Repository navigation
fix: recognize real static-analysis consumers - #183118
Merged
Merged
Conversation
Contributor
|
🦞👀 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. |
Contributor
Author
|
Fixed: Static analysis now recognizes the 17 live consumer edges while preserving strict unused-export detection. |
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Oct 25, 2026
Static analysis now follows the real generator, configuration, generated-type, and dynamic named consumer edges for 17 live declarations without weakening unused-export detection.
This was referenced Oct 25, 2026
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 unused-export checks report 17 live declarations as dead because their consumers sit behind package-script generators, build and test-runner configuration, generated type declarations, emitted child source, or module-loader hooks that Knip does not follow on its own. That makes the cleanup signal unsafe: removing these declarations would break real build, validator, benchmark, fixture, or type contracts, while broad suppressions would hide genuinely unused exports.
User Impact
There is no user-visible runtime change. Maintainers get accurate unused-export results for these real consumers while unrelated authored exports, production-only test seams, generated outputs, and strict production/full-tree/script boundaries remain detectable. No dependency, configuration option, schema, data, package API, runtime behavior, benchmark behavior, or migration changes.
Why This Change Was Made
The repair teaches each existing owner about the consumer it already has:
tsdown.config.tsas exact inputs;tsdown.config.tsimport;The compiler projections disappear when their source consumer disappears, and no file-, directory-, or export-family ignore was added.
Evidence
On base
3270e6953055a12ceb9f8ad4a3dad908b5f27972, the repository-owned export wrapper reproduced the 17 unique declarations across 11 production rows, four full-tree rows, and five script rows, with expected overlap.The exact committed tree
bee8ae7bff50728d2e3e990314c56dd38675377athen passed the focused remote gate on a 32-CPU AWS runner:pnpm static:validators:checkreported every generated output fresh;RELEASE_ONLY_RUNTIME_TEST_FILES,createReportRunFixtureFetch, andruntimeProcessStandaloneModules) remained visible;test/scripts/check-deadcode-exports.test.tspassed 17/17 tests.The aggregate export wrapper still exits nonzero on unrelated pinned-base backlog; this PR does not relabel that backlog as green. Hosted CI, exact-head ClawSweeper evidence, and independent review are pending on the published head.