feat(test): assert warm runtime identity in contract matrix - #337
Conversation
🦋 Changeset detectedLatest commit: 28124ce 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. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f5870d024
ℹ️ 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".
| const hasEventRoutes = Object.values(manifest.routes) | ||
| .some((route) => route.kind === 'event-route'); |
There was a problem hiding this comment.
Restrict identity checks to the runtime-owning server
In artifacts with multiple generated MCP servers and any event route, this global predicate enables runtime tracking for every server selected via options.server. However, compileMcpEntries attaches eventRoutes only to the first generated eventHostId, so a matrix run against another server either reports the shared endpoint as unavailable and fails an otherwise healthy contract, or—if the owner is also running—measures the wrong process. Pass serverName into this decision and only require identity evidence for the server that actually owns the event runtime.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 371b4b1. The test manifest now records the first generated MCP server that owns event routes, and the identity tracker reports not-applicable for any other selected server; the regression passes a dead socket to prove it is never read.
Pin packed and installed-host event sequences to one warm runtime instance and match stateful lifecycle fixtures to the compiled state catalog.
Record the generated server that owns event routes so multi-server matrices do not probe another server's runtime.
371b4b1 to
28124ce
Compare
Summary
runtime-instance-identityboundary check that samples the pinned event-runtime status before and throughout packed and installed-host matrix eventsCloses the runtime-identity assertion gap tracked in #218 after #269.
Test plan
pnpm exec rstest --config rstest.projection.config.ts packages/agent-bundle/tests/projection/contract-matrix.test.ts(13 passed)pnpm test:host-install(9 passed, 0 skipped; real Claude and Codex lanes ran, plus Cursor)node scripts/run-packed-tests.mjs packages/agent-bundle/tests/packed-stdio-projection.test.ts(1 passed)pnpm typecheckpnpm lint(0 errors, 0 warnings)Release gates (Node 22.19), including the full packed poolKnown upstream CI blocker
Verify (Node 24): unchangedoverview.e2e.test.tsexpects one event-hub subscription after fixture startup but receives two after the concurrently landed host-proxy changemainfails identically; one PR rerun reproduced it