mirror of
https://github.com/stablyai/orca.git
synced 2026-09-28 08:02:43 +00:00
#19542 broke `orchestration send --to <handle>` between two terminals in no Run — the FIRST command the orchestration guide teaches — and every gate was green. The CLI tests mock the runtime client, so the runtime's throw was never produced; the RPC harness uses `:memory:` with a bound Run, so the unbound path was never taken; the guide-contract check only matched strings against ORCHESTRATION_COMMAND_SPECS. No gate ran the taught argv through a real binary against a real runtime. This spec does. It boots Electron, spawns the compiled out/cli/index.js, and runs the guide's sequence in the printed order — plain-terminal send, check, reply, restart, run-create, task-create, worker-start, the worker's own check/heartbeat/ask/escalation/worker_done, the coordinator's wait/reply/ack, retain/release, the run:/dispatch:/@group address forms, gates, low-level dispatch --inject, and worker-stop — asserting each receipt's shape rather than a zero exit. Commands run with ORCA_TERMINAL_HANDLE set instead of an added --from, because that is how the guide's argv actually runs. The second half is a drift gate: the spec records every argv it ran and compares it with the commands parsed out of skill-guides/orchestration*.md at test time. A documented command nobody executes fails, and so does a flag the spec executes that the guide never teaches. Excuses are per (verb, flag) with a stated reason, and an excuse that stops matching the guide fails too. The static contract test stays: it runs on every PR in seconds with no build and is the only gate covering the documented commands one local profile cannot reach. Both now read the guide through one parser so they cannot disagree about what is documented.