Skip to content

fix(release): keep frozen package inventory self-contained#106886

Merged
steipete merged 2 commits into
mainfrom
fix/release-packer-frozen-target-inventory
Jul 14, 2026
Merged

fix(release): keep frozen package inventory self-contained#106886
steipete merged 2 commits into
mainfrom
fix/release-packer-frozen-target-inventory

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Trusted-main release recovery failed while packaging a frozen stable target because the current packer imported a current-main inventory helper that does not exist in the frozen checkout.

Why This Change Was Made

Run the frozen source checkout's own inventory writer while loading tsx from trusted main. This keeps the target's inventory schema and dependencies self-contained without requiring new helper files to exist on older refs.

User Impact

Release validation can package older trusted refs again. Normal package output is unchanged.

Evidence

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling size: S maintainer Maintainer-authored PR labels Jul 13, 2026
@steipete
steipete requested a review from a team as a code owner July 13, 2026 23:17
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: discord Channel integration: discord channel: whatsapp-web Channel integration: whatsapp-web app: android App: android app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling extensions: github-copilot size: XL and removed size: S labels Jul 13, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Jul 13, 2026
@clawsweeper

clawsweeper Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 13, 2026, 8:09 PM ET / July 14, 2026, 00:09 UTC.

Summary
The PR changes Docker release packaging to execute a frozen source checkout’s inventory writer and adds an exported declaration plus focused regression coverage.

PR surface: Tests +27, Other +9. Total +36 across 3 files.

Reproducibility: yes. from source and workflow context: leave trusted main without dependencies, install dependencies only in the frozen source checkout, then invoke the packer with that sourceDir; the current loader lookup remains anchored to trusted main and can fail to find tsx.

Review metrics: 1 noteworthy metric.

  • Checkout dependency layouts covered: 1 of 2 modeled. The test covers a frozen checkout without the current helper, but not the real workflow layout where only that frozen checkout has tsx installed.

Stored data model
Persistent data-model change detected: serialized state: test/e2e/qa-lab/runtime/package-openclaw-for-docker.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🦪 silver shellfish
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Resolve tsx from the frozen source checkout.
  • [P1] Add a split-checkout regression test and refresh exact source=ref workflow proof.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The linked runs are useful real workflow evidence, but they do not demonstrate the final head succeeding with trusted main dependency-less and tsx installed only in the frozen source checkout. Add a redacted exact source=ref package-acceptance transcript or logs after fixing the loader; updating the PR body should trigger review, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Risk before merge

  • [P1] Merging this head can leave trusted-main frozen-ref recovery broken because executable dependency resolution remains anchored to the dependency-less trusted checkout.
  • [P1] The existing test and linked package proof can pass without exercising the workflow’s split-checkout dependency layout, creating a false-positive automation signal.

Maintainer options:

  1. Anchor the loader before merge (recommended)
    Resolve tsx from sourceDir, add coverage for the split-checkout dependency layout, and rerun exact frozen-ref package acceptance on the repaired head.
  2. Pause the release change
    Keep the PR open until the dependency-less trusted-checkout scenario succeeds, because current evidence does not settle the reported recovery path.

Next step before merge

  • [P1] The author should repair the repeated P1 loader defect and refresh exact workflow proof; the protected maintainer label keeps final handling in explicit human review.

Security
Cleared: The patch adds no dependency, permission, secret access, downloaded executable, or publishing-surface change; the blocking concern is release-automation correctness rather than security.

Review findings

  • [P1] Resolve tsx from the frozen source checkout — scripts/package-openclaw-for-docker.mjs:725
Review details

Best possible solution:

Resolve tsx explicitly from the dependency-installed frozen sourceDir, keep execution on that checkout’s own inventory writer, and prove the final head with an exact source=ref package-acceptance run where trusted main has no installed dependencies.

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

Yes from source and workflow context: leave trusted main without dependencies, install dependencies only in the frozen source checkout, then invoke the packer with that sourceDir; the current loader lookup remains anchored to trusted main and can fail to find tsx.

Is this the best way to solve the issue?

No, not yet. Executing the frozen checkout’s own inventory writer is the correct ownership boundary, but the implementation must also resolve its TypeScript loader from that checkout rather than from the trusted packer module.

Full review comments:

  • [P1] Resolve tsx from the frozen source checkout — scripts/package-openclaw-for-docker.mjs:725
    This still resolves tsx relative to the trusted-main packer module. In the reported source=ref workflow, trusted main has no dependencies and only sourceDir is installed, so this can still throw ERR_MODULE_NOT_FOUND; resolve the loader explicitly from sourceDir and cover that split-checkout layout. This is the unresolved finding from the previous review cycle.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.96

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: The defect blocks a bounded maintainer release-recovery workflow rather than normal end-user runtime behavior.
  • merge-risk: 🚨 automation: The changed child-process loader can make frozen-ref release packaging fail despite focused tests and ordinary CI passing.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The linked runs are useful real workflow evidence, but they do not demonstrate the final head succeeding with trusted main dependency-less and tsx installed only in the frozen source checkout. Add a redacted exact source=ref package-acceptance transcript or logs after fixing the loader; updating the PR body should trigger review, or a maintainer can request @clawsweeper re-review. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Tests +27, Other +9. Total +36 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 27 0 +27
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 2 26 17 +9
Total 3 53 17 +36

What I checked:

  • Unresolved loader anchor: The latest patch resolves tsx with import.meta.resolve("tsx") inside the trusted-main packer module, while the documented failing workflow installs dependencies only in the frozen package source; this preserves the earlier review blocker. (scripts/package-openclaw-for-docker.mjs:725, 2194626e1b52)
  • Prior review continuity: The previous completed review raised the same P1 checkout-resolution defect at SHA 7c5f715. The subsequent latest commit only declares the exported helper and does not change the runtime resolution line. (scripts/package-openclaw-for-docker.d.mts:31, 2194626e1b52)
  • Test misses dependency split: The regression test calls the helper from the normal test checkout, where tsx is available beside the packer module; it does not model a dependency-less trusted checkout with dependencies installed only under sourceDir. (test/e2e/qa-lab/runtime/package-openclaw-for-docker.e2e.test.ts:176, 2194626e1b52)
  • Current main does not solve the recovery problem: Current main uses an inline tsx preload and imports the inventory helper from the selected source checkout, which fails when an older frozen ref lacks that current-main helper. The PR’s central fix therefore remains useful once loader resolution is corrected. (scripts/package-openclaw-for-docker.mjs:738, f693ac1b6527)
  • Inspection limitation: The read-only command runner failed before executing local git-history commands with bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted; the verdict therefore uses the fully supplied policy, PR patches, commits, comments, checks, and prior-review context.

Likely related people:

  • steipete: Beyond proposing the patch, the available context connects this person to the trusted-main recovery incident, the focused Testbox validation, the exact frozen-target package run, and repeated maintenance of this PR head; merged-history attribution could not be independently inspected because the read-only shell was unavailable. (role: release workflow owner; confidence: medium; commits: 2f99e6116dc4, 2194626e1b52; files: scripts/package-openclaw-for-docker.mjs, scripts/package-openclaw-for-docker.d.mts, test/e2e/qa-lab/runtime/package-openclaw-for-docker.e2e.test.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (2 earlier review cycles)
  • reviewed 2026-07-13T23:24:26.933Z sha d93166b :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-13T23:51:40.734Z sha 7c5f715 :: needs real behavior proof before merge. :: [P1] Resolve tsx from the frozen source checkout

@steipete
steipete requested a review from a team as a code owner July 13, 2026 23:31
@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram channel: reef Channel integration: reef app: linux labels Jul 13, 2026
@steipete
steipete force-pushed the fix/release-packer-frozen-target-inventory branch from 840be15 to e27f755 Compare July 13, 2026 23:34
@openclaw-barnacle openclaw-barnacle Bot removed docs Improvements or additions to documentation channel: discord Channel integration: discord channel: telegram Channel integration: telegram channel: whatsapp-web Channel integration: whatsapp-web app: android App: android app: web-ui App: web-ui labels Jul 13, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: S and removed gateway Gateway runtime agents Agent runtime and tooling extensions: github-copilot channel: reef Channel integration: reef app: linux size: XL labels Jul 13, 2026
@clawsweeper

clawsweeper Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(release): keep frozen package inventory self-contained This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@steipete
steipete force-pushed the fix/release-packer-frozen-target-inventory branch from e27f755 to 7c5f715 Compare July 13, 2026 23:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7c5f715a82

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


export async function writePackageInventoryForDocker(sourceDir, runImpl = run) {
// Frozen release refs own their inventory shape; run their writer instead of importing current-main helpers.
const tsxModuleUrl = import.meta.resolve("tsx");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Resolve tsx from the source checkout

When source=ref package acceptance runs, .github/workflows/package-acceptance.yml leaves the trusted workflow checkout without dependencies (install-deps: "false"), and resolve-openclaw-package-candidate.mjs installs deps only in packageSource.sourceDir before invoking this helper with --source-dir. Resolving tsx from this script therefore looks in the dependency-less trusted checkout and fails with ERR_MODULE_NOT_FOUND; keep the preload resolution in the child/source checkout, or otherwise point it at the source checkout's installed tsx, so frozen-ref packaging still works.

Useful? React with 👍 / 👎.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jul 13, 2026
@steipete
steipete force-pushed the fix/release-packer-frozen-target-inventory branch from 7c5f715 to 2194626 Compare July 13, 2026 23:58
@steipete
steipete merged commit b4c311e into main Jul 14, 2026
142 of 143 checks passed
@steipete
steipete deleted the fix/release-packer-frozen-target-inventory branch July 14, 2026 00:15
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

wm0018 pushed a commit to wm0018/openclaw that referenced this pull request Jul 14, 2026
…106886)

* fix(release): keep frozen package inventory self-contained

* fix(release): declare frozen inventory helper
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 14, 2026
…106886)

* fix(release): keep frozen package inventory self-contained

* fix(release): declare frozen inventory helper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant