Skip to content

fix(skills): persist per-skill toggles in Antares configuration - #44

Closed
elliottophellia wants to merge 3 commits into
enowdev:mainfrom
elliottophellia:feat/config-backed-skill-toggles
Closed

elliottophellia wants to merge 3 commits into
enowdev:mainfrom
elliottophellia:feat/config-backed-skill-toggles

Conversation

@elliottophellia

Copy link
Copy Markdown
Collaborator

Changes

  • Store profile-wide enable/disable preferences in skills.disabled, keyed by exact, case-sensitive skill name. Toggles persist atomically and publish live state without rewriting skill files; missing names retain preferences.
  • Import legacy configured enabled: false headers once using skills.frontmatter_migrated. Incomplete imports abort startup/reload without marking migration complete. Environment-only settings are not persisted by these helpers.
  • Block disabled entries across the agent skill tool's list, search, read, and chains operations. Search filters before ranking/limits; administrative APIs and /skills retain off entries. Content saves do not re-enable names.
  • Serialize HTTP toggles through persistence and reload, use current manager snapshots after runtime replacement, and return persistence/publication errors.
  • Show toggle failures inline in the Skills page, reconcile after errors, and disable page switches during a pending request.

Boundaries

skills.enabled remains the independent global gate. Disabling cannot retract model context already sent and does not restrict generic filesystem tools. A successful save followed by failed reload remains persisted but returns HTTP 500.

This branch starts from main and is independently reviewable from #42. Compatible changes were separately appended to the discovery branch with source-SHA provenance; this PR does not include automatic discovery or project scoping.

Checkpoints

  1. 30e08ff — configuration persistence, migration, effective state, and HTTP publication.
  2. 0980eb5 — disabled skill-tool access enforcement.
  3. a380abd — dashboard persistence-error handling.

Verification

Passed with Go 1.26.7:

  • go test ./...
  • go test -race ./internal/config ./internal/skills ./internal/agent ./internal/commands ./internal/server ./cmd/antares
  • make build build-fixture
  • Frontend bun test: 86 passed, 0 failed.
  • Isolated real-binary smoke with scrubbed HOME/config environment and loopback SSE provider: one-time migration, toggles, restart, generic config updates, real skill-tool outputs/prompts, and administrative off-state visibility.
  • Source bytes, permissions, and mtime unchanged by toggles, including read-only source fixtures; concurrent toggles preserve both preferences; malformed config and atomic-save/reload failures exercise error paths.
  • Browser interactions at 1440×900 and 390×844: checked-state persistence, pending-request guard, and real config-directory permission failure producing an inline alert with unchanged checked state and no unhandled page error.
  • Mutation proofs detect source rewrites, disabled body access, and enabled results displaced behind 30 disabled search matches. Restored tests pass.

The existing DNS-dependent TestValidateCustomProviderBaseURL intermittently timed out resolving openrouter.ai; final full and race suites passed. Unmodified make smoke was not used as feature proof because its fixture disables skills.

Please do not merge yet.

@enowdev

enowdev commented Sep 18, 2026

Copy link
Copy Markdown
Owner

Shipped in main as part of #42 rather than as a separate merge.

#42 is a strict superset of this branch: all 22 files here are also in #42, and internal/config/skills.go and internal/tools/skill.go are byte-identical between the two. Every feature of this PR is present in mainskills.disabled persistence, MigrateSkillState / frontmatter_migrated one-time import, SetSkillEnabled, Manager.SetDisabled / LegacyDisabled, Filter.EnabledOnly search filtering, skillsConfigMu-serialized HTTP toggles, and the Skills page inline error handling.

Test coverage carried over too. Two of this branch's tests exist under names adapted to #42's architecture, and both pass:

Verified on the merged tree: go build ./..., go vet ./..., full go test ./..., go test -race over config/skills/agent/server/commands/tui/tools/cmd, make build, and frontend bun test (86 passed) + typecheck + build.

Noted your "please do not merge yet" — this closes as delivered-via-#42, not as a merge of this branch. Nothing here is dropped. Reopen if you intended changes beyond what #42 carried.

Review note carried forward: SetSkillEnabled hard-errors when migration has not run, and migration only runs from cmd/antares bootstrap/reload. Both server.New call sites live there today, so it is not reachable now, but it leaves internal/server depending on a cmd-level init step.

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.

2 participants