feat(dev): re-sync installed dev hosts on epoch swap behind the stable proxy (#179 stage 2) - #343
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 77ca3a9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 3, 2026
This was referenced Sep 3, 2026
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.
Summary
Stage 2 of #179:
agent-bundle dev --install-host <claude|codex|cursor>(repeatable) installs the developed plugin into real hosts as a marked DEV VARIANT and re-syncs skills/hooks/mcp-apps/manifests into the installed locations on every successful epoch swap — hosts pick up changes without reinstall. Hooks are spawned per event, so they adopt the new epoch on the next event; the MCP surface stays live through the stage-1 proxy (#339).installBundlepath (realclaude/codexplugin CLIs, Cursor copy), with the MCP document rewritten to the stable proxy command and a.agent-bundle-dev.jsonmarker (schemaVersion 1, projectRoot, host, epochId).dev/dev-proxy-command.ts):process.execPath+ the framework's own resolved CLI entry (package-root walk → declaredbin→ existence check; no PATH assumption) +dev proxy --root <project> --server <name> --target <host>. Never rewritten to an epoch path on swap (byte-identical mcp document pinned in tests).artifact.available: each epoch copies into an immutable generation under.agent-bundle-dev/generations/<epochId>; top-level directories switch by atomic symlink (junction on Windows) rename, top-level files by atomic sibling rename — a host never reads a torn tree (the first swap after install renames the real directory aside before the pointer lands). Failed publish rolls back to the previous generation and emitsAB7202on a new epoch-scopeddev.host.syncproject event; failed builds emit nothing (last-good stays). Generations pruned to {current, previous}.log-client.tsdevLogKinds) sodev.host.sync/dev.host.sync.diagnosticframes don't hard-fail the Logs page with AB8093; project SSE is unaffected (named events, no listener).AB8025) until that project's dev server runs again.Tests
tests/dev-host-install.test.ts(integration pool +test:host-installscript):AB7202event; generation pruning to {current, previous}.DevCoordinator+EpochStoreend-to-end: skill + hook edits propagate into the isolated Cursor install after a real rebuild; broken source leaves the install and marker untouched.[AB8025]— proving a real host could spawn it without PATH assumptions.packages/workbench/tests/log-client.test.tscovers the new kinds.Reviewer fix included:
dev-host-install.test.tswas initially picked up by the "build-free, process-free" unit pool; it is now classified inintegrationTestFilesand ridestest:host-install.Gates (local, rebased)
pnpm build/pnpm typecheck/pnpm lint(0/0) — passpnpm test:unit2633 passed; only residue is the two known timing flakes under machine load (mcp-probe-serviceteardown,dispatcherdeadline) — 34/34 in isolated rerunpnpm test:route-unit24/24 ·pnpm test:projection59/59pnpm test:host-install16/16 with 0 skips (real claude + codex lanes executed)Part of #179 (stage 2 of 4). Changeset: minor.