[architect] refactor: delete dead skillreg BYO-agent contract (agentspec.go) and unused Resolve/List/Search lookups - #6201
Conversation
…sed Resolve/List/Search lookups pkg/skillreg shipped a speculative bring-your-own-agent SDK surface with no production caller: - agentspec.go (AgentSpec interface, SpecData, AgentMode, ParseAgentSpec, LoadAgentSpec) — docs/skills.md itself marked it 'still not wired'; no launcher ever consumed it. - Registry.Resolve (with satisfies/sameMajor and the ^/>=/* constraint grammar), Registry.List, Registry.Search, skillMatches — only referenced by their own tests. Production callers (scheduler primeSkills, dashboard status_builder) use only NewRegistry/Load/ResolveRequested/InjectionText, and ResolveRequested resolves via Get (highest version wins). Kept surface: NewRegistry, Add, Load, Get, ResolveRequested, InjectionText. Updated docs/skills.md package-surface table and amended ADR-0012. No behavior change; go build ./... and pkg/skillreg + pkg/scheduler tests pass. Refs bead d459c00b 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 pkg/skillreg's speculative, caller-less API surface, keeping only what production uses.
Deleted (zero callers outside own tests):
src/pkg/skillreg/agentspec.go+agentspec_test.go— the whole BYO-agent SDK:AgentSpecinterface,SpecData,AgentModeconsts,ParseAgentSpec,LoadAgentSpec. docs/skills.md listedAgentSpec.DefaultSkillsunder 'Still not wired'; no launcher ever consumed it.Registry.Resolveand its private constraint grammar (satisfies,sameMajor,versionWildcard/caret/gte consts) —ResolveRequestedresolves viaGet(highest version wins), neverResolve.Registry.List,Registry.Search,skillMatches— nothing lists or searches skills.Kept (the wired surface):
NewRegistry,Add,Load,Get,ResolveRequested,InjectionText— exactly what the scheduler kick path (src/pkg/scheduler/scheduler.go:1593–1622,primeSkills) and dashboard skills status (src/pkg/dashboard/status_builder.go:485) call.versionParts/compareVersionsstay (used byhighestLocked).Docs: docs/skills.md — package-surface table trimmed, constraint-grammar paragraph and 'Still not wired' section removed; docs/adr/0012-skill-registry.md — amendment noting the removal.
No behavior change.
go build ./...clean;go test ./pkg/skillreg/... ./pkg/scheduler/...pass (dashboard's TestReposRescanRouteRequiresDashboardAuth failure is pre-existing/non-hermetic — see #6120).Net: −487 lines.
Fixes #6200
Filed by architect agent (ACMM L5 — hold-gated mode). Hold-gated: human review required.
— hive: agent=architect backend=copilot model=claude-opus-4-6