✔ sessionModel: agent vars win, then the system's execution settings (10.072066ms)
✔ a pi bundle: prompt, policy, tools and manifest, 0600 in a 0700 directory (4.464194ms)
✔ a claude-code bundle adds the wrapped gate hook and the MCP config (3.041137ms)
✔ a bundle is written once: an existing file refuses (1.693357ms)
✔ a path with a single quote can't go into the hook command (1.641576ms)
✔ allow exits 0, a deny exits 2 with the reason on stderr (121.237419ms)
✔ a missing or wrong policy, or a bad event, exits 2 (87.516879ms)
✔ the bundle's wrapped command: a missing gate or node still blocks (1110.448001ms)
✔ claude: typed tools through MCP, the hook blocks, builtins outside --tools don't exist (793.508268ms)
✔ claude: the hook alone blocks a path outside the workspace (585.02418ms)
✔ claude: a second turn resumes the first turn's session (909.649643ms)
✔ claude adapter: --restricted is always passed (8.689451ms)
✔ claude: CLAUDE.md files and auto-memory don't reach the model; without --restricted they do (876.923862ms)
✔ claude: a missing hook or MCP file refuses before claude starts (10.398933ms)
✔ pi: policy tools and typed tools pass, anything else is blocked (2.649943ms)
✔ claude: builtins map from pi names, typed tools need the mcp prefix (0.662426ms)
✔ file tool paths must resolve inside the workspace (0.900944ms)
✔ pi's own path normalisation can't be used to step out (0.928954ms)
✔ a symlink inside the workspace that points out is outside (0.793623ms)
✔ a dangling symlink is refused at any depth, in both harnesses (2.377096ms)
✔ claude path fields per tool (0.761812ms)
✔ glob patterns stay inside the workspace (0.941867ms)
✔ a path that can't be checked is blocked (0.485438ms)
✔ initialize, ping and tools/list (48.18657ms)
✔ tools/call goes through the tool socket; a refusal is an isError result (35.517959ms)
✔ unknown tools and methods are JSON-RPC errors and never reach the socket (31.251428ms)
✔ a missing argument is a usage error (43.83764ms)
✔ pi: typed tools reach the socket, the gate blocks, agent_end writes the marker (398.761733ms)
✔ pi: a write through a dangling symlink is blocked, and nothing appears outside (340.73565ms)
✔ pi: a missing extension refuses before any model call (6.705612ms)
✔ pi: an extension without its configuration fails pi's start (282.254531ms)
✔ founderCheck: founder variables, then a needed service without a usable token (1.589327ms)
✔ turnRequest names the sender, class, reply and decision (0.235049ms)
✔ a message becomes a turn, the answer goes back as a RESULT, SIGTERM releases and exits 0 (304.492209ms)
✔ a SIGTERM before the claim stops the runner with exit 0 and no claim (100.17469ms)
✔ typed tools carry the runner's capability; launch goes to the host's launch socket (384.345215ms)
✔ a RESULT gets no automatic reply; failed turns reply with the reason (1297.7852ms)
✔ SIGTERM during a turn kills the turn's process group and still exits 0 (230.321537ms)
✔ founder credentials stop before the claim (20) (301.916569ms)
✔ a refused claim exits 21; an ended run's capability exits 22 (323.890546ms)
✔ the launch ending under a running session exits 22 (166.444389ms)
✔ a broker that stays unreachable exits 23 after brokerRetries polls (305.527659ms)
✔ a broker that is down at the claim exits 23, not 21 (141.535353ms)
✔ no capability, or a malformed one, on stdin exits 2 (266.319545ms)
✖ a missing or malformed policy exits 2 before the claim (152.302277ms)
✔ the PM gets launch, its task verbs and the reads (8.291622ms)
✔ a coder gets no launch, no resolve_decision, and no task tools without a tracker (1.846874ms)
✔ launch only when the business's launch block names the instance as launcher (1.468387ms)
✔ an action outside the instance's authority has no tool (1.482613ms)
✔ callTool: one JSON line out, the result back, a refusal rejects (7.935313ms)
ℹ tests 50
ℹ suites 0
ℹ pass 49
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 10428.347094

✖ failing tests:

test at packages/harness/tests/runner.test.mjs:325:1
✖ a missing or malformed policy exits 2 before the claim (152.302277ms)
  AssertionError [ERR_ASSERTION]: <anonymous_script>:1
  {
  
  SyntaxError: Expected property name or '}' in JSON at position 1 (line 1 column 2)
      at JSON.parse (<anonymous>)
      at main (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/harness/src/runner.mjs:268:17)
      at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
      at async file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/harness/src/runner.mjs:369:22
  
  Node.js v26.8.1
  
  
  1 !== 2
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/harness/tests/runner.test.mjs:330: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: 1,
    expected: 2,
    operator: 'strictEqual',
    diff: 'simple'
  }
