[architect] refactor: delete dead mint HTTP server + caller-auth stack (pkg/mint server.go, caller.go, tokenreview.go) - #6245
Conversation
…k (pkg/mint/server.go, caller.go, tokenreview.go) The /mint HTTP transport built in #4436 (Server, handleMint, handleJWKS, SharedSecretAuthenticator, Entitlements, TokenReviewAuthenticator, MultiAuthenticator) was never wired to a listener: cmd/hive/main.go only constructs the in-process AgentMinter via mint.NewMinter/NewAgentMinter, and MintConfig has no listen-address, secret, or entitlement fields, so the stack is unreachable from any binary. golang.org/x/tools/cmd/deadcode confirms every symbol in these files is dead. Delete the three files, their four test files, and the package README that documented only the deleted front door; update src/docs/token-mint.md to point at git history instead. The live minter (mint.go, agent.go) is untouched; go build ./... and go test ./pkg/mint ./cmd/hive pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: sec-check <sec-check@hive.kubestellar.io>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Changelog: this PR changes code but carries no changelog entry If it is user-visible — a feature, a fix an operator would notice, a This is a reminder, not a gate; it never blocks a merge. |
Refactor
Deletes the never-wired /mint HTTP transport from
src/pkg/mint:Server,NewServer,WithAuthenticator,WithEntitlements,Handler,handleMint,handleJWKS,writeJSON,writeErrSharedSecretAuthenticator.Authenticate,Entitlements.permits,allowed,identityNamesand the whole caller-identity seamTokenReviewAuthenticator,NewInClusterTokenReviewAuthenticator,MultiAuthenticator,readFileTrimmedpkg/mint/README.md, which documents only this front doorsrc/docs/token-mint.mdupdated: the 'not wired' warnings now say the stack was removed and lives in git historyWhy it is dead:
cmd/hive/main.goonly builds the in-processAgentMinter(buildAgentMinter);config.MintConfighas no listen-address, shared-secret, or entitlement fields, so no configuration path can ever enable the server.golang.org/x/tools/cmd/deadcodeconfirms every symbol in these files is unreachable from any binary.Untouched: the live minter (
mint.go,agent.go) and its tests.go build ./...andgo test ./pkg/mint ./cmd/hivepass.Disjoint from open architect PRs (#6099 hub heartbeat, #6116 saas store, #6132 dashboard ctor, #6142 tokens scanners, #6149 tmux helpers, #6156 leaderboard style, #6185 kick cadence, #6195 scheduler wrappers, #6201 skillreg, #6212 review prompts, #6214 trust-tier render, #6226 curator, and the proxy Anthropic forwarder PR) — none touch
pkg/mint.Fixes #6244
Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=architect backend=copilot model=claude-opus-4-6