Skip to content

test(e2e): keep the relabeled candidate's dist content inventory truthful - #164036

Merged
steipete merged 2 commits into
mainfrom
upd/published-driver-relabel-inventory
Oct 3, 2026
Merged

steipete merged 2 commits into
mainfrom
upd/published-driver-relabel-inventory

Conversation

@steipete

@steipete steipete commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Hourly 37094503398 (head 5e6794c, first run containing #163999) shows the relabel working (candidate-relabel.json: 2026.9.7 → 2026.9.8, no more downgrade refusal) but the cell still failed one step later: the candidate's package-verify step reported Invalid package dist content inventory at dist/postinstall-content-inventory.json: expected packaged file hashes and executable bits to match current dist files → global-install-failed.

Why This Change Was Made

dist/build-info.json is the authoritative version source (src/version.ts) and is an inventoried dist file. Rewriting it without updating its inventory entry turns the product's own integrity check into a false alarm. The harness now refreshes that entry's sha256 and size after the rewrite; package.json is not under dist/ and needs no inventory change. Test-harness only, no production code.

User Impact

None at runtime. CI: the published-driver cell can pass during the post-release window again.

Evidence

Replayed the exact relabel steps on the real candidate tarball from run 37094503398 and ran scripts/check-openclaw-package-tarball.mts:

The next hourly on main is the live proof; the cell skips on PR CI.

…hful

#163999 relabels the published-driver candidate to the driver version when
main lags npm latest, but rewriting dist/build-info.json changed an
inventoried file, so the candidate's own package-verify step failed on the
next hourly (dist/postinstall-content-inventory.json hash mismatch). Update
that file's inventory entry (sha256 + size) after the rewrite.
@clawsweeper

clawsweeper Bot commented Oct 3, 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.

@steipete
steipete marked this pull request as ready for review October 3, 2026 04:35
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: XS labels Oct 3, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Oct 3, 2026
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 3, 2026, 1:45 AM ET / 05:45 UTC (Revision 2).

ClawSweeper review

What this changes

The upgrade test harness refreshes the build-info file’s recorded hash and size after relabeling a candidate package.

Merge readiness

⛔ Blocked before merge - 1 item remains

This PR remains useful: current main still has the inventory mismatch, and no introduced defect was found. The earlier migration-proof blocker does not apply to this disposable test-package repair.

Priority: P2
Reviewed head: c6ba09bce3c0326b3abe9481323a5f0b84f9d5e9

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with relevant real-artifact evidence and no actionable introduced defect.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The reported replay uses a real candidate tarball and the actual package checker, showing repaired relabeling passes while the unchanged-inventory negative control fails. It covers this metadata repair without claiming a full updater run. No stored-data schema or user-state contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The reported replay uses a real candidate tarball and the actual package checker, showing repaired relabeling passes while the unchanged-inventory negative control fails. It covers this metadata repair without claiming a full updater run. No stored-data schema or user-state contract changes.
Evidence reviewed 6 items Pinned introduced change: The merge-base-to-head diff adds a SHA-256 refresh and byte-size refresh for dist/build-info.json. It preserves the entry’s mode and every other inventory entry, and asserts that the expected entry exists.
Current main still needs the repair: The fetched main version rewrites package.json and dist/build-info.json, then repacks without refreshing the content inventory. GitHub independently returned main’s file blob as 72ca48571a07c34afb7549e84195aaef0f0c6feb, matching the introduced diff’s original blob. The PR remains open and unmerged.
Independent integrity contract: The tarball checker computes hashes, byte lengths, and modes from extracted files and compares them against the inventory. The shared contract excludes the content inventory itself from its own entries, so rewriting that inventory requires no recursive hash update.
Findings None None.
Security None None.

How this fits together

The published-driver test installs a released OpenClaw version and updates it to a candidate package. Candidate preparation feeds the package-integrity checks before the test verifies the updated Gateway.

flowchart TD
  A[Released OpenClaw driver] --> C[Upgrade test harness]
  B[Candidate package] --> C
  C --> D{Candidate version older?}
  D -->|Yes| E[Relabel and refresh inventory]
  D -->|No| F[Package integrity checks]
  E --> F
  F --> G[Managed update and Gateway checks]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Other +11. Total +11 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 11 0 +11
Total 1 11 0 +11

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: scripts/e2e/lib/upgrade-survivor/published-driver.mjs, serialized state: scripts/e2e/lib/upgrade-survivor/published-driver.mjs. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep the candidate’s integrity metadata synchronized with its rewritten bytes while retaining all package validation.

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

Yes, source establishes the trigger: relabel an older candidate’s inventoried build-info file, then run the package checker. The contributor reports the corresponding failing negative control; this read-only review did not execute it.

Is this the best way to solve the issue?

Yes, refreshing only the changed file’s hash and size repairs the producer’s inconsistency while preserving the existing independent integrity checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 052efb366564.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This repairs a bounded package-preparation failure in the published-driver validation lane without changing runtime behavior.
  • 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. Sufficient (live_output): The reported replay uses a real candidate tarball and the actual package checker, showing repaired relabeling passes while the unchanged-inventory negative control fails. It covers this metadata repair without claiming a full updater run. No stored-data schema or user-state contract changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The reported replay uses a real candidate tarball and the actual package checker, showing repaired relabeling passes while the unchanged-inventory negative control fails. It covers this metadata repair without claiming a full updater run. No stored-data schema or user-state contract changes.

Evidence

What I checked:

  • Pinned introduced change: The merge-base-to-head diff adds a SHA-256 refresh and byte-size refresh for dist/build-info.json. It preserves the entry’s mode and every other inventory entry, and asserts that the expected entry exists. (scripts/e2e/lib/upgrade-survivor/published-driver.mjs:173, c6ba09bce3c0)
  • Current main still needs the repair: The fetched main version rewrites package.json and dist/build-info.json, then repacks without refreshing the content inventory. GitHub independently returned main’s file blob as 72ca48571a07c34afb7549e84195aaef0f0c6feb, matching the introduced diff’s original blob. The PR remains open and unmerged. (scripts/e2e/lib/upgrade-survivor/published-driver.mjs:163, 052efb366564)
  • Independent integrity contract: The tarball checker computes hashes, byte lengths, and modes from extracted files and compares them against the inventory. The shared contract excludes the content inventory itself from its own entries, so rewriting that inventory requires no recursive hash update. (scripts/check-openclaw-package-tarball.mts:639, c6ba09bce3c0)
  • Real candidate proof: The captured PR body reports replaying the relabel operation against the real candidate tarball from run 37094503398: the original and repaired tarballs passed the actual package checker, while relabeling without refreshing the inventory produced the expected mismatch. This covers the changed package-integrity behavior; a complete hourly updater run is future evidence, not a claimed pass. Captured body source revision: 9e397a3bf25eb71c1ad7f80770fa4bc637ee2a5ebe3407604d77b7f0690bbfb8.
  • Earlier compatibility concern reassessed: The previous completed review requested upgrade compatibility proof. This diff modifies values in an existing inventory entry inside a newly extracted disposable candidate package; it changes neither the inventory schema nor persisted operator state. No data migration is introduced. The latest commit replaces map-and-spread with an in-place entry update and adds an explicit missing-entry assertion. (scripts/e2e/lib/upgrade-survivor/published-driver.mjs:175, c6ba09bce3c0)
  • Merged area history and routing: Current-main history connects steipete to the published-driver cell and its earlier relabel change. GitHub verifies test(e2e): relabel the published-driver candidate when main lags npm latest #163999 as merged; that change handles version downgrade refusal, while this PR repairs the subsequent integrity failure. Some local blame and older-blob reads failed with an HTTP 403 during object hydration; GitHub commit patches supplied the relevant history instead. (scripts/e2e/lib/upgrade-survivor/published-driver.mjs:163, 7bc45fa2b9e6)

Likely related people:

  • steipete: 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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-03T04:40:21.700Z sha b3a930d :: blocked before merge. :: none

@steipete
steipete merged commit 65d5066 into main Oct 3, 2026
95 checks passed
@steipete
steipete deleted the upd/published-driver-relabel-inventory branch October 3, 2026 06:15
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 4, 2026
…hful (openclaw#164036)

openclaw#163999 relabels the published-driver candidate to the driver version when main lags npm latest, but rewriting dist/build-info.json changed an inventoried file, so the candidate's own package-verify step failed on the next hourly (dist/postinstall-content-inventory.json hash mismatch). Update that file's inventory entry (sha256 + size) after the rewrite; proven with check-openclaw-package-tarball on the real candidate tarball plus a stale-inventory negative control.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XS 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