Skip to content

refactor(config): remove credential-location aliases (477.3)#503

Merged
rianjs merged 2 commits into
mainfrom
refactor/477-credentialref
Jul 11, 2026
Merged

refactor(config): remove credential-location aliases (477.3)#503
rianjs merged 2 commits into
mainfrom
refactor/477-credentialref

Conversation

@rianjs

@rianjs rianjs commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Refs #477 — step 3 of 5 of the approved Candidate 1 from the design record.

Removes the credential-location compatibility aliases, the biggest remaining chunk of legacy config surface:

  • Deleted the four ignored CredentialRef fieldsGitConfig, ReviewerCredentials, ReviewerEntity, LLMConfig. All production consumers (9 files today — down from the design record's pre-refactor(llm): extract concrete adapters into internal/llmadapters (476.B) #499 count of 14) now use Credential.Store/Credential.Name: config, app, initcmd, credentials, GitHub provider, identity, LLM adapters, mecmd, view.
  • Deleted Profile.SecretsStore, the ignored legacy store selector; store resolution and init inventory use canonical credential locations.
  • Deleted the machinery: syncCredentialRef, legacy credential-location normalization, and alias-only init validation recovery.
  • The legacy credential_ref/credential_refs wire names are unchanged — they live only in the view mapping, same pattern as steps 2's label/desktop_account_id.

Test accounting

  • Three tests deleted with the behavior they exclusively covered: Profile.SecretsStore selector-repair flows, which are impossible now the field doesn't exist (TestBuildInteractiveInitWorkspaceRepairsBrokenSecretsStoreSelection, ...RepairsBrokenSecretsStoreToConfiguredProfile, ...AllowsRepairWhileAnotherProfileStillHasBrokenSecretsStore).
  • Fixture conversions to canonical fields across affected command packages were mechanical; the single production change outside the core set is a one-line ref lookup in mecmd.go.
  • All seven config show --json goldens pass byte-identical and unmodified.
  • grep confirms zero remaining references to the deleted fields.

Verification

go build, go vet, full go test ./... green unsandboxed (60 packages), repo-wide golangci-lint 0 issues, architecture harness pass. +614/−843 (net −229) across 30 files.

Remaining for #477: step 4 (pure credential planning into internal/credentials) and step 5 (init apply-tail dedup).

rianjs added 2 commits July 11, 2026 15:15
Delete the four ignored CredentialRef fields (GitConfig, ReviewerCredentials,
ReviewerEntity, LLMConfig) and Profile.SecretsStore, plus syncCredentialRef,
the legacy credential-location normalization, and alias-only init validation
recovery. All nine remaining production consumers use Credential.Store and
Credential.Name; the legacy credential_ref/credential_refs wire names live
only in the view mapping. Three tests deleted with the repair behavior they
exclusively covered (Profile.SecretsStore selector repair, impossible once
the field is gone); the seven config-show goldens are byte-identical.
@rianjs rianjs merged commit c51605b into main Jul 11, 2026
10 checks passed
@rianjs rianjs deleted the refactor/477-credentialref branch July 11, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant