Skip to content

feat(managed): enroll, apply, status and unenroll a signed managed state [skip release] - #416

Merged
aroff merged 2 commits into
mainfrom
feat/managed-apply
Oct 10, 2026
Merged

aroff merged 2 commits into
mainfrom
feat/managed-apply

Conversation

@aroff

@aroff aroff commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds fastskill managed enroll | apply | status | unenroll on top of the signed managed state format from #415 (ADR-0016 decisions 8–12 and 17).

  • apply verifies the newest signed state, stages the listed skills into a private store, and deploys each one into every agent's user skills folder (the targets come from aikit's per-user skills folders), as a symlink or a verified copy. It records which entries it owns.
    • Identical existing entries are adopted.
    • Foreign content is reported as a collision and left alone.
    • Owned entries that are no longer listed are removed.
    • Blocked or disallowed content, and changed owned copies, go to a quarantine instead of being deleted.
    • Project-level id clashes are reported.
  • An expired state changes nothing except the quarantine.
  • When the source is unreachable, the last accepted state is used.
  • One apply runs per user at a time. A busy apply exits quietly without a terminal and explains itself in one.
  • enroll records the source and a machine id. When the system settings name the source, the first apply enrolls.
  • status is read-only. --report adds the last apply's full report.
  • unenroll removes what managed state placed and keeps the quarantine. It's refused when the system file sets required = true.
  • managed enroll, managed apply and managed unenroll are classified as write operations; managed status is read-only.
  • Bumps aikit to 9de6b40 and cli-framework to 971134fd. CaseRunOptions.capture_harness is set to false.
  • Docs: webdocs/cli-reference/managed-command.mdx.

Test plan

  • cargo clippy --workspace --all-features --all-targets -- -D warnings
  • cargo fmt --all --check
  • cargo nextest run --workspace --all-features -E 'not test(install_e2e_tests)'
  • Coverage gate passes (≥ 90%) on every modified production file
  • Unit tests for the engine and the command, plus a binary test against an isolated HOME and XDG folders

Apply deploys the listed skills from a private store into each agent's user
skills folder, as a link or a verified copy, records what it owns, adopts
identical entries, reports collisions and project id clashes, removes unlisted
owned entries, and quarantines blocked, disallowed or changed content instead
of deleting it. One apply runs at a time per user.

Bumps aikit to 9de6b40 for the per-user skills folders.
@aroff
aroff enabled auto-merge (squash) October 10, 2026 07:40
A deployed entry is a directory link or a copy, which remove_file can't delete on Windows; the tests now use remove_entry.
@aroff
aroff merged commit 6c6c42f into main Oct 10, 2026
15 checks passed
@aroff
aroff deleted the feat/managed-apply branch October 10, 2026 08:51
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.

1 participant