Repository navigation
fix(publication): resume accepted tuple batch retries - #1152
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 13, 2026, 12:17 AM ET / 04:17 UTC. ClawSweeper reviewWhat this changesThe PR allows an actively owned exact-review batch to reuse a terminal publication receipt after apply-only tuple drift, and lets evidence-proven stale tuple failures use existing newer-head supersession. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer review: the repair is not on current main, and the focused regressions plus committed Docker-backed loopback proof support the proposed boundary. Likely related people
Priority: P2 Review scores
Verification
How this fits togetherExact-review workflows submit signed publication batches to the queue, which stores canonical report tuples and then completes lifecycle effects. A dead-letter operator separately reconciles failed publication rows against live pull-request heads and canonical records. flowchart LR
A[Exact-review workflow batch] --> B[Queue publication endpoint]
B --> C{Active fence validation}
C -->|Terminal receipt| D[Reuse canonical receipt]
C -->|New tuple| E[Validate and store tuple]
D --> F[Lifecycle post-effects]
E --> F
G[Dead-letter inventory] --> H[Evidence-gated supersede or recovery]
Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the narrow active-fence receipt reuse and retain the existing evidence and revalidation gates for every stale-head resolution. Do we have a high-confidence way to reproduce the issue? Yes: the committed red/green record identifies current main 56cb78d and reproduces the changed-byte batch retry as HTTP 400, then exercises the repaired Worker and operator paths through loopback fixtures. Is this the best way to solve the issue? Yes: active batch ownership and a terminal canonical receipt are the narrowest boundaries for accepting apply-only byte drift, while direct conflicts remain strict and stale rows still need independent newer-head proof. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 56cb78d60734. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Summary
Root-cause the two major
tuple_protocol_invaliddead-letter fingerprints, repair the live batch retry path, and extend evidence-gated newer-head supersession to stale tuple failures without weakening current-head recovery.Root cause
18100482292fa5b48fd215110a0be3a7d261257e337fdd57b748bee5482efac9is exactly the digest ofError:invalid_direct_publication_plan. Before #1091, the Worker discarded validator detail, so this is an opacity bucket rather than one causal fingerprint. Nineteen of its 21 rows are mixed-casesteipete/CodexBarpublications. The adjacent first detailed row proves the old case-sensitive containment error (steipete/CodexBarversusrecords/steipete-codexbar/...), fixed by #1100. The two old lowercase rows lost their detail and are deliberately not guessed into that cause.02bf7196a153893877e10306cc15656861a515b38c70dbc4fa16b6e9faea6e7ais exactly the digest ofError:invalid_direct_publication_plan: conflicting direct publication retry. It covers pre-#1143 runs foropenclaw/openclaw#114173and#121562and post-#1143 command-originated protocol-v2 runs for#80396and#82540, so it is one cause across both generations—not a protocol-v2 or command-intake shape bug. After the canonical tuple was accepted, a later batch attempt reran guarded apply. Refreshedcurrent_item_*andapply_checked_atfields changed tuple bytes under the same fence/revision, and the immutable direct-plan guard rejected the replay before lifecycle post-effects could finish.Fix design
tuple_protocol_invalidnow enters fix(reconcile): supersede proven stale dead letters #1148's existing newer-head supersede path. The signed envelope/digest, repository, item number, PR type, complete status, exact live head, immediate live revalidation, ten-target cap, and 20-row cap are unchanged.workflow_cancelledremains excluded. A tuple row on the current head never reaches supersession and remains eligible for ordinary fresh recovery.Expected effect on the 30 tuple rows is evidence-dependent: proven older-head rows retire as
superseded; current-head eligible rows re-review and publish through the repaired path (or the already-deployed mixed-case fix); unproven or ineligible rows stay open. There is no reason-only bulk resolution.Proof
pr-behavior-proofconflicting direct publication retryand the tuple reason exclusion. GREEN returned 202/deduped for the active batch, retained first canonical content, preserved direct HTTP 400, superseded only the proven tuple row, leftworkflow_cancelledopen, and recovered the current-head tuple row.provider=local-container, leasecbx_e7a1213fcc2c(silver-barnacle-f1bf), imagenode:24-bookworm, committed source head080904359d54c6e2cdf9b0e314bf44471c09d196; focused behavior 176/176 pass. The later container docs gate was blocked because bounded raw sync omitted 36 unrelated historical proof artifacts, recorded as a limit rather than a pass.pnpm run checkpassed 3,405 tests: 3,396 pass, 0 fail, 9 platform skips, with static/docs/build/lint/coverage green.docs/proof/tuple-protocol-rootcause/contains the behavior contract, RED/GREEN record, source-blind report, transcript, receipt, hashes, secret scan, and cleanup state.OpenClaw Bay is unaffected. This is queue-owned publication replay and operator policy; Bay remains observer-only and gains no queue, workflow, GitHub, recovery, deploy, or rollback action.
No changelog change: this branch intentionally leaves release-owned history untouched.