Repository navigation
feat(agents): sync versioned skills to workers - #63
Merged
Merged
Conversation
nixuuu
force-pushed
the
feat/agent-environment-2
branch
from
November 4, 2026 15:44
a3fbec6 to
b3c3ac2
Compare
nixuuu
marked this pull request as ready for review
November 4, 2026 16:28
nixuuu
added a commit
that referenced
this pull request
Nov 4, 2026
Stage 3 of the agent environment stack (on top of #63). - Skill sources: git repositories, refs and paths, plus a paste box for `npx skills add …` commands (grammar of skills 1.7.6: multi-skill discovery, root precedence, refs, flags, skills.sh resolution) with a preview before import. - Multi-skill imports pinned to frozen commits. - Update tracking: detects new upstream commits, shows the diff, manual or opt-in automatic updates, pin and rollback. - Source credentials stay in the gateway, encrypted. - BFF body limit default 50M for skill uploads. Design: `docs/agent-environment.md`, verification notes: `docs/agent-environment-verification.md`. Checks: install, gen:check, typecheck, lint, format:check, check:tmp (870 pass, 150 skip, 0 fail), web build. Browser checked light/dark at desktop and phone widths. Draft until the whole stack is done.
nixuuu
added a commit
that referenced
this pull request
Nov 4, 2026
Two integration tests failed intermittently on the new parallel CI shards (#80). - **agent-skills** ("folder/ZIP boundaries reject … without writes"): a second worker's delayed registration bumped the environment revision (3 → 4) after the test took its baseline. Reproduced deterministically with controlled ordering. Setup now awaits every worker's registration and current report before the baseline. - **interaction-reconnect** ("an answer lost at the send boundary …"): the test's snapshot read could straddle the interaction transaction and see the pending request before its timeline item. Reproduced under load. The existing wait now requires the matching timeline item. No production changes, no sleeps, retries or weakened assertions. Each file passed 30 runs in a row (270 + 120 tests); full suite 943 pass / 152 skip / 0 fail. Fixes: #63 Fixes: #67
This was referenced Nov 13, 2026
nixuuu
added a commit
that referenced
this pull request
Nov 17, 2026
Managed plugins could block every new session after a successful installation. On Windows, filesystem reads lose POSIX executable bits; Canopy treated that as code drift. Codex also refreshes versioned plugins from `local` into their manifest version, leaving Canopy’s ownership record and launch receipt pointing at a missing directory. This change compares installed files using Windows filesystem semantics while preserving canonical artifact and approval checksums. Codex uses its preferred manifest version for the cache directory. Exact owned bundles moved by older Codex sessions recover their ownership atomically; upgrades and downgrades retire old owned versions before activation. Interrupted retirement remains recoverable until transaction cleanup and directory removal finish. Invalid manifest versions block only their affected targets, allowing retired activation to be removed; missing or null versions use the native `local` fallback. Modified files, symlinks, private additions and competing cache entries remain blocked and preserved. Validation: - Targeted filesystem, Windows-mode, native-cache, migration and gateway–worker tests passed through `check:tmp` (including cleanup). The 10 migration regressions cover interrupted retirement, atomic ownership recovery, malformed replacements, upgrades, downgrades and private-file preservation. - Native forced refresh verified with Codex 0.164.0 and 0.169.0; real model sessions exercised `itsolpowers` 0.26.0. - Worker and integration-test package typechecks, edited-file lint, formatting and diff checks passed locally. Windows metadata behavior is simulated on Linux; no native Windows execution. - Full repository verification and builds are left to CI. Copy audit (§8): diagnostic messages identify the problem and an action in English, using existing error details. “Resolve its ownership” → “Move the extra entry before syncing this plugin” gives a concrete recovery step. No new controls or layout changes. Fixes: #69 Fixes: #63
nixuuu
added a commit
that referenced
this pull request
Nov 28, 2026
) A worker could remove every installed file yet leave the skill's nested directories on disk. Once it dropped the ownership entry, the next assignment reported a local conflict. This also happened when an update stopped using a directory and a later uninstall left it behind. The worker now prunes directories that only held its own files. It keeps user files, empty user directories and their parents, including directories an intervening version of the skill used. A clean uninstall moves the old tree to its transaction backup before releasing ownership. Recovery can restore the tree if the worker stops before committing. An older uninstall may have already discarded its ownership record. In web or desktop, **Resolve local conflict → Use the Canopy version** archives that directory and installs the assigned version. ## Verification - Reproduced the regression on the previous implementation. After the fix, a nested skill updates, uninstalls and installs again in both CLI and Canopy session homes after a worker restart. - 54 tests passed across the skill inventory, filesystem, gateway integration, plugin migration and Windows mode suites. The temporary directory check passed. - Worker typecheck, lint on edited files and diff checks passed. CI runs the full repository gate. ## Copy audit A file colliding with a local directory previously surfaced a filesystem error. The worker now identifies the directory conflict and tells the user to move the directory and sync again. Reviewed against section 8 of the copy guide. Fixes: #63
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stage 2 of the agent environment plan (stacked on #59).
Skill library: safe upload of a folder or ZIP (SKILL.md validation, size/file-count limits, no path traversal or escaping symlinks), versions with per-computer pins, assignment by tags/computers with overrides, worker reconcile into the homes Claude, Codex and Grok actually read (incl. isolated platform homes), ownership manifests so removal/rollback touch only what Canopy installed, drift with keep/overwrite/import, offline catch-up, older-worker fallback. Instructions and skills share a new tag picker (chips, suggestions with matching-computer counts, inline new tag, live "Applies to N computers").
Tests: 18 skill integration tests with temp HOMEs (upload validation, install per home, tag targeting, versions, removal leaves user skills, drift, offline, owner scoping); check:tmp 863 pass / 0 fail. Large folder uploads need the web BFF
BODY_SIZE_LIMITraised (to be handled in the stack).