✔ sessionModel: agent vars win, then the system's execution settings (14.060701ms)
✔ a pi bundle: prompt, policy, tools and manifest, 0600 in a 0700 directory (6.264076ms)
✔ a claude-code bundle adds the wrapped gate hook and the MCP config (2.839664ms)
✔ a bundle is written once: an existing file refuses (3.015861ms)
✔ a path with a single quote can't go into the hook command (2.544498ms)
✔ allow exits 0, a deny exits 2 with the reason on stderr (132.672334ms)
✔ a missing or wrong policy, or a bad event, exits 2 (87.579364ms)
✔ the bundle's wrapped command: a missing gate or node still blocks (1096.85555ms)
✔ claude: typed tools through MCP, the hook blocks, builtins outside --tools don't exist (822.993933ms)
✔ claude: the hook alone blocks a path outside the workspace (474.272951ms)
✔ claude: a second turn resumes the first turn's session (795.497289ms)
✔ claude: a missing hook or MCP file refuses before claude starts (7.958534ms)
✔ pi: policy tools and typed tools pass, anything else is blocked (2.905317ms)
✔ claude: builtins map from pi names, typed tools need the mcp prefix (0.824151ms)
✔ file tool paths must resolve inside the workspace (0.924751ms)
✔ pi's own path normalisation can't be used to step out (0.989216ms)
✔ a symlink inside the workspace that points out is outside (0.928767ms)
✔ claude path fields per tool (1.135022ms)
✔ glob patterns stay inside the workspace (0.905393ms)
✔ a path that can't be checked is blocked (0.641327ms)
✔ initialize, ping and tools/list (52.803314ms)
✔ tools/call goes through the tool socket; a refusal is an isError result (36.588106ms)
✔ unknown tools and methods are JSON-RPC errors and never reach the socket (33.504222ms)
✔ a missing argument is a usage error (31.403397ms)
✔ pi: typed tools reach the socket, the gate blocks, agent_end writes the marker (415.995746ms)
✔ pi: a missing extension refuses before any model call (8.458682ms)
✔ pi: an extension without its configuration fails pi's start (279.315528ms)
✔ founderCheck: founder variables, then a needed service without a usable token (1.858056ms)
✔ turnRequest names the sender, class, reply and decision (0.265717ms)
✖ a message becomes a turn, the answer goes back as a RESULT, SIGTERM releases and exits 0 (193.748977ms)
✖ a SIGTERM before the claim stops the runner with exit 0 and no claim (92.328678ms)
✔ typed tools carry the runner's capability; launch goes to the host's launch socket (443.407365ms)
✔ a RESULT gets no automatic reply; failed turns reply with the reason (1296.372554ms)
✖ SIGTERM during a turn kills the turn's process group and still exits 0 (144.59476ms)
✔ founder credentials stop before the claim (20) (171.480323ms)
✔ a refused claim exits 21; an ended run's capability exits 22 (197.025228ms)
✔ the launch ending under a running session exits 22 (142.65891ms)
✔ a broker that stays unreachable exits 23 after brokerRetries polls (248.859517ms)
✔ a broker that is down at the claim exits 23, not 21 (106.087394ms)
✔ no capability, or a malformed one, on stdin exits 2 (164.168036ms)
✔ the PM gets launch, its task verbs and the reads (7.809666ms)
✔ a coder gets no launch, no resolve_decision, and no task tools without a tracker (2.544128ms)
✔ launch only when the business's launch block names the instance as launcher (2.508715ms)
✔ an action outside the instance's authority has no tool (3.166666ms)
✔ callTool: one JSON line out, the result back, a refusal rejects (11.382644ms)
ℹ tests 45
ℹ suites 0
ℹ pass 42
ℹ fail 3
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 10318.14779

✖ failing tests:

test at packages/harness/tests/runner.test.mjs:141:1
✖ a message becomes a turn, the answer goes back as a RESULT, SIGTERM releases and exits 0 (193.748977ms)
  AssertionError [ERR_ASSERTION]: runner: demo/coder claimed by run coder-run
  
  
  null !== 0
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41/wt/packages/harness/tests/runner.test.mjs:160: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: 0,
    operator: 'strictEqual',
    diff: 'simple'
  }

test at packages/harness/tests/runner.test.mjs:166:1
✖ a SIGTERM before the claim stops the runner with exit 0 and no claim (92.328678ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
  + actual - expected
  
    [
  -   0,
      null,
  +   'SIGTERM'
    ]
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41/wt/packages/harness/tests/runner.test.mjs:185: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: true,
    code: 'ERR_ASSERTION',
    actual: [ null, 'SIGTERM' ],
    expected: [ 0, null ],
    operator: 'deepStrictEqual',
    diff: 'simple'
  }

test at packages/harness/tests/runner.test.mjs:232:1
✖ SIGTERM during a turn kills the turn's process group and still exits 0 (144.59476ms)
  AssertionError [ERR_ASSERTION]: runner: demo/coder claimed by run coder-run
  
  
  null !== 0
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41/wt/packages/harness/tests/runner.test.mjs:242: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: 0,
    operator: 'strictEqual',
    diff: 'simple'
  }
