Repository navigation
fix(workflow): prioritize superseded batch receipts - #990
Conversation
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed July 31, 2026, 11:03 PM ET / August 1, 2026, 03:03 UTC. ClawSweeper reviewWhat this changesMoves canonical Merge readinessKeep open. Current main still evaluates the stale artifact requeue plan before a canonical Priority: P2 Review scores
Verification
How this fits togetherThe exact-review batch publisher reads per-item artifacts and canonical Worker receipts after a batch commit, then emits either a lifecycle terminal handoff, a router handoff, or a source-drift requeue. This change affects the decision that turns a confirmed canonical supersession into a terminal lifecycle result rather than retrying an artifact-owned post-effect. flowchart LR
A[Batch item artifact] --> B[Canonical receipt lookup]
B --> C{Receipt is superseded?}
C -->|Yes| D[Terminal lifecycle handoff]
C -->|No| E{Artifact disposition}
E -->|Source drift| F[Requeue post-effect]
E -->|Other terminal state| D
D --> G[Post-effects completed]
Decision needed
Why: The code repair is narrow, but the remaining merge condition is an operational safety threshold for a live exact-review workflow rather than a mechanical code defect that automation can resolve. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the canonical-receipt-first ordering, retain the artifact-originated source-drift path for non-canonical supersession, and manually merge only after the stated lifecycle-health observation criteria are evidenced. Do we have a high-confidence way to reproduce the issue? Yes. Current main visibly checks the stale requeue disposition before the canonical Is this the best way to solve the issue? Yes. Giving a canonical superseded receipt precedence is the narrowest repair because it preserves artifact-originated supersession and source-drift recovery for cases without that canonical terminal result. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against b07ab751813c. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@clawsweeper re-review |
Summary
Corrects the batch post-effect precedence after #952: a canonical
supersededreceipt now wins before a stale artifact's terminal plan can enqueue a source-drift retry or select a conflicting terminal lifecycle disposition.Problem
The batch finalizer accepted a canonical
supersededreceipt but evaluated artifact-owned requeue/terminal-plan conditions first. A stale artifact could therefore trigger post-effects that conflicted with the canonical outcome. Worker projection validation kept the durable lifecycle safe, but the workflow could retry those harmless post-effects indefinitely.Implementation
receipt_outcome=supersededthe first terminal decision after receipt validation.outcome_kind=supersededin its existing position, preserving the source-drift recovery path.Validation
actionlintis not installed on this Windows host. The focused Linux test parses the workflow and runsbash -nfor everyrun:step./bin/bash. This PR adds no Windows support, platform policy, or CI change.Real Behavior Proof
superseded, without executing the stale artifact's source-drift requeue post-effect.Finalize healthy members under a fenced heartbeatpost-effect loop in.github/workflows/exact-review-batch-publish.yml.eligibleartifact withrequeueLatestExpected=trueis paired with a matching canonical receipt whose outcome issuperseded. The controlled endpoint rejects any stale/internal/exact-review/enqueuecall and accepts only the terminal-disposition handoff.mcr.microsoft.com/playwright:v1.60.0-noble,--no-hydrate, executing the complete current finalizerrun:block extracted from the workflow with controlledpnpm,jq, and HTTP seams.kind=superseded; no stale requeue endpoint was called;postEffectsRequiredandpostEffectsCompletewere both written.Inspectable redacted finalizer trace
The following is the assertion transcript emitted after the controlled execution of the workflow's complete extracted finalizer
run:block. The harness suppresses target, fence, HMAC/header, and local lease values; it prints only these fixed, safe assertions.This extract contains no credential material, HMAC/signature value, real target/fence key, lease ID, URL query token, or production endpoint.
Codex Review
codex review --uncommitted: clean; no accepted/actionable findings.codex review --base origin/main: clean; no accepted/actionable findings.Risks and rollout
This is an ordering-only workflow correction. It affects only canonical receipt supersession and leaves artifact-originated supersession/source-drift behavior unchanged.
Merge authorization
The prior CSW-077 operational stability requirement is superseded and does not apply to this PR. This exact head/body is authorized for a manual squash merge after live preflight confirms all of the following:
SUCCESSorSKIPPED.MERGEABLE/CLEAN, with no requested changes, blocking label/ruleset condition, or automerge request.No gate, queue, Cloudflare/Bay, production, replay, automerge, or merge mutation is included in this PR.
Links
Follow-up to #952 and related lifecycle work for #898.