
 RUN  v2.1.9 /Users/khaliqgant/flows-spec-Q-sidechannel/packages/sdk

stdout | tests/live-kernel.test.ts
LIVE_KERNEL relayflowd=/Users/khaliqgant/.relayflows-toolchain/target/3923540030/debug/relayflowd
LIVE_KERNEL flows=/Users/khaliqgant/flows-spec-Q-sidechannel/packages/sdk/dist/cli.js

 ✓ tests/daemon-lifecycle.test.ts (42 tests) 45ms
 ✓ tests/preflight.test.ts (27 tests) 79ms
 ✓ tests/validate.test.ts (68 tests) 88ms
 ✓ tests/observer-link.test.ts (39 tests) 275ms
 ✓ tests/authored-flow.test.ts (25 tests) 813ms
 ✓ tests/journal-client.test.ts (14 tests) 103ms
 ✓ tests/tick-source.test.ts (33 tests) 66ms
 ✓ tests/cloud-run.test.ts (47 tests) 124ms
 ✓ tests/authored-flow-lifecycle-executor.test.ts (27 tests) 542ms
 ✓ tests/cli-replay.test.ts (37 tests) 1123ms
   ✓ flows replay > --json is byte-identical across two CLI invocations (diff) 780ms
 ✓ tests/gate-contract.test.ts (20 tests) 206ms
 ✓ tests/verb-field-lint.test.ts (78 tests) 1998ms
   ✓ closed per-verb step fields > carries the llm/agent `output` sugar through every path > flows check accepts output on llm 1329ms
 ✓ tests/cli-hn-monitor.test.ts (16 tests) 136ms
 ✓ tests/tick-runner.test.ts (22 tests) 2653ms
   ✓ CLI argument parsing refuses coercion rather than accepting it > refuses --interval-ms fractional as an invocation error 575ms
   ✓ CLI argument parsing refuses coercion rather than accepting it > refuses --interval-ms exponent notation as an invocation error 347ms
   ✓ CLI argument parsing refuses coercion rather than accepting it > refuses --interval-ms trailing text as an invocation error 300ms
   ✓ CLI argument parsing refuses coercion rather than accepting it > refuses --interval-ms empty as an invocation error 601ms
   ✓ CLI argument parsing refuses coercion rather than accepting it > accepts an exact integer and proceeds past parsing 461ms
 ✓ tests/authored-flow-slack.test.ts (6 tests) 1748ms
   ✓ authored Slack helper effects > replays after SIGKILL before confirm with the same token and one successful completion 624ms
   ✓ authored Slack helper effects > replays after SIGKILL before complete with the same token and one successful completion 496ms
   ✓ authored Slack helper effects > writes two files for two calls and supports dm, reply, and react 401ms
 ✓ tests/backlog-picker.test.ts (14 tests) 69ms
 ✓ tests/backlog-picker-flow.test.ts (6 tests) 693ms
   ✓ backlog-picker flow > does not emit a stale entry left by a previous run 378ms
 ✓ tests/mcp.test.ts (30 tests) 8230ms
   ✓ MCP preflight and transports > flows check refuses an undeclared server with exit 2 and no daemon 860ms
   ✓ MCP preflight and transports > flows check reports a refusing server and leaves no PID 673ms
   ✓ MCP preflight and transports > kills a SIGTERM-resistant silent child after a parent-owned handshake deadline 1310ms
   ✓ MCP preflight and transports > reaps a SIGTERM-resistant descendant with inherit stdio before cleanup finishes 1208ms
   ✓ MCP preflight and transports > reaps a SIGTERM-resistant descendant with ignore stdio before cleanup finishes 2062ms
   ✓ MCP preflight and transports > reports malformed connection configuration as config_invalid 498ms
   ✓ authored MCP effects against the real kernel > journals one MCP receipt per call with args, result, stable logical key, and a confirmed effect 339ms
   ✓ authored MCP effects against the real kernel > reports a dropped tool connection as a failed CLI run 484ms
 ✓ tests/authored-flow-operation.test.ts (23 tests) 271ms
 ❯ tests/bundle.test.ts (21 tests | 1 failed) 5463ms
   ✓ immutable bundles > returns exit 2 naming a byte-flipped payload and refuses to reuse corruption 383ms
   ✓ immutable bundles > builds and verifies the canonical YAML fixture through the compiled CLI 1327ms
   ✓ immutable bundles > emits the ephemeral warning on CLI stderr and uses the default output directory 456ms
   ✓ immutable bundles > preserves quoted asset words and executable permissions 1539ms
   × immutable bundles > builds a standalone TS fixture twice with identical executable hashes 293ms
     → expected 'REFUSED [bundle_invalid] TypeScript b…' to be '' // Object.is equality
 ✓ tests/work-package-consumer.test.ts (13 tests) 202ms
 ✓ tests/spec-parity.test.ts (31 tests) 184ms
 ✓ tests/stop-process-group.test.ts (6 tests) 10287ms
   ✓ every stop reaches the process group, not just the direct child > exits the run after an execution-timeout stop 1658ms
   ✓ every stop reaches the process group, not just the direct child > exits the run after a protocol terminate stop 1329ms
   ✓ every stop reaches the process group, not just the direct child > kills a SIGTERM-deaf grandchild after a protocol terminate stop 3134ms
   ✓ every stop reaches the process group, not just the direct child > kills a SIGTERM-deaf grandchild after an execution-timeout stop 2719ms
   ✓ every stop reaches the process group, not just the direct child > holds the loop open long enough for the escalation to run 1152ms
 ✓ tests/worker-lease.test.ts (7 tests) 5ms
 ✓ tests/typed-output.test.ts (14 tests) 101ms
 ✓ tests/json-schema-bound.test.ts (71 tests) 1450ms
   ✓ JSON Schema termination bound > walks a deep schema with an explicit stack rather than recursion 1210ms
 ✓ tests/mcp-lifecycle.test.ts (4 tests) 7ms
 ✓ tests/model-selection.test.ts (10 tests) 9ms
 ✓ tests/webhook-live.test.ts (3 tests) 4847ms
   ✓ flows serve-webhook writes JSON before the daemon starts, then journals and archives exactly once 1299ms
   ✓ resumes the same journal after SIGKILL after spawn and before acknowledgement 3286ms
 ✓ tests/relayflowd-path.test.ts (10 tests) 2ms
 ✓ tests/direct-input.test.ts (4 tests) 6706ms
   ✓ direct .flow.ts input through the built CLI and live runtime > executes inline and file JSON input through relayflowd 2539ms
   ✓ direct .flow.ts input through the built CLI and live runtime > refuses missing and malformed input before contacting relayflowd 2451ms
   ✓ direct .flow.ts input through the built CLI and live runtime > does not run the authored body before daemon availability 843ms
   ✓ direct .flow.ts input through the built CLI and live runtime > refuses oversized file input before contacting relayflowd 873ms
 ✓ tests/f-memory.test.ts (7 tests) 757ms
 ✓ tests/webhook.test.ts (6 tests) 55ms
 ✓ tests/local-dev-ux.test.ts (8 tests) 14ms
 ✓ tests/dependency-validation.test.ts (6 tests) 324ms
 ✓ tests/input-binding.test.ts (12 tests) 103ms
 ✓ tests/daemon-lifecycle-live.test.ts (9 tests) 13084ms
   ✓ flows run against a data dir with no daemon (§6 test 7) > cold start spawns exactly one daemon, the run succeeds, and the daemon outlives the CLI 1357ms
   ✓ flows run against a data dir with no daemon (§6 test 7) > polls, bounded, for a daemon that holds the lock before it binds 2432ms
   ✓ flows run against a data dir with no daemon (§6 test 7) > attaches to a serving daemon that has not published a connection file 1181ms
   ✓ flows run against a data dir with no daemon (§6 test 7) > a second run attaches to the daemon the first one started, spawning nothing 2090ms
   ✓ flows run against a data dir with no daemon (§6 test 7) > detects a stale connection file left by a hard kill and starts a fresh daemon 1822ms
   ✓ concurrent invocations against one empty data dir (§6 test 15) > ends with exactly one daemon owning the socket, and both runs succeed 1385ms
   ✓ refusals from a spawn that cannot produce a daemon > names relayflowd_not_found rather than falling through to PATH 827ms
   ✓ refusals from a spawn that cannot produce a daemon > names daemon_start_failed and quotes the daemon log when startup dies 936ms
   ✓ refusals from a spawn that cannot produce a daemon > refuses a daemon speaking another protocol version instead of binding over it 1053ms
 ✓ tests/deterministic-llm.test.ts (5 tests) 36ms
 ✓ tests/scope-compiler.test.ts (25 tests) 5ms
 ✓ tests/budget-attribution.test.ts (4 tests) 2ms
 ✓ tests/hn-poller.test.ts (6 tests) 3ms
 ✓ tests/dir-watcher-poller.test.ts (6 tests) 2ms
 ✓ tests/flow-executor-chain.test.ts (12 tests) 13686ms
   ✓ flow executor LLM and output-binding chain > runs f.llm -> f.agent -> f.run with schema-verified journal output and the exact allowed model 2334ms
   ✓ flow executor LLM and output-binding chain > fails invalid LLM output before the next step: not JSON 1200ms
   ✓ flow executor LLM and output-binding chain > fails invalid LLM output before the next step: {"message":7} 1372ms
   ✓ flow executor LLM and output-binding chain > retains tagged-template text output 1246ms
   ✓ flow executor LLM and output-binding chain > preserves JSON values without promoting them to process wrappers: null 1174ms
   ✓ flow executor LLM and output-binding chain > preserves JSON values without promoting them to process wrappers: [1,2] 904ms
   ✓ flow executor LLM and output-binding chain > preserves JSON values without promoting them to process wrappers: "hello" 833ms
   ✓ flow executor LLM and output-binding chain > runs the authored LLM path through the built flows CLI 1216ms
   ✓ flow executor LLM and output-binding chain > passes a declarative verified value through an agent into a deterministic artifact 619ms
   ✓ flow executor LLM and output-binding chain > journals a missing optional field as a failure before the consuming command executes 537ms
   ✓ flow executor LLM and output-binding chain > flows run consumes YAML bindings and resume reuses the original journal output 2217ms
 ✓ tests/hello-deterministic.test.ts (5 tests) 10ms
 ✓ tests/budget-preflight.test.ts (16 tests) 5ms
 ✓ tests/work-package-validator.test.ts (7 tests) 3ms
 ✓ tests/bin.test.ts (7 tests) 1921ms
   ✓ built flows binary > refuses through a symlink to the built artifact 441ms
   ✓ built flows binary > classifies a signal-terminated auth probe as probe_failed 468ms
   ✓ built flows binary > runs one auth probe for three steps sharing a flow CLI 429ms
 ✓ tests/yaml-local-agent-live.test.ts (7 tests) 3434ms
   ✓ YAML --local-agent through the built CLI and real daemon > runs with the checked step CLI and model and journals done 837ms
   ✓ YAML --local-agent through the built CLI and real daemon > runs with the checked named CLI and model and journals done 463ms
   ✓ YAML --local-agent through the built CLI and real daemon > runs with the checked flow CLI and model and journals done 482ms
   ✓ YAML --local-agent through the built CLI and real daemon > runs with the checked project CLI and model and journals done 472ms
   ✓ YAML --local-agent through the built CLI and real daemon > still parks without --local-agent 343ms
   ✓ YAML --local-agent through the built CLI and real daemon > reports the agent process failure 485ms
   ✓ YAML --local-agent through the built CLI and real daemon > preserves declared workspace surfaces that the local worker cannot pin 351ms
 ↓ tests/real-cli-adapters.test.ts (3 tests | 3 skipped)
 ✓ tests/model-pricing.test.ts (8 tests) 2ms
 ✓ tests/authored-use-loader.test.ts (5 tests) 31ms
 ✓ tests/parse-json-output.test.ts (7 tests) 1ms
 ✓ tests/cli-adapter.test.ts (3 tests) 2ms
 ✓ tests/pty-sidechannel.test.ts (5 tests) 2105ms
   ✓ view attach preserves worker completion and marks only drive 635ms
   ✓ passthrough attach preserves worker completion and marks only drive 616ms
   ✓ none attach preserves worker completion and marks only drive 626ms
 ✓ tests/journal-client-completion.test.ts (4 tests) 98ms
 ✓ tests/direct-run-failure.test.ts (6 tests) 3ms
 ✓ tests/memoization.test.ts (57 tests) 697ms
   ✓ refuses invalid reuse invocation "run" 670ms
 ✓ tests/cli.test.ts (63 tests) 20258ms
   ✓ flows check CLI > binds a checked relative wrapper to the flow directory for worker execution 1068ms
   ✓ flows check CLI > uses the raw Claude adapter model flag instead of accepting auth status as model proof 770ms
   ✓ flows check CLI > uses Codex login status and reports a rejected model as unavailable, not unauthenticated 1502ms
   ✓ flows check CLI > refuses a nonconforming custom wrapper without calling it an authentication failure 910ms
   ✓ flows check CLI > accepts an exact allowlisted named-agent model and probes that model 1459ms
   ✓ flows check CLI > checks the same named-agent contract from declarative JSON 1445ms
   ✓ flows check CLI > refuses a typo model before probing or contacting relayflowd 909ms
   ✓ flows check CLI > distinguishes an allowlisted but inaccessible model from broken auth 1044ms
   ✓ flows check CLI > refuses cli-unauthenticated.flow.yaml with typed kind cli_unauthenticated and exit 2 870ms
   ✓ flows check CLI > resolves a project CLI path relative to the flows.json that declares it 901ms
   ✓ flows check CLI > maps every input refusal path to its declared kind without raw exceptions 1856ms
   ✓ flows run/resume CLI over the journal protocol > exits 1 and emits the declared completionReason for a failed run 821ms
   ✓ flows run/resume CLI over the journal protocol > exits 3 and names the parked llm step 634ms
   ✓ flows run/resume CLI over the journal protocol > reports a needs_human agent step as parked for human recovery 631ms
   ✓ flows run/resume CLI over the journal protocol > classifies a typed hello refusal as a protocol error, not an unreachable daemon 670ms
   ✓ flows run/resume CLI over the journal protocol > follows a dispatched worker step instead of reporting a protocol error 394ms
   ✓ flows run/resume CLI over the journal protocol > bounds a worker wait by its lease and reports what it is waiting for 781ms
   ✓ flows run/resume CLI over the journal protocol > resumes a parked run from snapshot step types without reading journal sequence one 699ms
   ✓ flows run/resume CLI over the journal protocol > maps only run_not_found resumes to exit 2 2254ms
 ✓ tests/budget-authored-live.test.ts (2 tests) 127ms
 ✓ tests/slack-writeback.test.ts (1 test) 258ms
 ✓ tests/placement.test.ts (54 tests) 7ms
 ✓ tests/memory.test.ts (18 tests) 4ms
 ✓ tests/worker-platform.test.ts (1 test) 2ms
 ✓ tests/classify-outcome.test.ts (2 tests) 2224ms
   ✓ classifyOutcome > gives up and reports when a running run never becomes classifiable 2066ms
 ✓ tests/cli-progress-wait.test.ts (2 tests) 1310ms
   ✓ run starts the wait clock on its first observed lease 611ms
   ✓ resume starts the wait clock on its first observed lease 699ms
 ✓ tests/worker-cli-abort.test.ts (2 tests) 2525ms
   ✓ stops claude and its process group when lease ownership is lost 1267ms
   ✓ stops wrapper.mjs and its process group when lease ownership is lost 1258ms
 ✓ tests/worker-cli.test.ts (13 tests) 26003ms
   ✓ custom wrapper execution identity > passes an explicit safe environment at identification and execution 496ms
   ✓ custom wrapper execution identity > refuses a wrapper symlink retarget before delivering private values 1072ms
   ✓ custom wrapper execution identity > bounds wrapper execution after acknowledgement 986ms
   ✓ custom wrapper execution identity > bounds captured wrapper output 1456ms
   ✓ custom wrapper execution identity > refuses a duplicate execute protocol frame 1149ms
   ✓ custom wrapper execution bounds are reader-owned > resolves when a conforming wrapper leaks a stdio pipe to a background helper 2982ms
   ✓ custom wrapper execution bounds are reader-owned > resolves when the leaked helper inherits stderr only 2388ms
   ✓ custom wrapper execution bounds are reader-owned > resolves when a wrapper leaks a stdio pipe and exits before identifying 3256ms
   ✓ custom wrapper execution bounds are reader-owned > journals a completionReason at the default bound when a wrapper leaks a stdio pipe 11256ms
   ✓ custom wrapper execution bounds are reader-owned > accepts the same over-8KiB payload whether or not it coalesces with the execute token 413ms
 ❯ tests/cli-watch.test.ts (10 tests | 8 failed) 40824ms
   × flows check --watch > rechecks syntax errors, clears once, and returns the last refusal on Ctrl-C 5005ms
     → Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
   × flows check --watch > streams JSON lines without ANSI, recovers after atomic saves, and exits zero after repair 5002ms
     → Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
   × flows check --watch > coalesces 20 concurrent saves into at most two rechecks 5003ms
     → Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
   × flows check --watch > watches transitive relative use imports, cycles, and nearest config changes 5003ms
     → Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
   × flows check --watch > refreshes the import graph and notices missing imports being created 5003ms
     → Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
   × flows check --watch > reloads authored TypeScript instead of reusing the first imported definition 5004ms
     → Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
   × flows check --watch > detects a nearer config appearing and falls back after it is deleted 5002ms
     → Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
   × flows check --watch > keeps watching after the target is deleted and recreated 5003ms
     → Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
   ✓ flows check --watch > queues changes during a slow check without overlapping checks 794ms
 ✓ tests/local-agent-live.test.ts (5 tests) 39681ms
   ✓ built CLI local agent against a real daemon > dispatches through the wrapper and keeps --json stdout report-shaped 917ms
   ✓ built CLI local agent against a real daemon > runs beyond the initial 30-second lease without a second invocation 35883ms
   ✓ built CLI local agent against a real daemon > renders actual agent completion in text output 824ms
   ✓ built CLI local agent against a real daemon > returns a failed run when the agent process fails 973ms
   ✓ built CLI local agent against a real daemon > refuses a workspace it cannot pin before invoking the agent 1082ms
stdout | tests/live-kernel.test.ts > surface resume after a real daemon kill > resumes a three-step run with each successful completion exactly once
LIVE_KERNEL kill -9 pid=42107 run=01M28VTDC2V93DVMKY33GJ0H6H while step=two state=Running

 ❯ tests/live-kernel.test.ts (31 tests | 2 failed) 67786ms
   ✓ built flows CLI against live relayflowd > twenty-six-step reuses 25 durable completions after editing the failed final step 3140ms
   ✓ built flows CLI against live relayflowd > runs rung (a), parks rung (b), and keeps JSON report-shaped 6433ms
   ✓ built flows CLI against live relayflowd > allows a deterministic run to exceed the bounded request timeout 32287ms
   ✓ built flows CLI against live relayflowd > follows a live worker dispatch through flows run 1412ms
   ✓ built flows CLI against live relayflowd > runs an agent CLI end to end through the SDK worker 378ms
   ✓ built flows CLI against live relayflowd > f.agent lowers to a real agent step and dispatches through a live worker 450ms
   ✓ built flows CLI against live relayflowd > f.agent's default flowPath anchors on cwd, not cwd's parent 464ms
   ✓ built flows CLI against live relayflowd > can always get a parked run to a late-attaching worker 5564ms
   × built flows CLI against live relayflowd > reports a real manual-recovery NeedsHuman state as parked 5007ms
     → Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
   ✓ built flows CLI against live relayflowd > runs hn-monitor analyze-story end-to-end via a stub agent CLI (gate 2 clause 2 demo) 377ms
   ✓ built flows CLI against live relayflowd > hn-monitor analyze-story FAILS verification when the CLI omits required schema fields 371ms
   ✓ built flows CLI against live relayflowd > agent step preserves the CliResult wrapper as output when the CLI emits non-JSON text 364ms
   ✓ built flows CLI against live relayflowd > AgentWorker exposes wake_context to the CLI via RELAYFLOW_WAKE_CONTEXT env var (real analyzer prerequisite) 420ms
   ✓ built flows CLI against live relayflowd > AgentWorker leaves RELAYFLOW_WAKE_CONTEXT UNSET when the run has no wake_context (undefined-vs-null pin) 413ms
   ✓ built flows CLI against live relayflowd > AgentWorker passes a declared model to an identified wrapper as RELAYFLOW_MODEL 515ms
   ✓ built flows CLI against live relayflowd > AgentWorker refuses a nonconforming journal-submitted wrapper before exposing RELAYFLOW_MODEL 398ms
   ✓ built flows CLI against live relayflowd > AgentWorker executes the raw claude adapter with its real model flag 346ms
   ✓ built flows CLI against live relayflowd > AgentWorker executes the raw codex adapter with its real model flag 393ms
   ✓ built flows CLI against live relayflowd > AgentWorker leaves RELAYFLOW_MODEL UNSET when the step declares no model 489ms
   × built flows CLI against live relayflowd > hn-monitor analyze-story reaches done through the real Claude analyzer CLI 1796ms
     → LIVE_ANALYZER_UNAVAILABLE: "/Users/khaliqgant/flows-spec-Q-sidechannel/testdata/preflight/analyze-story-claude-cli auth status" exited 1: analyze-story-claude-cli: "claude -p --model claude-haiku-4-5-20251001" exited 1: — failing because gate-2 acceptance requires the real analyzer to execute. Set RELAYFLOWS_ALLOW_ANALYZER_SKIP=1 only if this run is not gate evidence.
   ✓ built flows CLI against live relayflowd > preflights before journaling and names an unreachable socket 2191ms
   ✓ built flows CLI against live relayflowd > starts exactly one daemon when two runs race for one empty data dir 1088ms
   ✓ surface resume after a real daemon kill > resumes a three-step run with each successful completion exactly once 2745ms
   ✓ a relayflow can be scheduled: tick source against live relayflowd > a tick spawns a real run whose step reports the SCHEDULED instant 379ms

⎯⎯⎯⎯⎯⎯ Failed Tests 11 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  tests/bundle.test.ts > immutable bundles > builds a standalone TS fixture twice with identical executable hashes
AssertionError: expected 'REFUSED [bundle_invalid] TypeScript b…' to be '' // Object.is equality

- Expected
+ Received

+ REFUSED [bundle_invalid] TypeScript build requires Bun: spawnSync bun ENOENT
+

 ❯ tests/bundle.test.ts:210:27
    208|   it('builds a standalone TS fixture twice with identical executable h…
    209|     const result = invoke(['--out', await temp(), 'packages/sdk/tests/…
    210|     expect(result.stderr).toBe(''); expect(result.status).toBe(0);
       |                           ^
    211|     const bundle = result.stdout.trim();
    212|     const second = invoke(['--out', await temp(), 'packages/sdk/tests/…

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/11]⎯

 FAIL  tests/cli-watch.test.ts > flows check --watch > rechecks syntax errors, clears once, and returns the last refusal on Ctrl-C
 FAIL  tests/cli-watch.test.ts > flows check --watch > streams JSON lines without ANSI, recovers after atomic saves, and exits zero after repair
 FAIL  tests/cli-watch.test.ts > flows check --watch > coalesces 20 concurrent saves into at most two rechecks
 FAIL  tests/cli-watch.test.ts > flows check --watch > watches transitive relative use imports, cycles, and nearest config changes
 FAIL  tests/cli-watch.test.ts > flows check --watch > refreshes the import graph and notices missing imports being created
 FAIL  tests/cli-watch.test.ts > flows check --watch > reloads authored TypeScript instead of reusing the first imported definition
 FAIL  tests/cli-watch.test.ts > flows check --watch > detects a nearer config appearing and falls back after it is deleted
 FAIL  tests/cli-watch.test.ts > flows check --watch > keeps watching after the target is deleted and recreated
 FAIL  tests/live-kernel.test.ts > built flows CLI against live relayflowd > reports a real manual-recovery NeedsHuman state as parked
Error: Test timed out in 5000ms.
If this is a long-running test, pass a timeout value as the last argument or configure it globally with "testTimeout".
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/11]⎯

 FAIL  tests/live-kernel.test.ts > built flows CLI against live relayflowd > hn-monitor analyze-story reaches done through the real Claude analyzer CLI
Error: LIVE_ANALYZER_UNAVAILABLE: "/Users/khaliqgant/flows-spec-Q-sidechannel/testdata/preflight/analyze-story-claude-cli auth status" exited 1: analyze-story-claude-cli: "claude -p --model claude-haiku-4-5-20251001" exited 1: — failing because gate-2 acceptance requires the real analyzer to execute. Set RELAYFLOWS_ALLOW_ANALYZER_SKIP=1 only if this run is not gate evidence.
 ❯ tests/live-kernel.test.ts:1223:15
    1221|       const notice = `LIVE_ANALYZER_UNAVAILABLE: ${readiness.detail}`;
    1222|       if (process.env['RELAYFLOWS_ALLOW_ANALYZER_SKIP'] !== '1') {
    1223|         throw new Error(
       |               ^
    1224|           `${notice} — failing because gate-2 acceptance requires the …
    1225|           + 'Set RELAYFLOWS_ALLOW_ANALYZER_SKIP=1 only if this run is …

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/11]⎯

⎯⎯⎯⎯⎯⎯ Unhandled Errors ⎯⎯⎯⎯⎯⎯

Vitest caught 8 unhandled errors during the test run.
This might cause false positive tests. Resolve unhandled errors to make sure your tests are not affected.

⎯⎯⎯⎯⎯ Uncaught Exception ⎯⎯⎯⎯⎯
Error: spawn bun ENOENT
 ❯ Process.ChildProcess._handle.onexit node:internal/child_process:286:19
 ❯ onErrorNT node:internal/child_process:507:16
 ❯ processTicksAndRejections node:internal/process/task_queues:90:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'spawn bun', path: 'bun', spawnargs: [ 'run', 'flows', 'check', '--watch', '/var/folders/_z/f_fpl8j533g_r63706k2xvp00000gn/T/flows-watch-T0QOru/fixture.yaml' ] }
This error originated in "tests/cli-watch.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "rechecks syntax errors, clears once, and returns the last refusal on Ctrl-C". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.

⎯⎯⎯⎯⎯ Uncaught Exception ⎯⎯⎯⎯⎯
Error: spawn bun ENOENT
 ❯ Process.ChildProcess._handle.onexit node:internal/child_process:286:19
 ❯ onErrorNT node:internal/child_process:507:16
 ❯ processTicksAndRejections node:internal/process/task_queues:90:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'spawn bun', path: 'bun', spawnargs: [ 'run', 'flows', 'check', '--watch', '--json', '/var/folders/_z/f_fpl8j533g_r63706k2xvp00000gn/T/flows-watch-zyTD6U/fixture.yaml' ] }
This error originated in "tests/cli-watch.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "streams JSON lines without ANSI, recovers after atomic saves, and exits zero after repair". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.

⎯⎯⎯⎯⎯ Uncaught Exception ⎯⎯⎯⎯⎯
Error: spawn bun ENOENT
 ❯ Process.ChildProcess._handle.onexit node:internal/child_process:286:19
 ❯ onErrorNT node:internal/child_process:507:16
 ❯ processTicksAndRejections node:internal/process/task_queues:90:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'spawn bun', path: 'bun', spawnargs: [ 'run', 'flows', 'check', '--watch', '--json', '/var/folders/_z/f_fpl8j533g_r63706k2xvp00000gn/T/flows-watch-hEvfm5/fixture.yaml' ] }
This error originated in "tests/cli-watch.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "coalesces 20 concurrent saves into at most two rechecks". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.

⎯⎯⎯⎯⎯ Uncaught Exception ⎯⎯⎯⎯⎯
Error: spawn bun ENOENT
 ❯ Process.ChildProcess._handle.onexit node:internal/child_process:286:19
 ❯ onErrorNT node:internal/child_process:507:16
 ❯ processTicksAndRejections node:internal/process/task_queues:90:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'spawn bun', path: 'bun', spawnargs: [ 'run', 'flows', 'check', '--watch', '--json', '/var/folders/_z/f_fpl8j533g_r63706k2xvp00000gn/T/flows-watch-FFk1D6/fixture.yaml' ] }
This error originated in "tests/cli-watch.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "watches transitive relative use imports, cycles, and nearest config changes". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.

⎯⎯⎯⎯⎯ Uncaught Exception ⎯⎯⎯⎯⎯
Error: spawn bun ENOENT
 ❯ Process.ChildProcess._handle.onexit node:internal/child_process:286:19
 ❯ onErrorNT node:internal/child_process:507:16
 ❯ processTicksAndRejections node:internal/process/task_queues:90:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'spawn bun', path: 'bun', spawnargs: [ 'run', 'flows', 'check', '--watch', '--json', '/var/folders/_z/f_fpl8j533g_r63706k2xvp00000gn/T/flows-watch-UI7Vqu/fixture.yaml' ] }
This error originated in "tests/cli-watch.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "refreshes the import graph and notices missing imports being created". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.

⎯⎯⎯⎯⎯ Uncaught Exception ⎯⎯⎯⎯⎯
Error: spawn bun ENOENT
 ❯ Process.ChildProcess._handle.onexit node:internal/child_process:286:19
 ❯ onErrorNT node:internal/child_process:507:16
 ❯ processTicksAndRejections node:internal/process/task_queues:90:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'spawn bun', path: 'bun', spawnargs: [ 'run', 'flows', 'check', '--watch', '--json', '/var/folders/_z/f_fpl8j533g_r63706k2xvp00000gn/T/flows-watch-JWzNP0/authored.flow.ts' ] }
This error originated in "tests/cli-watch.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "reloads authored TypeScript instead of reusing the first imported definition". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.

⎯⎯⎯⎯⎯ Uncaught Exception ⎯⎯⎯⎯⎯
Error: spawn bun ENOENT
 ❯ Process.ChildProcess._handle.onexit node:internal/child_process:286:19
 ❯ onErrorNT node:internal/child_process:507:16
 ❯ processTicksAndRejections node:internal/process/task_queues:90:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'spawn bun', path: 'bun', spawnargs: [ 'run', 'flows', 'check', '--watch', '--json', '/var/folders/_z/f_fpl8j533g_r63706k2xvp00000gn/T/flows-watch-K2OPSl/sub/fixture.yaml' ] }
This error originated in "tests/cli-watch.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "detects a nearer config appearing and falls back after it is deleted". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.

⎯⎯⎯⎯⎯ Uncaught Exception ⎯⎯⎯⎯⎯
Error: spawn bun ENOENT
 ❯ Process.ChildProcess._handle.onexit node:internal/child_process:286:19
 ❯ onErrorNT node:internal/child_process:507:16
 ❯ processTicksAndRejections node:internal/process/task_queues:90:21

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Serialized Error: { errno: -2, code: 'ENOENT', syscall: 'spawn bun', path: 'bun', spawnargs: [ 'run', 'flows', 'check', '--watch', '--json', '/var/folders/_z/f_fpl8j533g_r63706k2xvp00000gn/T/flows-watch-RUVTus/fixture.yaml' ] }
This error originated in "tests/cli-watch.test.ts" test file. It doesn't mean the error was thrown inside the file itself, but while it was running.
The latest test that might've caused the error is "keeps watching after the target is deleted and recreated". It might mean one of the following:
- The error was thrown, while Vitest was running this test.
- If the error occurred after the test had been completed, this was the last documented test before it was thrown.
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯

 Test Files  3 failed | 66 passed | 1 skipped (70)
      Tests  11 failed | 1204 passed | 3 skipped (1218)
     Errors  8 errors
   Start at  20:30:25
   Duration  68.83s (transform 1.68s, setup 0ms, collect 13.49s, tests 285.92s, environment 6ms, prepare 2.86s)

