✔ sessionModel: agent vars win, then the system's execution settings (11.121928ms)
✔ a pi bundle: prompt, policy, tools and manifest, 0600 in a 0700 directory (4.728183ms)
✖ a claude-code bundle adds the wrapped gate hook and the MCP config (4.014424ms)
✔ a bundle is written once: an existing file refuses (1.996239ms)
✔ a path with a single quote can't go into the hook command (1.855058ms)
✔ allow exits 0, a deny exits 2 with the reason on stderr (130.812334ms)
✔ a missing or wrong policy, or a bad event, exits 2 (79.031735ms)
✔ the bundle's wrapped command: a missing gate or node still blocks (1094.514702ms)
✔ claude: typed tools through MCP, the hook blocks, builtins outside --tools don't exist (764.062618ms)
✔ claude: the hook alone blocks a path outside the workspace (589.82994ms)
✔ claude: a second turn resumes the first turn's session (736.915159ms)
✔ claude: a missing hook or MCP file refuses before claude starts (8.629216ms)
✔ pi: policy tools and typed tools pass, anything else is blocked (2.876463ms)
✔ claude: builtins map from pi names, typed tools need the mcp prefix (0.752765ms)
✔ file tool paths must resolve inside the workspace (0.962332ms)
✔ pi's own path normalisation can't be used to step out (0.907476ms)
✔ a symlink inside the workspace that points out is outside (0.808361ms)
✔ claude path fields per tool (0.860736ms)
✔ glob patterns stay inside the workspace (0.904636ms)
✔ a path that can't be checked is blocked (0.617929ms)
✔ initialize, ping and tools/list (42.391174ms)
✔ tools/call goes through the tool socket; a refusal is an isError result (37.12388ms)
✔ unknown tools and methods are JSON-RPC errors and never reach the socket (31.935515ms)
✔ a missing argument is a usage error (33.805981ms)
✔ pi: typed tools reach the socket, the gate blocks, agent_end writes the marker (359.224518ms)
✔ pi: a missing extension refuses before any model call (8.186443ms)
✔ pi: an extension without its configuration fails pi's start (270.982753ms)
✔ founderCheck: founder variables, then a needed service without a usable token (1.711642ms)
✔ turnRequest names the sender, class, reply and decision (0.259584ms)
✔ a message becomes a turn, the answer goes back as a RESULT, SIGTERM releases and exits 0 (269.324752ms)
✔ a SIGTERM before the claim stops the runner with exit 0 and no claim (131.430937ms)
✔ typed tools carry the runner's capability; launch goes to the host's launch socket (464.429598ms)
✔ a RESULT gets no automatic reply; failed turns reply with the reason (1520.134523ms)
✔ SIGTERM during a turn kills the turn's process group and still exits 0 (187.836217ms)
✔ founder credentials stop before the claim (20) (208.81483ms)
✔ a refused claim exits 21; an ended run's capability exits 22 (244.227937ms)
✔ the launch ending under a running session exits 22 (172.416748ms)
✔ a broker that stays unreachable exits 23 after brokerRetries polls (253.75994ms)
✔ a broker that is down at the claim exits 23, not 21 (92.919627ms)
✔ no capability, or a malformed one, on stdin exits 2 (191.524811ms)
✔ the PM gets launch, its task verbs and the reads (7.204459ms)
✔ a coder gets no launch, no resolve_decision, and no task tools without a tracker (2.916872ms)
✔ launch only when the business's launch block names the instance as launcher (2.364338ms)
✔ an action outside the instance's authority has no tool (2.35004ms)
✔ callTool: one JSON line out, the result back, a refusal rejects (8.053898ms)
ℹ tests 45
ℹ suites 0
ℹ pass 44
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 10694.510151

✖ failing tests:

test at packages/harness/tests/bundle.test.mjs:70:1
✖ a claude-code bundle adds the wrapped gate hook and the MCP config (4.014424ms)
  AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
  + actual - expected
  
  + "timeout -k 2 10 '/usr/bin/node' '/home/jwoltje/darkwing-scratch/r41/wt/packages/harness/src/claude-gate.mjs' '/home/jwoltje/darkwing-scratch/tmp/mosaic-harness-F6vGQM/bundle/policy.json'"
  - "timeout -k 2 10 '/usr/bin/node' '/home/jwoltje/darkwing-scratch/r41/wt/packages/harness/src/claude-gate.mjs' '/home/jwoltje/darkwing-scratch/tmp/mosaic-harness-F6vGQM/bundle/policy.json' || exit 2"
  
      at TestContext.<anonymous> (file:///home/jwoltje/darkwing-scratch/r41/wt/packages/harness/tests/bundle.test.mjs:78:10)
      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: "timeout -k 2 10 '/usr/bin/node' '/home/jwoltje/darkwing-scratch/r41/wt/packages/harness/src/claude-gate.mjs' '/home/jwoltje/darkwing-scratch/tmp/mosaic-harness-F6vGQM/bundle/policy.json'",
    expected: "timeout -k 2 10 '/usr/bin/node' '/home/jwoltje/darkwing-scratch/r41/wt/packages/harness/src/claude-gate.mjs' '/home/jwoltje/darkwing-scratch/tmp/mosaic-harness-F6vGQM/bundle/policy.json' || exit 2",
    operator: 'strictEqual',
    diff: 'simple'
  }
