Skip to content

fix(test): restore trusted packaging harness startup - #151967

Closed
steipete wants to merge 1 commit into
mainfrom
codex/packed-tarball-harness-fixture-20260918
Closed

steipete wants to merge 1 commit into
mainfrom
codex/packed-tarball-harness-fixture-20260918

Conversation

@steipete

Copy link
Copy Markdown
Contributor

Related: #151930

What Problem This Solves

The trusted packaging-harness test checkout fails to load the package launcher after tarball cleanup moved into a shared module, before it reaches argument validation.

User Impact

Restores the existing package-contract CI check. No production behavior changes.

Why This Change Was Made

Include scripts/lib/packed-openclaw-tarballs.mts in the fixture's explicit copied dependency list. The real launcher can then reach its existing --invalid argument check. Assertions, copy behavior, and timeouts remain unchanged.

Evidence

  • The existing trusted-harness case reproduced the missing-module error locally before the fix, matching the retained Windows CI failure.
  • After the fix, the complete package-contract file passes on macOS: 63 passed, 3 Windows-only cases skipped.
  • Selected root-test typechecking, script and test lint, formatting, line-cap, and guard checks pass.
  • Independent P0–P2 review found no actionable issues.

@clawsweeper

clawsweeper Bot commented Sep 18, 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 September 18, 2026 16:57
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 18, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 1:02 PM ET / 17:02 UTC.

ClawSweeper review

What this changes

Adds the packaging launcher's missing shared module to the isolated test fixture so its startup check reaches argument validation.

Merge readiness

✅ Ready for maintainer review

The fix remains necessary on fetched main and has no actionable review findings. This protected, maintainer-authored PR is suitable for normal merge review.

Priority: P3
Reviewed head: 8b58def37fbf0e5750492a9fc9de87478e54e3d2

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported repair that preserves meaningful existing coverage.
Proof confidence 🌊 off-meta tidepool Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer-authored repair. The captured body reports that the real launcher fixture passes after the fix; this reviewer did not execute it.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The ordinary external-contributor proof gate does not apply to this maintainer-authored repair. The captured body reports that the real launcher fixture passes after the fix; this reviewer did not execute it.
Evidence reviewed 6 items Existing startup contract preserved: The changed fixture copies the additional module before spawning the real launcher. It retains assertions for exit status 1, the expected invalid-argument message, and absence of ERR_MODULE_NOT_FOUND.
Direct launcher dependency: The launcher statically imports packed-openclaw-tarballs.mts before argument parsing. The shared module itself imports only Node built-ins, so copying it requires no additional fixture dependencies.
Still necessary on fetched main: Fetched main retains the explicit fixture list without the launcher's required shared module; the central defect is not already repaired there.
Findings None None.
Security None None.

How this fits together

The package-contract tests exercise OpenClaw's Docker packaging tooling. This fixture copies the launcher and its dependencies into an isolated directory, then checks that startup reaches the expected CLI error.

flowchart LR
  A[Repository scripts] --> B[Copy fixture dependencies]
  B --> C[Isolated test directory]
  C --> D[Launch packaging script]
  E[Invalid CLI argument] --> D
  D --> F[Assert expected argument error]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +1. Total +1 across 1 file.

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

Review metrics

None.

Technical review

Best possible solution:

Keep the isolated fixture aligned with the launcher's dependencies while preserving its existing startup assertions.

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

Yes, from source: the existing isolated-launcher test omits a statically imported file on fetched main, preventing argument validation. Execution was not attempted during this read-only review.

Is this the best way to solve the issue?

Yes. Adding the required module to the existing fixture is the narrowest repair and leaves production code, assertions, and timeouts unchanged.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 234e9e0c3766.

Labels

Label changes:

  • add P3: This is a bounded test-fixture repair with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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 ordinary external-contributor proof gate does not apply to this maintainer-authored repair. The captured body reports that the real launcher fixture passes after the fix; this reviewer did not execute it.

Label justifications:

  • P3: This is a bounded test-fixture repair with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool 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 ordinary external-contributor proof gate does not apply to this maintainer-authored repair. The captured body reports that the real launcher fixture passes after the fix; this reviewer did not execute it.

Evidence

What I checked:

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • Peter Steinberger: 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

Copy link
Copy Markdown
Member

Landing reconciliation: GitHub's squash-merge request returned 502 Bad Gateway after publishing the exact PR patch to main, but the pull request metadata remained open and no merge event was recorded.

The landed commit is 5741b3c. Its parent tree matches the PR base for the touched file, and its resulting file blob exactly matches head 8b58def37fbf0e5750492a9fc9de87478e54e3d2. Author credit is preserved.

Closing as landed to prevent a duplicate or empty second merge attempt.

@vincentkoc vincentkoc closed this Sep 18, 2026
@vincentkoc
vincentkoc deleted the codex/packed-tarball-harness-fixture-20260918 branch September 18, 2026 17:43
vincentkoc added a commit that referenced this pull request Sep 18, 2026
* origin/main:
  test(gateway): isolate session resolution channel fixtures (#151945)
  fix(clickclack): drain discussion opens before shutdown (#151978)
  fix(test): restore trusted packaging harness startup (#151967)
  improve(codex): batch session adoption binding reads (#151979)
  improve(cron): reduce allocations for busy stream sources (#151956)
  fix(file-transfer): avoid repeated directory record encoding (#151987)
  fix: avoid session-list rebuilds when authentication availability changes (#151920)
  fix(updates): explain externally managed update refusals (#151942)
  improve(heartbeat): avoid unused config work in membership checks (#151867)
  fix(android): keep status text readable and label accessibility actions (#151342)
  improve(ui): show OS and size in the environment selector (#151947)
  fix(android): keep tool errors visible in collapsed chat activity (#151332)
karmafeast pushed a commit to karmaterminal/openclaw that referenced this pull request Sep 18, 2026
steipete added a commit that referenced this pull request Sep 18, 2026
Include Diffs in the expected database-worker planner group while retaining exact coverage and duplicate checks.

Carry the packaging fixture dependency from canonical main commit 5741b3c (PR #151967), whose one-line patch matches the original 8b58def.

No production or build inputs change; compiled runtime and active-writer evidence retain their original commit bindings.
steipete added a commit that referenced this pull request Sep 18, 2026
Include the worker pool completion, core, and owned-task modules in the
existing PR wrapper component inventory so extracted wrappers reach their
normal argument validation with a complete eager import closure.

Carry the exact packaging fixture repair from canonical
5741b3c (#151967): copy the existing
packed-openclaw-tarballs helper into the no-dependency harness.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
steipete added a commit that referenced this pull request Sep 20, 2026
* perf(fleet): run registry operations in SQLite workers

* fix(state): preserve readonly admission error context

* test(gateway): retain catalog root failure diagnostics

* fix: preserve uncertain lease outcomes before caller recovery

* fix(state): reject retired read scopes and retain wrapper imports

Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries.

Include the retained-read eager dependencies in the canonical PR wrapper inventory.

* test(state): require rejection of retired read scopes

Update the three existing disposable-scope variants to expect the canonical
admission error while preserving active and unrelated source assertions.

* fix(state): keep ordinary reads in the SQLite worker

Use the existing independent readonly worker for ordinary fixed reads while
retaining cached writer custody. Validate captured file identity around opens
and acceptance, and bind previously missing paths when their first file appears.

Keep selected snapshots and native preparation scopes with their existing owners.

* fix: catalog refresh fails when previous discovery finishes

Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: #151588, #148290.

* fix(test): retain Telegram suite output on subprocess errors

* fix(ci): require full compact proof for worker policy guards (#151427)

Fix compact CI policy guards that confused a two-worker budget with a parallel-to-serial transition. Preserve inherited job ceilings on already-serial recipients and reject redundant group-policy rewrites.

Select the complete compact plan on Blacksmith and hybrid runs when the owning planner-policy test changes; keep GitHub targeting precise. Production admission-before-placement, worker limits, and measurements remain unchanged.

Validation: focused host-profile and policy cases, serial-policy negative controls, and exact-head CI run 35343663468 passed. ClawSweeper and the retained scoped review found no actionable defects. No user-visible runtime change.

* refactor(state): move fixed-read snapshot tokens off the main thread

* perf(gateway): materialize archived session rows on demand (#151574)

* fix: avoid host-speed failures in catalog performance checks (#151732)

Replace the catalog benchmark's host-dependent 20 ms median limit with 20 times an independent in-process CPU reference. Check every composed list for exactly 20 SQLite reads, including three binding-authority reads, and zero plugin-state worker operations, while preserving the existing native-RPC, file-I/O, and session-payload guards.

This is a test reliability repair with no runtime or update behavior change. Production changes: 0 lines; tests and test support: +61/-7 across two files.

Validation: exact-head CI is green; the reviewed proof includes five passing local runs, two-CPU Testbox and hosted calibration, an extra-SELECT negative control, and a uniform CPU slowdown that fails the independent timing guard. Round-2 Codex autoreview and exact-head ClawSweeper review found no actionable defects.

* test(gateway): match catalog read budget to binding owner

* test(codex): synchronize agent-end context scenarios

Own the fixture clock and wait for turn start and ten response progress
events before selecting completion, cancellation, or refusal. Keep the
five-second budget and require the expected terminal outcome.

Restore real timers before cancelling and joining the run so a failed
assertion cannot discard cleanup deadlines.

Validation: 62 agent-end, deadline, and lifecycle tests; extension test
types; scoped lint and format; independent P2 review. A temporary assertion
failure also verified cancellation, unsubscribe, and joined cleanup.

* test(state): intercept asynchronous snapshot preparation in lifecycle controls

* fix(state): bound and reuse fixed-read workers

Reuse healthy Node execution workers while each read retains its source pins
through native cleanup. Preserve Bun per-task retirement and the public pool
contract with an internal owned-task boundary, exact-slot settlement, and
aggregation of independent cleanup failures.

Carry snapshot reader leases and existing-schema context from the token
foundation. Capture and charge both retained path fields before queueing.
Keep best-effort quarantine admission with its existing owner.

Validated with 83 focused tests, the full changed-file gate, a normal build,
independent P0-P2 review, and five ordinary compiled Node/Bun proof runs.

* fix(tooling): complete extracted wrapper dependencies

Include the worker pool completion, core, and owned-task modules in the
existing PR wrapper component inventory so extracted wrappers reach their
normal argument validation with a complete eager import closure.

Carry the exact packaging fixture repair from canonical
5741b3c (#151967): copy the existing
packed-openclaw-tarballs helper into the no-dependency harness.

* fix(test): preserve complete Git test inventories beyond one MiB

Carry the exact two-file repair from canonical
fd0c00b (#151991).

Use the bounded 16 MiB Git inventory capture and reject child-process
errors even with status zero. Preserve working-tree/untracked tests and
the existing filesystem fallback, with the canonical boundary controls.

No unrelated main ancestry or runtime source changes are included.

* fix(sqlite): name scoped worker declaration return type
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 20, 2026
)

* perf(fleet): run registry operations in SQLite workers

* fix(state): preserve readonly admission error context

* test(gateway): retain catalog root failure diagnostics

* fix: preserve uncertain lease outcomes before caller recovery

* fix(state): reject retired read scopes and retain wrapper imports

Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries.

Include the retained-read eager dependencies in the canonical PR wrapper inventory.

* test(state): require rejection of retired read scopes

Update the three existing disposable-scope variants to expect the canonical
admission error while preserving active and unrelated source assertions.

* fix(state): keep ordinary reads in the SQLite worker

Use the existing independent readonly worker for ordinary fixed reads while
retaining cached writer custody. Validate captured file identity around opens
and acceptance, and bind previously missing paths when their first file appears.

Keep selected snapshots and native preparation scopes with their existing owners.

* fix: catalog refresh fails when previous discovery finishes

Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: openclaw#151588, openclaw#148290.

* fix(test): retain Telegram suite output on subprocess errors

* fix(ci): require full compact proof for worker policy guards (openclaw#151427)

Fix compact CI policy guards that confused a two-worker budget with a parallel-to-serial transition. Preserve inherited job ceilings on already-serial recipients and reject redundant group-policy rewrites.

Select the complete compact plan on Blacksmith and hybrid runs when the owning planner-policy test changes; keep GitHub targeting precise. Production admission-before-placement, worker limits, and measurements remain unchanged.

Validation: focused host-profile and policy cases, serial-policy negative controls, and exact-head CI run 35343663468 passed. ClawSweeper and the retained scoped review found no actionable defects. No user-visible runtime change.

* refactor(state): move fixed-read snapshot tokens off the main thread

* perf(gateway): materialize archived session rows on demand (openclaw#151574)

* fix: avoid host-speed failures in catalog performance checks (openclaw#151732)

Replace the catalog benchmark's host-dependent 20 ms median limit with 20 times an independent in-process CPU reference. Check every composed list for exactly 20 SQLite reads, including three binding-authority reads, and zero plugin-state worker operations, while preserving the existing native-RPC, file-I/O, and session-payload guards.

This is a test reliability repair with no runtime or update behavior change. Production changes: 0 lines; tests and test support: +61/-7 across two files.

Validation: exact-head CI is green; the reviewed proof includes five passing local runs, two-CPU Testbox and hosted calibration, an extra-SELECT negative control, and a uniform CPU slowdown that fails the independent timing guard. Round-2 Codex autoreview and exact-head ClawSweeper review found no actionable defects.

* test(gateway): match catalog read budget to binding owner

* test(codex): synchronize agent-end context scenarios

Own the fixture clock and wait for turn start and ten response progress
events before selecting completion, cancellation, or refusal. Keep the
five-second budget and require the expected terminal outcome.

Restore real timers before cancelling and joining the run so a failed
assertion cannot discard cleanup deadlines.

Validation: 62 agent-end, deadline, and lifecycle tests; extension test
types; scoped lint and format; independent P2 review. A temporary assertion
failure also verified cancellation, unsubscribe, and joined cleanup.

* test(state): intercept asynchronous snapshot preparation in lifecycle controls

* fix(state): bound and reuse fixed-read workers

Reuse healthy Node execution workers while each read retains its source pins
through native cleanup. Preserve Bun per-task retirement and the public pool
contract with an internal owned-task boundary, exact-slot settlement, and
aggregation of independent cleanup failures.

Carry snapshot reader leases and existing-schema context from the token
foundation. Capture and charge both retained path fields before queueing.
Keep best-effort quarantine admission with its existing owner.

Validated with 83 focused tests, the full changed-file gate, a normal build,
independent P0-P2 review, and five ordinary compiled Node/Bun proof runs.

* fix(tooling): complete extracted wrapper dependencies

Include the worker pool completion, core, and owned-task modules in the
existing PR wrapper component inventory so extracted wrappers reach their
normal argument validation with a complete eager import closure.

Carry the exact packaging fixture repair from canonical
e5772b6 (openclaw#151967): copy the existing
packed-openclaw-tarballs helper into the no-dependency harness.

* fix(test): preserve complete Git test inventories beyond one MiB

Carry the exact two-file repair from canonical
78e1224 (openclaw#151991).

Use the bounded 16 MiB Git inventory capture and reject child-process
errors even with status zero. Preserve working-tree/untracked tests and
the existing filesystem fallback, with the canonical boundary controls.

No unrelated main ancestry or runtime source changes are included.

* fix(sqlite): name scoped worker declaration return type
steipete added a commit that referenced this pull request Sep 20, 2026
)

* perf(fleet): run registry operations in SQLite workers

* fix(state): preserve readonly admission error context

* test(gateway): retain catalog root failure diagnostics

* fix: preserve uncertain lease outcomes before caller recovery

* fix(state): reject retired read scopes and retain wrapper imports

Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries.

Include the retained-read eager dependencies in the canonical PR wrapper inventory.

* test(state): require rejection of retired read scopes

Update the three existing disposable-scope variants to expect the canonical
admission error while preserving active and unrelated source assertions.

* refactor: move plugin blob storage into workers

Move all eight asynchronous BlobStore methods onto the existing shared-state
mutation and retained read owners. Preserve quotas, transactional accounting,
read-source selection, and typed error and cleanup behavior.

* fix(state): keep ordinary reads in the SQLite worker

Use the existing independent readonly worker for ordinary fixed reads while
retaining cached writer custody. Validate captured file identity around opens
and acceptance, and bind previously missing paths when their first file appears.

Keep selected snapshots and native preparation scopes with their existing owners.

* fix: catalog refresh fails when previous discovery finishes

Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: #151588, #148290.

* fix(test): retain Telegram suite output on subprocess errors

* test: align Blob worker CI inventories

Include Diffs in the expected database-worker planner group while retaining exact coverage and duplicate checks.

Carry the packaging fixture dependency from canonical main commit 5741b3c (PR #151967), whose one-line patch matches the original 8b58def.

No production or build inputs change; compiled runtime and active-writer evidence retain their original commit bindings.

* fix(state): clarify blob preparation callback contracts

* test(plugins): load Diffs lifecycle fixture through public facade
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 21, 2026
…claw#151175)

* perf(fleet): run registry operations in SQLite workers

* fix(state): preserve readonly admission error context

* test(gateway): retain catalog root failure diagnostics

* fix: preserve uncertain lease outcomes before caller recovery

* fix(state): reject retired read scopes and retain wrapper imports

Reject new admissions to closing or closed selected read scopes while keeping already-admitted readers owned through cleanup. Preserve typed invalidation at plugin discovery boundaries.

Include the retained-read eager dependencies in the canonical PR wrapper inventory.

* test(state): require rejection of retired read scopes

Update the three existing disposable-scope variants to expect the canonical
admission error while preserving active and unrelated source assertions.

* refactor: move plugin blob storage into workers

Move all eight asynchronous BlobStore methods onto the existing shared-state
mutation and retained read owners. Preserve quotas, transactional accounting,
read-source selection, and typed error and cleanup behavior.

* fix(state): keep ordinary reads in the SQLite worker

Use the existing independent readonly worker for ordinary fixed reads while
retaining cached writer custody. Validate captured file identity around opens
and acceptance, and bind previously missing paths when their first file appears.

Keep selected snapshots and native preparation scopes with their existing owners.

* fix: catalog refresh fails when previous discovery finishes

Retain selected plugin registries through awaited preparation and hand construction claims to the completed generation. Preserve stale-publication cleanup and borrowed Gateway-root ownership. Related: openclaw#151588, openclaw#148290.

* fix(test): retain Telegram suite output on subprocess errors

* test: align Blob worker CI inventories

Include Diffs in the expected database-worker planner group while retaining exact coverage and duplicate checks.

Carry the packaging fixture dependency from canonical main commit e5772b6 (PR openclaw#151967), whose one-line patch matches the original 8b58def.

No production or build inputs change; compiled runtime and active-writer evidence retain their original commit bindings.

* fix(state): clarify blob preparation callback contracts

* test(plugins): load Diffs lifecycle fixture through public facade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. 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.

2 participants