Skip to content

refactor: localize file-private exports#101701

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

refactor: localize file-private exports#101701
vincentkoc merged 1 commit into
mainfrom
refactor/deadcode-all-surfaces-20260707-v46

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

The dead-export inventory still contained file-private helpers and constants across core, the Control UI, and bundled plugins. Keeping them exported expands module API surfaces without any cross-file consumer.

Why This Change Was Made

Localize 50 values that are referenced only inside their defining module. This removes stale named exports while preserving the existing implementation and call paths.

User Impact

No user-visible behavior change. Internal module boundaries are narrower and the unused-export report drops by 13 modules.

Evidence

  • OPENCLAW_TESTBOX=1 Testbox tbx_01kwyb4t91ykkycx7kbw0s23pn (silver-shrimp)
  • pnpm check:changed: passed on the final rebased 38-file patch in 10m38s
  • targeted tests: 1,051 passed across 15 Vitest shards
  • deadcode report: 3,611 -> 3,598 modules with unused exports
  • autoreview: clean at 0.86, 0.88, and 0.88 confidence
  • codebase-memory graph: 281,042 nodes / 1,136,583 edges

@vincentkoc vincentkoc self-assigned this Jul 7, 2026
@openclaw-barnacle openclaw-barnacle Bot added channel: discord Channel integration: discord app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations agents Agent runtime and tooling extensions: acpx size: S maintainer Maintainer-authored PR labels Jul 7, 2026
@vincentkoc
vincentkoc force-pushed the refactor/deadcode-all-surfaces-20260707-v46 branch from 90b39af to 9dc841a Compare July 7, 2026 13:54
@vincentkoc

Copy link
Copy Markdown
Member Author

Land-ready proof:

  • Localized 50 file-private helpers/constants across 38 core, UI, and bundled-plugin files; implementations and in-file callers are unchanged.
  • Testbox tbx_01kwyb4t91ykkycx7kbw0s23pn (silver-shrimp, blacksmith-testbox): final exact 38-file pnpm check:changed passed in 10m38s.
  • 1,051 targeted tests passed across 15 Vitest shards in 1m26s, covering core, gateway, config, cron, logging, TUI, CLI, auto-reply, agents, UI, acpx, browser, and Discord.
  • Regenerated deadcode evidence reduced modules with unused exports from 3,611 to 3,598; sampled localized symbols are absent.
  • Four fresh autoreviews were clean across live-main rebases; final confidence 0.86 with no actionable findings.
  • Refreshed codebase-memory graph: 281,081 nodes / 1,130,413 edges.
  • Native scripts/pr prepare-run 101701 completed successfully on head 9dc841aa148d8d96b69c7441a804280618056c64.

Known proof gap: no full repository suite; the exact changed gate plus targeted touched-surface tests passed.

@vincentkoc
vincentkoc marked this pull request as ready for review July 7, 2026 13:56
@vincentkoc
vincentkoc requested a review from a team as a code owner July 7, 2026 13:56
@vincentkoc
vincentkoc merged commit c8d95da into main Jul 7, 2026
95 checks passed
@vincentkoc
vincentkoc deleted the refactor/deadcode-all-surfaces-20260707-v46 branch July 7, 2026 13:57
@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 cli CLI command changes commands Command implementations extensions: acpx gateway Gateway runtime maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant