
> @wassname2/pi-goals@0.2.2 test
> vitest run --run test/intercom-handshake.test.ts test/intercom.test.ts test/goals-flow.test.ts --reporter=verbose


 RUN  v4.1.9 /home/code/.pi/agent/git/github.com/wassname/pi-goals

 ✓ test/intercom-handshake.test.ts > re-handshakes unchanged peers in either direction without hello ping-pong or lost advice 7ms
 ✓ test/intercom-handshake.test.ts > replays pending advice and views across either role's own readiness transition 1ms
 ✓ test/intercom-handshake.test.ts > cancels pending waits immediately on detach or reconfiguration 1ms
 ✓ test/intercom.test.ts > pi-intercom transport > receives exact advice once, acknowledges it and rejects unrelated peers 4ms
 × test/intercom.test.ts > pi-intercom transport > restores an unacknowledged steer on reconnect and stops replay after acknowledgment 7ms
   → expected [ { binding: 'binding', …(4) }, …(1) ] to match object [ { …(2) } ]
 ✓ test/intercom.test.ts > pi-intercom transport > advances the incremental overview only after acknowledgment 1ms
 ✓ test/intercom.test.ts > pi-intercom transport > cancels a readiness wait on shutdown 1ms
 ✓ test/intercom.test.ts > does not acknowledge a synchronous handoff failure, and retries the instruction 1ms
 ✓ test/intercom.test.ts > detaches a completed binding and ignores its late advice without replay errors or false acceptance 3ms
 ✓ test/goals-flow.test.ts > /goals flow > reports actual idle state, invalidates stopped views on start, and stops completed plans 34ms
 ✓ test/goals-flow.test.ts > /goals flow > preserves drafts, records the interview, and keeps planning read-only 18ms
 ✓ test/goals-flow.test.ts > /goals flow > forks a visible supervisor on Ready and keeps the main session as worker 24ms
 ✓ test/goals-flow.test.ts > /goals flow > starts work only after the supervisor launcher resolves 22ms
 ✓ test/goals-flow.test.ts > /goals flow > delivers an Intercom instruction to the worker 18ms
 ✓ test/goals-flow.test.ts > /goals flow > closes the supervisor on clear but keeps the plan file 23ms
 ✓ test/goals-flow.test.ts > /goals flow > accepts only an approval for the exact clean commit and goal block 47ms
 ✓ test/goals-flow.test.ts > process role > keeps subagent children and visible supervisors out of the worker extension 0ms
 ✓ test/goals-flow.test.ts > restores working linkage even when its remembered model is unavailable, and supports explicit recovery 18ms
 ✓ test/goals-flow.test.ts > restores planning linkage even when its remembered model is unavailable, and supports explicit recovery 16ms
 ✓ test/goals-flow.test.ts > shows a missing resumed supervisor, pauses writes, and automatically unpauses when that peer returns 17ms
 ✓ test/goals-flow.test.ts > times out stale Ready retries in five seconds, without replacing the pane automatically 26ms
 ✓ test/goals-flow.test.ts > explicitly restarts only the tracked pane, keeps the plan, and invalidates old approval binding 23ms
 ✓ test/goals-flow.test.ts > does not persist startup results or launch work after session shutdown 23ms
 ✓ test/goals-flow.test.ts > keeps a failed Ready model not-ready and recovers the same real supervisor binding 23ms
 ✓ test/goals-flow.test.ts > points a present-but-paused peer recovery at the supervisor pane 18ms
 ✓ test/goals-flow.test.ts > clear during the initial Ready wait cancels immediately and cannot resurrect the plan 21ms
 ✓ test/goals-flow.test.ts > clear before the launcher resolves rejects late pane callbacks without restoring the binding 35ms

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

 FAIL  test/intercom.test.ts > pi-intercom transport > restores an unacknowledged steer on reconnect and stops replay after acknowledgment
AssertionError: expected [ { binding: 'binding', …(4) }, …(1) ] to match object [ { …(2) } ]

- Expected
+ Received

  [
    {
+     "binding": "binding",
+     "id": "7f4566ea-f2ef-4a14-ad75-e138fc3a26a0",
+     "kind": "steer",
+     "role": "supervisor",
+     "text": "Read the full output.",
+   },
+   {
+     "binding": "binding",
      "id": "7f4566ea-f2ef-4a14-ad75-e138fc3a26a0",
+     "kind": "steer",
+     "role": "supervisor",
      "text": "Read the full output.",
    },
  ]

 ❯ test/intercom.test.ts:45:76
     43|   resumed.link.markReady();
     44|   await resumed.link.waitReady();
     45|   expect(resumed.fixture.sent.filter(message => message.kind === "stee…
       |                                                                            ^
     46|   resumed.fixture.receive({ binding: "binding", role: "worker", kind: …
     47|   resumed.fixture.connect(false);

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


 Test Files  1 failed | 2 passed (3)
      Tests  1 failed | 26 passed (27)
   Start at  19:20:05
   Duration  861ms (transform 365ms, setup 0ms, import 583ms, tests 437ms, environment 0ms)

