Repository navigation
fix: prevent package import scans from stalling on helper calls - #158705
fuller-stack-dev wants to merge 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed October 1, 2026, 9:05 AM ET / 13:05 UTC (Revision 24). ClawSweeper reviewWhat this changesThe PR delays argument tracing in OpenClaw’s package dependency scanner and adds a subprocess regression for repeated opaque helper calls. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 4 items remain The optimization remains necessary, but both previously reported defects remain in the published head. The author’s correction and its qualification results are explicitly unpublished; they cannot clear this head. Priority: P2 Review scores
Verification
How this fits togetherThe package dependency scanner reads JavaScript source without executing it and identifies imports belonging to the package. Release validation and Node bootstrap packaging consume those results to check dependencies and retain required files. flowchart TD
A[Package JavaScript] --> B[Parse source and bindings]
B --> C[Trace possible callees]
C --> D[Trace required arguments]
D --> E[Collected imports]
E --> F[Release dependency validation]
E --> G[Node bootstrap packaging]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +4, Tests +36. Total +40 across 2 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the existing scanner owner and dependency semantics, with invocation-scoped reuse of demanded argument origins and a correctly typed factory fallback. Do we have a high-confidence way to reproduce the issue? Yes, source establishes both mechanisms: repeated opaque arguments expand eagerly on main, while nested conditional resolve/join callees repeat argument tracing in this patch. No target code or tests were executed during this read-only review. Is this the best way to solve the issue? Yes, demand-driven tracing in the existing scanner is the narrow repair, provided demanded origins are reused within each invocation and the factory fallback remains typed as Origin. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9bf17b16a878. LabelsLabel changes: No label changes. Label justifications:
EvidenceAcceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (23 earlier review cycles; latest 8 shown)
|
|
The correction remains unpublished. GitHub still has The ambiguous-callee finding was real. The earlier candidate exceeded five seconds on 24 nested calls whose callee could be The scanner files are unchanged from the independently reviewed correction. On the current candidate, the exact original asset scans in 390 ms with the same import result. Current-context proof includes 183 focused tests and 23 independent source-blind semantic cases. The fixture is parsed only, never executed. The previous native build and check passed, but its full test run was cancelled after the known browser/TUI baseline failures. Landed #158683 and #158748 are now incorporated. The candidate also carries the canonical #158778 lint prerequisite with author credit; focused lint, formatting, and three existing UI cases pass. Native correction review validates READY. Full native correction gates are waiting for the coordinated local test slot; corrected-head publication, CI, and fresh Claw review still follow. No full-suite or release:check pass is claimed. |
|
Closing as superseded by #167121, merged as 245b7f6. Current main at 9c199dc retains that scanner implementation. It resolves callees before exploring arguments and computes the required argument origins once per invocation, covering both the original opaque-call stall and the repeated ambiguous-callee work identified in this PR's review. The merged PR records the same published rfb asset scanning in 196 ms, a regression that fails on the original implementation and passes through the release-verification consumer, and 78 passing tests. This reconciliation checked current source and that published evidence; it did not rerun those tests. The intended fix is already on main. This PR's unpublished correction is preserved while its additional work is reconciled. |
Related: #158673
What Problem This Solves
Release verification can spend minutes on one CPU while scanning a generated browser asset with repeated helper-call arguments.
User Impact
The affected package import scan completes promptly. Node worker bootstrap retains its dependency decisions. Earlier Mac worker pruning results are historical because canonical Bun migration retired that path. No configuration change or migration is required.
Why This Change Was Made
The scanner expanded arguments even when an opaque call could not use their origins. It now resolves possible callees first and computes demanded argument origins once per invocation. This also avoids repeated argument scans across ambiguous Node path callees. Scope, writes, cycles, working-directory changes and immutable path snapshots keep their behavior. There is no cross-query cache or file exclusion.
Native qualification also required credited fixture and consumer repairs. These include canonical CommonJS closure resolution from #160583 and the existing recovery-helper bundle allowance from #160717. Private Git fixtures now sanitize before bootstrap; worker cleanup joins owned children; port and lease fixtures preserve their actual lifetime contracts. Original credit for Jason (Json)'s reviewed work and Peter Steinberger's canonical fixes remains in the commits.
Evidence
Published head remains
8b115300897146a5afa7a5bae076e6849ca8642d. Local correctionef789ababa565f801053480e7d3a24c797c42b0fis unpublished and unmerged. It integrates canonical18154cae312943e32491b9d788ad3b6e3bb1ff11, including fs-safe 0.22, CoW copy/restore, and native wrapper/runtime preparation changes, while preserving original publication ancestry. Both scanner source files are unchanged from the previously qualified repair. The credited pinned-pnpm normalization now matches the canonical lockfile. Its no-op startup proof covers that normalization, not the newly integrated dependency graph.The integration preserves the reviewed daemon fixture from Jason (Json)'s
bacb2e7bafd2e86c9e4a44cb9de0166dbe9bb8c2. Inline ENOSPC refusal before authoritative publication and file-backed compensation remain separate cases, checking real partial writes, artifacts, receipts, no restart, and warning history. The complete 708-line file was audited. Its exact source passed independent P0-P2 review and 14 daemon cases within a 90-case supplier run, plus typed lint and formatting. That run preceded fs-safe 0.22 and is not current combined-context clearance.Canonical #162599 now owns checkpoint equivalence through committed-content generation checks. This correction removes the superseded Windows checkpoint callbacks, successor-generation promotion and extracted removal module. Canonical restore, cache and generation production files are preserved exactly. The distinct native-reader refusal and successful same-fixture retry regression remains for both agent and shared databases.
Native correction review validates READY FOR /prepare-pr, meaning source readiness for the required gates. Before the latest dependency/restore integration, matching-source qualification passed 58 planner and 17 restore cases in 163.99 seconds across two shards. The reviewed browser fixtures passed all 44 cases across three files. A negative control showed that the old delete-failure test could pass without reaching the fault; the corrected test rejects the same input and now observes both close and fault occurrence. Deferred checkpoint waits reject early operation settlement and join their work in
finally. Whole touched tests and helpers were audited; distinct regressions and failure assertions remain. Independent P0-P2 reviews passed within their stated source-context limits.On unchanged canonical production, native Windows recovery qualification passed the real native-close failure, same-owner retry, reopen and subsequent restore observation. This falsified a separate remaining cleanup defect; the temporary observation was consumed and removed. Independent canonical acceptance passed normal restore and foreign-write refusal, with committed WALs observed before restore and fresh persisted reads afterward. The separate second-normal invocation clause was not rerun on canonical source.
Earlier seven-case Windows qualification and all three acceptance clauses passed on the now-superseded prerequisite. Its declaration and fault-target spelling failures remain historical evidence. Those earlier results are not presented as proof for the canonical replacement.
Current combined build/check/test, corrected-head CI and fresh ClawSweeper completion remain pending. No scanner compiler or broad suite is running while the preceding coordinated native gate is active. The latest canonical scanner still contains the original affected implementation, so this repair remains necessary.
On predecessor
59a5f370fca967e98d79d6ac833856c0e789ed89, native build passed in 13m35.5s and full check passed. The process shard then failed one assertion comparingnode.exewithnode.EXE; 859 tests passed and 55 had existing skips. The full gate was cancelled after this failure, admitted children settled, and exact-token native lock recovery succeeded. This is a failed gate, with cancelled coverage unproven.The unchanged 33-case child-adapter file reproduced that failure. A private filesystem probe proved both spellings identify the same executable inode; the explicit PATHEXT controls which spelling the resolver returns. The one-line fixture correction names its file
node.EXEto match.EXE, preserving the exact entrypoint, prompt arguments and shell-escaping assertions. All 33 cases now pass, as do 22 adjacent cases with 28 existing Windows-only skips on macOS. Typed lint, formatting and independent P0–P2 review passed. The whole touched test file and its helpers were audited; no cases, assertions, skips or deadlines were removed or weakened. Production resolution is unchanged.A credited browser fixture simplification clears the strict line cap encountered by the shared prerequisite gate. It preserves all 28 cases and assertions while sharing repeated setup and joining the paused sweep in
finally. The exact supplier preimage and postimage were verified. Supplier lint changed from failing to passing; all 28 cases passed before and after, with typed lint and independent review also passing. This is scoped supplier evidence, not a completed scanner gate. A further credited fixture correction uses canonical storage keys to test malformed fields, rejects early sweep settlement, and awaits database closure before restart and teardown. All 28 cases and 93 assertions remain. Its supplier passed 44 cases across three files with independent review.The current composition adopts canonical updater progress and Kysely lint owners from
c03ee95e109d671ed7f4d918346a7cdc0f419d69, replacing the superseded supplier implementation while preserving contributor ancestry. Terminal publication now owns final progress disposal; the temporary publicpauseAPI and only its obsolete assertions are removed. Useful immutable-snapshot, committed-row and package-generator tests remain. The canonical lint fixture also retains direct and striped malformed-SQL failure checks. At that earlier qualification stage, all 59 shared prerequisite postimages matched the reviewed composition, with whole-file audits and independent review recorded. The owner's 76-case recovery/planner run passed, as did the five-case lint fixture. These are scoped supplier results, not a current scanner full-suite pass. The earlier supplier CI run 36828820775 remains failed evidence. The Windows rollback repair now has the scoped native proof described above; combined-context gates remain pending.On predecessor
7d1d31e4de14a47f3586d7ec322351dc5bb7f672, native build passed in 14m55.5s. Full check stopped during preflight: 22 guards passed and the addedwithTestTimeoutreadiness call in the node-worker fixture failed the rule against new wall-clock test deadlines. Types, lint and tests were not reached. The reviewed correction uses Vitest's cancellation signal through the existingwithinTestowner. Both real-child cases and their assertions remain; the supplier proved the ratchet red/green and both cases passed. Native failure recovery completed after owned processes settled. This remains a failed full-gate attempt.The correction also incorporates canonical #162431 for explicit Gateway port reservation and a reviewed fixture resolution from identical base/local/main inputs. All three resulting files match the supplier's tested source. Its 32 acquisition cases and 19 listener/environment cases passed. The complete touched tests were audited, with no cases, assertions, skips or budgets weakened. These are matching-source supplier results, not a new full-suite pass on the scanner head. The missing UI scope-error import is now on canonical main as
03137c1d729e.Matching scanner and surviving-consumer source passed 242 tests across four files on Node 24.21. The exact supplied asset scanned in 210.931 ms and returned its sole relative import; installed-root manifest validation took 229.986 ms with no errors. The two permanent CPU regressions took 205 ms and 106 ms; their single-worker file shard took 2.05s. Current hosted cost is unmeasured. The fixture was only read and parsed. Canonical Bun migration retired Mac node-worker pruning and its test, so earlier Mac-pruning results below are historical.
Earlier correction qualification
On parent
2e1a1c83f289bdf03ea8ce098bad0fd9394582bd, native build passed in 675.6s and full check passed. The Skills shard failed “replans a directory replaced between source planning and the first scan” withpath-mismatchcaused by a realENOENT. It completed 136 files with 133 passed, one failed and two existing skips; 1,735 tests passed, one failed and four were skipped. The full gate was cancelled after that footer, all owned children settled, and native lock recovery completed. An unchanged replay of all 136 executed files in the same observed order passed 1,736 tests in 205.93s. It did not reproduce the original concurrent full-suite load and does not clear the failed gate.The final correction serializes the fixture's injected replacement against overlapping descendant plans before their real filesystem probes. The selected root still finishes planning before replacement, and replacement still precedes its watch invocation. A controlled comparison reproduces the original
path-mismatch/ENOENTand passes with the corrected fixture under the same imposed schedule. This demonstrates the race mechanism; historical scheduling was not directly observed. A rejected first draft exposed a stale descendant scope and was discarded before commit. Production behavior, strict startup rejection, all ten fixture cases and their assertions remain unchanged. The barrier releases infinally.The correction passed 27 focused cases across the missing-root, registration-gap and filesystem recovery files, plus the services type graph, scoped typed lint and formatting. A real filesystem failure control preserves
ENOENTand verifies joined close, zero watcher owners, closed subscriptions and removal of its private root. Independent source-blind validation passed seven clauses across fault, regular and red/green comparison runs. Its first-scan observation is the watch invocation before watcher creation, not a direct internal scan timestamp. API review found no P0–P2 issue in the diff and supplied lifecycle/helper context; the full touched file was unavailable to that reviewer and was separately audited in full by the lead and coordinator. These scoped results do not qualify the historical full-suite schedule or a live Gateway.On predecessor
6ea03340eca4f2c92f64907ee443404c9e82b2cb, native build passed in 12m46.9s and full check passed. Full tests were cancelled after the UI pairing case "expires only the currently active setup" reported 17 remaining timers instead of zero. An unchanged replay of the original 73-file UI prefix passed all 3,071 tests in 91.59s. One passive diagnostic repeated that same observed order and passed all 3,071 tests in 99.16s, with an empty final timer heap and only the two expected pairing timers observed. Neither result explains the original failure or proves a fix; the original full-group conditions were not reproduced. That bounded uncertainty remains recorded under the repository's normal review/CI continuation policy. No assertion, timeout, retry or skip was changed. Prior phase and supplier results do not constitute a completed full gate for the current correction.c849a831a17fd4508684a5cda94e688b0c00c7eb, with Babel 8.0.6, exceeded a 10-second scanner bound on the exact 190,454-byte asset. Parse/bind took 99 ms. The corrected scanner took 152 ms and returned the sole expected relative import; installed-root manifest validation took 213 ms with no errors. A separate ambiguous-callee regression failed on the prior candidate and completes in 59 ms with the correction.Fixture SHA256:
798095b29965d623b069bab48f10a7ebf384a7047e1c25a85a4c38797db23980.The earlier 6 MiB recovery-helper guard and CommonJS closure refusals are addressed by the composed canonical consumer repairs and focused proof. No completed full
release:check, successful whole-package bootstrap archive, signed Mac qualification or Darwin freeze clearance is claimed.Earlier native qualification and remaining full-suite gap
On predecessor
20a416758aac6482b5bf8ea3722282f922e91e1c, local build passed in 12m19s and full check passed. The Testbox run exited 255 after roughly two hours during tooling tests, without a finalized failing case. The lease completed and its Actions run was cancelled. Provider/transport diagnosis remains separate from scanner correctness.Completed outer groups, excluding nested fixture summaries:
A later local run on
4f31cdabc783a7c26a4fe21441ea972c77f311adpassed build in 11m06.3s and all typecheck lanes. It was cancelled during lint before tests when the Git bootstrap fixture defect was proved. Those phase results remain historical; neither run supplies a completed gate for the current correction.Subsequent local qualification exposed additional fixture failures and a Gateway SIGSEGV. The original crash remains unattributed. A later Gateway control passed 109 files and 3,737 tests with two existing skips before cancellation; it used a new compiler cache and leaves 226 original files unqualified. Skills notification timing and historical FTS failures retain their recorded evidence limits. Later fixture controls qualify their own repairs without retroactively clearing failed full runs.
Shared gate prerequisites
Credited transfers retain their original attribution and scoped proof:
The correction integrates reviewed canonical
2b4055f8dd703e9c09985940dce9a9c6fc3c29bf. The live-build fence uses its canonical stopped-service check and discovery owner. Both spawn-broker fixtures retain strict transport callbacks and joined cleanup. Seven matching composition files are covered by the supplier’s 210 passing cases with one existing skip across 13 files in 197.017s. These are matching-source results, not a full Scanner gate.Credited
6158df93e876df8225a39b16cb04ffc47282cb6ckeeps supervisor markers independent of state-path imports, so private test HOME is installed before state paths are captured. Three fresh-child cases fail before the repair; the original config-I/O case remains. The final supplier passed 46 focused cases, 12 independent source-blind children, and changed checks. The initial new cleanup assertion incorrectly included a preexisting loader cache; it was corrected to require home removal while preserving those exact prior entries. Original sandbox assertions were unchanged. The complete test, helpers and both owner modules were audited, and all three transferred files match the reviewed supplier.7e13890ecccc4d66035e6fe00ac52b7540a424dadisposes chat view state in three UI fixture teardowns before existing cleanup. In the supplier's original-relative-order four-file reproduction, 28 cases passed and the viewport case failed with four scheduled frames; the correction passed all 29 cases with one frame. Independent original/reverse-order and viewport-alone controls passed 29/29/11 cases, and scoped types, lint and formatting passed. All 18 fixture cases remain after whole-file/helper audit. Matching preimages and postimages justify reuse here. This repairs a separately proved fixture leak and does not establish the Scanner pairing-timer failure's cause.The correction integrates canonical
3420ad1714228fb8fe2c08afe3c3a799ced4732f. Four matching fixture files passed 154 cases in the supplier’s native run, covering local-command MCP settlement, model switching, snapshot cleanup ownership and signal custody. Complete local-command and cleanup-owner test audits preserve their assertions and failure paths. The scanner owner, tests and dependency inputs are unchanged.Credited
2b01ada1baa9a00fc080dc94add08a3e8c4437d9makes yielded-followup fixtures join persisted cleanup after the canonical awaited-cleanup change. A controlled delayed acknowledgment reproduced the old finite-poll failure; ten cases then passed, and source-blind acceptance passed 580 cases across 16 files. That acceptance preceded an equivalentObject.assignlint adjustment; the final bytes passed scoped lint and types. This does not establish the historical Gateway crash cause or a new Scanner full-suite pass.Current qualification also includes reviewed model-switch settlement, spawn bootstrap/transport fixture corrections, FTS watcher/clock isolation, and signal-custody fixture isolation. The signal fixture uses a private singleton key while exercising the real cleanup callback; all ten cases and assertions remain. The supplier reproduced five failures in the original 137-file command, then passed 135 files and 1,367 tests with two existing file skips and six existing test skips. Three predecessor/successor controls passed 30 cases. The FTS supplier passed all 26 cases. These are matching-source supplier results, not new Scanner full-suite results.
The signal controls preserve an earlier cleanup owner and its listeners, restore the intercepted registration, and verify real successor bytes are removed. Source-blind output did not separately expose SQLite-open/worker counters; the unchanged per-case forbidden-call assertion was independently source-audited. Original command order does not establish historical per-worker scheduling.
b87659c38b5c680c70e9578eb865d89c4f604e14and2cba7ab4bb15fef297730dd7b54149bef2993f9cisolate native PR fixtures from inherited Git/config state, including bootstrap. Real private repositories verify foreign index, refs and hook behavior.d705a34117660cc4651e844576332fa4ca0a347bapplies the existing environment owner to four planner bootstrap calls.The obsolete outer MCP file-order wrapper is retired under current native routing, which separates its original memory/requester pairing. Those owner tests remain. A separate later runtime/local-command mutation control verifies singleton isolation for that composition; it does not prove the old pairing or historical timeout cause. Local-command setup and teardown await runtime disposal before retiring the fixture transport factory. All four transport cases and real request expectations remain.
0fa080f71eb40c9eb1f5a3b6b7c97f6dafc448d5uses real lifecycle errors and restores lease timers; 27 lease/adjacent cases pass.74442a24f612087a9304dd9a22dc6327d04a27c9retains native acquisition port claims through adoption and cleanup; the causal regression and all 32 acquisition cases pass.Canonical
bbbb3b464a9fe6094a65cc391ce3db94a1c29c07and1f7886c4ad8ded9bf83de04555b0c2776b110930serialize fixture journal writes and join owned children before state removal. Causal red/green, original recovery cases, permanent cleanup regressions and independent cleanup clauses cover settlement and refusal.b464a9a55d1bbe07c457d3be131ff4bcb83b1a51keeps GitHub item icons with their first label line while oversized labels wrap. Seven browser tests and six independent clauses across 80 combinations cover LTR/RTL overflow and overlap.Reviewed Slack fixture extraction, session-roster type extraction, restart-fixture isolation and canonical
3a300c650a5b87c4f84afeea7c2ff3a1df70e4eescenario-reference repair address qualification prerequisites. Original credit is preserved in the commits.Entire touched tests, fixtures, imports, setup/teardown and skips were audited. Source-text checks were replaced with observable private-Git behavior. Obsolete MCP cohabitation and literal fixture self-checks were removed for recorded ownership and redundancy reasons. Distinct regressions remain; assertions, retries and timeouts were not weakened. Historical failures remain failed evidence, and reused owner results are not represented as new full-suite passes.
The captures below use the same synthetic component fixture, Chromium renderer and 200/208-pixel columns. Base:
1fe560c198c2917154e2e1b130b0df3352ac5114. Head:b464a9a55d1bbe07c457d3be131ff4bcb83b1a51, byte-identical to the transferred CSS/test. This proves component layout, not a full Gateway workflow or every browser engine.Before video:
https://91b59577e757131d68d55a471fe32aca.r2.cloudflarestorage.com/openclaw-crabbox-artifacts/crabbox-artifacts/v2/org/b3BlbmNsYXc/owner/Z2l0aHViOjI2MzA2MDIwMg/pr-158680/publish/20260928-061345-944996000/before.mp4?X-Amz-Expires=604800&X-Amz-Date=20260928T061345Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=a677a1e59413a4e54bcc2da5fec6164a%2F20260928%2Fauto%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=7e738bc0a2aaf033c3881374b5d220d472c0fd32ed2f6df84af0a21ee47a6ef1
After video:
https://91b59577e757131d68d55a471fe32aca.r2.cloudflarestorage.com/openclaw-crabbox-artifacts/crabbox-artifacts/v2/org/b3BlbmNsYXc/owner/Z2l0aHViOjI2MzA2MDIwMg/pr-158680/publish/20260928-061345-944996000/after.mp4?X-Amz-Expires=604800&X-Amz-Date=20260928T061345Z&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=a677a1e59413a4e54bcc2da5fec6164a%2F20260928%2Fauto%2Fs3%2Faws4_request&X-Amz-SignedHeaders=host&X-Amz-Signature=a95c81c2122825713eddf588b9638379ea62a6816c358381340a468443784943
Contract · Raw before · Raw after · Artifact manifest
The four screenshots were independently downloaded, hash-verified and visually inspected before reuse. They are attached in the originating chat and were verified loaded and visible on this public PR page in Chromium. Links expire October 5, 2026.