Bug type
Behavior bug (incorrect output/state without crash surfaced)
What happened
The CI check-dependencies shard's advisory unused-exports report has been silently broken, so OpenClaw has zero symbol-level dead-code detection:
pnpm deadcode:ts-unused (ts-unused-exports@11) crashes on startup: pnpm dlx resolves the latest [email protected] peer, which is incompatible (TypeError: Cannot read properties of undefined (reading 'Unknown') in lib/parser/blacklists.js). CI pipes it through || true into the deadcode-reports artifact, so the artifact is just a stack trace and nothing fails.
pnpm deadcode:ts-prune uses ts-prune, which is archived upstream (author recommends knip).
Meanwhile knip (already pinned at 6.8.0 with a curated config/knip.config.ts, enforced for unused files + dependencies) is never run with export detection. A production-mode run with --include exports,types,enumMembers on current main reports ~1,506 unused exports and ~1,053 unused exported types across ~2.4M non-test TS LOC.
Evidence
deadcode-reports artifact from main CI run 29202053366 contains only the ts-unused-exports crash stack trace.
- Local knip 6.8.0 production scan (
--include exports,types,enumMembers) near main e8f8738aae7: Unused exports (1506), Unused exported types (1053).
package.json deadcode:* scripts; .github/workflows/ci.yml dependencies case; docs/ci.md "check-dependencies shard" section.
Expected behavior
Unused-export detection should work and be enforced the same way unused files already are (scripts/check-deadcode-unused-files.mjs allowlist ratchet): a checked-in baseline of pre-existing findings that can only shrink, with CI failing on new unused exports and on stale baseline entries.
Proposed fix
- Remove the dead
deadcode:ts-prune / deadcode:ts-unused lanes and their advisory CI artifact plumbing.
- Add
scripts/check-deadcode-exports.mjs: knip production --include exports,types,enumMembers scan compared against a checked-in baseline (ratchet semantics, --update regeneration), enforced in the check-dependencies CI shard.
- Burning down the ~2.5k baseline entries is follow-up work.
Bug type
Behavior bug (incorrect output/state without crash surfaced)
What happened
The CI
check-dependenciesshard's advisory unused-exports report has been silently broken, so OpenClaw has zero symbol-level dead-code detection:pnpm deadcode:ts-unused(ts-unused-exports@11) crashes on startup:pnpm dlxresolves the latest[email protected]peer, which is incompatible (TypeError: Cannot read properties of undefined (reading 'Unknown')inlib/parser/blacklists.js). CI pipes it through|| trueinto thedeadcode-reportsartifact, so the artifact is just a stack trace and nothing fails.pnpm deadcode:ts-pruneusests-prune, which is archived upstream (author recommends knip).Meanwhile knip (already pinned at 6.8.0 with a curated
config/knip.config.ts, enforced for unused files + dependencies) is never run with export detection. A production-mode run with--include exports,types,enumMemberson currentmainreports ~1,506 unused exports and ~1,053 unused exported types across ~2.4M non-test TS LOC.Evidence
deadcode-reportsartifact from main CI run 29202053366 contains only the ts-unused-exports crash stack trace.--include exports,types,enumMembers) near maine8f8738aae7:Unused exports (1506),Unused exported types (1053).package.jsondeadcode:*scripts;.github/workflows/ci.ymldependenciescase;docs/ci.md"check-dependencies shard" section.Expected behavior
Unused-export detection should work and be enforced the same way unused files already are (
scripts/check-deadcode-unused-files.mjsallowlist ratchet): a checked-in baseline of pre-existing findings that can only shrink, with CI failing on new unused exports and on stale baseline entries.Proposed fix
deadcode:ts-prune/deadcode:ts-unusedlanes and their advisory CI artifact plumbing.scripts/check-deadcode-exports.mjs: knip production--include exports,types,enumMembersscan compared against a checked-in baseline (ratchet semantics,--updateregeneration), enforced in thecheck-dependenciesCI shard.