Skip to content

fix(ci): resume partially published preparation receipts - #158174

Merged
vincentkoc merged 1 commit into
mainfrom
fix/pr-partial-publication-resume-20260925
Sep 25, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/pr-partial-publication-resume-20260925

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Interrupted PR preparation can leave a successful push receipt without the completed preparation receipt. Resuming currently rejects that valid partial publication, blocking further validation and landing. This happened while preparing #152311 and #155284.

User Impact

Maintainers can resume interrupted preparation from the recorded local and published heads without discarding recovery state or weakening landing gates. No product configuration, protocol, schema, or operator permission changes.

Why This Change Was Made

The preparation owner now resolves completed and intermediate publication receipts together, checks that their local/published head pairs form one ordered chain, and binds resumed checks to that chain. Receipt parsing accepts only the recorded fields and never evaluates receipt contents. The push path rechecks its receipt snapshot after the awaited GitHub lookup; a genuine no-op preserves the existing receipt bytes. Gate-dispatch failures remain failures.

The inconsistent-receipt tests protect recovery integrity; they do not claim that the normal publication producer creates forked receipt histories. The fix removes the completed-receipt-only decision and duplicate test setup, without adding a retry, fallback, or bypass.

Production: +122/-33 (net +89). The added code belongs to the existing publication lifecycle owner and establishes the missing receipt-validation contract. Tests/support: +1014/-559 (net +455), including relocation of 32 existing publication cases into the dedicated suite.

Evidence

@vincentkoc vincentkoc self-assigned this Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XL labels Sep 25, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 25, 2026 14:57
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 25, 2026, 11:05 AM ET / 15:05 UTC.

ClawSweeper review

What this changes

The PR lets native PR preparation resume from verified intermediate push receipts and adds publication and gate recovery tests.

Merge readiness

✅ Ready for maintainer review

Keep open. Current main still cannot resume the reported partial publication, and review of the proposed recovery found no definite blocking defect.

Priority: P2
Reviewed head: 8aefaf829faa7982d1075e29e51010ec1435282b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused on the publication owner and has substantial boundary coverage, while the GitHub transport portion remains simulated.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: The MEMBER-authored PR is exempt from contributor live-setup proof. Its native Bash publication tests use real local Git but simulate GitHub reads; the PR body reports after-fix Testbox results without a live GitHub interruption run. Existing on-disk receipt fields are unchanged and accepted without migration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The MEMBER-authored PR is exempt from contributor live-setup proof. Its native Bash publication tests use real local Git but simulate GitHub reads; the PR body reports after-fix Testbox results without a live GitHub interruption run. Existing on-disk receipt fields are unchanged and accepted without migration.
Evidence reviewed 8 items Current-main gap: The current-main resolver returns when the completed preparation receipt is absent, without reading the intermediate push or sync receipts.
Recovery validation: The introduced resolver parses fixed receipt fields, checks ancestry and tree identity, validates the recorded pairs as one chain, and selects its latest hosted head.
Final publication boundary: The publication owner reobserves PR identity and head before a write; Git uses a head lease and GraphQL supplies an expected head OID. A verified no-op retains its receipt bytes.
Findings None None.
Security None None.

How this fits together

OpenClaw's maintainer scripts review and prepare a PR before publishing its prepared head. Local receipts record the publication state used by later preparation and landing checks.

flowchart LR
A[Reviewed PR head] --> B[Preparation and gates]
B --> C[Publication receipts]
C --> D[Receipt chain validation]
D --> E[Live head and lease checks]
E --> F[Published PR head]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +455, Other +89. Total +544 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 4 1014 559 +455
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 4 122 33 +89
Total 8 1136 592 +544

Review metrics

Metric Value Why it matters
Production versus test growth tooling +89 net lines; tests/support +455 net lines The PR attributes production growth to receipt-chain validation and moves 32 existing publication cases into the dedicated suite.
Publication suite cost 18.945 s reported wall time, one worker This is below the repository's 30-second threshold for explaining unusually costly test files.

Technical review

Best possible solution:

Keep receipt selection in the native preparation owner, with existing gate, review, live-head, and push-lease checks governing resumed publication.

Do we have a high-confidence way to reproduce the issue?

Yes, from current-main source: after a push succeeds but before prep.env is written, the resolver ignores the remaining intermediate receipt. The read-only review did not execute that failure on current main.

Is this the best way to solve the issue?

Yes. Extending the existing preparation owner to validate its recorded receipt chain is a narrow repair, and final publication still checks the live PR head and lease.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 53a0b854769d.

Labels

Label changes:

  • add P2: Interrupted maintainer preparation can block landing affected PRs, with limited impact outside that workflow.
  • add merge-risk: 🚨 automation: Receipt selection now controls resumed PR publication, so a chain-validation error could stall or misdirect the native landing workflow.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from contributor live-setup proof. Its native Bash publication tests use real local Git but simulate GitHub reads; the PR body reports after-fix Testbox results without a live GitHub interruption run. Existing on-disk receipt fields are unchanged and accepted without migration.

Label justifications:

  • P2: Interrupted maintainer preparation can block landing affected PRs, with limited impact outside that workflow.
  • merge-risk: 🚨 automation: Receipt selection now controls resumed PR publication, so a chain-validation error could stall or misdirect the native landing workflow.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The MEMBER-authored PR is exempt from contributor live-setup proof. Its native Bash publication tests use real local Git but simulate GitHub reads; the PR body reports after-fix Testbox results without a live GitHub interruption run. Existing on-disk receipt fields are unchanged and accepted without migration.

Evidence

What I checked:

  • Current-main gap: The current-main resolver returns when the completed preparation receipt is absent, without reading the intermediate push or sync receipts. (scripts/pr-lib/prepare-core.sh:328, 53a0b854769d)
  • Recovery validation: The introduced resolver parses fixed receipt fields, checks ancestry and tree identity, validates the recorded pairs as one chain, and selects its latest hosted head. (scripts/pr-lib/prepare-core.sh:395, 8aefaf829faa)
  • Final publication boundary: The publication owner reobserves PR identity and head before a write; Git uses a head lease and GraphQL supplies an expected head OID. A verified no-op retains its receipt bytes. (scripts/pr-lib/push.sh:394, 8aefaf829faa)
  • Existing receipt compatibility: Current main writes the same five intermediate receipt fields that the new reader accepts; the PR does not change their serialized format. (scripts/pr-lib/push.sh:397, 53a0b854769d)
  • Boundary tests: The new suite runs the production Bash functions with a real local Git remote and simulated GitHub reads, covering interrupted publication, no-op resume, conflicting receipts, and foreign heads. (test/scripts/pr-publication.test.ts:36, 8aefaf829faa)
  • Testbox evidence: The PR body reports 61 passing publication cases and a measured 18.945-second wall time. The linked overall Testbox run is cancelled, so its run conclusion does not independently establish that test result. (8aefaf829faa)

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Jason (Json): Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@vincentkoc
vincentkoc merged commit 8f5e974 into main Sep 25, 2026
168 checks passed
@vincentkoc
vincentkoc deleted the fix/pr-partial-publication-resume-20260925 branch September 25, 2026 15:20
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (194 commits)
  feat(ui): listen to managed desktop audio in the panel (#157724)
  fix(ci): resume partially published preparation receipts (#158174)
  feat(release): one approval per release via an attested parent approval receipt (#157911)
  feat(desktop): advertise current managed desktop audio (#157723)
  fix(ui): retain delayed progress scroll gestures (#158153)
  refactor(ui): share sidebar mutation error feedback (#158173)
  test: await database verifier process lifecycle events (#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (#157722)
  refactor(gateway): split companion prompts and metadata fixtures (#158050)
  feat(desktop): isolate managed Linux application audio (#157720)
  fix(test): prepare catalog fixture modules before startup (#158157)
  fix: keep model pickers usable during provider sign-in (#158132)
  refactor(test): remove unused prompt scenario metadata (#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020)
  fix: bound stalled browser stream startup (#156323)
  fix(onnx): prevent worker fixture hangs after release (#158146)
  fix(models): preserve scoped provider discovery outcomes (#158139)
  fix(agents): report offline trash failures after agent delete (#158052)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (175 commits)
  feat(ui): listen to managed desktop audio in the panel (#157724)
  fix(ci): resume partially published preparation receipts (#158174)
  feat(release): one approval per release via an attested parent approval receipt (#157911)
  feat(desktop): advertise current managed desktop audio (#157723)
  fix(ui): retain delayed progress scroll gestures (#158153)
  refactor(ui): share sidebar mutation error feedback (#158173)
  test: await database verifier process lifecycle events (#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (#157722)
  refactor(gateway): split companion prompts and metadata fixtures (#158050)
  feat(desktop): isolate managed Linux application audio (#157720)
  fix(test): prepare catalog fixture modules before startup (#158157)
  fix: keep model pickers usable during provider sign-in (#158132)
  refactor(test): remove unused prompt scenario metadata (#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020)
  fix: bound stalled browser stream startup (#156323)
  fix(onnx): prevent worker fixture hangs after release (#158146)
  fix(models): preserve scoped provider discovery outcomes (#158139)
  fix(agents): report offline trash failures after agent delete (#158052)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* fix(qa-lab): retain tab focus and scroll during polling

* chore(qa-lab): merge main for tab navigation validation

* fix(qa-lab): keep focused tabs visible after layout changes

* fix(qa-lab): reconcile navigation retention with current app

* chore: refresh main for QA Lab navigation validation

* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (194 commits)
  feat(ui): listen to managed desktop audio in the panel (#157724)
  fix(ci): resume partially published preparation receipts (#158174)
  feat(release): one approval per release via an attested parent approval receipt (#157911)
  feat(desktop): advertise current managed desktop audio (#157723)
  fix(ui): retain delayed progress scroll gestures (#158153)
  refactor(ui): share sidebar mutation error feedback (#158173)
  test: await database verifier process lifecycle events (#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (#157722)
  refactor(gateway): split companion prompts and metadata fixtures (#158050)
  feat(desktop): isolate managed Linux application audio (#157720)
  fix(test): prepare catalog fixture modules before startup (#158157)
  fix: keep model pickers usable during provider sign-in (#158132)
  refactor(test): remove unused prompt scenario metadata (#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020)
  fix: bound stalled browser stream startup (#156323)
  fix(onnx): prevent worker fixture hangs after release (#158146)
  fix(models): preserve scoped provider discovery outcomes (#158139)
  fix(agents): report offline trash failures after agent delete (#158052)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
)

* fix(qa-lab): retain tab focus and scroll during polling

* chore(qa-lab): merge main for tab navigation validation

* fix(qa-lab): keep focused tabs visible after layout changes

* fix(qa-lab): reconcile navigation retention with current app

* chore: refresh main for QA Lab navigation validation

* commit '0001f441f53712e44b2ca6edf2a6752b8abd6d1d': (194 commits)
  feat(ui): listen to managed desktop audio in the panel (openclaw#157724)
  fix(ci): resume partially published preparation receipts (openclaw#158174)
  feat(release): one approval per release via an attested parent approval receipt (openclaw#157911)
  feat(desktop): advertise current managed desktop audio (openclaw#157723)
  fix(ui): retain delayed progress scroll gestures (openclaw#158153)
  refactor(ui): share sidebar mutation error feedback (openclaw#158173)
  test: await database verifier process lifecycle events (openclaw#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (openclaw#157722)
  refactor(gateway): split companion prompts and metadata fixtures (openclaw#158050)
  feat(desktop): isolate managed Linux application audio (openclaw#157720)
  fix(test): prepare catalog fixture modules before startup (openclaw#158157)
  fix: keep model pickers usable during provider sign-in (openclaw#158132)
  refactor(test): remove unused prompt scenario metadata (openclaw#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (openclaw#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (openclaw#158020)
  fix: bound stalled browser stream startup (openclaw#156323)
  fix(onnx): prevent worker fixture hangs after release (openclaw#158146)
  fix(models): preserve scoped provider discovery outcomes (openclaw#158139)
  fix(agents): report offline trash failures after agent delete (openclaw#158052)
  ...

Co-authored-by: Vincent Koc <[email protected]>
vincentkoc added a commit that referenced this pull request Oct 17, 2026
* fix(ui): release failed avatar response bodies

* test(ui): cover avatar response cancellation in Chromium

* test(ui): assert retained image after avatar failure

* test(ui): preserve window global type in avatar proof

* test(ui): avoid shadowed avatar proof bindings

* chore: refresh main for avatar lifecycle validation

* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (175 commits)
  feat(ui): listen to managed desktop audio in the panel (#157724)
  fix(ci): resume partially published preparation receipts (#158174)
  feat(release): one approval per release via an attested parent approval receipt (#157911)
  feat(desktop): advertise current managed desktop audio (#157723)
  fix(ui): retain delayed progress scroll gestures (#158153)
  refactor(ui): share sidebar mutation error feedback (#158173)
  test: await database verifier process lifecycle events (#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (#157722)
  refactor(gateway): split companion prompts and metadata fixtures (#158050)
  feat(desktop): isolate managed Linux application audio (#157720)
  fix(test): prepare catalog fixture modules before startup (#158157)
  fix: keep model pickers usable during provider sign-in (#158132)
  refactor(test): remove unused prompt scenario metadata (#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020)
  fix: bound stalled browser stream startup (#156323)
  fix(onnx): prevent worker fixture hangs after release (#158146)
  fix(models): preserve scoped provider discovery outcomes (#158139)
  fix(agents): report offline trash failures after agent delete (#158052)
  ...

* test(ui): wait for settled avatar fallback

* test(ui): wait for control UI before avatar handoff

* fix(ui): preserve avatar cleanup across retry lifecycle updates

Integrate current main while preserving retry exhaustion, auth restoration, and deferred response cleanup. Keep the real-stream test on real timers and drain loader cleanup before restoring shared test state.

* fix(ui): integrate avatar response cleanup with current main

* test(ui): align avatar cleanup proof with current harness

* test(ui): qualify avatar cleanup harness types and formatting

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
* fix(ui): release failed avatar response bodies

* test(ui): cover avatar response cancellation in Chromium

* test(ui): assert retained image after avatar failure

* test(ui): preserve window global type in avatar proof

* test(ui): avoid shadowed avatar proof bindings

* chore: refresh main for avatar lifecycle validation

* commit '0001f441f53712e44b2ca6edf2a6752b8abd6d1d': (175 commits)
  feat(ui): listen to managed desktop audio in the panel (openclaw#157724)
  fix(ci): resume partially published preparation receipts (openclaw#158174)
  feat(release): one approval per release via an attested parent approval receipt (openclaw#157911)
  feat(desktop): advertise current managed desktop audio (openclaw#157723)
  fix(ui): retain delayed progress scroll gestures (openclaw#158153)
  refactor(ui): share sidebar mutation error feedback (openclaw#158173)
  test: await database verifier process lifecycle events (openclaw#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (openclaw#157722)
  refactor(gateway): split companion prompts and metadata fixtures (openclaw#158050)
  feat(desktop): isolate managed Linux application audio (openclaw#157720)
  fix(test): prepare catalog fixture modules before startup (openclaw#158157)
  fix: keep model pickers usable during provider sign-in (openclaw#158132)
  refactor(test): remove unused prompt scenario metadata (openclaw#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (openclaw#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (openclaw#158020)
  fix: bound stalled browser stream startup (openclaw#156323)
  fix(onnx): prevent worker fixture hangs after release (openclaw#158146)
  fix(models): preserve scoped provider discovery outcomes (openclaw#158139)
  fix(agents): report offline trash failures after agent delete (openclaw#158052)
  ...

* test(ui): wait for settled avatar fallback

* test(ui): wait for control UI before avatar handoff

* fix(ui): preserve avatar cleanup across retry lifecycle updates

Integrate current main while preserving retry exhaustion, auth restoration, and deferred response cleanup. Keep the real-stream test on real timers and drain loader cleanup before restoring shared test state.

* fix(ui): integrate avatar response cleanup with current main

* test(ui): align avatar cleanup proof with current harness

* test(ui): qualify avatar cleanup harness types and formatting

Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant