# Baseline run at the parent revision e21caad, in a detached git worktree.
$ git -C /tmp/flows-baseline-e21caad rev-parse HEAD
e21caad1e4020d9e2675d2840301cb7eeb6f1aac
$ git -C /tmp/flows-baseline-e21caad status --porcelain
?? packages/sdk/node_modules
# node_modules is a symlink to the main checkout (npm install is not rerun):
$ ls -l /tmp/flows-baseline-e21caad/packages/sdk/node_modules
lrwxrwxrwx 1 daytona daytona 83 Sep 20 17:41 /tmp/flows-baseline-e21caad/packages/sdk/node_modules -> /home/daytona/.relayflow-v2-supervisor/durable/repository/packages/sdk/node_modules

$ RELAYFLOWD_BIN=/home/daytona/.relayflows-toolchain/target/2962130851/debug/relayflowd npm run build && npx vitest run tests/live-kernel.test.ts tests/stuck-run-triage.test.ts tests/authored-node-runtime.test.ts

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


 RUN  v2.1.9 /tmp/flows-baseline-e21caad/packages/sdk

 ❯ tests/authored-node-runtime.test.ts (14 tests | 14 skipped) 19ms
stdout | tests/live-kernel.test.ts
LIVE_KERNEL relayflowd=/home/daytona/.relayflows-toolchain/target/2962130851/debug/relayflowd
LIVE_KERNEL flows=/tmp/flows-baseline-e21caad/packages/sdk/dist/cli.js

 ✓ tests/stuck-run-triage.test.ts (22 tests) 3143ms
   ✓ stuck-run-triage shell text > collects tails with no GNU timeout on PATH, as on a stock macOS 3084ms
stdout | tests/live-kernel.test.ts > built flows CLI against live relayflowd > hn-monitor analyze-story reaches done through the real Claude analyzer CLI
LIVE_ANALYZER ready: claude -p --model claude-haiku-4-5-20251001 round-trip OK

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=80459 run=01M2ZYKSAN5HW6C58HHTTVPSA8 while step=two state=Running

 ❯ tests/live-kernel.test.ts (31 tests | 1 failed) 56356ms
   ✓ built flows CLI against live relayflowd > twenty-six-step reuses 25 durable completions after editing the failed final step 1953ms
   ✓ built flows CLI against live relayflowd > runs rung (a), parks rung (b), and keeps JSON report-shaped 2298ms
   ✓ built flows CLI against live relayflowd > allows a deterministic run to exceed the bounded request timeout 32442ms
   ✓ built flows CLI against live relayflowd > follows a live worker dispatch through flows run 567ms
   ✓ built flows CLI against live relayflowd > runs an agent CLI end to end through the SDK worker 472ms
   ✓ built flows CLI against live relayflowd > f.agent lowers to a real agent step and dispatches through a live worker 576ms
   ✓ built flows CLI against live relayflowd > can always get a parked run to a late-attaching worker 5577ms
   ✓ built flows CLI against live relayflowd > reports a real manual-recovery NeedsHuman state as parked 413ms
   ✓ built flows CLI against live relayflowd > runs hn-monitor analyze-story end-to-end via a stub agent CLI (gate 2 clause 2 demo) 418ms
   ✓ built flows CLI against live relayflowd > hn-monitor analyze-story FAILS verification when the CLI omits required schema fields 440ms
   ✓ built flows CLI against live relayflowd > agent step preserves the CliResult wrapper as output when the CLI emits non-JSON text 460ms
   ✓ built flows CLI against live relayflowd > AgentWorker exposes wake_context to the CLI via RELAYFLOW_WAKE_CONTEXT env var (real analyzer prerequisite) 527ms
   ✓ built flows CLI against live relayflowd > AgentWorker leaves RELAYFLOW_WAKE_CONTEXT UNSET when the run has no wake_context (undefined-vs-null pin) 534ms
   ✓ built flows CLI against live relayflowd > AgentWorker passes a declared model to an identified wrapper as RELAYFLOW_MODEL 634ms
   ✓ built flows CLI against live relayflowd > AgentWorker refuses a nonconforming journal-submitted wrapper before exposing RELAYFLOW_MODEL 470ms
   ✓ built flows CLI against live relayflowd > AgentWorker executes the raw claude adapter with its real model flag 432ms
   ✓ built flows CLI against live relayflowd > AgentWorker executes the raw codex adapter with its real model flag 479ms
   ✓ built flows CLI against live relayflowd > AgentWorker leaves RELAYFLOW_MODEL UNSET when the step declares no model 541ms
   × built flows CLI against live relayflowd > hn-monitor analyze-story reaches done through the real Claude analyzer CLI 3805ms
     → expected { …(3) } to match object { Object (gate, verdict) }
(1 matching property omitted from actual)
   ✓ built flows CLI against live relayflowd > preflights before journaling and names an unreachable socket 720ms
   ✓ built flows CLI against live relayflowd > starts exactly one daemon when two runs race for one empty data dir 431ms
   ✓ surface resume after a real daemon kill > resumes a three-step run with each successful completion exactly once 807ms
   ✓ a relayflow can be scheduled: tick source against live relayflowd > a tick spawns a real run whose step reports the SCHEDULED instant 627ms

⎯⎯⎯⎯⎯⎯ 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/2]⎯

⎯⎯⎯⎯⎯⎯⎯ Failed Tests 1 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  tests/live-kernel.test.ts > built flows CLI against live relayflowd > hn-monitor analyze-story reaches done through the real Claude analyzer CLI
AssertionError: expected { …(3) } to match object { Object (gate, verdict) }
(1 matching property omitted from actual)

- Expected
+ Received

  Object {
-   "gate": "json_schema",
-   "verdict": "pass",
+   "gate": "execution",
+   "verdict": "fail",
  }

 ❯ tests/live-kernel.test.ts:1317:49
    1315|     // the promoted output, not the test re-deriving it: the spec is
    1316|     // the unmodified canonical one, so this record is the gate.
    1317|     expect(stepCompleted!.payload.verification).toMatchObject({
       |                                                 ^
    1318|       gate: 'json_schema',
    1319|       verdict: 'pass',

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

 Test Files  2 failed | 1 passed (3)
      Tests  1 failed | 52 passed | 14 skipped (67)
   Start at  17:41:55
   Duration  57.63s (transform 1.01s, setup 0ms, collect 2.40s, tests 59.52s, environment 0ms, prepare 114ms)

EXIT=1
