Skip to content

refactor(scripts): deslop scripts - #166083

Merged
steipete merged 2 commits into
mainfrom
deslop/l409-err-comments-scripts-20261005
Oct 6, 2026
Merged

steipete merged 2 commits into
mainfrom
deslop/l409-err-comments-scripts-20261005

Conversation

@steipete

@steipete steipete commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Repository scripts repeat private forwarding layers, already-completed normalization, equivalent control flow, and comments that only narrate the implementation.

User Impact

No intended user-visible change. CLI flags, environment variables, output, error messages, exit codes, release evidence, and cleanup behavior remain unchanged.

Why This Change Was Made

This is one accumulated scripts cleanup batch, with 1,707 net lines removed: 1,297 from script tooling and 410 from E2E harnesses. Existing test suites are unchanged.

  • Share identical CI ownership inventories and Docker shard descriptions while preserving their expanded values.
  • Let existing parsing, grouping, validation, and error owners carry their guarantees into callers instead of repeating the work.
  • Inline single-use forwarding functions and remove unused private options, duplicate branches, and repeated version-range update logic.
  • Keep asynchronous cleanup, recorded failures, publication reconciliation, security checks, and lazy source loading intact.
  • Remove narrating headers/JSDoc and stale history while retaining useful usage examples and comments explaining constraints.

The PR tooling and its runtime closure, generated files, and files occupied by other deslop work were excluded. No dependencies, public SDK contracts, config/schema shapes, baselines, or suppressions changed.

Evidence

  • Linux validation on an isolated remote machine: 3,662 focused tests passed across 152 selected files, with 17 existing platform/tool-dependent skips. Three source-text assertions led to retaining the original shell forms; the test suites themselves are unchanged.
  • The E2E runtime build and go -C scripts/docs-i18n test ./... passed (Go 1.27.1).
  • Candidate Madge and runtime import checks reported zero cycles; clean-base Madge also reported zero.
  • Six version/changelog fixtures matched the original implementation byte-for-byte, and all CI UI inventory exports remained deeply equal.
  • Fresh independent review of the final candidate completed scoped-clean at P0/P1. Earlier concerns were checked against the unchanged owner implementations before the final review.
  • The changed-file gate passed formatting, snapshots, ratchets, all selected type checks, Knip scans, and extension lint. It stopped at three scripts-lint findings; those simplifications were withdrawn. The final exact-source rerun passed both cycle checks, all 93 affected tests, and scripts lint (1,324 files; zero warnings/errors). The first hosted run exposed a timing-result inference contract and a restart-test source delimiter; both files were withdrawn entirely. The correction passed 49 focused tests, both cycle checks, and node scripts/run-tsgo.mjs --noEmit -p test/tsconfig/tsconfig.test.root.tooling.json, plus fresh independent review. Both originally failing jobs passed on the corrected head. Exact-head CI attempt 2 is green; the earlier failure and diagnostic retry are recorded below.

CI investigation and final result

Exact head fa4c373681e5f0e628a6b6256bf5468a7ccf3f52 completed CI run 37453548755, attempt 2 successfully. The paginated pre-merge census found no failed or pending check runs.

Attempt 1 failed checks-node-compact-small-10-2 and therefore the aggregate gate. test/scripts/bench-gateway-installed.test.ts:435 (retains settled launches and state in a single cohort) received EPROCESSGROUP_CLEANUP_FAILED: “Managed command exited while its process group remained active”, followed by eventual processTreeState: terminated, under the pinned Bun build. The error is emitted by unchanged scripts/lib/managed-child-process.mts, inside the lane's excluded PR-tooling closure. The installed route's only changed dependencies remove two narration comments; the changed live-evidence logic is not loaded.

Twenty clean-base repetitions at 4304c49a8ea76c6f165115fc9502d70c5e56a224, with exact CI Bun revision 1.4.3-canary.1+667c4ab22, passed. On resumption, current-main inspection found no owner repair or matching hosted baseline failure. One diagnostic rerun of the exact failed hosted jobs then passed on the unchanged PR head. This is not claimed as a source fix; the original process-settlement event remains a tooling follow-up. No inherited-red or admin exception is used.

Historical cancelled PR context and evidence and dispatch automation runs have successful same-head replacements (runs 37456112770 and 37456112805). No test job lacks completed proof.

@clawsweeper

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

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts docker Docker and sandbox tooling size: XL labels Oct 6, 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 Oct 6, 2026
@clawsweeper

clawsweeper Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed October 6, 2026, 7:38 AM ET / 11:38 UTC (Revision 3).

ClawSweeper review

What this changes

The branch simplifies repository scripts and end-to-end harnesses by consolidating repeated logic, inlining private forwarding helpers, and removing narrating comments.

Merge readiness

⛔ Blocked before merge - 2 items remain

The cleanup remains distinct from current main, and source review found no actionable introduced defect. The earlier generic compatibility blocker is unsupported; the failed required CI gate remains unresolved without proven attribution.

Priority: P3
Reviewed head: fa4c373681e5f0e628a6b6256bf5468a7ccf3f52

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Coherent simplifications with substantial reported validation and no actionable introduced defect found; the failed CI gate remains a separate landing constraint.
Proof confidence 🌊 off-meta tidepool Not applicable: The trusted-author exemption applies to this internal scripts cleanup. Reported differential fixtures and targeted validation supplement source review; no stored-data contract changes or authority-chain proof requirement were identified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The trusted-author exemption applies to this internal scripts cleanup. Reported differential fixtures and targeted validation supplement source review; no stored-data contract changes or authority-chain proof requirement were identified.
Evidence reviewed 10 items Pinned introduction and complete scope: Inspected the merge-base-to-head introduced hunks across the complete scripts-only inventory. The original head records c240b64 as its parent. The stale test merge was not used to attribute base-branch changes or removals.
Compatibility concern resolved by source: The shared version-range updater preserves the existing semver comparison and higher plugin API floors. The Docker install change extracts identical read-only npm-pack parsers. Neither changes a persisted shape, introduces a migration, or expands the public SDK.
Current main still contains the repeated implementation: The fetched main revision retains separate dependency-range and plugin-API-range updaters; the branch’s consolidation is not already present there. Main also retains the separately declared Docker install shards.
Findings None None.
Security None None.

How this fits together

OpenClaw’s repository scripts turn source, package metadata, and operator inputs into builds, validation plans, release evidence, and test results. These changes simplify that tooling while preserving its existing contracts.

flowchart LR
  A[Source and package metadata] --> C[Repository scripts]
  B[Operator and CI inputs] --> C
  C --> D[Validation and planning]
  D --> E[Build and release artifacts]
  D --> F[Test results and evidence]
Loading

Before merge

  • Review config compatibility - Confirm compatibility and upgrade impact for the changed config or default surface before merge.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

PR surface statistics unavailable: the file list is incomplete.

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: scripts/test-install-sh-docker.sh, unknown-data-model-change: scripts/sync-plugin-versions.ts, unknown-data-model-change: scripts/test-install-sh-docker.sh, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best possible solution:

Keep the scripts simplification with existing validation, cleanup, publication, and compatibility owners intact, using the normal exact-head landing gates.

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

Not applicable to the cleanup itself. The hosted benchmark failure is documented, but its baseline replay did not reproduce it and this read-only review did not execute tests.

Is this the best way to solve the issue?

Yes: consolidating equivalent private logic into existing owners is a maintainable cleanup, and the inspected removals preserve their owning invariants.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 78e8de276bd2.

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is internal tooling cleanup with no intended user-visible change; the failed check does not establish an urgent product regression.
  • 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 trusted-author exemption applies to this internal scripts cleanup. Reported differential fixtures and targeted validation supplement source review; no stored-data contract changes or authority-chain proof requirement were identified.

Evidence

What I checked:

  • Pinned introduction and complete scope: Inspected the merge-base-to-head introduced hunks across the complete scripts-only inventory. The original head records c240b64 as its parent. The stale test merge was not used to attribute base-branch changes or removals. (fa4c373681e5)
  • Compatibility concern resolved by source: The shared version-range updater preserves the existing semver comparison and higher plugin API floors. The Docker install change extracts identical read-only npm-pack parsers. Neither changes a persisted shape, introduces a migration, or expands the public SDK. (scripts/sync-plugin-versions.ts:35, fa4c373681e5)
  • Current main still contains the repeated implementation: The fetched main revision retains separate dependency-range and plugin-API-range updaters; the branch’s consolidation is not already present there. Main also retains the separately declared Docker install shards. (scripts/sync-plugin-versions.ts:36, 78e8de276bd2)
  • Existing validation owners retain their guarantees: The translation parser’s existing findTaggedBodyEnd rejects trailing text; the screenshot manifest loader independently enforces the complete family topology; the release workflow waiter returns only for terminal success. The removed checks repeat those existing guarantees. (scripts/docs-i18n/doc_mode.go:117, fa4c373681e5)
  • Required CI failure verified: The job metadata binds the failed checks-node-compact-small-10-2 shard to the reviewed head and identifies Run Node test shard as its failed execution step. The captured PR body reports EPROCESSGROUP_CLEANUP_FAILED and explicitly declines an inherited-failure exception; its passing baseline repetitions are not claimed as a fix. (test/scripts/bench-gateway-installed.test.ts:435, fa4c373681e5)
  • Benchmark failure is not an established patch defect: The installed-cohort entry dynamically loads gateway-bench-installed.ts and uses the unchanged managed-child-process.mts owner. The installed owner, cleanup owner, and withdrawn timing file have no introduced diff; the changed live-evidence owner belongs to the concurrency benchmark. This does not prove the hosted failure is inherited. (scripts/bench-gateway-startup.ts:988, fa4c373681e5)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: 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 (2 earlier review cycles)
  • reviewed 2026-10-06T10:54:09.723Z sha c240b64 :: blocked before merge. :: none
  • reviewed 2026-10-06T11:07:29.390Z sha fa4c373 :: blocked before merge. :: none

@steipete

steipete commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Review disposition for fa4c373681e5f0e628a6b6256bf5468a7ccf3f52:

The automated review reported no actionable source finding. Its compatibility notices refer to an incomplete file inventory; the complete candidate has 240 scripts-only files and preserves the existing config, persisted-data, and protocol shapes. In the specifically flagged paths, sync-plugin-versions.ts shares the existing range-update logic (six differential fixtures matched the original output bytes), and test-install-sh-docker.sh extracts two identical read-only npm-pack version parsers. Neither introduces a migration or a new stored shape. ci-run-timings.mjs is now unchanged from the base.

The first hosted run did find two contracts missed by the selected pre-push proof: timing-result type inference and a restart-test source delimiter. Both files were withdrawn entirely, without changing tests. The correction passed 49 targeted tests, the exact failing TypeScript project, both zero-cycle checks, and fresh independent review. The corrected-head hosted run is in progress.

@steipete
steipete merged commit dd1c135 into main Oct 6, 2026
263 of 267 checks passed
@steipete
steipete deleted the deslop/l409-err-comments-scripts-20261005 branch October 6, 2026 21:51
@steipete

steipete commented Oct 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 7, 2026
* refactor(scripts): deslop scripts

* fix(scripts): preserve existing timing and restart contracts
RomneyDa added a commit that referenced this pull request Oct 28, 2026
Preserve the tested pinned-P unit from 9961d25.
Source lineage: #178179, #179112, #174693, #166083 and #172883.
No registry or release publication.

Co-authored-by: Peter Steinberger <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: XL 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