# Required package command at HEAD (f308f95), run from packages/sdk.
# RELAYFLOWD_BIN is passed explicitly because test:prep exports it in a subshell.
$ git rev-parse HEAD
f308f95683c46eaddcf5c22eefd35aa04d2d1500
$ git status --porcelain -- packages/sdk
$ RELAYFLOWD_BIN=/home/daytona/.relayflows-toolchain/target/2962130851/debug/relayflowd npm test

> @relayflows/sdk@2.0.22 test
> sh scripts/test.sh


> @relayflows/sdk@2.0.22 test:prep
> ( cd ../../kernel && sh ../ops/cargo.sh build ) && ( [ ! -d ../../testdata/preflight ] || find ../../testdata/preflight -name '*-cli' -type f -exec chmod +x {} + )

    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s

> @relayflows/sdk@2.0.22 typecheck
> tsc --noEmit && tsc -p tsconfig.type-tests.json


> @relayflows/sdk@2.0.22 build
> tsc && node scripts/make-cli-executable.mjs


> @relayflows/sdk@2.0.22 typecheck:tests
> tsc -p tsconfig.tests.json


 RUN  v2.1.9 /home/daytona/.relayflow-v2-supervisor/durable/repository/packages/sdk

stdout | tests/live-kernel.test.ts
LIVE_KERNEL relayflowd=/home/daytona/.relayflows-toolchain/target/2962130851/debug/relayflowd
LIVE_KERNEL flows=/home/daytona/.relayflow-v2-supervisor/durable/repository/packages/sdk/dist/cli.js

 ✓ tests/cloud-read.test.ts (39 tests) 73ms
 ✓ tests/preflight.test.ts (57 tests) 92ms
 ✓ tests/cli.test.ts (65 tests) 1415ms
   ✓ flows check CLI > binds a checked relative wrapper to the flow directory for worker execution 375ms
 ✓ tests/cloud-sync.test.ts (40 tests) 706ms
 ✓ tests/observer-link.test.ts (39 tests) 146ms
 ✓ tests/agent-transcript.test.ts (29 tests) 269ms
 ✓ tests/cloud-run.test.ts (58 tests) 682ms
(node:84245) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
 ✓ tests/cli-status.test.ts (26 tests) 901ms
   ✓ flows status > resolves the run with no arguments from inside a worker-spawned agent 711ms
 ✓ tests/relay-cli-surface.test.ts (66 tests) 24ms
 ✓ tests/authored-flow.test.ts (25 tests) 726ms
 ✓ tests/daemon-lifecycle.test.ts (42 tests) 35ms
 ✓ tests/run-state.test.ts (21 tests) 11ms
 ✓ tests/cloud-deploy.test.ts (40 tests) 1072ms
 ✓ tests/cloud-connect.test.ts (24 tests) 3290ms
   ✓ hosted verbs connect before they submit > flows run --cloud submits once the prompt connected the integration 2152ms
 ✓ tests/step-failure-diagnostic.test.ts (21 tests) 36ms
 ✓ tests/worker-cli.test.ts (18 tests) 25255ms
   ✓ registered CLI model defaults > passes the same priced Claude default to the real provider invocation 397ms
   ✓ step discovery environment > names the run, step, attempt and an absolute data dir for a direct agent spawn 404ms
   ✓ step discovery environment > exports none of the four without a data dir, even when the worker inherited them 334ms
   ✓ wrapper discovery environment > exports none of the four to a wrapper without a data dir, even when the worker inherited them 365ms
   ✓ custom wrapper execution identity > passes an explicit safe environment at identification and execution 346ms
   ✓ custom wrapper execution identity > refuses a wrapper symlink retarget before delivering private values 408ms
   ✓ custom wrapper execution identity > bounds wrapper execution after acknowledgement 426ms
   ✓ custom wrapper execution identity > bounds captured wrapper output 342ms
   ✓ custom wrapper execution identity > refuses a duplicate execute protocol frame 353ms
   ✓ custom wrapper execution bounds are reader-owned > resolves when a conforming wrapper leaks a stdio pipe to a background helper 1938ms
   ✓ custom wrapper execution bounds are reader-owned > resolves when the leaked helper inherits stderr only 1911ms
   ✓ custom wrapper execution bounds are reader-owned > resolves when a wrapper leaks a stdio pipe and exits before identifying 3689ms
   ✓ custom wrapper execution bounds are reader-owned > journals a completionReason at the default bound when a wrapper leaks a stdio pipe 11627ms
   ✓ custom wrapper execution bounds are reader-owned > accepts an execute token and an over-8KiB payload flushed in one write 410ms
   ✓ custom wrapper execution bounds are reader-owned > accepts the same over-8KiB payload whether or not it coalesces with the execute token 1185ms
   ✓ custom wrapper execution bounds are reader-owned > still bounds an un-terminated handshake buffer and names the bound 377ms
   ✓ delivers the journaled memory pack to the real wrapper and excludes its charge from completion usage 458ms
 ❯ tests/authored-node-runtime.test.ts (14 tests | 14 skipped) 13ms
 ✓ tests/close-pr-flow.test.ts (28 tests) 332ms
 ✓ tests/journal-client.test.ts (15 tests) 77ms
 ✓ tests/validate.test.ts (68 tests) 20ms
 ✓ tests/verb-field-lint.test.ts (96 tests) 271ms
 ✓ tests/authored-root.test.ts (12 tests) 175ms
 ✓ tests/mcp.test.ts (30 tests) 20250ms
   ✓ MCP preflight and transports > flows check refuses an undeclared server with exit 2 and no daemon 545ms
   ✓ MCP preflight and transports > flows check reports a refusing server and leaves no PID 543ms
   ✓ MCP preflight and transports > kills a SIGTERM-resistant silent child after a parent-owned handshake deadline 1319ms
   ✓ MCP preflight and transports > reaps a SIGTERM-resistant descendant with inherit stdio before cleanup finishes 1121ms
   ✓ MCP preflight and transports > reaps a SIGTERM-resistant descendant with ignore stdio before cleanup finishes 2065ms
   ✓ MCP preflight and transports > reports malformed connection configuration as config_invalid 542ms
   ✓ authored MCP effects against the real kernel > reports a dropped tool connection as a failed CLI run 13173ms
 ✓ tests/tick-source.test.ts (33 tests) 23ms
 ✓ tests/agent-relay-transport.test.ts (16 tests) 2220ms
   ✓ Relay completion at the journal boundary > does not complete at readiness and journals exact output, receipt, and priced accounting 1005ms
   ✓ Relay completion at the journal boundary > aborts polling on rejected renewal and never writes a stale completion 1003ms
 ✓ tests/authored-flow-lifecycle-executor.test.ts (27 tests) 605ms
 ✓ tests/pr-review-post.test.ts (21 tests) 2462ms
 ✓ tests/flow-executor-chain.test.ts (14 tests) 10570ms
   ✓ flow executor LLM and output-binding chain > runs f.llm -> f.agent -> f.run with schema-verified journal output and the exact allowed model 1018ms
   ✓ flow executor LLM and output-binding chain > runs a dollar-budgeted authored Claude agent with the same default used by preflight 614ms
   ✓ flow executor LLM and output-binding chain > preserves JSON values without promoting them to process wrappers: [1,2] 332ms
   ✓ flow executor LLM and output-binding chain > preserves JSON values without promoting them to process wrappers: "hello" 365ms
   ✓ flow executor LLM and output-binding chain > runs the exact authored flagship f.llm -> f.agent -> f.run path through the durable CLI root 1512ms
   ✓ flow executor LLM and output-binding chain > resumes an interrupted durable authored root without replaying completed flagship effects 3531ms
   ✓ flow executor LLM and output-binding chain > passes a declarative verified value through an agent into a deterministic artifact 886ms
   ✓ flow executor LLM and output-binding chain > journals a missing optional field as a failure before the consuming command executes 378ms
   ✓ flow executor LLM and output-binding chain > flows run consumes YAML bindings and resume reuses the original journal output 914ms
 ✓ tests/authored-flow-slack.test.ts (7 tests) 1633ms
   ✓ authored Slack helper effects > replays after SIGKILL before confirm with the same token and one successful completion 493ms
   ✓ authored Slack helper effects > replays after SIGKILL before complete with the same token and one successful completion 474ms
(node:86295) ExperimentalWarning: SQLite is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
 ✓ tests/cli-replay.test.ts (37 tests) 1011ms
   ✓ flows replay > --json is byte-identical across two CLI invocations (diff) 685ms
 ✓ tests/tick-runner.test.ts (22 tests) 2093ms
   ✓ CLI argument parsing refuses coercion rather than accepting it > refuses --interval-ms fractional as an invocation error 344ms
   ✓ CLI argument parsing refuses coercion rather than accepting it > refuses --interval-ms exponent notation as an invocation error 339ms
   ✓ CLI argument parsing refuses coercion rather than accepting it > refuses --interval-ms hex as an invocation error 338ms
   ✓ CLI argument parsing refuses coercion rather than accepting it > refuses --interval-ms trailing text as an invocation error 331ms
   ✓ CLI argument parsing refuses coercion rather than accepting it > refuses --interval-ms empty as an invocation error 363ms
   ✓ CLI argument parsing refuses coercion rather than accepting it > accepts an exact integer and proceeds past parsing 350ms
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=87028 run=01M2ZZ0GYBQ2EHWGJW8AXSB9E2 while step=two state=Running

 ✓ tests/stop-process-group.test.ts (6 tests) 6406ms
   ✓ every stop reaches the process group, not just the direct child > exits the run after an execution-timeout stop 852ms
   ✓ every stop reaches the process group, not just the direct child > exits the run after a protocol terminate stop 463ms
   ✓ every stop reaches the process group, not just the direct child > kills a SIGTERM-deaf grandchild after a protocol terminate stop 1630ms
   ✓ every stop reaches the process group, not just the direct child > kills a SIGTERM-deaf grandchild after an execution-timeout stop 2118ms
   ✓ every stop reaches the process group, not just the direct child > holds the loop open long enough for the escalation to run 1082ms
 ✓ tests/gate-contract.test.ts (20 tests) 118ms
 ❯ tests/live-kernel.test.ts (31 tests | 8 failed) 53047ms
   ✓ built flows CLI against live relayflowd > twenty-six-step reuses 25 durable completions after editing the failed final step 2008ms
   ✓ built flows CLI against live relayflowd > runs rung (a), parks rung (b), and keeps JSON report-shaped 2400ms
   ✓ built flows CLI against live relayflowd > allows a deterministic run to exceed the bounded request timeout 32417ms
   ✓ built flows CLI against live relayflowd > follows a live worker dispatch through flows run 539ms
   ✓ built flows CLI against live relayflowd > runs an agent CLI end to end through the SDK worker 563ms
   ✓ built flows CLI against live relayflowd > f.agent lowers to a real agent step and dispatches through a live worker 584ms
   ✓ built flows CLI against live relayflowd > can always get a parked run to a late-attaching worker 5578ms
   ✓ built flows CLI against live relayflowd > reports a real manual-recovery NeedsHuman state as parked 521ms
   × built flows CLI against live relayflowd > runs hn-monitor analyze-story end-to-end via a stub agent CLI (gate 2 clause 2 demo) 558ms
     → expected { …(12) } to match object { output: { …(3) }, …(1) }
(22 matching properties omitted from actual)
   × built flows CLI against live relayflowd > hn-monitor analyze-story FAILS verification when the CLI omits required schema fields 501ms
     → expected { …(12) } to match object { …(3) }
(21 matching properties omitted from actual)
   × built flows CLI against live relayflowd > agent step preserves the CliResult wrapper as output when the CLI emits non-JSON text 525ms
     → expected null not to be null
   × built flows CLI against live relayflowd > AgentWorker exposes wake_context to the CLI via RELAYFLOW_WAKE_CONTEXT env var (real analyzer prerequisite) 525ms
     → Cannot read properties of null (reading 'story_title')
   × built flows CLI against live relayflowd > AgentWorker leaves RELAYFLOW_WAKE_CONTEXT UNSET when the run has no wake_context (undefined-vs-null pin) 501ms
     → Cannot read properties of null (reading 'env_present')
   ✓ built flows CLI against live relayflowd > AgentWorker passes a declared model to an identified wrapper as RELAYFLOW_MODEL 426ms
   ✓ built flows CLI against live relayflowd > AgentWorker refuses a nonconforming journal-submitted wrapper before exposing RELAYFLOW_MODEL 512ms
   ✓ built flows CLI against live relayflowd > AgentWorker executes the raw claude adapter with its real model flag 458ms
   ✓ built flows CLI against live relayflowd > AgentWorker executes the raw codex adapter with its real model flag 487ms
   × built flows CLI against live relayflowd > AgentWorker leaves RELAYFLOW_MODEL UNSET when the step declares no model 529ms
     → Cannot read properties of null (reading 'story_title')
   × built flows CLI against live relayflowd > hn-monitor analyze-story reaches done through the real Claude analyzer CLI 37ms
     → LIVE_ANALYZER_UNAVAILABLE: "/home/daytona/.relayflow-v2-supervisor/durable/repository/testdata/preflight/analyze-story-claude-cli" does not identify as relayflows-agent-cli-v1 — 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 746ms
   ✓ built flows CLI against live relayflowd > starts exactly one daemon when two runs race for one empty data dir 481ms
   ✓ surface resume after a real daemon kill > resumes a three-step run with each successful completion exactly once 805ms
   × a relayflow can be scheduled: tick source against live relayflowd > a tick spawns a real run whose step reports the SCHEDULED instant 609ms
     → expected null to deeply equal { schedule_id: 'heartbeat-1m', …(3) }
 ✓ tests/authored-human.test.ts (13 tests) 90ms
 ✓ tests/bundle.test.ts (23 tests) 8576ms
   ✓ immutable bundles > returns exit 2 naming a byte-flipped payload and refuses to reuse corruption 352ms
   ✓ immutable bundles > verifies with --verify in any position and answers --json with one object 697ms
   ✓ immutable bundles > refuses --out with --verify rather than ignoring the destination 353ms
   ✓ immutable bundles > builds and verifies the canonical YAML fixture through the compiled CLI 1037ms
   ✓ immutable bundles > emits the ephemeral warning on CLI stderr and uses the default output directory 713ms
   ✓ immutable bundles > refuses build-provable CLI resolution errors without environment probes 351ms
   ✓ immutable bundles > builds a standalone TS fixture twice with identical executable hashes 2708ms
   ✓ immutable bundles > refuses to label installed dependency drift with lockfile pins 346ms
   ✓ immutable bundles > refuses invalid CLI arguments %j 347ms
   ✓ immutable bundles > refuses invalid CLI arguments "--out" 370ms
   ✓ immutable bundles > refuses invalid CLI arguments "--verify" 359ms
   ✓ immutable bundles > refuses invalid CLI arguments "--verify" 373ms
   ✓ immutable bundles > refuses invalid CLI arguments "--out" 459ms
 ✓ tests/cli-hn-monitor.test.ts (16 tests) 93ms
 ✓ tests/named-gate-diagnostics.test.ts (17 tests) 532ms
 ✓ tests/cloud-schedule.test.ts (17 tests) 4003ms
   ✓ schedule lowering > marks a non-grid cron as Cloud-only rather than approximating it, with a silence budget from its own cadence 1705ms
   ✓ flows check prints declared schedules > shows the lowering for a fixed interval and the Cloud-only note for a real cron 1616ms
 ✓ tests/authored-node-result.test.ts (38 tests) 39ms
 ✓ tests/direct-input.test.ts (6 tests) 5342ms
   ✓ direct .flow.ts input through the built CLI and live runtime > returns exit 3 for an authored human handoff and persists its outcome 634ms
   ✓ direct .flow.ts input through the built CLI and live runtime > returns exit 1 for an authored step_failed verdict and persists its outcome 583ms
   ✓ direct .flow.ts input through the built CLI and live runtime > executes inline and file JSON input through relayflowd 1770ms
   ✓ direct .flow.ts input through the built CLI and live runtime > refuses missing and malformed input before contacting relayflowd 1430ms
   ✓ direct .flow.ts input through the built CLI and live runtime > does not run the authored body before daemon availability 509ms
   ✓ direct .flow.ts input through the built CLI and live runtime > refuses oversized file input before contacting relayflowd 415ms
 ✓ tests/daemon-lifecycle-live.test.ts (9 tests) 6385ms
   ✓ 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 409ms
   ✓ flows run against a data dir with no daemon (§6 test 7) > polls, bounded, for a daemon that holds the lock before it binds 1334ms
   ✓ flows run against a data dir with no daemon (§6 test 7) > attaches to a serving daemon that has not published a connection file 524ms
   ✓ 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 974ms
   ✓ 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 873ms
   ✓ concurrent invocations against one empty data dir (§6 test 15) > ends with exactly one daemon owning the socket, and both runs succeed 1101ms
   ✓ refusals from a spawn that cannot produce a daemon > names relayflowd_not_found rather than falling through to PATH 359ms
   ✓ refusals from a spawn that cannot produce a daemon > names daemon_start_failed and quotes the daemon log when startup dies 413ms
   ✓ refusals from a spawn that cannot produce a daemon > refuses a daemon speaking another protocol version instead of binding over it 397ms
(node:88133) Warning: Transcript tail for run-9/analyze attempt 1 (stdout) could not be written; the step continues without it: EACCES: permission denied, mkdir '/tmp/transcript-tail-c9FNaN/runs/run-9/steps'
(Use `node --trace-warnings ...` to show where the warning was created)
 ✓ tests/transcript-tail.test.ts (11 tests) 831ms
   ✓ direct agent spawn > completes the step when the tail directory cannot be created 442ms
 ✓ tests/authored-agent-artifacts.test.ts (4 tests) 469ms
 ✓ tests/authored-helpers.test.ts (6 tests) 3034ms
   ✓ runs every available provider through the real kernel and resumes completed effects without a second write 1653ms
   ✓ replays after SIGKILL before confirm with the same token and one successful completion 493ms
   ✓ replays after SIGKILL before complete with the same token and one successful completion 471ms
 ✓ tests/backlog-picker.test.ts (14 tests) 40ms
 ✓ tests/backlog-picker-flow.test.ts (6 tests) 316ms
 ✓ tests/preflight-permissions-unenforced.test.ts (17 tests) 261ms
 ❯ tests/stuck-run-triage.test.ts (22 tests | 22 failed) 63ms
   × stuck-run-triage input validation > refuses an 8-character run-id prefix: Cloud has no prefix lookup 4ms
     → expected [Function] to throw error matching /not full Cloud run ids: c649fe14/ but got 'expected an @relayflows/surface flow …'
   × stuck-run-triage input validation > refuses the whole batch when any id is invalid, rather than dropping it 0ms
     → expected [Function] to throw error matching /not full Cloud run ids: nope!/ but got 'expected an @relayflows/surface flow …'
   × stuck-run-triage input validation > refuses an empty batch 0ms
     → expected [Function] to throw error matching /needs runIds/ but got 'expected an @relayflows/surface flow …'
   × stuck-run-triage input validation > refuses a batch too large for the edge step lease 0ms
     → expected [Function] to throw error matching /exceeds the 8 that fit/ but got 'expected an @relayflows/surface flow …'
   × stuck-run-triage input validation > accepts eight ids — the incident batch is inside the bound 3ms
     → promise rejected "TypeError: expected an @relayflows/surfac…" instead of resolving
   × stuck-run-triage apiUrl > refuses to send the Cloud bearer token to an unapproved origin 0ms
     → expected [Function] to throw error matching /refusing to send the Cloud bearer to…/\ but got 'expected an @relayflows/surface flow …'
   × stuck-run-triage apiUrl > refuses a non-URL apiUrl 0ms
     → expected [Function] to throw error matching /is not a URL/ but got 'expected an @relayflows/surface flow …'
   × stuck-run-triage apiUrl > allows an approved origin and uses it in the curl 0ms
     → expected an @relayflows/surface flow handle
   × stuck-run-triage apiUrl > defaults to production Cloud 0ms
     → expected an @relayflows/surface flow handle
   × stuck-run-triage apiUrl > never publishes a run record the fetch did not produce 0ms
     → expected an @relayflows/surface flow handle
   × stuck-run-triage edge collection > names the Worker on every wrangler invocation 0ms
     → expected an @relayflows/surface flow handle
   × stuck-run-triage edge collection > accepts caller-supplied Workers and rejects option-shaped ones 0ms
     → expected an @relayflows/surface flow handle
   × stuck-run-triage edge collection > falls back when GNU timeout is absent, as it is on macOS 0ms
     → expected an @relayflows/surface flow handle
   × stuck-run-triage edge collection > runs the tails concurrently so wall time does not scale with the batch 0ms
     → expected an @relayflows/surface flow handle
   × stuck-run-triage edge collection > records wrangler's own exit status rather than head's 0ms
     → expected an @relayflows/surface flow handle
   × stuck-run-triage shell text > parses under both sh and bash 0ms
     → expected an @relayflows/surface flow handle
   × stuck-run-triage shell text > collects tails with no GNU timeout on PATH, as on a stock macOS 48ms
     → expected an @relayflows/surface flow handle
   × stuck-run-triage agents > declares read-only permissions on every agent 0ms
     → expected an @relayflows/surface flow handle
   × stuck-run-triage agents > tells the forensics agents their evidence is untrusted 0ms
     → expected an @relayflows/surface flow handle
   × stuck-run-triage fan-out > refuses a duplicate run id: two tails would share one evidence file 0ms
     → expected [Function] to throw error matching /duplicate runIds: c649fe14-0c2e-4e51-…/ but got 'expected an @relayflows/surface flow …'
   × stuck-run-triage fan-out > refuses a duplicate Worker name for the same reason 1ms
     → expected [Function] to throw error matching /duplicate workers: w-one/ but got 'expected an @relayflows/surface flow …'
   × stuck-run-triage fan-out > bounds ids x workers, not just ids 0ms
     → expected [Function] to throw error matching /24 concurrent tails, over the 16/ but got 'expected an @relayflows/surface flow …'
 ✓ tests/worker-transcript.test.ts (5 tests) 187ms
 ✓ tests/flow-requirements.test.ts (13 tests) 691ms
   ✓ flows check prints REQUIRES > names the helper, the harness and the mcp server of an authored flow 446ms
 ✓ tests/webhook.test.ts (9 tests) 500ms
   ✓ webhook ingress > checks TS declarations against flows.json without invoking handlers 431ms
 ✓ tests/authored-run-failure-evidence.test.ts (8 tests) 747ms
   ✓ the child index after the process that wrote it is gone > still names every child, with its own run id, after a daemon restart 441ms
 ✓ tests/webhook-live.test.ts (6 tests) 9547ms
   ✓ executes and deduplicates 'app_mention' only for its provider and matching payload 1453ms
   ✓ executes and deduplicates 'reaction_added' only for its provider and matching payload 1398ms
   ✓ executes and deduplicates 'pull_request' only for its provider and matching payload 1415ms
   ✓ flows serve-webhook writes JSON before the daemon starts, then journals and archives exactly once 1407ms
   ✓ replays a dropped file after SIGKILL before spawn 435ms
   ✓ resumes the same journal after SIGKILL after spawn and before acknowledgement 3438ms
 ✓ tests/cli-watch.test.ts (10 tests) 14714ms
   ✓ flows check --watch > rechecks syntax errors, clears once, and returns the last refusal on Ctrl-C 1209ms
   ✓ flows check --watch > streams JSON lines without ANSI, recovers after atomic saves, and exits zero after repair 1712ms
   ✓ flows check --watch > coalesces 20 concurrent saves into at most two rechecks 1721ms
   ✓ flows check --watch > watches transitive relative use imports, cycles, and nearest config changes 2213ms
   ✓ flows check --watch > refreshes the import graph and notices missing imports being created 2215ms
   ✓ flows check --watch > reloads authored TypeScript instead of reusing the first imported definition 1454ms
   ✓ flows check --watch > detects a nearer config appearing and falls back after it is deleted 1700ms
   ✓ flows check --watch > keeps watching after the target is deleted and recreated 1704ms
   ✓ flows check --watch > queues changes during a slow check without overlapping checks 781ms
 ✓ tests/agent-transcript-live.test.ts (4 tests) 41163ms
   ✓ the transcript digest through the built CLI, a real daemon and the local agent > preserves structured agent failure details and its completed root index 12627ms
   ✓ the transcript digest through the built CLI, a real daemon and the local agent > preserves structured llm failure details and its completed root index 14532ms
   ✓ the transcript digest through the built CLI, a real daemon and the local agent > journals the digest in trajectory_tail on a successful agent step and writes the file it points at 805ms
   ✓ the transcript digest through the built CLI, a real daemon and the local agent > on a failed agent step, names the failure and the transcript in the terminal diagnostic, redacted 13198ms
 ✓ tests/authored-step-failed.test.ts (10 tests) 37ms
 ✓ tests/authored-flow-operation.test.ts (23 tests) 382ms
 ✓ tests/agent-artifacts-live.test.ts (5 tests) 44324ms
   ✓ agent artifacts and gates through the built CLI, a real daemon and the local agent > journals the files the agent wrote, and both artifact gates pass on that journal 1031ms
   ✓ agent artifacts and gates through the built CLI, a real daemon and the local agent > fails the run when the artifact_exists gate names a file the agent did not write 14623ms
   ✓ agent artifacts and gates through the built CLI, a real daemon and the local agent > fails the run with the author reason when a predicate gate returns false, journaling the verdict 13955ms
   ✓ review follow-ups > applies a predicate gate on a helper step too, and journals its verdict 14047ms
   ✓ review follow-ups > records predicate verdicts on the root run so a resume reuses them instead of re-running the closure 667ms
 ✓ tests/budget-preflight.test.ts (25 tests) 13ms
 ✓ tests/authored-step-index.test.ts (12 tests) 11ms
 ✓ tests/artifact-gates.test.ts (6 tests) 119ms
 ✓ tests/human-live.test.ts (3 tests) 5799ms
   ✓ f.human against a real daemon > parks with the question, refuses wrong answers, records one, and resumes to success 3362ms
   ✓ f.human against a real daemon > a "no" is a value the body branches on: declined, exit 0, no effect 1547ms
   ✓ f.human against a real daemon > refuses to answer a run the daemon does not know 889ms
 ✓ tests/provider-trigger-contract.test.ts (7 tests) 586ms
   ✓ provider trigger contract > fails `flows check` before deployment and passes once the event is real 378ms
 ✓ tests/work-package-consumer.test.ts (13 tests) 132ms
 ✓ tests/budget-unmetered-live.test.ts (3 tests) 1273ms
   ✓ unmetered budget spend through the live kernel > runs an unpriced step under a dollar budget without tripping it, journaling unknown dollars 506ms
   ✓ unmetered budget spend through the live kernel > still counts an unpriced step toward a token budget 403ms
   ✓ unmetered budget spend through the live kernel > accrues a priced step and stops the run when it crosses the dollar budget 363ms
 ✓ tests/helpers-fanout.test.ts (96 tests) 145ms
 ✓ tests/spec-parity.test.ts (31 tests) 307ms
 ✓ tests/generate-triggers.test.ts (7 tests) 1030ms
   ✓ discovers new adapters, preserves exact event names, and prefers adapter-local mappings 327ms
 ✓ tests/named-gate-journal.test.ts (5 tests) 1959ms
   ✓ a lowered subprocess_gate journals the gate command's streams > persists what the gate printed before a timeout killed it 822ms
   ✓ a gate on an agent step > journals the command's streams and surfaces them in the authored failure 834ms
 ✓ tests/webhook-hardening.test.ts (11 tests) 54ms
 ✓ tests/human-to.test.ts (8 tests) 9ms
 ✓ tests/plugin-loader.test.ts (9 tests) 165ms
 ✓ tests/pty-sidechannel.test.ts (11 tests) 6628ms
   ✓ view attach preserves worker completion and marks only drive 906ms
   ✓ drive attach preserves worker completion and marks only drive 451ms
   ✓ passthrough attach preserves worker completion and marks only drive 899ms
   ✓ none attach preserves worker completion and marks only drive 885ms
   ✓ none subscriber lets an unattended CLI read EOF 531ms
   ✓ view subscriber lets an unattended CLI read EOF 473ms
   ✓ passthrough subscriber lets an unattended CLI read EOF 464ms
   ✓ incomplete subscriber lets an unattended CLI read EOF 515ms
   ✓ rejects drive after EOF without marking human intervention 819ms
   ✓ delivers all drive bytes in order across child stdin backpressure 679ms
 ✓ tests/worker-lease.test.ts (7 tests) 10ms
 ✓ tests/yaml-helpers.test.ts (33 tests) 63ms
 ✓ tests/authored-agent-permissions.test.ts (26 tests) 782ms
 ✓ tests/deploy.test.ts (11 tests) 4627ms
   ✓ flows deploy file buckets > publishes the full signed layout byte-for-byte and redeploys as a noop 735ms
   ✓ flows deploy file buckets > answers --json with one object per outcome 716ms
   ✓ flows deploy file buckets > reports a refusal as JSON under --json 343ms
   ✓ flows deploy file buckets > refuses a missing local bundle before creating the bucket 349ms
   ✓ flows deploy file buckets > refuses an unreachable bucket before copying 352ms
   ✓ flows deploy file buckets > refuses an unwritable bucket 342ms
   ✓ flows deploy file buckets > refuses local tampering of spec.canonical.json 336ms
   ✓ flows deploy file buckets > refuses local tampering of identity.json 342ms
   ✓ flows deploy file buckets > refuses asset bundles instead of using daemon-relative files 371ms
   ✓ flows deploy file buckets > never labels a corrupt existing deployment as a noop 720ms
 ✓ tests/redact.test.ts (35 tests) 8ms
 ✓ tests/communication.test.ts (10 tests) 13ms
 ✓ tests/typed-output.test.ts (14 tests) 180ms
 ✓ tests/budget-attribution.test.ts (5 tests) 6ms
 ✓ tests/json-schema-bound.test.ts (71 tests) 2113ms
   ✓ JSON Schema termination bound > walks a deep schema with an explicit stack rather than recursion 1724ms
 ✓ tests/effect-channel.test.ts (5 tests) 378ms
 ✓ tests/mcp-lifecycle.test.ts (4 tests) 13ms
 ✓ tests/model-selection.test.ts (10 tests) 15ms
 ✓ tests/f-memory.test.ts (7 tests) 955ms
 ✓ tests/relayflowd-path.test.ts (10 tests) 6ms
 ✓ tests/worker-cli-result-exit.test.ts (5 tests) 32907ms
   ✓ a Claude agent step completes on its result, not only on process exit > settles a hung, successful run within the grace and stops its whole tree 31611ms
   ✓ a Claude agent step completes on its result, not only on process exit > maps an error result on a hung run to a failed exit 31612ms
   ✓ a Claude agent step completes on its result, not only on process exit > leaves a hang before any result to the existing stops 32013ms
   ✓ an agent tree does not outlive the process that spawned it > kills the agent group when the run process is terminated by SIGTERM 800ms
 ✓ tests/authored-plugin-effect.test.ts (6 tests) 49ms
 ✓ tests/yaml-local-agent-live.test.ts (7 tests) 3806ms
   ✓ YAML --local-agent through the built CLI and real daemon > runs with the checked step CLI and model and journals done 541ms
   ✓ YAML --local-agent through the built CLI and real daemon > runs with the checked named CLI and model and journals done 564ms
   ✓ YAML --local-agent through the built CLI and real daemon > runs with the checked flow CLI and model and journals done 557ms
   ✓ YAML --local-agent through the built CLI and real daemon > runs with the checked project CLI and model and journals done 576ms
   ✓ YAML --local-agent through the built CLI and real daemon > still parks without --local-agent 494ms
   ✓ YAML --local-agent through the built CLI and real daemon > reports the agent process failure 575ms
   ✓ YAML --local-agent through the built CLI and real daemon > preserves declared workspace surfaces that the local worker cannot pin 498ms
 ✓ tests/local-dev-ux.test.ts (8 tests) 18ms
 ✓ tests/relay-cli-surface-live.test.ts (3 tests) 467ms
 ✓ tests/authored-declined.test.ts (13 tests) 56ms
 ✓ tests/resume-failure.test.ts (2 tests) 5ms
 ✓ tests/dependency-validation.test.ts (6 tests) 577ms
   ✓ dependency validation > accepts a valid 10,000-step reverse chain through every direct public boundary 322ms
 ✓ tests/input-binding.test.ts (12 tests) 171ms
 ✓ tests/communication-review.test.ts (5 tests) 332ms
 ✓ tests/yaml-helper-effect.test.ts (4 tests) 75ms
 ✓ tests/deterministic-llm.test.ts (5 tests) 47ms
 ✓ tests/scope-preflight.test.ts (6 tests) 7ms
 ✓ tests/bin.test.ts (7 tests) 2178ms
   ✓ built flows binary > refuses through a symlink to the built artifact 344ms
   ✓ built flows binary > refuses through a symlinked directory component 333ms
   ✓ built flows binary > classifies a signal-terminated auth probe as probe_failed 449ms
   ✓ built flows binary > classifies an unavailable PATH resolver as probe_failed 358ms
   ✓ built flows binary > does not describe a present non-executable CLI as missing 344ms
   ✓ built flows binary > runs one auth probe for three steps sharing a flow CLI 349ms
 ✓ tests/build-gate.test.ts (3 tests) 1046ms
   ✓ flows build gates on flows check green (#318) > refuses a flow with an unresolvable named-agent CLI and leaves no artifacts 342ms
   ✓ flows build gates on flows check green (#318) > --json emits one CheckReport object on stdout on refusal, exits 2, no artifacts 347ms
   ✓ flows build gates on flows check green (#318) > builds the bundle on success (regression: gate must not block valid flows) 356ms
 ✓ tests/scope-compiler.test.ts (25 tests) 11ms
 ✓ tests/run-from-digest.test.ts (6 tests) 3922ms
   ✓ flows run digest input > submits the sealed canonical spec through the normal journal path without checkout 398ms
   ✓ flows run digest input > uses a verified cache hit even after the bucket is removed 369ms
   ✓ flows run digest input > resolves deploy.bucket from flows.json and honors explicit override 1069ms
   ✓ flows run digest input > refuses an unconfigured bucket 705ms
   ✓ flows run digest input > refuses tampered spec.canonical.json before creating run data 704ms
   ✓ flows run digest input > refuses tampered identity.json before creating run data 676ms
 ✓ tests/communication-worker.test.ts (15 tests) 1497ms
 ✓ tests/hn-poller.test.ts (6 tests) 7ms
 ✓ tests/plugin-add.test.ts (7 tests) 1113ms
   ✓ typechecks the augmented verb and rejects unknown namespaces 824ms
 ✓ tests/authored-step-failed-exit.test.ts (3 tests) 7ms
 ✓ tests/direct-run-failure.test.ts (8 tests) 11ms
 ✓ tests/dir-watcher-poller.test.ts (6 tests) 5ms
 ✓ tests/model-pricing.test.ts (10 tests) 5ms
 ✓ tests/yaml-helper-live.test.ts (1 test) 893ms
   ✓ runs compiled YAML helpers through the built CLI and kernel effect journal 892ms
 ✓ tests/provider-trigger-executor.test.ts (4 tests) 287ms
 ✓ tests/transcript-tail-close.test.ts (2 tests) 858ms
   ✓ a stalled transcript-tail close > does not hold the spawn open past its bounded window 498ms
   ✓ a stalled tail close beside a transcript that finished > still journals the transcript pointer 360ms
 ✓ tests/wrapper-artifacts-cwd.test.ts (2 tests) 65ms
 ✓ tests/hello-deterministic.test.ts (5 tests) 15ms
 ✓ tests/transcript-exclusion-timeout.test.ts (1 test) 183ms
 ✓ tests/cli-adapter.test.ts (4 tests) 5ms
 ✓ tests/communication-mixed-resume.test.ts (1 test) 167ms
 ✓ tests/work-package-validator.test.ts (7 tests) 5ms
 ✓ tests/authored-use-loader.test.ts (5 tests) 819ms
 ✓ tests/authored-declined-live.test.ts (1 test) 1508ms
   ✓ runs an input guard and resumes its completed declined root without repeated effects 1507ms
 ✓ tests/cli-answer.test.ts (15 tests) 8ms
 ✓ tests/bundle-preflight.test.ts (4 tests) 791ms
   ✓ bundle execution preflight > ignores surrounding cache configuration on a verified cache hit 370ms
   ✓ bundle execution preflight > uses the built alias for a nameless flow even in a digest-only cache directory 391ms
 ✓ tests/agent-relay-hardening.test.ts (12 tests) 12ms
 ✓ tests/classify-outcome.test.ts (2 tests) 2160ms
   ✓ classifyOutcome > gives up and reports when a running run never becomes classifiable 2007ms
 ✓ tests/communication-preflight.test.ts (13 tests) 33ms
 ✓ tests/agent-artifacts.test.ts (6 tests) 13ms
 ↓ tests/real-cli-adapters.test.ts (3 tests | 3 skipped)
 ✓ tests/memoization.test.ts (57 tests) 51ms
 ✓ tests/parse-json-output.test.ts (7 tests) 3ms
 ✓ tests/journal-client-completion.test.ts (4 tests) 99ms
 ✓ tests/worker-cli-abort.test.ts (2 tests) 2542ms
   ✓ stops claude and its process group when lease ownership is lost 1252ms
   ✓ stops wrapper.mjs and its process group when lease ownership is lost 1289ms
 ✓ tests/communication-environment-preflight.test.ts (6 tests) 3ms
 ✓ tests/budget-authored-live.test.ts (2 tests) 158ms
 ✓ tests/slack-writeback.test.ts (1 test) 257ms
 ✓ tests/authored-surface-authority.test.ts (2 tests) 15ms
 ✓ tests/adapters/claude.test.ts (7 tests) 4ms
 ✓ tests/worker-cli-cwd.test.ts (2 tests) 351ms
   ✓ runAgentCli — cwd propagation (flows#357) > omits cwd when not provided (inherits parent cwd) 346ms
 ✓ tests/adapters/codex.test.ts (7 tests) 4ms
 ✓ tests/slack-block-kit.test.ts (5 tests) 14ms
 ✓ tests/communication-history.test.ts (1 test) 3ms
 ✓ tests/adapters/registry.test.ts (4 tests) 4ms
 ✓ tests/step-lease.test.ts (36 tests) 66424ms
   ✓ f.run leases against the live kernel > enforces 10000 ms for 'sleep 5; printf ok' 5071ms
   ✓ f.run leases against the live kernel > enforces 40000 ms for 'sleep 31; printf ok' 31064ms
   ✓ f.run leases against the live kernel > enforces 30000 ms for 'sleep 31; printf ok' 30090ms
 ✓ tests/authored-declined-report.test.ts (6 tests) 7ms
 ✓ tests/communication-refusal.test.ts (1 test) 12ms
 ✓ tests/check-command-cwd.test.ts (1 test) 12ms
 ✓ tests/communication-lazy.test.ts (1 test) 3ms
 ✓ tests/cli-progress-wait.test.ts (2 tests) 3ms
 ✓ tests/bundle-transport.test.ts (20 tests) 2338ms
   ✓ digest references > accepts and deploys the build output for hello 372ms
   ✓ digest references > accepts and deploys the build output for Hello 360ms
   ✓ digest references > accepts and deploys the build output for hello.world 378ms
   ✓ digest references > accepts and deploys the build output for hello_world 434ms
   ✓ digest references > accepts and deploys the build output for 123 431ms
   ✓ digest references > accepts and deploys the build output for A_b.c-1 358ms
 ✓ tests/run-digest-live.test.ts (1 test) 858ms
   ✓ executes a deployed digest on the real kernel after deleting the authoring tree 857ms
 ✓ tests/placement.test.ts (54 tests) 16ms
 ✓ tests/communication-tools.test.ts (1 test) 80ms
 ✓ tests/authored-admission.test.ts (2 tests) 2ms
 ✓ tests/memory.test.ts (18 tests) 8ms
 ✓ tests/worker-platform.test.ts (1 test) 3ms
 ✓ tests/run-digest.test.ts (4 tests) 1391ms
   ✓ digest run configuration refusals > reports config_invalid before fetching or starting a run for {invalid json 354ms
   ✓ digest run configuration refusals > reports config_invalid before fetching or starting a run for {"deploy":{}} 330ms
   ✓ digest run configuration refusals > reports config_invalid before fetching or starting a run for {"deploy":{"bucket":123}} 354ms
   ✓ digest run configuration refusals > reports config_invalid before fetching or starting a run for {"deploy":{"bucket":""}} 353ms
 ✓ tests/local-agent-live.test.ts (5 tests) 64632ms
   ✓ built CLI local agent against a real daemon > dispatches through the wrapper and keeps --json stdout report-shaped 705ms
   ✓ built CLI local agent against a real daemon > runs beyond the initial 30-second lease without a second invocation 35717ms
   ✓ built CLI local agent against a real daemon > renders actual agent completion in text output 764ms
   ✓ built CLI local agent against a real daemon > returns a failed run when the agent process fails 13068ms
   ✓ built CLI local agent against a real daemon > refuses a workspace it cannot pin before invoking the agent 14377ms

⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  tests/authored-node-runtime.test.ts [ tests/authored-node-runtime.test.ts ]
AssertionError: expected '1.3.6' to be '1.4.0' // Object.is equality

Expected: "1.4.0"
Received: "1.3.6"

 ❯ tests/authored-node-runtime.test.ts:18:77
     16| 
     17| beforeAll(() => {
     18|   expect(spawnSync(bun, ['--version'], { encoding: 'utf8' }).stdout.tr…
       |                                                                             ^
     19|   expect(existsSync(daemon), 'build the current kernel or set RELAYFLO…
     20|   stage = mkdtempSync(join(tmpdir(), 'authored-standalone-build-'));

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/31]⎯

⎯⎯⎯⎯⎯⎯ Failed Tests 30 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  tests/live-kernel.test.ts > built flows CLI against live relayflowd > runs hn-monitor analyze-story end-to-end via a stub agent CLI (gate 2 clause 2 demo)
AssertionError: expected { …(12) } to match object { output: { …(3) }, …(1) }
(22 matching properties omitted from actual)

- Expected
+ Received

  Object {
-   "output": Object {
-     "reasoning": "stub agent runtime — deterministic output for gate-2 clause-2 demo",
-     "relevance_score": 5,
-     "story_title": "stub",
-   },
+   "output": null,
    "verification": Object {
-     "gate": "json_schema",
-     "verdict": "pass",
+     "gate": "execution",
+     "verdict": "fail",
    },
  }

 ❯ tests/live-kernel.test.ts:657:36
    655|         && (entry as { step_id?: string }).step_id === 'analyze-story',
    656|     ) as { payload: { output: unknown; verification: unknown } } | und…
    657|     expect(stepCompleted?.payload).toMatchObject({
       |                                    ^
    658|       output: {
    659|         story_title: 'stub',

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[2/31]⎯

 FAIL  tests/live-kernel.test.ts > built flows CLI against live relayflowd > hn-monitor analyze-story FAILS verification when the CLI omits required schema fields
AssertionError: expected { …(12) } to match object { …(3) }
(21 matching properties omitted from actual)

- Expected
+ Received

  Object {
-   "completionReason": "retries_exhausted",
+   "completionReason": "worker_error",
    "output": null,
    "verification": Object {
-     "gate": "json_schema",
+     "gate": "execution",
      "verdict": "fail",
    },
  }

 ❯ tests/live-kernel.test.ts:752:36
    750|     // its verification record names the json_schema rejection. The re…
    751|     // parsed value is nulled before the completion is persisted.
    752|     expect(stepCompleted?.payload).toMatchObject({
       |                                    ^
    753|       completionReason: 'retries_exhausted',
    754|       output: null,

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[3/31]⎯

 FAIL  tests/live-kernel.test.ts > built flows CLI against live relayflowd > agent step preserves the CliResult wrapper as output when the CLI emits non-JSON text
AssertionError: expected null not to be null
 ❯ tests/live-kernel.test.ts:823:24
    821|     // here (parseJsonOutput returned null on non-JSON stdout) and
    822|     // these assertions would all fail.
    823|     expect(output).not.toBeNull();
       |                        ^
    824|     expect(output.exit_code).toBe(0);
    825|     expect(output.stdout_tail).toContain('looked at the story');

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[4/31]⎯

 FAIL  tests/live-kernel.test.ts > built flows CLI against live relayflowd > AgentWorker exposes wake_context to the CLI via RELAYFLOW_WAKE_CONTEXT env var (real analyzer prerequisite)
TypeError: Cannot read properties of null (reading 'story_title')
 ❯ tests/live-kernel.test.ts:891:42
    889|     ) as { payload: { output: { story_title: string; reasoning: string…
    890|     expect(stepCompleted).toBeDefined();
    891|     expect(stepCompleted!.payload.output.story_title).toBe(`echoed:${s…
       |                                          ^
    892|     expect(stepCompleted!.payload.output.reasoning).toContain(String(s…
    893| 

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[5/31]⎯

 FAIL  tests/live-kernel.test.ts > built flows CLI against live relayflowd > AgentWorker leaves RELAYFLOW_WAKE_CONTEXT UNSET when the run has no wake_context (undefined-vs-null pin)
TypeError: Cannot read properties of null (reading 'env_present')
 ❯ tests/live-kernel.test.ts:958:38
    956|     ) as { payload: { output: { env_present: boolean } } } | undefined;
    957|     expect(completed).toBeDefined();
    958|     expect(completed!.payload.output.env_present).toBe(false);
       |                                      ^
    959| 
    960|     delete process.env.RELAYFLOW_WAKE_CONTEXT;

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[6/31]⎯

 FAIL  tests/live-kernel.test.ts > built flows CLI against live relayflowd > AgentWorker leaves RELAYFLOW_MODEL UNSET when the step declares no model
TypeError: Cannot read properties of null (reading 'story_title')
 ❯ tests/live-kernel.test.ts:1194:38
    1192|     expect(completed).toBeDefined();
    1193|     // UNSET, not EMPTY and not the leaked parent value.
    1194|     expect(completed!.payload.output.story_title).toBe('model:UNSET');
       |                                      ^
    1195| 
    1196|     delete process.env.RELAYFLOW_MODEL;

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[7/31]⎯

 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: "/home/daytona/.relayflow-v2-supervisor/durable/repository/testdata/preflight/analyze-story-claude-cli" does not identify as relayflows-agent-cli-v1 — 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 …

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[8/31]⎯

 FAIL  tests/live-kernel.test.ts > a relayflow can be scheduled: tick source against live relayflowd > a tick spawns a real run whose step reports the SCHEDULED instant
AssertionError: expected null to deeply equal { schedule_id: 'heartbeat-1m', …(3) }

- Expected: 
Object {
  "lag_ms": 43000,
  "schedule_id": "heartbeat-1m",
  "scheduled_for_ms": 1764000000000,
  "slot": 29400000,
}

+ Received: 
null

 ❯ tests/live-kernel.test.ts:1665:39
    1663|     // The bound: the run reports the grid instant and its own lag, so…
    1664|     // backfilled run can tell it is running for a slot from the past.
    1665|     expect(completed!.payload.output).toEqual({
       |                                       ^
    1666|       schedule_id: 'heartbeat-1m',
    1667|       slot: 29_400_000,

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[9/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage input validation > refuses an 8-character run-id prefix: Cloud has no prefix lookup
AssertionError: expected [Function] to throw error matching /not full Cloud run ids: c649fe14/ but got 'expected an @relayflows/surface flow …'

- Expected: 
/not full Cloud run ids: c649fe14/

+ Received: 
"expected an @relayflows/surface flow handle"

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[10/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage input validation > refuses the whole batch when any id is invalid, rather than dropping it
AssertionError: expected [Function] to throw error matching /not full Cloud run ids: nope!/ but got 'expected an @relayflows/surface flow …'

- Expected: 
/not full Cloud run ids: nope!/

+ Received: 
"expected an @relayflows/surface flow handle"

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[11/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage input validation > refuses an empty batch
AssertionError: expected [Function] to throw error matching /needs runIds/ but got 'expected an @relayflows/surface flow …'

- Expected: 
/needs runIds/

+ Received: 
"expected an @relayflows/surface flow handle"

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[12/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage input validation > refuses a batch too large for the edge step lease
AssertionError: expected [Function] to throw error matching /exceeds the 8 that fit/ but got 'expected an @relayflows/surface flow …'

- Expected: 
/exceeds the 8 that fit/

+ Received: 
"expected an @relayflows/surface flow handle"

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[13/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage input validation > accepts eight ids — the incident batch is inside the bound
AssertionError: promise rejected "TypeError: expected an @relayflows/surfac…" instead of resolving
 ❯ tests/stuck-run-triage.test.ts:62:40
     60|   it('accepts eight ids — the incident batch is inside the bound', asy…
     61|     const ids = Array.from({ length: 8 }, (_, i) => `${ID_A.slice(0, -…
     62|     await expect(drive({ runIds: ids })).resolves.toBeDefined();
       |                                        ^
     63|   });
     64| });

Caused by: TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
 ❯ tests/stuck-run-triage.test.ts:62:18

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[14/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage apiUrl > refuses to send the Cloud bearer token to an unapproved origin
AssertionError: expected [Function] to throw error matching /refusing to send the Cloud bearer to…/\ but got 'expected an @relayflows/surface flow …'

- Expected: 
/refusing to send the Cloud bearer token to https:\/\/evil\.example/

+ Received: 
"expected an @relayflows/surface flow handle"

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[15/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage apiUrl > refuses a non-URL apiUrl
AssertionError: expected [Function] to throw error matching /is not a URL/ but got 'expected an @relayflows/surface flow …'

- Expected: 
/is not a URL/

+ Received: 
"expected an @relayflows/surface flow handle"

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[16/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage apiUrl > allows an approved origin and uses it in the curl
TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
     32|     done: () => {},
     33|   };
     34|   await getFlowDefinition<StuckRunTriageInput>(triage).body(f as never…
       |         ^
     35|   return rec;
     36| }
 ❯ tests/stuck-run-triage.test.ts:77:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[17/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage apiUrl > defaults to production Cloud
TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
     32|     done: () => {},
     33|   };
     34|   await getFlowDefinition<StuckRunTriageInput>(triage).body(f as never…
       |         ^
     35|   return rec;
     36| }
 ❯ tests/stuck-run-triage.test.ts:82:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[18/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage apiUrl > never publishes a run record the fetch did not produce
TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
     32|     done: () => {},
     33|   };
     34|   await getFlowDefinition<StuckRunTriageInput>(triage).body(f as never…
       |         ^
     35|   return rec;
     36| }
 ❯ tests/stuck-run-triage.test.ts:89:34

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[19/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage edge collection > names the Worker on every wrangler invocation
TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
     32|     done: () => {},
     33|   };
     34|   await getFlowDefinition<StuckRunTriageInput>(triage).body(f as never…
       |         ^
     35|   return rec;
     36| }
 ❯ tests/stuck-run-triage.test.ts:98:33

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[20/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage edge collection > accepts caller-supplied Workers and rejects option-shaped ones
TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
     32|     done: () => {},
     33|   };
     34|   await getFlowDefinition<StuckRunTriageInput>(triage).body(f as never…
       |         ^
     35|   return rec;
     36| }
 ❯ tests/stuck-run-triage.test.ts:107:33

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[21/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage edge collection > falls back when GNU timeout is absent, as it is on macOS
TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
     32|     done: () => {},
     33|   };
     34|   await getFlowDefinition<StuckRunTriageInput>(triage).body(f as never…
       |         ^
     35|   return rec;
     36| }
 ❯ tests/stuck-run-triage.test.ts:115:33

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[22/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage edge collection > runs the tails concurrently so wall time does not scale with the batch
TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
     32|     done: () => {},
     33|   };
     34|   await getFlowDefinition<StuckRunTriageInput>(triage).body(f as never…
       |         ^
     35|   return rec;
     36| }
 ❯ tests/stuck-run-triage.test.ts:123:33

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[23/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage edge collection > records wrangler's own exit status rather than head's
TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
     32|     done: () => {},
     33|   };
     34|   await getFlowDefinition<StuckRunTriageInput>(triage).body(f as never…
       |         ^
     35|   return rec;
     36| }
 ❯ tests/stuck-run-triage.test.ts:129:33

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[24/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage shell text > parses under both sh and bash
TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
     32|     done: () => {},
     33|   };
     34|   await getFlowDefinition<StuckRunTriageInput>(triage).body(f as never…
       |         ^
     35|   return rec;
     36| }
 ❯ tests/stuck-run-triage.test.ts:137:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[25/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage shell text > collects tails with no GNU timeout on PATH, as on a stock macOS
TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
     32|     done: () => {},
     33|   };
     34|   await getFlowDefinition<StuckRunTriageInput>(triage).body(f as never…
       |         ^
     35|   return rec;
     36| }
 ❯ tests/stuck-run-triage.test.ts:157:33

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[26/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage agents > declares read-only permissions on every agent
TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
     32|     done: () => {},
     33|   };
     34|   await getFlowDefinition<StuckRunTriageInput>(triage).body(f as never…
       |         ^
     35|   return rec;
     36| }
 ❯ tests/stuck-run-triage.test.ts:176:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[27/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage agents > tells the forensics agents their evidence is untrusted
TypeError: expected an @relayflows/surface flow handle
 ❯ Module.getFlowDefinition node_modules/@relayflows/surface/src/flow.ts:143:11
 ❯ drive tests/stuck-run-triage.test.ts:34:9
     32|     done: () => {},
     33|   };
     34|   await getFlowDefinition<StuckRunTriageInput>(triage).body(f as never…
       |         ^
     35|   return rec;
     36| }
 ❯ tests/stuck-run-triage.test.ts:182:23

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[28/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage fan-out > refuses a duplicate run id: two tails would share one evidence file
AssertionError: expected [Function] to throw error matching /duplicate runIds: c649fe14-0c2e-4e51-…/ but got 'expected an @relayflows/surface flow …'

- Expected: 
/duplicate runIds: c649fe14-0c2e-4e51-9a6a-4f0d1b0f77aa/

+ Received: 
"expected an @relayflows/surface flow handle"

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[29/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage fan-out > refuses a duplicate Worker name for the same reason
AssertionError: expected [Function] to throw error matching /duplicate workers: w-one/ but got 'expected an @relayflows/surface flow …'

- Expected: 
/duplicate workers: w-one/

+ Received: 
"expected an @relayflows/surface flow handle"

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[30/31]⎯

 FAIL  tests/stuck-run-triage.test.ts > stuck-run-triage fan-out > bounds ids x workers, not just ids
AssertionError: expected [Function] to throw error matching /24 concurrent tails, over the 16/ but got 'expected an @relayflows/surface flow …'

- Expected: 
/24 concurrent tails, over the 16/

+ Received: 
"expected an @relayflows/surface flow handle"

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[31/31]⎯

 Test Files  3 failed | 155 passed | 1 skipped (159)
      Tests  30 failed | 2393 passed | 17 skipped (2440)
   Start at  17:48:56
   Duration  194.32s (transform 2.90s, setup 0ms, collect 35.01s, tests 501.26s, environment 18ms, prepare 5.84s)

EXIT=1
