feat(vpn): converge the fleet skill library onto the pinned private rev (NCFG#110) #1210
No reviewers
Labels
No labels
backlog
bug
enhancement
in-progress
review
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ymrtech/nix-config!1210
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "kb/NCFG-110-skill-library-git"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The converge half of Kanban nix-config#110, slice 1. The other half — the skill CONTENT — is
nix-config-private/skills/**(private PR #253); this PR is what installs it on vpn.What it adds
hermesSkills(hosts/vpn/default.nix) — a derivation that copies${inputs.nix-config-private}/skillsinto the store, files 0444 / dirs 0555, withSOURCE_REVnaming the rev it was built from. ThekanboardScriptsshape, for the same reasons: content that can only change through a merge, read-only on the host, identifiable by blob at verify time (the pin is aninteg:merge commit, so a rev comparison would read a false negative).hosts/vpn/hermes-skills-converge.sh— the converge, as a real file rather than a Nix string, so shellcheck, the contract test and the host run the same bytes. For every skill the store provides it makes$HERMES_HOME/.hermes/skills/<group>/<skill>a symlink into the store; a previous generation's link is PRUNED when this generation no longer provides that skill (that is how a skill deleted in git leaves the host); a live skill directory at a managed name is REPLACED (the first converge on the real host finds 133 of them).system.activationScripts.hermes-skills— calls it with the store path, the shared tree, the rev and--owner hermes:hermes, afterhermes-agent-setup.hermes-profiles-setupnow depends onhermes-skills— the profile gate links the declared groups out of the shared tree and FAILS the switch on a declared group the shared tree cannot provide (hermes-profile-skills.sh's MISSING class). On a fresh host those group dirs only exist once the library converge has run, so the order is load-bearing, not cosmetic..forgejo/tests/test-fleet-skills.sh, run bynix-build-check.What it must not do — and is tested not to
The shared tree is shared, so the interesting cases are the ones where a converger could damage it:
agent-authored/are still there afterwards) — a build that lost its content must not be able to delete the library;agent-authored/(hermes' ownskills.create_dir, the write path nix-config#101 built), the runtime dotfiles (.usage.json,.curator_ledger.jsonl,.hub/,.bundled_manifest), the app's seeded bundled skills and any unmanaged skill directory are left exactly where they are;The contract test runs the real script against fixture trees for all of the above, asserts the wiring (the store comes from the pinned private rev, the activation passes the real shared tree and the rev) and asserts the ORDER against the profile gate as an order, with three mutations that must turn it red, plus
bash -nand shellcheck (-S warning -x, the flags the repo uses) in CI. Local: 21/21 cases,test-profile-skills.shstill 31/31.Ordering of the merge, and the pin
This PR's eval reads
${inputs.nix-config-private}/skills, so the pinned private rev must already carry it: the private PR (#253) merges first, the CD chain bumps the pin innix-config, and this branch is rebased onto that bump before its CI runs. The private repo's.forgejo/deploy/skills-scope.sh(in #253) is what makes the chain classifyskills/**as a vpn-reader path — without it the chain gate would setPR_SKIP, the pin would never move, and this converge would deploy against content that is not there.What changes on the host once this lands
Managed skills become read-only store symlinks.
skill_managePATCH on one is then refused (Path.rglobdoes not descend a symlinked directory), which is the intended "stricter than willy-nilly" state and is documented in the library doc and in two skills that ship with it — the git path (a PR tonix-config-private) is the way to change a fleet skill from now on, whileagent-authored/stays writable for a new one.Verification (after merge and deploy)
readlink -fan installed skill → thehermes-skills-<rev>store path;sha256sumof an installedSKILL.md==git cat-file blob <pinned rev>:skills/…== the blob onorigin/mainof the private repo;hermes-profile-skills.shstill passes; a curated skill loads (skill_view) from the coding profile through the profile symlink chain.foremerge intent coverage (advisory) — 2 of 4 changed path(s) in ymrtech/nix-config#1210 have no live foremerge intent:
.forgejo/tests/test-fleet-skills.shhosts/vpn/hermes-skills-converge.shCoverage was decided by reading the repo's foremerge ledger (48 in-flight intent(s) considered) against this PR's changed paths — no branch or session name is involved, so a force-push does not change the answer. Paths that legitimately need no claim (docs,
.md,flake.lock) are excluded.This is advisory and does not block the merge. To clear it, publish intent for the paths above (
foremerge intent publish --agent <your agent id> --task <task> --summary <what and why> --scope file:<path>=modify), or ignore it if the work genuinely collides with nobody.0b793d46a7a6dde177dfforemerge intent coverage (advisory) — update for ymrtech/nix-config#1210: all 4 claimable changed path(s) are now covered by a live foremerge intent. Nothing to do; this comment closes the earlier gap warning.