Repository navigation
Description
Scenario 10 acceptance criteria:
- AC10.1: On Node,
spawn()starts a same-checkoutmecated, a scripted turn callsmcp__sdk__lookup, the TypeScript handler runs, and its result reaches the model's next turn — the full round trip on real wire. - AC10.2: One named test exercises the spawn → tool round trip → clean shutdown path under Bun. Whether the whole suite runs on Bun in CI is a job-composition fact discharged by AC10.12, not by this test.
- AC10.3: The spawned daemon opens no TCP port: the ready document reports
unixtransport with nohttp_address, and a real TCP connect tomecated's default--grpc-addrand default HTTP address, made while the daemon is up, is refused withECONNREFUSED. - AC10.4:
close()stops the daemon and removes the socket and runtime directory; the process is gone by the timeclose()resolves. - AC10.5: Killing the parent process without a clean
close()stops the daemon through the lifetime pipe, on Node and on Bun. - AC10.6:
query(prompt, { retainSession: true })on the real wire leaves a session a later client can load, and the defaultquery()leaves none. - AC10.7: A startup failure on the real wire — an unresolvable binary and a binary given an argument
mecatedrejects — produces the typed error and the redacted stderr tail, with no orphan process. - AC10.8: A handler that throws on the real wire yields a generic model-facing error, and the run continues to its terminal rather than failing.
- AC10.9: A
readOnly: truetool is dispatched in the harness's concurrent read batch — two calls in one turn overlap in flight, where a mutating tool is dispatched alone.readOnlyHintsteers dispatch, not permissions, so a read-only callback still raises an ask; both halves run the same default posture so the assertion isolates thereadOnlyassertion itself. - AC10.10: A default (mutating) tool raises a
permission.ask; anonPermissionAskresponder allowing it lets the call reach the handler, and a responder-lessquery()denies it while the run still reaches its terminal. - AC10.11: The MCP handshake is completed by the real pinned Go client against the hand-written host on the wire — version negotiation included — so a protocol revision that changes it fails this suite rather than a user's first tool call.
- AC10.12: The
sdkCI job runs the new unit suites and these e2e suites on Node, and the Bun leg either runs or is explicitly recorded as deferred with its reason. - AC10.13: A callback tool reached through the default
--authority-evaluator localis denied by the capability-set evaluator, with the run still reaching its terminal. This pins the known limitation recorded under "Deferred decisions and known risks" so the eventualRootAuthoritywidening has a failing test to flip rather than a silent behaviour change.
Activity
feat(sdk): offline spawn/tool e2e on Node and Bun — M3 close-out (#1111…
test(sdk): flip the pinned client-MCP capability-set test to authorized