✔ sessionModel: agent vars win, then the system's execution settings (14.267841ms)
✔ a pi bundle: prompt, policy, tools and manifest, 0600 in a 0700 directory (5.331756ms)
✔ a claude-code bundle adds the wrapped gate hook and the MCP config (3.063225ms)
✔ a bundle is written once: an existing file refuses (2.3933ms)
✔ a path with a single quote can't go into the hook command (2.229339ms)
✔ allow exits 0, a deny exits 2 with the reason on stderr (149.790714ms)
✔ a missing or wrong policy, or a bad event, exits 2 (114.816308ms)
✔ the bundle's wrapped command: a missing gate or node still blocks (1113.267018ms)
✔ claude: typed tools through MCP, the hook blocks, builtins outside --tools don't exist (1052.590796ms)
✔ claude: the hook alone blocks a path outside the workspace (566.552275ms)
✔ claude: a second turn resumes the first turn's session (735.772562ms)
✔ claude adapter: --restricted is always passed (5.210642ms)
✔ claude: CLAUDE.md files and auto-memory don't reach the model; without --restricted they do (752.794353ms)
✔ claude: a missing hook or MCP file refuses before claude starts (7.481333ms)
✔ pi: policy tools and typed tools pass, anything else is blocked (4.137095ms)
✔ claude: builtins map from pi names, typed tools need the mcp prefix (1.087122ms)
✔ file tool paths must resolve inside the workspace (1.830471ms)
✔ pi's own path normalisation can't be used to step out (1.461666ms)
✔ a symlink inside the workspace that points out is outside (1.387513ms)
✖ a dangling symlink is refused at any depth, in both harnesses (2.238046ms)
✔ claude path fields per tool (1.183856ms)
✔ glob patterns stay inside the workspace (1.290554ms)
✔ a path that can't be checked is blocked (0.757566ms)
✔ initialize, ping and tools/list (55.169248ms)
✔ tools/call goes through the tool socket; a refusal is an isError result (42.192702ms)
✔ unknown tools and methods are JSON-RPC errors and never reach the socket (40.690799ms)
✔ a missing argument is a usage error (45.831681ms)
✔ pi: typed tools reach the socket, the gate blocks, agent_end writes the marker (447.976546ms)
✖ pi: a write through a dangling symlink is blocked, and nothing appears outside (460.290575ms)
✔ pi: a missing extension refuses before any model call (8.272109ms)
✔ pi: an extension without its configuration fails pi's start (317.932286ms)
✔ founderCheck: founder variables, then a needed service without a usable token (1.482243ms)
✔ turnRequest names the sender, class, reply and decision (0.191539ms)
✔ a message becomes a turn, the answer goes back as a RESULT, SIGTERM releases and exits 0 (335.253633ms)
✔ a SIGTERM before the claim stops the runner with exit 0 and no claim (218.308665ms)
✔ typed tools carry the runner's capability; launch goes to the host's launch socket (578.967725ms)
✔ a RESULT gets no automatic reply; failed turns reply with the reason (1419.210919ms)
✔ SIGTERM during a turn kills the turn's process group and still exits 0 (200.913598ms)
✔ founder credentials stop before the claim (20) (278.03445ms)
✔ a refused claim exits 21; an ended run's capability exits 22 (255.703953ms)
✔ the launch ending under a running session exits 22 (170.51835ms)
✔ a broker that stays unreachable exits 23 after brokerRetries polls (285.056323ms)
✔ a broker that is down at the claim exits 23, not 21 (141.580326ms)
✔ no capability, or a malformed one, on stdin exits 2 (220.456576ms)
✔ a missing or malformed policy exits 2 before the claim (170.29542ms)
✔ the PM gets launch, its task verbs and the reads (10.850788ms)
✔ a coder gets no launch, no resolve_decision, and no task tools without a tracker (2.930345ms)
✔ launch only when the business's launch block names the instance as launcher (2.233962ms)
✔ an action outside the instance's authority has no tool (2.476419ms)
✔ callTool: one JSON line out, the result back, a refusal rejects (13.327592ms)
ℹ tests 50
ℹ suites 0
ℹ pass 48
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 10898.485035

✖ failing tests:

test at packages/harness/tests/gate.test.mjs:82:1
✖ a dangling symlink is refused at any depth, in both harnesses (2.238046ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  
  true !== false
  
      at blocked (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/harness/tests/gate.test.mjs:19:10)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/harness/tests/gate.test.mjs:92:7)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25)
      at Test.processPendingSubtests (node:internal/test_runner/test:974:18)
      at Test.postRun (node:internal/test_runner/test:1542:19)
      at Test.run (node:internal/test_runner/test:1467:12)
      at async Test.processPendingSubtests (node:internal/test_runner/test:974:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: true,
    expected: false,
    operator: 'strictEqual',
    diff: 'simple'
  }

test at packages/harness/tests/pi-session.test.mjs:99:1
✖ pi: a write through a dangling symlink is blocked, and nothing appears outside (460.290575ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  
  false !== true
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41b/wt/packages/harness/tests/pi-session.test.mjs:112: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: false,
    expected: true,
    operator: 'strictEqual',
    diff: 'simple'
  }
