Skip to content

[architect] refactor: delete dead skillreg BYO-agent contract (agentspec.go) and unused Resolve/List/Search lookups - #6201

Open
kubestellar-hive[bot] wants to merge 1 commit into
v4from
arch/refactor-skillreg-dead-surface
Open

[architect] refactor: delete dead skillreg BYO-agent contract (agentspec.go) and unused Resolve/List/Search lookups#6201
kubestellar-hive[bot] wants to merge 1 commit into
v4from
arch/refactor-skillreg-dead-surface

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

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: AgentSpec interface, SpecData, AgentMode consts, ParseAgentSpec, LoadAgentSpec. docs/skills.md listed AgentSpec.DefaultSkills under 'Still not wired'; no launcher ever consumed it.
  • Registry.Resolve and its private constraint grammar (satisfies, sameMajor, versionWildcard/caret/gte consts) — ResolveRequested resolves via Get (highest version wins), never Resolve.
  • 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/compareVersions stay (used by highestLocked).

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

…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>
@kubestellar-hive kubestellar-hive Bot added the hold label Sep 7, 2026
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Sep 7, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign hanthor for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Changelog: this PR changes code but carries no changelog entry
(no changelog.d/ fragment and no CHANGELOG.md edit).

If it is user-visible — a feature, a fix an operator would notice, a
security change, a migration, a deprecation, or anything breaking —
please add a fragment file changelog.d/<category>-<pr-or-slug>.md
containing exactly your entry (see changelog.d/README.md; the
category is one of added/changed/deprecated/fixed/security). Please
do not append to CHANGELOG.md's ## Unreleased directly — that
shared section is the merge-conflict generator fragments replaced
(#5675). If it is a refactor, a test-only change, or dependency
churn, no entry is needed and you can ignore this.

This is a reminder, not a gate; it never blocks a merge.

@kubestellar-prow kubestellar-prow Bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Sep 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot dco-signoff: yes Indicates the PR's author has signed the DCO. hold size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[architect] pkg/skillreg carries a dead BYO-agent SDK (AgentSpec) and unused Resolve/List/Search registry lookups

0 participants