refactor!: remove legacy migrations and shared/types guards - #302
Merged
Merged
Conversation
- Remove the `hawk credentials migrate` subcommand, its man page entry, config/gateway `MigrateEnvFileCredentials` wrappers, and the "plaintext env" developer-path check with its helper and test. - Remove the one-time model/provider settings migration into Eyrie (`migrateStoredModelProvider`, `SetActiveSelection`) and its call in `LoadSettings`; keep the `Settings.Model`/`Settings.Provider` fields. - Remove the startup `MigrateProviderSecrets` pass: both cmd/root.go call sites, `logMigrateProviderSecretsError` and its tests, `MigrateEngineProviderSecrets`, and the method on the gateway `CatalogMaintenance` interface, implementation, and test stub. The provider.json security check stays with a manual-fix hint. - Remove the obsolete `shared/types` guards: the import-check script, the `contracts-guard` make target, lefthook and CI steps, and the related testaudit tests; drop `shared/types` from the ecosystem boundary pattern, its template, and the architecture docs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
With the one-time migration gone, a model/provider left in an old ~/.hawk/settings.json would act as a host override over Eyrie's stored selection. LoadGlobalSettings now drops them (SaveGlobal already did); --settings overrides still apply. Also gofumpt the gateway test stub. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Removes four legacy features that outlived their purpose. Follow-up to #301 (rename back to hawk).
hawk credentials migrate— the subcommand, its man-page entry,config.MigrateEnvFileCredentials/gateway.MigrateEnvFileCredentials, and the "plaintext env" developer-path check that pointed at it.credentials status/removestay.migrateStoredModelProvider(called fromLoadSettings),SetActiveSelection(its only caller), and the tests covering it.MigrateProviderSecrets/MigrateEngineProviderSecrets, both call sites incmd/root.go,logMigrateProviderSecretsError, andCatalogMaintenance.MigrateProviderSecrets. Theprovider.jsonsecrets-on-disk check stays, with a manual fix hint.shared/typesguards — the package was already removed; dropsscripts/check-shared-types-imports.sh, thecontracts-guardMake target, the lefthook hook, the CI step, and the two testaudit tests. The ecosystem boundary guard now checkshawk/internal/only.Removedsection with BREAKING entries. Historical CHANGELOG entries anddocs/plans/are untouched.Stale settings.json model/provider
Without the migration, a
model/providerleft in an old~/.hawk/settings.jsonwould have become a host override over Eyrie's stored selection.LoadGlobalSettingsnow drops both on load (SaveGlobalalready stripped them on save), so Eyrie's selection always wins.Settings.Model/Settings.Providerstay for runtime overrides, and--settingsoverrides still apply. Covered byTestLoadSettingsUsesUserConfigOnly.docs/SECURITY-DEVELOPER.mdno longer says the model is stored in settings.json.The gateway test stub is also re-run through gofumpt v0.10.0 (the first push failed the
formatjob).Test plan
gofmt -l cmd internalcleango build ./...andgo vetoncmd,internal/config,internal/provider,internal/testaudit(GOWORK=off, eyrie v0.6.0 from the public proxy)go test ./cmd/ ./internal/config/... ./internal/provider/gateway/... ./internal/testaudit/...scripts/check-ecosystem-boundaries.shdocs/plans/🤖 Generated with Claude Code