Skip to content

fix(release): avoid repeated payload downloads during receipt recovery - #196501

Merged
RomneyDa merged 6 commits into
mainfrom
openclaw/receipt-payload-repair
Nov 10, 2026
Merged

RomneyDa merged 6 commits into
mainfrom
openclaw/receipt-payload-repair

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Receipt-backed release publication repeatedly downloaded retained evidence for each plugin consumer. The audit also found accepted child IDs could be lost during post-dispatch verification, and missing ClawHub receipts were incorrectly treated as proof that staging never happened.

User Impact and Solution

  • Authenticate the ordered recovery seal and observations; compare the complete retained inventory using original descriptors and fresh metadata. Original recovery production still verifies all payload bytes.
  • Route retained-publication, candidate/receipt archive, and completed admission-job reads through the existing replay owner. Raw responses are captured before projection. Current metadata, producer attempts, trusted refs, and operator permissions remain live.
  • Preserve original candidate/qualification artifacts, selected-package byte verification, replay limits (64 MiB total, 512 entries, 16 MiB per entry), and existing deadlines.
  • Record accepted numeric child IDs before optional URL/SHA verification. Unknown acceptance requires reconciliation, never blind redispatch.
  • Missing-receipt ClawHub entries are observed without adopting unbound attempts or submitting replacement bytes. Unresolved entries remain holds; independent receipted siblings can complete recovery.

Evidence and CI Corrections

Base: a65cb61a7d14c7dbee97f92d442f9a378c88a688. Current published head: fa00418820eb6eead3f2635d5663a12d3395db4c.

  • Independent source-only reviews covered the repair and successive CI corrections, with no actionable findings in the latest semantic and test-only corrections. Static review is not runtime or formatter proof.
  • Earlier hosted CI exposed fixture, declaration, isolated-tooling, formatting, and lint failures. Corrections align recovery inventories, count metadata reads through both transports, supply fail-fast fixture methods, declare the existing qualification-operator export, and pass explicit CLI selection mode. The isolated validator copies the complete scripts tree with the existing close-on-exec helper, matching production without a repository fallback.
  • CI 42779528730 exposed five immutable-classified requests per replay process: one necessary live carrier-bootstrap job read and four completed admission-job reads bypassing replay. Admission authority revalidation now shares the existing replay transport; both recovery call sites use that client. All live authority boundaries remain.
  • Hosted actual CLI regression passed on 6276990ac18efd018cd3aee337bf485dd389f6d6, CI 42780735327, job 129710603079, in 18.135 seconds. It runs preview and two distinct consume/authorize pairs through actual CLI processes with fixture transports, not live GitHub/release publication. Authentication owners are not mocked. It checks zero immutable reacquisition, carrier bootstrap, selected-package bytes, retained candidate archive coverage, and failures for expired/superseded authority, revoked permissions, failed carrier producers, and corrupted bytes.
  • Measured requests: preview 211; each consume 186; each authorize 183; total for preview plus two pairs 949. Preview categories: 177 live + 34 immutable. Each consume: 184 live + one carrier + one selected package. Each authorize: 182 live + one carrier. Consumer immutable reacquisition: zero. The 101-identical-consumer result is extrapolated, not executed: 37,480 requests = 37,143 live + 34 immutable + 202 carrier + 101 selected-package requests.
  • Current four-file correction is 24 insertions/16 deletions against 6276990: the sibling return-time gate expectation changes 18 to 17 because its completed admission-job read now replays. New assertions require the immutable job route to be absent and live artifact metadata, exact attempt, and permission routes to remain. Formatting-only expression simplifications and loop braces preserve semantics. Exact-head execution and formatter acceptance remain pending.
  • CI 42780735327 docs job 129710602963 failed its repository-wide source formatter on the same two source files as the lint job; subsequent docs formatting, markdown lint, templates, MDX, links, config examples, and changelog checks all passed. This is not evidence of a separate docs defect.
  • Exact own ratchet allocation is 1,403 LF lines against the original base. The two MJS fixtures total 739 lines outside existing ratchet patterns. Shared scalar remains unchanged. No new state store, recovery framework, schema, or authority owner was added. Full-tree copy cost remains unmeasured.
  • Final source inspection and git diff --check passed. No local tests, formatter, lint, typecheck, build, install, preflight, or new qualification ran. Paused simplification remains separately preserved and excluded.

Inherited Ratchet Debt

CI 42780735327 tested merge 72fffb049785c9493d4c98afd04f1ac45ebfa645 against comparison base 604aacb6cdf4df3ecf6fb5b7bf690dd58d6804c5. Its 293-LF overage is inherited from main: e6afc3c54002b6c2aca7eefb2a12038482e93506 adds 71 unfunded LF, baccc7e152916c7f4a48596b5cb544c12264ac54 removes one, and 441b6139039d18701357e93665dcc59f787f439d adds 223. Base total 6,619,127 minus effective ceiling 6,618,834 = 293. The repair's own allocation exactly covers its own growth; it does not erase inherited debt. A separate exact inherited-debt allocation requires explicit approval under the testing policy and has not been added.

Remaining Proof and Operational Limits

Real exact-head hosted checks and applicable landing gates are still required. Prior-head success covers its tested inputs, not current-head formatter parity or new assertions. Parent coordination owns CI, merge, and release; this repair dispatched none of them.

This is not an end-to-end single-download redesign: parent readiness, core npm, and dependency-evidence upload retain independent full-preflight transfers. Mutable authority remains fresh in every consume/authorize process. Unknown dispatch acceptance requires operator reconciliation. Public ClawHub state cannot bind a missing original receipt; a new retained-ClawHub validation-only contract is outside this change. This npm/replay correction does not solve the separate missing ClawHub pack.

Original C/Q and artifacts remain unchanged. No release dispatch, local qualification, or registry publication was performed.

Co-authored-by: RomneyDa [email protected]

OpenClaw-Publication: abfbfbf5-b067-4515-a86b-fb0966d6ec9e
@clawsweeper

clawsweeper Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: L labels Nov 10, 2026
OpenClaw-Publication: f8570c45-3da1-459c-98b7-ac39f4f91c54
@RomneyDa
RomneyDa marked this pull request as ready for review November 10, 2026 07:47
OpenClaw-Publication: 26ecd3d3-263d-4bc8-b005-05325b100678
OpenClaw-Publication: b6c7c43f-4252-41a5-bf63-946ce2fb2a89
OpenClaw-Publication: 8479cb12-ce63-44ac-b35a-4baac32f7b09
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 10, 2026
OpenClaw-Publication: 0b194f7f-7ad9-41ab-8200-60328347ccc3
@RomneyDa
RomneyDa merged commit 09723cd into main Nov 10, 2026
107 of 110 checks passed
@RomneyDa
RomneyDa deleted the openclaw/receipt-payload-repair branch November 10, 2026 08:28
@obviyus

obviyus commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

Heads-up: since this merged (09723cdcad1), three of its files fail the formatter on main (verified at ce91f94f83b with oxfmt --check):

  • test/scripts/full-release-receipt-recovery.test.ts
  • test/scripts/plugin-npm-cli-process.test.ts
  • test/scripts/plugin-npm-cli-recovery.test-support.mjs

main's own CI skips check-docs, so it stays green there, but every PR that touches docs now fails check-docs → node scripts/run-format.mts --check on these files. Examples: #191540 (job 129746511555) and #164462 (job 129752656788). Running oxfmt on those three files should clear it.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 11, 2026
openclaw#196501)

* fix(release): avoid repeated payload downloads during receipt recovery

OpenClaw-Publication: abfbfbf5-b067-4515-a86b-fb0966d6ec9e

* Publish openclaw/receipt-payload-repair

OpenClaw-Publication: f8570c45-3da1-459c-98b7-ac39f4f91c54

* Publish openclaw/receipt-payload-repair

OpenClaw-Publication: 26ecd3d3-263d-4bc8-b005-05325b100678

* Publish openclaw/receipt-payload-repair

OpenClaw-Publication: b6c7c43f-4252-41a5-bf63-946ce2fb2a89

* Publish openclaw/receipt-payload-repair

OpenClaw-Publication: 8479cb12-ce63-44ac-b35a-4baac32f7b09

* Publish openclaw/receipt-payload-repair

OpenClaw-Publication: 0b194f7f-7ad9-41ab-8200-60328347ccc3

---------

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

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. docs Improvements or additions to documentation scripts Repository scripts size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants