Skip to content

refactor: localize internal implementation constants#101758

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/deadcode-all-surfaces-20260707-v48
Jul 7, 2026
Merged

refactor: localize internal implementation constants#101758
vincentkoc merged 1 commit into
mainfrom
refactor/deadcode-all-surfaces-20260707-v48

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Implementation constants in 54 core, bundled-plugin, and Control UI modules were still exported even though no other tracked file referenced those names. Those exports inflate the apparent API surface and keep dead-code reports noisy.

Why This Change Was Made

Localize 76 constants that are used only inside their defining module. Public barrels, package entrypoints, provider contracts, Plugin SDK surfaces, Codex protocol/runtime declarations, fixtures, and declaration files were excluded.

User Impact

No behavior change. The codebase exposes a smaller internal value surface and the unused-export report has fewer false-positive candidates.

Evidence

  • Blacksmith Testbox tbx_01kwygfwspedmmr654db8z1bym: exact committed diff passed pnpm check:changed
  • Targeted serial suite across 18 files: 515 tests passed in 13 Vitest shards
  • node scripts/check-duplicates.mjs: zero clones across production, extension, and test lanes
  • pnpm deadcode:report:ci:ts-unused: 3,589 -> 3,576 modules with unused exports; all 76 selected names removed from their originating module entries
  • fresh branch autoreview: clean at 0.91 confidence
  • git diff --check

@vincentkoc vincentkoc self-assigned this Jul 7, 2026
@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix channel: msteams Channel integration: msteams channel: slack Channel integration: slack channel: voice-call Channel integration: voice-call app: web-ui App: web-ui gateway Gateway runtime extensions: memory-core Extension: memory-core commands Command implementations agents Agent runtime and tooling plugin: google-meet extensions: oc-path extensions: ollama extensions: openrouter plugin: logbook Logbook automatic work journal plugin size: S maintainer Maintainer-authored PR labels Jul 7, 2026
@vincentkoc

Copy link
Copy Markdown
Member Author

Land-ready proof:

  • Blacksmith Testbox tbx_01kwygfwspedmmr654db8z1bym: exact committed diff passed pnpm check:changed.
  • Targeted serial suite: 515 tests passed across 18 files and 13 Vitest shards.
  • Full duplicate scan: zero clones across production, extensions, and tests.
  • Unused-export report: 3,589 to 3,576 affected modules; all 76 selected names disappeared from their originating entries.
  • Fresh committed-diff autoreview: clean at 0.91 confidence.
  • Review artifacts validated with zero findings; guarded prepare completed at 7d833e87a527b18dc5732b55fbcefea1ded25c76.

No docs or changelog update is required for this internal mechanical refactor.

@vincentkoc
vincentkoc marked this pull request as ready for review July 7, 2026 15:33
@vincentkoc
vincentkoc merged commit 3d20614 into main Jul 7, 2026
219 of 227 checks passed
@vincentkoc
vincentkoc deleted the refactor/deadcode-all-surfaces-20260707-v48 branch July 7, 2026 15:34
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: discord Channel integration: discord channel: imessage Channel integration: imessage channel: line Channel integration: line channel: matrix Channel integration: matrix channel: msteams Channel integration: msteams channel: slack Channel integration: slack channel: voice-call Channel integration: voice-call commands Command implementations extensions: memory-core Extension: memory-core extensions: oc-path extensions: ollama extensions: openrouter gateway Gateway runtime maintainer Maintainer-authored PR plugin: google-meet plugin: logbook Logbook automatic work journal plugin size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant