✔ sessionModel: agent vars win, then the system's execution settings (11.177806ms)
✔ a pi bundle: prompt, policy, tools and manifest, 0600 in a 0700 directory (5.252937ms)
✔ a claude-code bundle adds the wrapped gate hook and the MCP config (2.918977ms)
✔ a bundle is written once: an existing file refuses (2.667274ms)
✔ a path with a single quote can't go into the hook command (2.474121ms)
✔ allow exits 0, a deny exits 2 with the reason on stderr (149.860923ms)
✔ a missing or wrong policy, or a bad event, exits 2 (80.513977ms)
✔ the bundle's wrapped command: a missing gate or node still blocks (1087.944389ms)
✔ claude: typed tools through MCP, the hook blocks, builtins outside --tools don't exist (756.080075ms)
✔ claude: the hook alone blocks a path outside the workspace (468.03756ms)
✔ claude: a second turn resumes the first turn's session (686.572807ms)
✔ claude adapter: --restricted is always passed (5.208836ms)
✔ claude: CLAUDE.md files and auto-memory don't reach the model; without --restricted they do (712.744346ms)
✔ claude: a missing hook or MCP file refuses before claude starts (7.437396ms)
✔ pi: policy tools and typed tools pass, anything else is blocked (3.76221ms)
✔ claude: builtins map from pi names, typed tools need the mcp prefix (0.832287ms)
✔ file tool paths must resolve inside the workspace (1.253709ms)
✔ pi's own path normalisation can't be used to step out (1.179842ms)
✔ a symlink inside the workspace that points out is outside (1.019438ms)
✔ a dangling symlink is refused at any depth, in both harnesses (2.701157ms)
✔ read is checked under every spelling pi's read would open, in both harnesses (29.193137ms)
✔ other spellings cover directories, dangling links and pi's cwd (7.676756ms)
✔ claude path fields per tool (0.905772ms)
✔ glob patterns stay inside the workspace (0.978329ms)
✔ a path that can't be checked is blocked (0.637371ms)
✔ initialize, ping and tools/list (54.963032ms)
✔ tools/call goes through the tool socket; a refusal is an isError result (40.53307ms)
✔ unknown tools and methods are JSON-RPC errors and never reach the socket (29.9518ms)
✔ a missing argument is a usage error (26.739266ms)
✔ pi: typed tools reach the socket, the gate blocks, agent_end writes the marker (369.845735ms)
✔ pi: a write through a dangling symlink is blocked, and nothing appears outside (305.775115ms)
✔ pi: a read is refused when pi would open another spelling outside (321.07066ms)
✔ pi: a missing extension refuses before any model call (7.216682ms)
✔ pi: an extension without its configuration fails pi's start (262.950669ms)
✖ founderCheck: founder variables, then a needed service without a usable token (1.768828ms)
✔ turnRequest names the sender, class, reply and decision (0.255406ms)
✔ a message becomes a turn, the answer goes back as a RESULT, SIGTERM releases and exits 0 (254.803001ms)
✔ a SIGTERM before the claim stops the runner with exit 0 and no claim (106.271699ms)
✔ typed tools carry the runner's capability; launch goes to the host's launch socket (409.851372ms)
✔ a RESULT gets no automatic reply; failed turns reply with the reason (1300.337486ms)
✔ SIGTERM during a turn kills the turn's process group and still exits 0 (151.104932ms)
✖ founder credentials stop before the claim (20) (60055.438549ms)
✔ a refused claim exits 21; an ended run's capability exits 22 (205.220258ms)
✔ the launch ending under a running session exits 22 (137.168395ms)
✔ a broker that stays unreachable exits 23 after brokerRetries polls (240.044539ms)
✔ a broker that is down at the claim exits 23, not 21 (103.647221ms)
✔ no capability, or a malformed one, on stdin exits 2 (194.450239ms)
✔ a missing or malformed policy exits 2 before the claim (151.976732ms)
✔ the PM gets launch, its task verbs and the reads (9.204315ms)
✔ a coder gets no launch, no resolve_decision, and no task tools without a tracker (3.319111ms)
✔ launch only when the business's launch block names the instance as launcher (2.395528ms)
✔ an action outside the instance's authority has no tool (2.487739ms)
✔ callTool: one JSON line out, the result back, a refusal rejects (11.73562ms)
ℹ tests 53
ℹ suites 0
ℹ pass 51
ℹ fail 2
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 63410.518602

✖ failing tests:

test at packages/harness/tests/runner.test.mjs:34:1
✖ founderCheck: founder variables, then a needed service without a usable token (1.768828ms)
  AssertionError [ERR_ASSERTION]: The "string" argument must be of type string. Received type object (null)
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41c/wt/packages/harness/tests/runner.test.mjs:38:10)
      at Test.runInAsyncScope (node:async_hooks:226:14)
      at Test.run (node:internal/test_runner/test:1402:25)
      at Test.start (node:internal/test_runner/test:1262:17)
      at startSubtestAfterBootstrap (node:internal/test_runner/harness:387:17) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: null,
    expected: /GITEA_TOKEN, SSH_AUTH_SOCK/,
    operator: 'match',
    diff: 'simple'
  }

test at packages/harness/tests/runner.test.mjs:261:1
✖ founder credentials stop before the claim (20) (60055.438549ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  
  null !== 20
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41c/wt/packages/harness/tests/runner.test.mjs:264: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,
    expected: 20,
    operator: 'strictEqual',
    diff: 'simple'
  }
