Skip to content

[Story] Delete unreachable modules and dead declarations (zombie code) #29

Done

Description

@aMonteSl

As a developer reading the Code-XR source,
I want every module and declaration that nothing can reach to be gone,
so that I only read, maintain and ship code that actually runs.

Scope (ROADMAP W2a + W2b + hinge, amended by docs/cleanup/w2-revalidation.md)

  • 54 modules unreachable from src/extension.ts (2,317 lines): 32 unimported barrels, 5 zero-byte modules, the engine barrel chain, duplicate interface files, pass-through requirement rules, directoryFilter, fileDisplayUtils, ConfigurationManager + example, servers/config, the duplicate serverItems.ts, the unregistered SERVERS provider, the old active-analyses provider, handlePythonEnvActions, learn_more/views, the browse-visualizations view, the stale language-table fork, the unreachable server click layers (W2-01..W2-21).
  • no-unused-vars as error and noUnusedLocals (W2-22, W2-23), so later deletions are self-checking.
  • Dead declarations inside live files (W2-24..W2-44): uncalled helpers, hashing cluster, aggregator accessors, certificate-inspection API, unreachable MultiServerLauncher/ServerControl halves, dead types and statics.
  • Additions from the re-validation: VisualizationConfig/TemplateProcessingResult, the duplicate FileRequirement, CreateStructure.getSSEScript, detectVSCodeTheme, HttpsCustomServer.getFullConfig, the unused statusIcon local. W2-29 drops AnalysisTableMode from its scope (text-pinned by two tests). W2-14 is H2, not H1.

Acceptance criteria

  • Each deletion is its own commit with the four-check proof (importers, string references, command registration, tests reading it as text) in the message.
  • File deletions are H1: dist/extension.js sha256 identical before/after (production build). Declarations inside live files are H2: reviewed shrink.
  • Unreachable modules 54 → 0 and pinned by the ratchet; dead exports → 0.
  • npm test green after every commit; guardrail-baseline.json updated in the same commit as each change.
  • No change in behaviour; the feature-baseline test ([Story] Feature baseline: inventory everything the extension has and does, and verify it after the cleanup #27 / safety-net story) stays green.

Activity

  1. self-assigned this
    on Nov 25, 2026
  2. added
    tfm
    user-story
    on Nov 25, 2026
  3. 12 remaining items

  4. aMonteSl commented on Nov 25, 2026

    @aMonteSl
    CollaboratorAuthor

    Done in #52, merged into v1.2.1 with CI green on Linux, macOS and Windows. Unreachable modules 54 → 0, src 52,974 → 47,968 lines, guardrail waivers empty. F5 checklist in .claude/docs/v1.2.1/sessions/29-dead-code.md for the final verification (#43).


    Generated by Claude Code

  5. added
    area: extension
    stream: cleanup-refactor
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: extensionstream: cleanup-refactortfmuser-story

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions