Repository navigation
refactor(scripts): deslop root scripts a–k - #159199
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 September 27, 2026, 4:01 AM ET / 08:01 UTC (Revision 10). ClawSweeper reviewWhat this changesThe branch consolidates OpenClaw build, install, benchmark, guard, documentation, and release scripts while fixing version-error reporting, ClawHub artifact discovery, polling-listener cleanup, and plugin-metadata output confinement. Merge readiness⛔ Blocked before merge - 1 item remains This PR remains useful: current main lacks its script consolidation and focused fixes. The prior upgrade concern does not identify a changed stored-data contract, and the submitted proof covers a published-driver update. I found no actionable patch defect. Priority: P2 Review scores
Verification
How this fits togetherRoot scripts turn CLI arguments, repository files, and release artifacts into installs, builds, documentation output, and CI or release evidence. The changed scripts support operators and automation rather than the agent's chat runtime. flowchart LR
A[CLI and repository inputs] --> B[Root scripts]
B --> C{Requested task}
C --> D[Install and build output]
C --> E[CI and release evidence]
C --> F[Docs and plugin metadata]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +161, Other -2148. Total -1987 across 72 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep shared script owners and the existing release-source validator while preserving the tested installer, artifact, and upgrade contracts. Do we have a high-confidence way to reproduce the issue? Not applicable to the refactor as a whole. The PR records original-failing, candidate-passing regressions for its four focused fixes, but this read-only review did not execute them. Is this the best way to solve the issue? Yes. The changed paths reuse existing parsers, validators, and artifact owners, and the submitted CLI and upgrade evidence addresses their relevant behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9ae6e1853062. LabelsLabel changes: No label changes. Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
bb3fd98 to
ecd179e
Compare
Consolidate repeated CLI parsing, scanning, benchmark and release projections through their existing owners. Preserve script and CI contracts. Fix malformed installer version diagnostics, flat ClawHub artifact sealing, completed polling sleep listener retention, and metadata output symlink confinement.
ecd179e to
4e0c945
Compare
Consolidate repeated CLI parsing, scanning, benchmark and release projections through their existing owners. Preserve script and CI contracts. Fix malformed installer version diagnostics, flat ClawHub artifact sealing, completed polling sleep listener retention, and metadata output symlink confinement.
## What Problem This Solves The script tree retains dormant one-off tools and CI inventory rows that its current selector already discards. ## User Impact No user-facing OpenClaw feature or active test selection changes. The maintained `.mts` entrypoints, runtime security checks, and existing CI filter remain in place. ## Why This Change Was Made Delete the 642-line private acceptance probe and 214-line dormant connect installer with their dedicated tests and obsolete test inventory/timing entries. The full reference graph separates package/workflow/docs/skill/config callers from test-only references. The probe has only its dedicated test/timing reference and was last changed September 13 in #146807. The connect wrapper describes itself as dormant and unactivated, has only its dedicated test/Bash inventory references, and was last changed September 27 in #159199. Neither was active this week. Delete 265 literal rows from `ci-proof-test-inventory.mts` that the existing `isOwnerSelectedUiE2eTest` filter already excludes. This is not a change to selection policy: the filter is unchanged and its ordered effective inventory remains 4,098 entries, byte-for-byte identical. The relevant selection policy was established in `cfa5dbf12434053460c60a25ee88fc771c666921` on October 1. Two obsolete five-line `.mjs` aliases are also removed: `check-memory-fd-repro` and `resolve-openclaw-package-candidate`. All current package, workflow, and test callers already use the maintained `.mts` entrypoints; these aliases had no inbound references and no changes since August 9 (#121005). The same reference audit deliberately retained active orphan-looking tools and the iOS sidebar fixture consumed through `OPENCLAW_IOS_ATTENTION_FIXTURE_URL`. No protected PR-tooling closure file changed. Net production reduction: **1,131 lines**, excluding tests and timing data. ## Best-effort tradeoffs accepted None in live behavior. This removes entire uncalled, dormant tools, not their security checks from a maintained path; the CI change removes only rows already filtered out. ## Evidence - Fresh-main reference graph covered 54,316 tracked files, 1,783 scripts and 25,095 edges, including package scripts, workflows/actions, docs, skills, test/runner configs and dynamic resource roots. Independent audit found no live caller or current-week activity for the four deleted tools; all five script targets are outside the 261-file executable PR-tooling closure. - Before/after evaluation of the actual applied commit: all 265 removed rows match the unchanged filter. Ordered effective array SHA-256 stays `048bb0503adb374dbe431844df8c0acc65e0cb42cd44b24c2badea55c3b89ba9`; all three predicates match on 10,279 inputs. Ordered exports and live exempt enumeration also match. - Focused proof: 253 tests passed, including both inventory cases, 140 macOS script cases, 33 maintained memory-FD cases, 61 maintained package-candidate/security cases, lint suppressions and the protected wrapper inventory. Three additional wrapper-extraction cases failed because the existing local install has `mdast-util-from-markdown` 2.0.3 while current main requires 2.1.0. The dependency manifest, lockfile, materializer and failing test are unchanged by this PR. Total wrapper wall time: 443.45 seconds; Vitest reported 397.90 seconds. No timeout, assertion, retry or skip was changed. - Runtime and static cycle checks passed with zero cycles. Independent P0/P1 autoreview was scoped-clean; the applied commit has the identical stable patch ID to that reviewed cut. - Changed-file verification passed all preceding guards, formatting, script types and all four root-test type shards. Script Knip passed with zero entries. The production/full-tree Knip scans both hit their unchanged 600-second deadlines, so the overall command is incomplete at that stage, not green. Its default remote backend did not authenticate or run checks; these are local-fallback results. Full script lint and changed-test lint passed separately. Exact-head hosted CI remains the landing gate. - Hosted CI [run 38204018042](https://github.com/openclaw/openclaw/actions/runs/38204018042) passed at `392e950df000e7dbd095fe9447392d11af7a041c`. Final exact-head census: 177 terminal checks, 79 successful, 97 intentionally skipped, one neutral, no failures or cancellations; dependency/security review and combined CI statuses are successful. No CI reruns or green-only pushes.
…#169606) ## What Problem This Solves The script tree retains dormant one-off tools and CI inventory rows that its current selector already discards. ## User Impact No user-facing OpenClaw feature or active test selection changes. The maintained `.mts` entrypoints, runtime security checks, and existing CI filter remain in place. ## Why This Change Was Made Delete the 642-line private acceptance probe and 214-line dormant connect installer with their dedicated tests and obsolete test inventory/timing entries. The full reference graph separates package/workflow/docs/skill/config callers from test-only references. The probe has only its dedicated test/timing reference and was last changed September 13 in openclaw#146807. The connect wrapper describes itself as dormant and unactivated, has only its dedicated test/Bash inventory references, and was last changed September 27 in openclaw#159199. Neither was active this week. Delete 265 literal rows from `ci-proof-test-inventory.mts` that the existing `isOwnerSelectedUiE2eTest` filter already excludes. This is not a change to selection policy: the filter is unchanged and its ordered effective inventory remains 4,098 entries, byte-for-byte identical. The relevant selection policy was established in `4544bdc0121b1d8fdc917d456015078338775fac` on October 1. Two obsolete five-line `.mjs` aliases are also removed: `check-memory-fd-repro` and `resolve-openclaw-package-candidate`. All current package, workflow, and test callers already use the maintained `.mts` entrypoints; these aliases had no inbound references and no changes since August 9 (openclaw#121005). The same reference audit deliberately retained active orphan-looking tools and the iOS sidebar fixture consumed through `OPENCLAW_IOS_ATTENTION_FIXTURE_URL`. No protected PR-tooling closure file changed. Net production reduction: **1,131 lines**, excluding tests and timing data. ## Best-effort tradeoffs accepted None in live behavior. This removes entire uncalled, dormant tools, not their security checks from a maintained path; the CI change removes only rows already filtered out. ## Evidence - Fresh-main reference graph covered 54,316 tracked files, 1,783 scripts and 25,095 edges, including package scripts, workflows/actions, docs, skills, test/runner configs and dynamic resource roots. Independent audit found no live caller or current-week activity for the four deleted tools; all five script targets are outside the 261-file executable PR-tooling closure. - Before/after evaluation of the actual applied commit: all 265 removed rows match the unchanged filter. Ordered effective array SHA-256 stays `048bb0503adb374dbe431844df8c0acc65e0cb42cd44b24c2badea55c3b89ba9`; all three predicates match on 10,279 inputs. Ordered exports and live exempt enumeration also match. - Focused proof: 253 tests passed, including both inventory cases, 140 macOS script cases, 33 maintained memory-FD cases, 61 maintained package-candidate/security cases, lint suppressions and the protected wrapper inventory. Three additional wrapper-extraction cases failed because the existing local install has `mdast-util-from-markdown` 2.0.3 while current main requires 2.1.0. The dependency manifest, lockfile, materializer and failing test are unchanged by this PR. Total wrapper wall time: 443.45 seconds; Vitest reported 397.90 seconds. No timeout, assertion, retry or skip was changed. - Runtime and static cycle checks passed with zero cycles. Independent P0/P1 autoreview was scoped-clean; the applied commit has the identical stable patch ID to that reviewed cut. - Changed-file verification passed all preceding guards, formatting, script types and all four root-test type shards. Script Knip passed with zero entries. The production/full-tree Knip scans both hit their unchanged 600-second deadlines, so the overall command is incomplete at that stage, not green. Its default remote backend did not authenticate or run checks; these are local-fallback results. Full script lint and changed-test lint passed separately. Exact-head hosted CI remains the landing gate. - Hosted CI [run 38204018042](https://github.com/openclaw/openclaw/actions/runs/38204018042) passed at `392e950df000e7dbd095fe9447392d11af7a041c`. Final exact-head census: 177 terminal checks, 79 successful, 97 intentionally skipped, one neutral, no failures or cancellations; dependency/security review and combined CI statuses are successful. No CI reruns or green-only pushes.
What Problem This Solves
Root scripts a–k repeat argument dispatch, scanner traversals, benchmark case construction, and result projection that already have an owner or an identical neighboring flow.
User Impact
Internal refactor preserving script entrypoints, flags, positional arguments, environment/defaults, output, exit behavior, CI lane selection, publication, and signing contracts, apart from the four focused fixes below. No new options, dependencies, or runtime configuration. No native UI appearance changes.
Why This Change Was Made
This maintainer-requested sweep covers the complete root a–k production subtree, largest files first. It removes 2,148 net production lines across 67 production files; five test files add 161 net lines. Existing shared helpers remain the owners; no
scripts/lib,scripts/pr, orscripts/pr-libfile changes.Fixes found along the way
dist; retain supported dependency-link leaf replacement.Evidence
Current head:
4e0c94550f70d76d7633979e566ce42ab915bf21, on base3a68ec05f929d85631faaf46c47dbfe2911015b8. Exact-head CI is green: 144 successful checks, includingopenclaw/ci-gate, Windows, and iOS smoke/evidence. Full-candidate isolated Codex autoreview is scoped-clean through P2.Blacksmith Testbox proof (Node 24.19.0, pnpm 12.4.2) verified synced source hashes and completed:
pnpm check:workflows, finalnode scripts/check-changed.mjs(335.168s), andpnpm build(391.486s). Subsequent canonical package build and integrity validation also passed (519.013s).Changed-test isolated wall costs (
pnpm test <file> --maxWorkers=1):install-cli5.401s,clawhub-postpublish1.972s,full-release-validation-state4.055s,build-external-plugin-local-dist15.395s, andinstall-sh8.867s. Linux proof does not claim real publication, signing or native-device execution. No retries, timeouts or assertions were weakened.Configured published-driver upgrade
The canonical
published-upgrade-survivorbase scenario passed in 319.926s on Blacksmith Testboxtbx_01m3gkwzwfwadrseg4m1psyngt(lease workflow). The lease is stopped; delegated Testbox workflows show cancelled after external lease cleanup, so the workflow conclusion is not the command result. The wrapper command returned exit 0 and the downloaded scenario results were inspected directly.The published
[email protected]CLI configured Gateway, model references, agents, skills, plugins, channels and logging, then performed the update to a package built in an immutable checkout of this exact PR head. Candidate SHA-256:f02a7bc3469e46e259cfa6a6c3fae87c80359f10358855054e05458f3170384b.Selected raw result fields:
{ "status": "passed", "candidateInstallMode": "updater", "updateOutcome": "success", "updateRestartMode": "manual", "failure": null, "updateResultStatus": "ok", "beforeBuildId": "2026.9.6-release-eb377ac59e6c-2026-09-23T16-33-12.144Z", "afterBuildId": "2026.9.6-4e0c94550f70-2026-09-27T05-15-05.874Z" }Automatic migration, explicit Doctor, config validation, state survival, installed-package identity, Gateway startup, health, readiness and status passed. Startup took 31s; health/readiness/status took 1s each. An unavailable custom-plugin path retained its config bytes and emitted its expected advisory. No live provider credentials or model calls were used.
The separate installer smoke exposed a same-version tarball collision in its harness. Candidate-artifact claims from that run are excluded; the separate fix is #159490 with passing boundary regression and exact-head CI (its extended smoke independently exposed a known Node shutdown deadlock); the configured survivor proof above verifies candidate and installed-file identity independently and is unaffected.
Investigated failures and review disposition
Incoming-main failures were fixed by their owners and incorporated: collector FIFO repair
5cf18de3d103a6bea797cbfe52fa8f51dce8c596and suppression-inventory correctione6fae68631f87f1894557f40a48b8c8f7a9acd1e. The independently prepared FIFO PR #159272 was closed unmerged as superseded; its landed replacement passes all 35 cases. Patch-identical rebases were verified withgit range-diff, followed by affected proof and exact-head CI.ClawSweeper revision 8 found no code or security defect and accepted the configured upgrade result as addressing its earlier proof request. Its remaining generic data-model flag is rejected as a false positive:
check-plugin-sdk-subpath-exports.mtsremoves a duplicate TypeScript callback type; the Gateway benchmark edits share synthetic configs/summaries and remove unused promises. They change no persisted user data, schema, migration, retention or serialization contract. CLI comparisons and the configured published-driver upgrade cover the relevant behavior. Ready for maintainer landing; no merge requested.