Skip to content

feat(orch): migrate orchestration consumers to selected-work portfolio basis (#1706 PR B) - #8325

Merged
EffortlessSteven merged 10 commits into
mainfrom
feat/1706-pr-b-consumers
Oct 17, 2026
Merged

EffortlessSteven merged 10 commits into
mainfrom
feat/1706-pr-b-consumers

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

Delivery slice PR B of 4 for #1706 (merged as squash 70d053fb7). Migrates all nine orchestration/issue-lifecycle consumers onto the shared RIPR-SPEC-0244 selected-work/portfolio-basis contract; each consumer reuses the shared identity law engine instead of forking one. The old singleton orchestrator was retired in #1701, so these consumers are rebuilt on the new basis rather than patched in place.

Consumer migration table

Consumer Issue Spec Command Commit
Task/result/receipt schemas #1633 RIPR-SPEC-0269 cargo xtask work result check [--corpus <dir>] [--json] e83b83f
Local + durable claims #1635 / #1647 RIPR-SPEC-0270 cargo xtask work claim check [--corpus <dir>] [--json] 982bd18
Wave planning #1634 RIPR-SPEC-0271 cargo xtask work wave check [--corpus <dir>] [--json] 7607347
Role-scoped context packets #1632 RIPR-SPEC-0272 cargo xtask work context check [--corpus <dir>] [--json] 16b3efc
Root-thread synthesis #1636 RIPR-SPEC-0273 cargo xtask work synthesis check [--corpus <dir>] [--json] b151683
Burn-down / closeout #1648 RIPR-SPEC-0274 cargo xtask work burndown check [--corpus <dir>] [--json] 41cf7b0
Issue intake #1644 RIPR-SPEC-0275 cargo xtask work intake check [--corpus <dir>] [--json] 66143fe
Plan dispositions #1646 RIPR-SPEC-0276 cargo xtask work plan check [--corpus <dir>] [--json] fc118ba
Codex adapter delegations #1637 / #1649 RIPR-SPEC-0277 cargo xtask work adapter check [--corpus <dir>] [--json] 07bb013

Corpus digest fix (commit 1178aef)

The first gate run failed check-fixture-contracts with digest drift on the three earliest corpora. Root cause: the nine work_*_identity corpora recorded their provenance sha256 digests over Windows CRLF working-tree bytes, while .gitattributes pins * text=auto eol=lf — git stores LF blobs and CI checkouts hash LF bytes. The recorded digests were recomputed over LF bytes (now byte-equal to the git blob sha256 for all nine corpora), and the gate re-run passed end-to-end.

Fixture coverage checklist (issue "Required fixtures")

  • 1 Selected issue in one campaign — result/claim corpora (9105, campaign-rust-repair member); reused by plan-01/plan-03 and adapter scenarios
  • 2 Selected issue in several related campaigns — PR A corpus reused by all corpora (9105 multi-campaign)
  • 3 Valid standalone work, no campaign — result-02 / claim-02 / plan-02 / adapter negatives (9106, zero campaign refs)
  • 4 Disjoint cross-campaign waves — wave-01 (editor-ux + rust-repair, disjoint exclusive resources); adapter-03 (1693)
  • 5 Open PR selected for repair — result-03 / claim-01 (9101 repair_review, PR 8801, wt-9101)
  • 6 Legacy packet fails to authorize a writer — PR A scenario-06 (reject_legacy_authority); legacy refs read-only with no authority pinned per consumer (result-04, claim-05, adapter-05 case 5)
  • 7 Snapshot changes, issue/head compatible — PR A scenario-07 reused; stale-basis routes pinned per consumer (result-05 case 2, claim-03 case 2, wave-05 case 0)
  • 8 Portfolio change introduces overlap, forces reconcile — PR A scenario-08 reused (overlap visibility law runs inside every consumer via the shared engine)
  • 9 Wrong repo/basis/head/... fails visibly — result-05 (8 wrong-input cases), wave-05, claim interactions, plan-05 (6 cases), adapter-05 (6 cases)
  • 10 Burn-down partial after merge — burndown corpus (github/issues: join specs, work items, PRs, verification, and closeout into an evidence-backed burn-down state #1648, spec 0274); PR A scenario-10 pins the projection state reused by plan-04 and adapter-05
  • 11 Fresh Codex root resume from artifacts — PR A scenario-11 reused; adapter-04 (reviewer resumed from committed artifacts only); no active.toml/chat authority bytes in any corpus (validator-pinned per consumer)
  • 12 Narrow one-file issue stays single-agent — wave-02 (9202 own wave despite active campaigns)

Compatibility notes

Legacy legacy_active_goal_ref / legacy_current_work_item_ref are accepted only through explicit schema compatibility on results, claims, plans and adapter delegations: they resolve to historical/relevant campaign references, emit migration posture, and grant no write, readiness, merge or closeout authority. Corpus validators (registered in check-fixture-contracts) pin the read-only authority posture and fail on active.toml/chat references. All nine corpora reuse the committed RIPR-SPEC-0244 captured directories by relative reference — no captured bytes are duplicated — and each carries sha256-bound provenance over LF bytes.

Verification

Per push: cargo fmt, cargo clippy -p xtask --bins --tests -- -D warnings, focused cargo test -p xtask --bin xtask <module> (119 tests green across the nine modules on the final head), and check-spec-format, check-spec-numbering, check-doc-index, check-traceability, check-fixture-contracts, check-command-catalog, check-output-contracts, check-changelog-fragments, check-static-language, check-file-policy, check-local-context, check-no-panic-family, check-allow-attributes all pass locally. Hosted gate run (re-dispatch after the digest fix): https://github.com/EffortlessMetrics/ripr-swarm/actions/runs/39005779538 — success on head 1178aef.

Non-goals / residuals for later slices

Refs #1706

#1633 consumer of #1706 delivery slice PR B: adds RIPR-SPEC-0269 and
xtask/src/work_result_identity.rs. Every committed WorkTaskResultV1 row
must bind the repository, the compiled portfolio-snapshot identity, the
basis head and the full RIPR-SPEC-0244 SelectedWorkIdentityV1 it extends;
the shared selection law engine runs inside the result check, never a
forked one. A result for another repository, portfolio snapshot,
issue/action, stale basis, unrecorded worktree or wrong exact head fails
stale/wrong-input with the exact recompile/reconcile route; an
evidence-free result fails as a claim-not-result; legacy
active-goal/current-work-item refs resolve read-only with migration
posture and grant no authority.

Adds cargo xtask work result check [--corpus <dir>] [--json], a five-
scenario committed corpus (14 pinned cases) reusing the RIPR-SPEC-0244
captured directories by reference, sha256-bound provenance, twelve tests,
and the spec/traceability/doc-artifact/catalog/fixture registrations.

Proof: cargo test -p xtask --bin xtask work_result_identity (12/12);
check-spec-format, check-spec-numbering, check-doc-index,
check-traceability, check-fixture-contracts, check-command-catalog,
check-output-contracts, check-changelog-fragments, check-static-language,
check-file-policy, check-local-context, check-no-panic-family,
check-allow-attributes all pass; clippy -D warnings clean; fmt clean.

Refs #1706
#1635/#1647 consumer of #1706 delivery slice PR B: adds RIPR-SPEC-0270
and xtask/src/work_claim_identity.rs. Every committed WorkClaimV1 row
binds one selected issue/work item/action and the exact portfolio basis;
the shared RIPR-SPEC-0244 selection law engine runs inside the claim
check, never a forked one. The schema has no priority, default-campaign,
agent-assignment, CI-wait or progress fields, so claiming one item never
asserts repository-wide priority. A stale basis keeps the claim recorded
as stale_requires_reconcile - reconcile, never release or takeover; a
duplicate claim id, one worktree serving two selections and one selection
double-claimed each fail with the exact law/route pair while the
occupying claim stays active. Legacy active-goal/current-work-item refs
resolve read-only with migration posture and grant no authority.

Adds cargo xtask work claim check [--corpus <dir>] [--json], a five-
scenario committed corpus (9 pinned cases) reusing the RIPR-SPEC-0244
captured directories by reference, sha256-bound provenance under the
work_claim_identity_provenance.v1 schema, thirteen tests, and the
spec/traceability/doc-artifact/catalog/fixture registrations.

Proof: cargo test -p xtask --bin xtask work_claim_identity (13/13),
work_result_identity (12/12), work_selection_identity (24/24);
check-spec-format, check-spec-numbering, check-doc-index,
check-traceability, check-fixture-contracts, check-command-catalog,
check-output-contracts, check-changelog-fragments, check-static-language,
check-file-policy, check-local-context, check-no-panic-family,
check-allow-attributes all pass; clippy -D warnings clean; fmt clean.

Refs #1706
#1634 consumer of #1706 delivery slice PR B: adds RIPR-SPEC-0271 and
xtask/src/work_wave_identity.rs. Every committed WorkWavePlanV1 row
consumes the complete selected candidate set and partitions it into
waves over the explicit resource vocabulary campaign-record:<id>,
portfolio-schema, spec-ledger, output-contract:<id>, issue:<n>, pr:<n>
and worktree:<path>; the shared RIPR-SPEC-0244 selection law engine runs
over each embedded selection, never a forked one. The retired generic
active-goal resource and every non-explicit shape fail closed with the
explicit-vocabulary route; portfolio-schema and spec-ledger are read-only
shareable references that never serialize unrelated work; shared
exclusive resources, over-capacity waves, unassigned candidates and
stale bases each fail with the exact recompile/reconcile route; disjoint
cross-campaign waves are admitted.

Adds cargo xtask work wave check [--corpus <dir>] [--json], a six-
scenario committed corpus (7 pinned cases) reusing the RIPR-SPEC-0244
captured directories by reference, sha256-bound provenance under the
work_wave_identity_provenance.v1 schema, thirteen tests, and the
spec/traceability/doc-artifact/catalog/fixture registrations.

Proof: cargo test -p xtask --bin xtask work_wave_identity (13/13),
work_claim_identity (13/13), work_result_identity (12/12),
work_selection_identity (24/24); check-spec-format, check-spec-numbering,
check-doc-index, check-traceability, check-fixture-contracts,
check-command-catalog, check-output-contracts, check-changelog-fragments,
check-static-language, check-file-policy, check-local-context,
check-no-panic-family, check-allow-attributes all pass; clippy -D
warnings clean; fmt clean.

Refs #1706
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

  • Ask an admin to enable usage-based reviews

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Next included review available in 42 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 61 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Essentials
  • Run ID: fa3c579d-c3ae-4ba9-a775-2129b5be23b7
📥 Commits

Reviewing files that changed from the base of the PR and between 577a95a and 1178aef.

📒 Files selected for processing: 81
  • .ripr/traceability.toml
  • changelog.d/1706-burndown-selected-work-basis.md
  • changelog.d/1706-codex-adapter-selected-work-basis.md
  • changelog.d/1706-context-packets-selected-work-basis.md
  • changelog.d/1706-durable-claims-selected-work-basis.md
  • changelog.d/1706-issue-intake-selected-work-basis.md
  • changelog.d/1706-plan-dispositions-selected-work-basis.md
  • changelog.d/1706-root-synthesis-selected-work-basis.md
  • changelog.d/1706-task-result-selected-work-basis.md
  • changelog.d/1706-wave-planning-selected-work-basis.md
  • docs/specs/README.md
  • docs/specs/RIPR-SPEC-0269-task-result-selected-work-basis.md
  • docs/specs/RIPR-SPEC-0270-durable-claims-selected-work-basis.md
  • docs/specs/RIPR-SPEC-0271-wave-planning-selected-work-basis.md
  • docs/specs/RIPR-SPEC-0272-context-packets-selected-work-basis.md
  • docs/specs/RIPR-SPEC-0273-root-synthesis-selected-work-basis.md
  • docs/specs/RIPR-SPEC-0274-burndown-selected-work-basis.md
  • docs/specs/RIPR-SPEC-0275-issue-intake-selected-work-basis.md
  • docs/specs/RIPR-SPEC-0276-plan-dispositions-selected-work-basis.md
  • docs/specs/RIPR-SPEC-0277-codex-adapter-selected-work-basis.md
  • fixtures/work_adapter_identity/SPEC.md
  • fixtures/work_adapter_identity/author_corpus.py
  • fixtures/work_adapter_identity/corpus.json
  • fixtures/work_adapter_identity/provenance.json
  • fixtures/work_burndown_identity/SPEC.md
  • fixtures/work_burndown_identity/author_corpus.py
  • fixtures/work_burndown_identity/corpus.json
  • fixtures/work_burndown_identity/provenance.json
  • fixtures/work_claim_identity/SPEC.md
  • fixtures/work_claim_identity/author_corpus.py
  • fixtures/work_claim_identity/corpus.json
  • fixtures/work_claim_identity/provenance.json
  • fixtures/work_context_identity/SPEC.md
  • fixtures/work_context_identity/author_corpus.py
  • fixtures/work_context_identity/corpus.json
  • fixtures/work_context_identity/provenance.json
  • fixtures/work_intake_identity/SPEC.md
  • fixtures/work_intake_identity/author_corpus.py
  • fixtures/work_intake_identity/corpus.json
  • fixtures/work_intake_identity/provenance.json
  • fixtures/work_plan_identity/SPEC.md
  • fixtures/work_plan_identity/author_corpus.py
  • fixtures/work_plan_identity/corpus.json
  • fixtures/work_plan_identity/provenance.json
  • fixtures/work_result_identity/SPEC.md
  • fixtures/work_result_identity/author_corpus.py
  • fixtures/work_result_identity/corpus.json
  • fixtures/work_result_identity/provenance.json
  • fixtures/work_synthesis_identity/SPEC.md
  • fixtures/work_synthesis_identity/author_corpus.py
  • fixtures/work_synthesis_identity/corpus.json
  • fixtures/work_synthesis_identity/provenance.json
  • fixtures/work_wave_identity/SPEC.md
  • fixtures/work_wave_identity/author_corpus.py
  • fixtures/work_wave_identity/corpus.json
  • fixtures/work_wave_identity/provenance.json
  • policy/doc-artifacts.toml
  • xtask/src/command.rs
  • xtask/src/dispatch.rs
  • xtask/src/fixture_contracts/mod.rs
  • xtask/src/main.rs
  • xtask/src/reports/fixtures.rs
  • xtask/src/work_adapter_identity.rs
  • xtask/src/work_adapter_identity/tests.rs
  • xtask/src/work_burndown_identity.rs
  • xtask/src/work_burndown_identity/tests.rs
  • xtask/src/work_claim_identity.rs
  • xtask/src/work_claim_identity/tests.rs
  • xtask/src/work_context_identity.rs
  • xtask/src/work_context_identity/tests.rs
  • xtask/src/work_intake_identity.rs
  • xtask/src/work_intake_identity/tests.rs
  • xtask/src/work_plan_identity.rs
  • xtask/src/work_plan_identity/tests.rs
  • xtask/src/work_result_identity.rs
  • xtask/src/work_result_identity/tests.rs
  • xtask/src/work_selection_identity.rs
  • xtask/src/work_synthesis_identity.rs
  • xtask/src/work_synthesis_identity/tests.rs
  • xtask/src/work_wave_identity.rs
  • xtask/src/work_wave_identity/tests.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed findings

  • xtask/src/work_result_identity/tests.rs:144 — 'work_result_identity_basis_facts_for_corpus_authoring' prints AUTHORING_FACT lines but the function returns Ok(()) unconditionally. There is no assertion: the test cannot fail and the printed facts are not asserted against the committed corpus's HEAD/SNAPSHOT values. Either assert basis.repository.default_branch_sha == HEAD constant (or a pinned literal) and snapshot_identity matches the recorded SNAPSHOT_MAIN, or remove the test — it is currently smoke-only.
  • captured_worktrees derives worktree paths from captured.local_state, captured.claims, and captured.pull_requests, but the corpus uses <root>/wt-9107-a literals while portable_path relativizes against local_state.root. If the captured root does not start with <root>, the relativization produces a non-portable path that silently fails the worktree-resource check. Add an assertion that portable_path returns a forward-slash relative path with no <root> placeholder, or document the exact spelling contract. (xtask/src/work_wave_identity.rs:753).
  • The wave author_corpus.py and work_result_identity/author_corpus.py are not exercised in any test. If the committed JSON ever drifts from the regeneration script, the test suite passes but future regenerations silently rewrite history. Add a check that re-runs python3 fixtures/*/author_corpus.py in a tmp dir and diffs against committed JSON.
  • 'work_claim_identity_duplicate_claim_id_fails_closed' mutates scenario.cases[1].claim.claim_id to equal case[0].claim_id, but the same test also keeps the already-present subject_identity/reconcile_selection double-claim law pinned with TWO identical violations. The test only verifies that violations.len()==2, which is true whether the duplicate-id law fires or only the double-claim law fires twice — the new duplicate-id branch is therefore not discriminated. Add a separate expect_violations tuple that pins {SubjectIdentity/RecompileBasis? no — SubjectIdentity} for duplicate-id and SubjectIdentity for double-claim, asserting the multiset exactly so a missing duplicate-id violation cannot pass. (xtask/src/work_claim_identity/tests.rs:339).

Verification questions

  • Confirm workResultCheck/WorkClaimCheck/WorkWaveCheck dispatch arms are registered but the parser pattern 'rest[2..]' silently passes extra args; --help/-h only handled inside the command not at parse time.
  • Confirm mutation-negative tests rely on crate::acquire_test_cwd_write_guard and chdir into a sandbox, then enumerate sandbox for any writes outside the allowed report paths; this is sound but does not prove the underlying compiler (compile_work_portfolio/load_work_captured_dir) cannot mutate during fixture compile.
  • Confirm per-spec the corpus count is 5/5/6 scenarios with 14/9/7 pinned cases; the spec-text 'Required Evidence' totals diverge (result spec claims 14, claim spec claims 9, wave spec claims 7) but the committed corpora embed those exact case counts in the JSON assertions.
  • Confirm authored corpus is mostly hand-edited JSON, not regenerated by author_corpus.py.
  • Confirm multiple loader-fails-closed tests rely on serde's required-field errors rather than the loader's own checks.
  • Confirm sibling-path: provenance digests in committed fixture corpora pin SHA-256 of corpus.json only; SPEC.md and author_corpus.py are listed under SHA-binding convention but not separately bound here (they re-derive corpus.json). This matches the PR A pattern but is a sibling-pattern note for the proof broker rather than a defect.

Evidence gaps

  • Model proof intent was rejected by deterministic validation.

Parked follow-ups

  • test_result/test_claim/test_wave duplicate-id branch in code (WorkClaim/WorkResult/WorkWave check_* functions) is exercised only by one assertion that does not discriminate; live cargo-test receipt is pending so this is parked until green.

@EffortlessSteven

Copy link
Copy Markdown
Member Author

Required gate dispatched manually (ready-toggle did not surface the routed check): https://github.com/EffortlessMetrics/ripr-swarm/actions/runs/38998294048

#1632 consumer of #1706 delivery slice PR B: adds RIPR-SPEC-0272 and
xtask/src/work_context_identity.rs. Every committed WorkContextPacketV1 row
must bind the repository, the compiled portfolio-snapshot identity, the
basis head and the full RIPR-SPEC-0244 SelectedWorkIdentityV1 it compiles
context for; the shared selection law engine runs inside the context
check, never a forked one. The delegation scope is a closed bounded
vocabulary (selected_work_only / selected_work_plus_relevant_overflow, no
repository-wide scope) and every carried context/overflow reference must
stay relevant to the bound selection, so campaign references remain
context, never permission and a standalone issue with no campaign
placement still compiles a valid packet. An unresolvable legacy ref, an
irrelevant carried reference, unbounded overflow, an evidence-free packet,
a wrong repository or a stale basis fails with the exact
recompile/reconcile route; legacy active-goal/current-work-item refs
resolve read-only with migration posture and grant no authority.

Adds cargo xtask work context check [--corpus <dir>] [--json], a six-
scenario committed corpus (11 pinned cases) reusing the RIPR-SPEC-0244
captured directories and selection packets by reference, sha256-bound
provenance, fourteen tests, and the spec/traceability/doc-artifact/
catalog/fixture registrations.

Proof: cargo test -p xtask --bin xtask work_context_identity (14/14);
check-spec-format, check-spec-numbering, check-doc-index,
check-traceability, check-fixture-contracts, check-command-catalog,
check-output-contracts, check-changelog-fragments, check-static-language,
check-file-policy, check-local-context, check-no-panic-family,
check-allow-attributes all pass; clippy -D warnings clean; fmt clean.

Refs #1706
#1636 consumer of #1706 delivery slice PR B: adds RIPR-SPEC-0273 and
xtask/src/work_synthesis_identity.rs. Every committed WorkSynthesisV1 row
must bind the repository, the compiled portfolio-snapshot identity, the
basis head and the full RIPR-SPEC-0244 SelectedWorkIdentityV1 it reports
on; the shared selection law engine runs inside the synthesis check, never
a forked one. The reported transition must match the selected action, so a
synthesis cannot silently report a different transition; every uncovered
or contradicted acceptance row must be named in the contradictions list,
so a synthesis can never hide a gap behind a green row; a reported
campaign ref outside the bound selection's campaign refs is a silent
switch that fails with the reconcile route; and the schema has no field
that could create another selected issue. Legacy active-goal/current-
work-item refs resolve read-only with migration posture and grant no
authority.

Adds cargo xtask work synthesis check [--corpus <dir>] [--json], a five-
scenario committed corpus (8 pinned cases) reusing the RIPR-SPEC-0244
captured directories and selection packets by reference, sha256-bound
provenance, fourteen tests, and the spec/traceability/doc-artifact/
catalog/fixture registrations.

Proof: cargo test -p xtask --bin xtask work_synthesis_identity (14/14);
check-spec-format, check-spec-numbering, check-doc-index,
check-traceability, check-fixture-contracts, check-command-catalog,
check-output-contracts, check-changelog-fragments, check-static-language,
check-file-policy, check-local-context, check-no-panic-family,
check-allow-attributes all pass; clippy -D warnings clean; fmt clean.

Refs #1706
#1648 consumer of #1706 delivery slice PR B: adds RIPR-SPEC-0274 and
xtask/src/work_burndown_identity.rs. Every committed WorkBurnDownV1 row
must bind the repository, the compiled portfolio-snapshot identity, the
basis head and the full RIPR-SPEC-0244 SelectedWorkIdentityV1 it tracks;
the shared selection law engine runs inside the burn-down check, never a
forked one. Issue completion derives from issue/spec acceptance,
implementation slices, PRs and exact-head review/proof evidence rows, and
campaign/work-item records are plan context only: a complete burn-down
over an open or stale evidence row fails with the reconcile route, so a
campaign record can never override current evidence. The current main
head the burn-down derives against must match the captured
default-branch head, an unknown campaign record fails closed, and legacy
active-goal/current-work-item refs resolve read-only with migration
posture and grant no authority.

Adds cargo xtask work burndown check [--corpus <dir>] [--json], a five-
scenario committed corpus (9 pinned cases, including the fixture-10
partial burn-down after one campaign work item merges with acceptance
still open) reusing the RIPR-SPEC-0244 captured directories and selection
packets by reference, sha256-bound provenance, fifteen tests, and the
spec/traceability/doc-artifact/catalog/fixture registrations.

Proof: cargo test -p xtask --bin xtask work_burndown_identity (15/15);
check-spec-format, check-spec-numbering, check-doc-index,
check-traceability, check-fixture-contracts, check-command-catalog,
check-output-contracts, check-changelog-fragments, check-static-language,
check-file-policy, check-local-context, check-no-panic-family,
check-allow-attributes all pass; clippy -D warnings clean; fmt clean.

Refs #1706
#1644 consumer of #1706 delivery slice PR B: adds RIPR-SPEC-0275 and
xtask/src/work_intake_identity.rs. Intake consumes the portfolio snapshot,
relevant campaigns/plans, open overlapping PRs and claims, the current
main and accepted contracts instead of one active-goal input: every
committed WorkIntakeV1 row binds the repository, the compiled
portfolio-snapshot identity, the basis head, the current main and one
issue the captured portfolio records. Campaign placement and relevant
campaigns must be recorded campaigns, but an out-of-campaign issue may
still qualify because placement remains a later root/planning decision;
the schema has no required placement and no placement grants authority.
An empty contract set, an unknown issue, a wrong repository, a wrong
current main or a legacy authority attempt fails with the exact
recompile/reconcile route; legacy active-goal/current-work-item refs
resolve read-only with migration posture and grant no authority.

Adds cargo xtask work intake check [--corpus <dir>] [--json], a five-
scenario committed corpus (11 pinned cases) reusing the RIPR-SPEC-0244
captured directories by reference, sha256-bound provenance, twelve tests,
and the spec/traceability/doc-artifact/catalog/fixture registrations.

Proof: cargo test -p xtask --bin xtask work_intake_identity (12/12);
check-spec-format, check-spec-numbering, check-doc-index,
check-traceability, check-fixture-contracts, check-command-catalog,
check-output-contracts, check-changelog-fragments, check-static-language,
check-file-policy, check-local-context, check-no-panic-family,
check-allow-attributes all pass; clippy -D warnings clean; fmt clean.

Refs #1706

Copy link
Copy Markdown
Member Author

Current-head scope/acceptance mismatch (reviewed 66143feb01388b7270751b92ce655079339e7525; no runtime execution claimed).

The PR description says PR B migrates only three consumers (result #1633, claim #1635/#1647, wave #1634), and explicitly defers context #1632 and synthesis #1636 to B2, plus intake #1644 and burn-down #1648 to PR C. The actual 65-file diff already adds all seven executable xtask command routes in xtask/src/{command,dispatch,main}.rs, with new 0269–0275 specs, validators, corpora, tests and command-catalog entries. The four supposedly deferred commands have substantial production implementation, not just placeholders:

This is a real review-denominator mismatch. An exact-head review against only the first three consumers would leave four newly shipped contract/validator surfaces unreviewed; declaring the other slices still to come would misstate the merged tree. Either split the four later slices back out under the existing #1706 owners, or deliberately accept a seven-consumer integrated PR and update its scope, issue/slice disposition and proof/review denominator accordingly. The first path respects the issue's PR B/B2/C boundaries and minimizes review blast radius; the second is acceptable only with seven-consumer qualification, not the current three-consumer claim.

The existing github-actions review already records concrete missing/discriminating controls (claim-ID duplicate, portable worktree paths, authoring provenance); those findings also need individual fix/refutation rather than a broad 'review ready' declaration. No second writer or hosted rerun was started.

…1706)

check-fixture-contracts hashes the corpus bytes it reads. The nine
work_*_identity corpora recorded sha256 digests computed over CRLF
working-tree bytes, while .gitattributes pins text=eol=lf, so CI checkouts
hashed the LF bytes and failed with digest drift. Renormalize the corpora
to LF and re-record each provenance digest over the LF bytes.
@EffortlessSteven

Copy link
Copy Markdown
Member Author

Gate repair for the check-fixture-contracts digest drift (infra #8254 re-dispatch).

Cause: the nine work_*_identity corpora recorded their provenance sha256 digests over CRLF working-tree bytes, while .gitattributes pins text=eol=lf, so the gate's CI checkout hashed the LF bytes and reported drift. The earlier run only flagged the three earliest corpora because it executed on head 7607347, before the later corpora existed; the same defect was latent in all nine.

Fix commit 1178aef: renormalize the corpora to LF and re-record each provenance digest over the LF bytes (verified: recorded digests now equal the git blob sha256 for all nine corpora). Local proof on the exact head: 119 focused tests green across the nine modules, and check-spec-format, check-spec-numbering, check-doc-index, check-traceability, check-fixture-contracts, check-command-catalog, check-output-contracts, check-changelog-fragments, check-static-language, check-file-policy, check-local-context, check-no-panic-family, check-allow-attributes all pass.

Re-dispatched gate run: https://github.com/EffortlessMetrics/ripr-swarm/actions/runs/39005779538

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed findings

  • Tracing the claim_state mapping in work_claim_identity: claim_state derives from violation list length plus presence of BasisIdentity; a stale-and-conflicting claim (BasisIdentity + WorktreeIdentity) renders 'stale_requires_reconcile' because BasisIdentity wins the state string, but the Markdown prints only the first violation in its current loop, so an operator reading work-claim-check.md sees a stale_basis narrative without the worktree overlap name unless they re-read the JSON projection. Not a blocker; humans should use --json when both fire.
  • RIPR-SPEC-0269 list says 'eight wrong-input failures' for result-05 but the corpus pins exactly eight cases (index 0..7), and the spec text says 'five corpus scenarios' — minor doc-vs-corpus drift worth a doc patch.
  • xtask/src/command.rs:181 — XtaskCommand gains nine variants in one PR. Recommend documenting the full route list (work {result,claim,wave,context,synthesis,burndown,intake,plan,adapter} check) in PR description and README so reviewers do not under-count the delivery slice. No code change required.
  • xtask/src/work_result_identity/tests.rs:99 — work_result_identity_basis_facts_for_corpus_authoring test only prints AUTHORING_FACT lines and returns Ok(()) without asserting the basis facts against committed corpus values. Per the seeded review summary it is smoke-only. Recommend adding a pinned assertion (default_branch_sha matches recorded HEAD constant and snapshot_identity matches recorded SNAPSHOT_MAIN) or removing the test.
  • xtask/src/work_wave_identity.rs:110 — captured_worktrees() derives worktree spellings from local_state.root via portable_path, but corpus fixtures use literal '/wt-9107-a' paths — if local_state.root does not start with the literal '' placeholder the relativized path silently fails the worktree-resource check.

Verification questions

  • Confirm work_claim_identity reuses crate::work_selection_identity::issue_identity referenced via fully-qualified path in legacy_current_work_item_ref check; sourcing is consistent with sibling modules.
  • Confirm xtask/src/work_burndown_identity.rs:1023 — Validate path: digest-drift failure branch in validate_work_burndown_identity_fixture_corpus emits 'work-result:sha256:{}' in its formatted message — copy-pasted from work_result_identity. While the provenance is consumed only for human-readable diagnostics, the literal prefix 'work-result' next to a burn-down fixture drift would mislead the next operator reading check-fixture-contracts output. Should report work-burndown:sha256: so the prefix matches the corpus identity.
  • Confirm xtask uses acquire_test_cwd_write_guard for sandbox CWD tests but the guard definition and BlindJourney::sha256_hex live in modules outside this diff; cannot verify ordering guarantees.
  • Confirm seeded review thread raised the PR-scope mismatch (three vs seven consumers) and a missing smoke-only claim_facts_for_corpus_authoring test on work_result_identity. Both are resolved at lane scope: the scope question is policy/docs not test oracle; the AUTHORING_FACT test prints but never asserts.

Refuted

  • Sibling evidence paths prove this slice safe despite the ripr sensor failing.; refuted because: Available structural witnesses (tokmd, unsafe-review, ast-grep) do not by themselves cover the nine-corpus behavioral surface; safety remains a parked follow-up until cargo-test (scheduled-late) and a green ripr receipt land. Reporting it as covered would be a false-premise approval.

Evidence gaps

  • ripr sensor failed (exit code 2); planned but did not produce a receipt. Three sibling evidence paths (gitleaks/osv-scanner/cargo-audit) also skipped by config, leaving only unsafe-review, ast-grep and tokmd receipts as available structural witnesses for this diff.

Parked follow-ups

  • No divergent sibling helper tree detected. Each consumer mirrors the RIPR-SPEC-0244 pattern: schema DTO + CorpusV1 + load_corpus + CheckViewV1 + checkengine + runcheck + write_report + validate_fixture_corpus. Helper duplication risk is parked, not blocker.

@EffortlessSteven
EffortlessSteven marked this pull request as draft October 17, 2026 05:40
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review October 17, 2026 05:40
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@EffortlessSteven
EffortlessSteven merged commit 70d053f into main Oct 17, 2026
38 of 39 checks passed
@EffortlessSteven
EffortlessSteven deleted the feat/1706-pr-b-consumers branch October 17, 2026 06:06
EffortlessSteven added a commit that referenced this pull request Oct 17, 2026
…4932)

The first gate run flagged two verbatim captures under
check-local-context: a local F:\ path inside a third-party commit
message of the 41-commit compare payload and a .codex role-path inside
the PR #8325 body. The local-context policy removes rather than
allowlists real machine state, so the compare and the PR #8325 captures
are jq-reduced receipts (base/head SHAs, ahead/behind counts, merge
facts) that bind the same identities without third-party prose. Row
digests and provenance snapshot digests recompute over LF bytes; the
now-unneeded static-language allowlist entry for the compare capture is
dropped. Refs #4932
EffortlessSteven added a commit that referenced this pull request Oct 17, 2026
…on capture-time inconsistency

Graphite review on #8440 caught that provenance.captured_at recorded
02:27 local as if it were UTC while the Row B snapshot binds PR #8325
mergedAt 06:06:21Z — about 3h39m "after" the stated capture. The capture
session was internally consistent (the captures happened at 02:27 -0400
== 06:27 UTC, after every bound merge/close event); only the timezone
label was wrong.

- provenance.json: captured_at corrected to 2026-10-17T06:27:51Z, the
  true UTC instant of the capture session
- verify_real_rows_bindings now cross-checks capture-time consistency
  fail-closed: captured_at must not predate the latest mergedAt/closedAt
  event any bound snapshot records, and non-UTC event timestamps reject
- new adapter test capture_time_predating_a_bound_event_rejects pins
  the rejection
- RIPR-SPEC-0278 behavior section and the changelog record the
  cross-check

Refs #4932
EffortlessSteven added a commit that referenced this pull request Oct 17, 2026
…) (#8440)

* test(issue-lifecycle): capture real issue-to-merge closeout rows (#4932)

Two real (synthetic: false) issue_lifecycle_attempt.v1 rows join the
RIPR-SPEC-0218 counting law corpus:

- Row A binds the complete #7795 journey: issue snapshot -> PR #8285 ->
  green checks on head 1b4a5f6 -> squash merge f3fa41d -> issue CLOSED
  -> compare-verified current head at main b038650 (behind_by 0) ->
  burn-down closed with five covered acceptance predicates -> closeout
  completed.
- Row B binds the live negative control: PR #8325 squash-merged as
  70d053f while parent #1706 stays OPEN with ten uncovered acceptance
  rows and no current-head receipt -> merged_pending_closeout.

Every identity is verified with read-only gh commands recorded in
provenance.json; snapshot digests recompute fail-closed over LF bytes in
check-fixture-contracts; gaps GitHub does not record stay recorded as
limitations. Adapter tests (cargo test -p xtask issue_lifecycle_real_rows)
pin wrong-identity rejection, zero-subject verification, stale receipts,
uncovered acceptance, duplicate import dedup and synthetic/real separation.

Spec: RIPR-SPEC-0278. Refs #4932

* test(issue-lifecycle): reduce gh captures to context-clean receipts (#4932)

The first gate run flagged two verbatim captures under
check-local-context: a local F:\ path inside a third-party commit
message of the 41-commit compare payload and a .codex role-path inside
the PR #8325 body. The local-context policy removes rather than
allowlists real machine state, so the compare and the PR #8325 captures
are jq-reduced receipts (base/head SHAs, ahead/behind counts, merge
facts) that bind the same identities without third-party prose. Row
digests and provenance snapshot digests recompute over LF bytes; the
now-unneeded static-language allowlist entry for the compare capture is
dropped. Refs #4932

* test(fixtures): correct real-rows captured_at to UTC and fail closed on capture-time inconsistency

Graphite review on #8440 caught that provenance.captured_at recorded
02:27 local as if it were UTC while the Row B snapshot binds PR #8325
mergedAt 06:06:21Z — about 3h39m "after" the stated capture. The capture
session was internally consistent (the captures happened at 02:27 -0400
== 06:27 UTC, after every bound merge/close event); only the timezone
label was wrong.

- provenance.json: captured_at corrected to 2026-10-17T06:27:51Z, the
  true UTC instant of the capture session
- verify_real_rows_bindings now cross-checks capture-time consistency
  fail-closed: captured_at must not predate the latest mergedAt/closedAt
  event any bound snapshot records, and non-UTC event timestamps reject
- new adapter test capture_time_predating_a_bound_event_rejects pins
  the rejection
- RIPR-SPEC-0278 behavior section and the changelog record the
  cross-check

Refs #4932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant