Skip to content

fix: retain maintained command and preload roots - #184233

Merged
shakkernerd merged 1 commit into
mainfrom
maintained-command-preload-roots-417
Oct 26, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
maintained-command-preload-roots-417

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

OpenClaw's dead-code audit treated 37 maintained measurement commands and one externally selected startup preload as unused files because their established invocations start outside the repository import graph.

User Impact

There is no user-visible runtime change. Maintainers can keep these intentional diagnostic and measurement entrypoints without weakening unused-file detection, while unrelated dead files and exports remain visible to the audit. Command, preload, and workload bodies; imported-child traversal; dependencies; configuration semantics; product data; and runtime behavior are unchanged.

Why This Change Was Made

The existing repositoryScriptEntries list owns maintained files that are executed by path. This change adds each source-qualified standalone command and the operator-supplied Node preload as one exact entry using the existing ! convention.

The entries are literal rather than a glob or ignore. None of the 38 files has a repository importer or spawner. The startup preload is selected through the documented --gateway-runtime wrapper and Node --import, so it is itself the external entry rather than an imported child. The analyzer continues following actual module edges from every root, including the Talk benchmark's fixture imports, and continues reporting unregistered scripts.

Evidence

The exact candidate tree received the following Darwin arm64 source-analysis coverage under the repository's supported Node 24.22.1, pnpm 12.15.0, and pinned Bun runtime:

  • All 38 assigned roots occur exactly once in repositoryScriptEntries and zero times in the unused-file residuals.
  • The production unused-file scan reported zero entries. The full-tree scan retained 10 unrelated files, and the script, production, and full-tree export scans retained 13, 7, and 32 unrelated findings respectively, confirming that this change does not hide residual dead-code reports.
  • Changed-file formatting and lint passed.
  • All 36 selected affected type graphs and consumers passed.
  • test/scripts/check-deadcode-exports.test.ts passed all 24 tests under its Node owner.
  • The full independent engineering review concluded clean after checking the complete diff, all 38 path identities, the established owner, sibling conventions, and imported-child behavior.
  • The installed autoreview returned a scoped-clean result at its P0 threshold. Its source bundle contained the config diff, so it remains advisory and does not replace the full independent review.

Hosted CI remained in progress on the exact head with no failing row in the current snapshot. No command, benchmark, workload, preload, Gateway, or channel runtime was executed because this change affects static reachability only.

@clawsweeper

clawsweeper Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@shakkernerd shakkernerd self-assigned this Oct 26, 2026
@shakkernerd
shakkernerd merged commit b703c84 into main Oct 26, 2026
89 of 90 checks passed
@shakkernerd
shakkernerd deleted the maintained-command-preload-roots-417 branch October 26, 2026 05:11
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: OpenClaw's dead-code audit now retains the 38 maintained command and preload entrypoints without hiding unrelated findings.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
OpenClaw's dead-code audit now retains the 38 maintained command and preload entrypoints without hiding unrelated findings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant