You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of the refactoring roadmap (see parent issue and docs/refactoring/roadmap.md). Phase 0 of 6, plus a parallel track.
Pure deletion first: no design decisions, zero behavior risk, and every later phase moves less code because of it. All items were adversarially verified as dead (no production callers) by whole-program reachability analysis plus repo-wide grep.
Tasks
Delete the legacy init-wizard path in credentialcmd (~750–840 LOC). Production always uses defaultInitDeps(), which never injects the legacy prompters — so runInjectedInteractiveInit, editInteractiveInitProfile/Step, newHuhInitPrompter, the 365-line huhInitPrompter.Run, huhInitRetentionPrompter.EditRetention, the huh-form EditKeyringBackend/editSecretsProfile, initOnePasswordDesktopDiscovery.Options/Selection/SelectionFor/LinearOptions, the secrets-profile-selection helper chain (credentialcmd.go:3152–3210), and initLinearDocument.addInput are unreachable outside tests. Migrate the ~37 test injections to the live menu/profileV2/bubbletea paths first, then delete in one pass.
Pipeline dead trio: reviewerReadableFiles, writeLLMTaskMetadata, writeFileAtomic (favor the already-exported llmlifecycle.WriteFileAtomic). Pre-executes part of the pipeline decomposition's llmlifecycle absorption.
Repo-wide dead-symbol sweep (~500 LOC): llm.RunStructured/RunStructuredWithSession + NewAnthropicAPIAdapter/NewOpenAIAPIAdapter (test-only); configedit's seven test-only mutation helpers (+ ErrReviewerCredentialsNotConfigured if orphaned); ledger.UpdateHeartbeat + heartbeat_at plumbing (never written — simplify heartbeatStale to StartedAt only); Store.GetPR; threadcontext's two dead FileScoped*Summaries + summaryLess; reviewplan.SortActions/actionOrder, formatUSD, threadanalysis.Options.ResumeSessionID, reviewcmd.ResponseRunner alias; benchmark/metrics.goWriteMetricsFile/IsMissingMetricsSource/writeJSONFile; four gate.Valid() methods; config.ValidateKeyring; write-only ItemTitlePrefix/ItemTag/ItemFieldTitle fields; BackendSourceSecretsProfile constant.
Why first
Unblocks the wizard split (moves ~1,700 fewer lines) and the pipeline decomposition, and shrinks the two largest test files before any structural migration touches them.
Part of the refactoring roadmap (see parent issue and
docs/refactoring/roadmap.md). Phase 0 of 6, plus a parallel track.Pure deletion first: no design decisions, zero behavior risk, and every later phase moves less code because of it. All items were adversarially verified as dead (no production callers) by whole-program reachability analysis plus repo-wide grep.
Tasks
credentialcmd(~750–840 LOC). Production always usesdefaultInitDeps(), which never injects the legacy prompters — sorunInjectedInteractiveInit,editInteractiveInitProfile/Step,newHuhInitPrompter, the 365-linehuhInitPrompter.Run,huhInitRetentionPrompter.EditRetention, the huh-formEditKeyringBackend/editSecretsProfile,initOnePasswordDesktopDiscovery.Options/Selection/SelectionFor/LinearOptions, the secrets-profile-selection helper chain (credentialcmd.go:3152–3210), andinitLinearDocument.addInputare unreachable outside tests. Migrate the ~37 test injections to the live menu/profileV2/bubbletea paths first, then delete in one pass.reviewerReadableFiles,writeLLMTaskMetadata,writeFileAtomic(favor the already-exportedllmlifecycle.WriteFileAtomic). Pre-executes part of the pipeline decomposition's llmlifecycle absorption.llm.RunStructured/RunStructuredWithSession+NewAnthropicAPIAdapter/NewOpenAIAPIAdapter(test-only);configedit's seven test-only mutation helpers (+ErrReviewerCredentialsNotConfiguredif orphaned);ledger.UpdateHeartbeat+heartbeat_atplumbing (never written — simplifyheartbeatStaletoStartedAtonly);Store.GetPR;threadcontext's two deadFileScoped*Summaries+summaryLess;reviewplan.SortActions/actionOrder,formatUSD,threadanalysis.Options.ResumeSessionID,reviewcmd.ResponseRunneralias;benchmark/metrics.goWriteMetricsFile/IsMissingMetricsSource/writeJSONFile; fourgate.Valid()methods;config.ValidateKeyring; write-onlyItemTitlePrefix/ItemTag/ItemFieldTitlefields;BackendSourceSecretsProfileconstant.Why first
Unblocks the wizard split (moves ~1,700 fewer lines) and the pipeline decomposition, and shrinks the two largest test files before any structural migration touches them.
Details with file/line citations:
docs/refactoring/tactical-simplifications-report.md(Tier 1 items 1–2, dead-code sweep sections).