Repository navigation
fix(orchestration): file mail from terminals in no Run under an unbound Run - #19696
Conversation
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 14d2628a2a5974f3b40381f10a070478c46f0ba1 and 5bbd2bf. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughMessages sent from terminals outside a Run now use the dedicated Fixed issue severity: <fixed_issue_severity>Medium</fixed_issue_severity> Merge Risk: 🔵 Low · up to Unbound mail is now stored durably under a dedicated Run, but an invalid empty Run ID can leave an unused unbound Run record after the message fails. This is a bounded data-cleanliness issue that should be corrected before merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: ec6069f7-4687-497e-9b08-2db468daa838
📥 Commits
Reviewing files that changed from the base of the PR and between 7197593 and 14d2628a2a5974f3b40381f10a070478c46f0ba1.
📒 Files selected for processing (7)
src/main/runtime/orchestration/db/contract-constants.tssrc/main/runtime/orchestration/db/messages/message-insert.tssrc/main/runtime/orchestration/db/writer-run-required.test.tssrc/main/runtime/orchestration/orchestration-federated-legacy-probe.test.tssrc/main/runtime/rpc/methods/orchestration/messaging/send-unbound-terminals.test.tssrc/shared/orchestration-rpc-contract.tstests/e2e/orchestration-idle-mail-delivery.spec.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
…nd Run #19542 deleted the fallback that filed such mail under the legacy Run, because a live row there makes the schema-skew probe read the database as pre-Runs and replay adoption on the next open. That refusal also broke the first command in the guide: `orca orchestration send --to <handle>` between two plain terminals, which worked in v1.4.198. Restore delivery by filing under `run_unbound`, a Run the probe never matches, created on first use so `run list` shows it only to a user who has such mail. Claude-Session: 1fec75fd-224b-46ab-95fe-d88e0f3d9ff9
Claude-Session: 1fec75fd-224b-46ab-95fe-d88e0f3d9ff9
d3f9763 to
5bbd2bf
Compare
…nd Run (#19696) * fix(orchestration): file mail from terminals in no Run under an unbound Run #19542 deleted the fallback that filed such mail under the legacy Run, because a live row there makes the schema-skew probe read the database as pre-Runs and replay adoption on the next open. That refusal also broke the first command in the guide: `orca orchestration send --to <handle>` between two plain terminals, which worked in v1.4.198. Restore delivery by filing under `run_unbound`, a Run the probe never matches, created on first use so `run list` shows it only to a user who has such mail. Claude-Session: 1fec75fd-224b-46ab-95fe-d88e0f3d9ff9 * fix(orchestration): create the unbound Run only for a null Run id Claude-Session: 1fec75fd-224b-46ab-95fe-d88e0f3d9ff9 (cherry picked from commit 0fe132e)

ELI5
Two plain Orca terminals, neither started by orchestration. Run
orca orchestration send --to <other handle> --subject hi. In v1.4.198 that delivered. After #19542 it fails with a bareRun is requiredand no recovery hint, and agents retry the same command until they give up. This is the first thing the orchestration guide teaches, and it is what today's field report was about (sendbreaks, nothing else does, same CLI).Why #19542 broke it
#19542 deleted the fallback that filed such mail under
run_legacy_local. That deletion was needed: a live row under the legacy Run makes the schema-skew probe read the database as pre-Runs and replay a destructive adoption on the next open. But the fallback had callers beyond federation, and I did not enumerate them. Point-to-point and group send from an unbound sender both reached it.Fix
Unbound mail files under
run_unbound, a Run id the probe never matches. The row is created on first use insideinsertMessage, so a user who never sends unbound mail never sees it inrun list(eager seeding failed five listing-count tests). Group send flows through the same insert. No wire change, no schema version change, no migration: the runs table already accepts the row.Net: -3 lines in the writer, +1 constant, +1 lazy insert.
Tests
orchestration.sendthenorchestration.checkbetween two terminals in no Run: message files underrun_unbound,checkreturns it.legacy_adoptionsrow and the mail still unread.orchestration-idle-mail-deliveryrestored to the v1.4.198 contract (durable, not pushed) with the run id pinned. test(orchestration): pin the Run-required contract for unbound direct mail #19684's refusal assertion is gone.run_legacy_localfails all three unit cases.Suites: runtime, cli, shared, rpc: 1527 files / 16172 tests green. tc:node, tc:cli, both changed-code gates, ratchet, oxfmt clean.
Release
Regression from #19542, which is on
release/adhoc-1.4.199-daily-202609081832-cherrypicksand unshipped. Cherry-pick this alongside #19689 before the daily. With both, every caller #19542 cut off is restored: remote attach from old desktops and pre-upgrade worker mailboxes (#19689), and unbound terminal mail (this).Compatibility
Host-only. A v1.4.198 client sees v1.4.198 behavior. A v1.4.198 host reading a v1.4.199 database sees an ordinary non-legacy Run row.
Checklist