Context
A dead-code sweep (grepping every symbol/basename against both src/ and test/, checking for CLI/script/dynamic-import references outside src/ too) found 5 files that are fully unit-tested but have zero production call site anywhere in the repo:
Also found: settings.privateTrustEnabled (a RepositorySettings field) is persisted and exposed via the maintainer API but read by zero conditional logic anywhere in src/ — a write-only field.
Requirements
For each of the 5 files: either (a) delete it and its dedicated test file if genuinely no longer wanted, or (b) if still desired (e.g. issue-rag-wire.ts for the planned miner-side feature), leave it but add a one-line comment noting it's intentionally pre-built and currently unreached, so a future dead-code sweep doesn't re-flag it as a mystery. For privateTrustEnabled: either wire it into real gate/behavior logic if it was meant to do something, or remove the field/column if it was superseded before ever being consumed.
Deliverables
- A decision + PR per file (or one combined PR if all five get the same disposition).
- Migration to drop
privateTrustEnabled if removed, or a small follow-up PR wiring it in if it should do something.
Expected outcome
No unexplained, fully-tested-but-unreachable code left in the tree without at least a comment explaining why it exists that way — removes maintenance burden and false leads for future audits.
Context
A dead-code sweep (grepping every symbol/basename against both
src/andtest/, checking for CLI/script/dynamic-import references outsidesrc/too) found 5 files that are fully unit-tested but have zero production call site anywhere in the repo:src/settings/settings-drift.ts(computeSettingsDrift/computeSettingsDriftForRepo) — added in feat(settings): add a read-only DB/config settings-drift diagnostic #3369, no route/CLI/MCP wiring ever followed up.src/review/issue-rag-wire.ts(buildIssueRagQuery) — added in feat(review): add issue RAG query builder #2660 for a not-yet-built miner-side issue-analysis feature (feat(miner-rag): issue-centric RAG query builder (issue title/body → embeddable query text) #2320); reads as intentional forward groundwork, not abandoned legacy code, but currently unreachable from anywhere.src/review/labeling-rules.ts(resolveLabelingRules) — added in feat(config): add review.labeling_rules deterministic label suggestions (#2045) #3534/feat(config): add review.labeling_rules deterministic label suggestions #2045; the config it parses (review.labeling_rules) is threaded throughsrc/signals/focus-manifest.ts, but nothing ever calls this function to apply the parsed rules.src/services/queue-burden-breakdown.ts(explainQueueBurden) — added in feat(signals): add queue burden score breakdown with weighted contributors and top lever #1919; its own header comment names itself as a sibling toscore-breakdown.ts/miner-dashboard-recommendations.ts/agent-action-explanation-card.ts, all three of which ARE wired intoapi/routes.ts/mcp/server.ts— this one alone was never wired in.src/api/workboard.ts(buildWorkboard) — the oldest of the five (same initial scaffold commit asprocessors.ts), superseded, no route ever calls it.Also found:
settings.privateTrustEnabled(aRepositorySettingsfield) is persisted and exposed via the maintainer API but read by zero conditional logic anywhere insrc/— a write-only field.Requirements
For each of the 5 files: either (a) delete it and its dedicated test file if genuinely no longer wanted, or (b) if still desired (e.g.
issue-rag-wire.tsfor the planned miner-side feature), leave it but add a one-line comment noting it's intentionally pre-built and currently unreached, so a future dead-code sweep doesn't re-flag it as a mystery. ForprivateTrustEnabled: either wire it into real gate/behavior logic if it was meant to do something, or remove the field/column if it was superseded before ever being consumed.Deliverables
privateTrustEnabledif removed, or a small follow-up PR wiring it in if it should do something.Expected outcome
No unexplained, fully-tested-but-unreachable code left in the tree without at least a comment explaining why it exists that way — removes maintenance burden and false leads for future audits.