Repository navigation
fix: retain maintained command and preload roots - #184233
Merged
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
repositoryScriptEntrieslist 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-runtimewrapper 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:
repositoryScriptEntriesand zero times in the unused-file residuals.test/scripts/check-deadcode-exports.test.tspassed all 24 tests under its Node owner.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.