Repository navigation
test(examples): prove worktree-proximity journeys across real processes and worktrees (#104) - #260
Conversation
…es and worktrees (#104) Target directed notices through the generated event scope's supported workspace principal, and cover Journey 8 at both the fail-closed native wrapper and route-refusal layers.
|
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a582b0f3ea
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| priority: 'high', | ||
| recipient: { | ||
| actor: { id: conflict.actorId }, | ||
| workspace: { root: conflict.worktreeRoot }, |
There was a problem hiding this comment.
Normalize recipient roots before matching notices
When the host is started from a subdirectory of a linked worktree, gitWorktreeProvider stores the Git top-level as conflict.worktreeRoot, but the generated event runtime mounts the raw native cwd as the workspace principal (packages/agent-bundle/src/mcp-server-runtime.ts:442-454), and notice matching requires exact string equality (packages/rsc-runtime/src/notices/state.ts:120-121). Publishing this canonical root therefore leaves the notice pending forever instead of surfacing it on the target worktree's next event; normalize both identities to the same worktree root before publishing or matching.
AGENTS.md reference: AGENTS.md:L12-L12
Useful? React with 👍 / 👎.
| const firstPid = liveSession.pid; | ||
| await liveSession.stop(); |
There was a problem hiding this comment.
Kill the server before asserting crash recovery
Journey 9 is documented as SIGKILL/restart durability, but this line invokes stop(), whose implementation calls client.close() and performs an orderly transport shutdown. A clean close may flush SQLite state and clean up the IPC endpoint, so the equality after restart cannot catch recovery failures caused by abrupt process death; send SIGKILL to firstPid and wait for its exit before starting the replacement server.
Useful? React with 👍 / 👎.
Summary
Completes #104's evidence boundary: one serialized integration suite (
packages/agent-bundle/tests/worktree-proximity-journeys.test.ts, root integration pool) that builds theexamples/worktree-proximityartifact once, creates a REAL git repository with two linked worktrees, spawns the generated MCP server over stdio, and drives every journey through real generated hook thin-client child processes over the artifact IPC endpoint — artifact/contract evidence, explicitly not commercial-host dispatch proof.Journeys 1–9, cross-process
revisionunchanged.agent_id(nonzero exit,native agent_id must be a nonempty string, durable state untouched) because the pinned hosts' contracts always carry identity; the route-level refusal for hosts that genuinely omit identity stays proven at route-unit level.revision, actors, activities, refusals from durable sqlite.Example adjustment (workspace recipient axis)
Generated event request scopes mount host/session/workspace principals (workspace = native
cwd) and no actor principal, so actor-directed notices are un-attemptable in generated runtimes v1. Directed notices now target the recipient worktree via the supportedAgentRecipient.workspaceaxis; the target actor stays named in content and dedupe keys, and the README documents the boundary (actor-principal mounting remains #99/#233 lineage follow-up).tool:coordinator/statusgains an honestrevisionfield for exact-revision assertions.Gates (local)
pnpm --filter @agent-bundle-example/worktree-proximity check— validate/build/typecheck, 4/4 domain, 8/8 route-unitRefs #104, #99, #233.