Skip to content

fix(orca): match the real 1.4.192 run-list contract and tolerate unbound terminals - #2846

Merged
namastex888 merged 1 commit into
devfrom
fix/orca-adapter-real-runtime-contract
Aug 30, 2026
Merged

namastex888 merged 1 commit into
devfrom
fix/orca-adapter-real-runtime-contract

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

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:

Real wire shape Adapter expected
coordinator_handle: null, coordinator_pane_key: null on runs whose coordinator terminal is gone non-null strings
page = { runs, nextCursor: null } strict { runs, cursor? } → unknown key rejected
rows are public run entities legacy compact runEntity only

run-current returns run: null on 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 legacy cursor.
  • Smoke: skip restore when nothing was bound.
  • Fixture tests with the captured real payloads; orca-entrypoint.min.js regenerated.

Evidence (this host, Orca 1.4.192, TERM_PROGRAM=Orca)

  • Before: run-list → OrcaAdapterError unexpected_response phase=decode; smoke → expected an object.
  • After: run-list returns 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).
  • Adapter unit: 58 pass. typecheck/lint/orca-bundle parity OK.

After merge the orca-plugin-dev ref refreshes automatically; reinstall/refresh the plugin in Orca to pick it up.

🤖 Generated with Claude Code

https://claude.ai/code/session_013gGxGgKskzyzr1HRUB6cV3

…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
@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 410480fa-a554-4214-91a0-0503659aee2b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-30T05:06:29.107228Z 92fc8da PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +534 to +535
coordinator_handle: terminalId.nullable(),
coordinator_pane_key: z.string().min(1).max(256).nullable(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@namastex888
namastex888 merged commit 17f23b9 into dev Aug 30, 2026
18 checks passed
@automagik-genie
automagik-genie deleted the fix/orca-adapter-real-runtime-contract branch September 25, 2026 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant