✔ sessionModel: agent vars win, then the system's execution settings (9.560686ms)
✔ a pi bundle: prompt, policy, tools and manifest, 0600 in a 0700 directory (4.533445ms)
✔ a claude-code bundle adds the wrapped gate hook and the MCP config (2.559218ms)
✔ a bundle is written once: an existing file refuses (1.805363ms)
✔ a path with a single quote can't go into the hook command (1.619328ms)
✔ allow exits 0, a deny exits 2 with the reason on stderr (114.276019ms)
✔ a missing or wrong policy, or a bad event, exits 2 (79.671029ms)
✔ the bundle's wrapped command: a missing gate or node still blocks (1090.201585ms)
✔ claude: typed tools through MCP, the hook blocks, builtins outside --tools don't exist (733.488775ms)
✔ claude: the hook alone blocks a path outside the workspace (434.280065ms)
✔ claude: a second turn resumes the first turn's session (693.516361ms)
✔ claude adapter: --restricted is always passed (4.81615ms)
✔ claude: CLAUDE.md files and auto-memory don't reach the model; without --restricted they do (718.692902ms)
✔ claude: a missing hook or MCP file refuses before claude starts (7.611874ms)
✔ pi: policy tools and typed tools pass, anything else is blocked (2.51607ms)
✔ claude: builtins map from pi names, typed tools need the mcp prefix (0.642592ms)
✔ file tool paths must resolve inside the workspace (0.832544ms)
✔ pi's own path normalisation can't be used to step out (0.888885ms)
✔ a symlink inside the workspace that points out is outside (0.752018ms)
✔ a dangling symlink is refused at any depth, in both harnesses (2.350641ms)
✔ claude path fields per tool (0.682112ms)
✔ glob patterns stay inside the workspace (0.928635ms)
✔ a path that can't be checked is blocked (0.448888ms)
✔ initialize, ping and tools/list (44.092584ms)
✔ tools/call goes through the tool socket; a refusal is an isError result (32.070127ms)
✔ unknown tools and methods are JSON-RPC errors and never reach the socket (34.879671ms)
✔ a missing argument is a usage error (27.189043ms)
✔ pi: typed tools reach the socket, the gate blocks, agent_end writes the marker (349.671657ms)
✔ pi: a write through a dangling symlink is blocked, and nothing appears outside (326.468976ms)
✔ pi: a missing extension refuses before any model call (6.621016ms)
✔ pi: an extension without its configuration fails pi's start (254.717079ms)
✔ founderCheck: founder variables, then a needed service without a usable token (1.048867ms)
✔ turnRequest names the sender, class, reply and decision (0.218323ms)
✔ a message becomes a turn, the answer goes back as a RESULT, SIGTERM releases and exits 0 (242.781802ms)
✔ a SIGTERM before the claim stops the runner with exit 0 and no claim (100.03186ms)
✔ typed tools carry the runner's capability; launch goes to the host's launch socket (390.07147ms)
✔ a RESULT gets no automatic reply; failed turns reply with the reason (1296.269843ms)
✔ SIGTERM during a turn kills the turn's process group and still exits 0 (148.02031ms)
✔ founder credentials stop before the claim (20) (163.958466ms)
✔ a refused claim exits 21; an ended run's capability exits 22 (189.269553ms)
✔ the launch ending under a running session exits 22 (136.865684ms)
✔ a broker that stays unreachable exits 23 after brokerRetries polls (239.430024ms)
✔ a broker that is down at the claim exits 23, not 21 (90.747737ms)
✖ no capability, or a malformed one, on stdin exits 2 (60155.411728ms)
✔ a missing or malformed policy exits 2 before the claim (177.561752ms)
✔ the PM gets launch, its task verbs and the reads (6.482302ms)
✔ a coder gets no launch, no resolve_decision, and no task tools without a tracker (1.9674ms)
✔ launch only when the business's launch block names the instance as launcher (1.697755ms)
✔ an action outside the instance's authority has no tool (1.405452ms)
✔ callTool: one JSON line out, the result back, a refusal rejects (8.133694ms)
ℹ tests 50
ℹ suites 0
ℹ pass 49
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 63428.846975

✖ failing tests:

test at packages/harness/tests/runner.test.mjs:313:1
✖ no capability, or a malformed one, on stdin exits 2 (60155.411728ms)
  AssertionError [ERR_ASSERTION]: runner: demo/coder claimed by run coder-run
  
  
  null !== 2
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/harness/tests/runner.test.mjs:320:10)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async Test.run (node:internal/test_runner/test:1409:7)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    generatedMessage: false,
    code: 'ERR_ASSERTION',
    actual: null,
    expected: 2,
    operator: 'strictEqual',
    diff: 'simple'
  }
