Skip to content

refactor: localize internal implementation types#101731

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

refactor: localize internal implementation types#101731
vincentkoc merged 1 commit into
mainfrom
refactor/deadcode-all-surfaces-20260707-v47

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Internal implementation types were still exported from 38 core and bundled-plugin modules even though no other tracked module imported them. Those exports inflate the apparent API surface and keep dead-code reports noisy.

Why This Change Was Made

Localize 44 file-private type aliases while preserving the five exported compile-time assertion aliases that TypeScript needs to avoid noUnusedLocals failures. No runtime logic or public plugin SDK surface changes.

User Impact

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

Evidence

  • OPENCLAW_TESTBOX=1 pnpm check:changed on Blacksmith Testbox tbx_01kwydzg4pg2pajcvkbvv9tzc5
  • pnpm test:serial across 12 explicit core/plugin test files: 481 tests passed in 10 Vitest shards
  • node scripts/check-duplicates.mjs: zero clones across production, extension, and test lanes
  • pnpm deadcode:report:ci:ts-unused: 3,598 -> 3,589 modules with unused exports; all 44 selected symbols removed from their originating module entries
  • fresh branch autoreview: clean, no accepted/actionable findings
  • git diff --check

@vincentkoc vincentkoc self-assigned this Jul 7, 2026
@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord channel: matrix Channel integration: matrix channel: msteams Channel integration: msteams channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: voice-call Channel integration: voice-call gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling channel: feishu Channel integration: feishu extensions: qa-lab plugin: file-transfer 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 for 657e4903f9a92efc2ac3ec47fdec9d8c3ea80402:

  • Blacksmith Testbox tbx_01kwydzg4pg2pajcvkbvv9tzc5: pnpm check:changed passed on the exact pushed diff.
  • Targeted pnpm test:serial suite passed 481 tests across 12 files and 10 Vitest shards.
  • node scripts/check-duplicates.mjs found zero clones across production, extension, and test lanes.
  • pnpm deadcode:report:ci:ts-unused improved from 3,598 to 3,589 modules with unused exports; all 44 selected aliases disappeared from their originating module entries.
  • Fresh branch autoreview completed with no accepted/actionable findings at 0.86 confidence.
  • git diff --check passed.

Known proof gaps: none.

@vincentkoc
vincentkoc marked this pull request as ready for review July 7, 2026 14:40
@vincentkoc
vincentkoc requested a review from a team as a code owner July 7, 2026 14:40
@vincentkoc
vincentkoc merged commit fdc7892 into main Jul 7, 2026
218 of 229 checks passed
@vincentkoc
vincentkoc deleted the refactor/deadcode-all-surfaces-20260707-v47 branch July 7, 2026 14:41
@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 channel: discord Channel integration: discord channel: feishu Channel integration: feishu channel: matrix Channel integration: matrix channel: msteams Channel integration: msteams channel: signal Channel integration: signal channel: slack Channel integration: slack channel: telegram Channel integration: telegram channel: tlon Channel integration: tlon channel: voice-call Channel integration: voice-call cli CLI command changes commands Command implementations extensions: qa-lab gateway Gateway runtime maintainer Maintainer-authored PR plugin: file-transfer plugin: logbook Logbook automatic work journal plugin size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant