fix(orca): match the real 1.4.192 run-list contract and tolerate unbound terminals - #2846
Conversation
…und terminals
Dogfood against a live Orca 1.4.192 runtime (the plugin installed from the
orca-plugin-dev ref) showed the plugin's only command, run-list, failing to
decode every real response:
- runs whose coordinator terminal is gone list with coordinator_handle and
coordinator_pane_key null; the public run entity required strings;
- a page is `{ runs, nextCursor }` (nextCursor null on the last page); the
strict receipt only knew `cursor`, so every page was rejected;
- run-list rows are public run entities, not the legacy compact shape.
run-current also returns `run: null` for a terminal not bound to a Run; the
real-runtime smoke dereferenced it and could never pass on a fresh terminal.
It now skips the restore step when there was nothing bound.
Fixture tests carry the captured real payloads. With these changes the live
smoke (run-create → run-show → task-create → task-update → task-list, no
local lifecycle mutation) and run-list both pass against the real runtime.
orca-entrypoint.min.js regenerated (parity gate).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013gGxGgKskzyzr1HRUB6cV3
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 92fc8daab0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| coordinator_handle: terminalId.nullable(), | ||
| coordinator_pane_key: z.string().min(1).max(256).nullable(), |
There was a problem hiding this comment.
Keep nullable coordinator fields scoped to run-list
When a run-use receipt and its subsequent run-current response both use the public shape with the requested run ID but null coordinator fields, this shared schema now accepts both responses. The readback at readbackPlan compares only run IDs, while runtime attestation checks only the legacy coordinatorTerminalHandle field, so the adapter can report a successful run-use even though the terminal binding was not established. Use a separate nullable entity for run-list (and { run: null } for the unbound current case), while retaining required coordinator fields for bound mutation receipts and readbacks.
Useful? React with 👍 / 👎.
Dogfood finding (live Orca 1.4.192, plugin installed from
orca-plugin-dev)genie.orca.run-list— the plugin's only command — failed on every real response:coordinator_handle: null,coordinator_pane_key: nullon runs whose coordinator terminal is gone{ runs, nextCursor: null }{ runs, cursor? }→ unknown key rejectedrunEntityonlyrun-currentreturnsrun: nullon an unbound terminal; the real-runtime smoke dereferenced it (could never pass on a fresh terminal).Fix
publicRunEntity: coordinator fields nullable.run-list: accepts public rows;nextCursor(nullable) alongside legacycursor.orca-entrypoint.min.jsregenerated.Evidence (this host, Orca 1.4.192,
TERM_PROGRAM=Orca)run-list→OrcaAdapterError unexpected_response phase=decode; smoke →expected an object.run-listreturns 5 real runs;GENIE_ORCA_REAL_RUNTIME_SMOKE=1 bun test plugins/genie/orca-real-runtime-smoke.test.ts→ 1 pass (creates/reads back a disposable Run+Task,.genie/untouched).After merge the
orca-plugin-devref refreshes automatically; reinstall/refresh the plugin in Orca to pick it up.🤖 Generated with Claude Code
https://claude.ai/code/session_013gGxGgKskzyzr1HRUB6cV3