Repository navigation
fix: fence exact-review batch publication identity - #947
Conversation
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed July 29, 2026, 7:00 PM ET / 23:00 UTC. ClawSweeper reviewWhat this changesSeparates canonical record target keys from exact queue fence keys across exact-review batch publication, Worker validation, durable receipts, CLI outcomes, and workflow post-effect gating. Merge readinessKeep this draft PR open for maintainer review. It addresses the active publication-protocol defect tracked by #898 with a coherent dual-identity design and substantial controlled proof, but the durable receipt and fence contract still needs the roadmap owner’s explicit approval before landing. Priority: P1 Review scores
Verification
How this fits togetherExact-review batches publish review records from the queue into ClawSweeper’s canonical Worker/Durable Object state. Queue members use decorated fence keys for ownership while canonical records use bare repository-and-item keys, and this change carries both identities through publication and receipt handling. flowchart LR
A[Exact-review batch manifest] --> B[Prepared publication plan]
B --> C[Canonical target key]
B --> D[Exact queue fence key]
C --> E[Worker canonical tuple validation]
D --> F[Queue and batch ownership check]
E --> G[Durable publication receipt]
F --> G
G --> H[Workflow post-effect gate]
Decision needed
Why: The patch is a focused repair for a documented current defect, but it establishes a durable Worker/queue protocol whose permanent semantics must be confirmed by the roadmap owner rather than inferred from a contributor branch. Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Approve or narrow the Workstream 1 dual-identity contract, then land this focused implementation only if the receipt migration preserves legacy deduplication and the exact-fence ownership boundary remains the sole authorization path. Do we have a high-confidence way to reproduce the issue? Yes—high-confidence source and production-run evidence in #898 identifies the current failure path: a decorated publication fence is forwarded where canonical validation requires a bare target key. This review did not independently rerun the failure against the PR base. Is this the best way to solve the issue? Unclear—the dual-identity approach directly addresses the documented mismatch and preserves ownership fencing, but the durable receipt and retry contract needs explicit roadmap-owner approval before it becomes the accepted permanent interface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8365a79af804. 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
|
Summary
Implements the CSW-075 Workstream 1 post-cutover publication contract: batch state publication now carries a typed dual identity, with a bare canonical target key separated from the exact decorated queue fence key.
Related to #898. CSW-073 remains the audit and approval record.
Problem
The batch queue owns decorated keys such as
owner/repo#42@publish:run:attempt, while canonical state validation accepts onlyowner/repo#42. Treating either representation as the other loses fencing or fails validation. Retried and concurrent batches also need per-member durable outcomes without allowing a stale fence to overwrite current canonical state.Implementation
canonicalTargetKeyandfenceKeyto batch mutation plans, direct-publication payloads, Worker validation, and durable publication receipts.accepted,deduped,superseded,retryable, orpermanent) and continue healthy members when a peer plan is invalid.acceptedordedupedreceipt. Source-drift supersession keeps its separate fenced route.Validation
pnpm run build:repairpnpm run build:dashboardnode --test test/dashboard-worker.test.ts test/exact-review-publication-batches.test.ts test/repair/exact-review-batch-cli.test.ts test/repair/exact-review-batch-publisher.test.tsmcr.microsoft.com/playwright:v1.60.0-noble): the same builds plustest/repair/exact-review-batch-workflow.test.ts.git diff --checkactionlintis not installed on the host. The workflow’s Bash syntax test is a known baseline failure through this host'sbash.exe/docker-desktopWSL route; the controlled Linux proof above exercised and passed that fixture. No platform files or CI matrix were changed.Real Behavior Proof
Claim. A state-publication batch preserves a bare canonical target independently from the exact fence, fences ownership at the Worker, isolates poison members, and can retry publication transport without duplicating the stable effect path.
Exercised surface. The controlled Worker/Durable Object SQLite fixture exercised
/internal/exact-review/publication-batch-results, batch membership fencing, direct-publication durable receipts, the batch CLI receipt/outcome protocol, and the existing batch workflow post-effect selector.Scenarios and observed result.
permanent; its healthy peer reachesacceptedand is the only peer posted to the Worker.acceptedordeduped).Command/environment.
Artifact/trace. Local-container lease
cbx_9230d8582b40(amber-krill-8f5d), stopped automatically. It synced the exact dirty branch, built repair/dashboard, and reported 337 passing tests with exit code 0.Limits. This is a controlled Linux Worker/R2-style fixture with mocked external fetches; it does not mutate production Worker/R2 state, live queues, GitHub effects, workflows, or review gates.
Codex review closeout
codex review --uncommitted— final result: no actionable correctness issues. Earlier findings on post-effect gating, reclaimed receipts, legacy dual identity, fence-local revision ordering, and durable source-head staleness were accepted, repaired, and reproven.origin/mainat8365a79af8(docs-only docs: clarify contributor proof lifecycle #945), thencodex review --base origin/main— no actionable correctness issues.Risks and non-goals
This intentionally does not implement Workstream 2 Completed/command-acknowledgement semantics, change Bay/Overview presentation, broaden scheduler policy, alter replay behavior, expand platform support, add CI, or mutate production state. The remaining evidence limit is live production behavior, which this PR deliberately does not exercise.