✔ sessionModel: agent vars win, then the system's execution settings (10.369128ms)
✔ a pi bundle: prompt, policy, tools and manifest, 0600 in a 0700 directory (4.101077ms)
✔ a claude-code bundle adds the wrapped gate hook and the MCP config (2.522222ms)
✔ a bundle is written once: an existing file refuses (2.480421ms)
✔ a path with a single quote can't go into the hook command (2.208256ms)
✔ allow exits 0, a deny exits 2 with the reason on stderr (125.228714ms)
✔ a missing or wrong policy, or a bad event, exits 2 (99.007065ms)
✔ the bundle's wrapped command: a missing gate or node still blocks (1096.273556ms)
✔ claude: typed tools through MCP, the hook blocks, builtins outside --tools don't exist (751.155725ms)
✔ claude: the hook alone blocks a path outside the workspace (441.135402ms)
✔ claude: a second turn resumes the first turn's session (735.082802ms)
✔ claude adapter: --restricted is always passed (5.239573ms)
✔ claude: CLAUDE.md files and auto-memory don't reach the model; without --restricted they do (739.084559ms)
✔ claude: a missing hook or MCP file refuses before claude starts (7.810106ms)
✔ pi: policy tools and typed tools pass, anything else is blocked (3.098661ms)
✔ claude: builtins map from pi names, typed tools need the mcp prefix (0.72834ms)
✔ file tool paths must resolve inside the workspace (1.366765ms)
✔ pi's own path normalisation can't be used to step out (1.135173ms)
✔ a symlink inside the workspace that points out is outside (1.183478ms)
✔ a dangling symlink is refused at any depth, in both harnesses (3.06165ms)
✔ read is checked under every spelling pi's read would open, in both harnesses (17.10114ms)
✔ other spellings cover directories, dangling links and pi's cwd (1.481463ms)
✔ a relative path climbs from the workspace's real path, in both harnesses (3.849039ms)
✔ claude path fields per tool (0.575647ms)
✖ glob patterns stay inside the workspace (1.300289ms)
✔ a path that can't be checked is blocked (0.383337ms)
✔ initialize, ping and tools/list (43.723869ms)
✔ tools/call goes through the tool socket; a refusal is an isError result (33.899289ms)
✔ unknown tools and methods are JSON-RPC errors and never reach the socket (32.230065ms)
✔ a missing argument is a usage error (28.925962ms)
✔ pi: typed tools reach the socket, the gate blocks, agent_end writes the marker (369.215026ms)
✔ pi: a write through a dangling symlink is blocked, and nothing appears outside (320.066306ms)
✔ pi: a read is refused when pi would open another spelling outside (312.239331ms)
✔ pi: a relative path climbs from the real path of a workspace behind a symlink (306.779191ms)
✔ pi: a relative path climbs from the real path of a dataRoot behind a symlink (312.126907ms)
✔ pi: a missing extension refuses before any model call (6.510548ms)
✔ pi: an extension without its configuration fails pi's start (268.831889ms)
✔ founderCheck: founder variables, then a needed service without a usable token (1.279785ms)
✔ turnRequest names the sender, class, reply and decision (0.19562ms)
✔ a message becomes a turn, the answer goes back as a RESULT, SIGTERM releases and exits 0 (251.909305ms)
✔ a SIGTERM before the claim stops the runner with exit 0 and no claim (105.575145ms)
✔ typed tools carry the runner's capability; launch goes to the host's launch socket (376.329399ms)
✔ a RESULT gets no automatic reply; failed turns reply with the reason (1308.851736ms)
✔ SIGTERM during a turn kills the turn's process group and still exits 0 (167.787107ms)
✔ founder credentials stop before the claim (20) (170.54228ms)
✔ a refused claim exits 21; an ended run's capability exits 22 (198.618677ms)
✔ the launch ending under a running session exits 22 (143.274433ms)
✔ a broker that stays unreachable exits 23 after brokerRetries polls (241.465266ms)
✔ a broker that is down at the claim exits 23, not 21 (91.778621ms)
✔ no capability, or a malformed one, on stdin exits 2 (191.158646ms)
✔ a missing or malformed policy exits 2 before the claim (138.321017ms)
✔ the PM gets launch, its task verbs and the reads (6.713097ms)
✔ a coder gets no launch, no resolve_decision, and no task tools without a tracker (2.657396ms)
✔ launch only when the business's launch block names the instance as launcher (1.954434ms)
✔ an action outside the instance's authority has no tool (1.581718ms)
✔ callTool: one JSON line out, the result back, a refusal rejects (8.690613ms)
ℹ tests 56
ℹ suites 0
ℹ pass 55
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 10327.132921

✖ failing tests:

test at packages/harness/tests/gate.test.mjs:218:1
✖ glob patterns stay inside the workspace (1.300289ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  
  true !== false
  
      at blocked (file:///home/jwoltje/darkwing-scratch/r41d/wt/packages/harness/tests/gate.test.mjs:19:10)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41d/wt/packages/harness/tests/gate.test.mjs:224:5)
      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'
  }
