Repository navigation
fix(orchestration): honor structured worker transport admission - #20866
brennanb2025 wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ 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 c8a7197091915646b0f427eabab9a871a6b61bea and c4f55d9. 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The admission changes preserve pending delivery and readiness behavior as intended, with no remaining merge-blocking risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 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.
✅ No new issues found.
Reviewed changes — aligns the orchestration consumer of a structured session send with the host's transport-admission contract.
- Preamble admission —
sendStructuredWorkerPreamblenow acceptspendingas admitted, preservingrejected→dispatch_preamble_undeliveredand everything else →operation_unknown. - Pointer-lane state —
StructuredDispatchStategainspendingwith a distinctdispatch-pendingretain reason;structuredDispatchDeliveredstill consumes mail only onaccepted. - Pointer host mapping —
pendingpasses through instead of collapsing tounknown, which is behavior-preserving for retain/park and only sharpens the reason label. - Turn-start honesty — structured worker starts report
turnStart: 'unsupported'rather than a false'observed', since this path has no correlated turn-start observer. - Regressions — a parameterized
local-worker-starttest over pending/accepted/rejected/unknown (codex + claude), both-provider integration tests asserting one send on pending admission, and a pointer-lane test pinning operation-ID replay until acceptance.
The change is grounded in the adapter contract: both providers return { state: 'admitted' } on the normal path and the host records that as a pending submission (structured-agent-session-adapter.ts:100-112), so the prior accepted-only check turned every fresh native worker start into outcome_unknown. The removed sendStructuredWorkerPreamble mock means the new failure test exercises the real function, so it fails against pre-fix code. No unresolved concerns.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Electron validation (Grok)Live Visible Orca: Codex Chat tab stayed up, showed the dispatch preamble, then After-only screenshot: reproducing the pre-fix |
c8a7197 to
c4f55d9
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟠 Major · Do not mark the structured worker ready for a pending preamble. · src/main/runtime/rpc/methods/orchestration-structured-worker-session.ts:248-249
248-249: 🩺 Stability & Availability | 🟠 Major | 🏗️ Heavy liftDo not mark the structured worker ready for a pending preamble.
sendStructuredWorkerPreamblereturns successfully forpending, so readiness settlement records the dispatch as accepted and marks the worker ready. Later journal reconciliation can reject that submission, but it only updates the journal. It does not tear down the ready worker or callreleaseStructuredWorkerSession, so the ready receipt and structured-session hold can remain active without an admitted task. Defer readiness until acceptance, or explicitly tear down the worker and release the hold when reconciliation rejects the pending submission.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 9760bda1-7beb-413d-b5ef-1685f41036aa
📥 Commits
Reviewing files that changed from the base of the PR and between 11733f2 and c8a7197091915646b0f427eabab9a871a6b61bea.
📒 Files selected for processing (1)
src/shared/agent-status-legacy-adapter.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.
There was a problem hiding this comment.
Important
The incremental commit adds a typescript/consistent-type-assertions violation that fails CI's changed-code quality gate.
Reviewed changes — re-review of the single commit since the prior pullfrog review (c8a7197); the main merge brought no other net change to the PR.
- Reflective read removed —
freezeRecursivelynow reads own properties via indexed access instead ofReflect.get, satisfyinganti-slop/no-reflect-get; the read semantics are unchanged (own keys, same getter receiver). - Casting gate now fails — the replacement's
as Record<PropertyKey, unknown>assertion is not suppressed, so the changed-code casting scan reports it on the added line.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — delta since the prior pullfrog review (c8a7197 → c4f55d9).
- Casting suppression corrected — the bare
// SAFETY:comment on the legacy adapter's indexed read is now the repo's directive form (// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: ...), clearing the changed-code casting finding from the previous review.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
Validation statusThe structured native worker admission regression is fixed and the PR is ready for merge.
Review and readiness
Electron evidenceGrok ran live Remaining gaps are limited to full-repository test/lint runs and live SSH/WSL network fault injection; the changed paths add no new remote transport behavior. |


ELI5
Starting a new native Codex or Claude worker could immediately report an unknown outcome and tear down its session even though its task had been sent. Worker-start now succeeds when the structured host admits the preamble.
What Changed
pendingandacceptedpreamble results as successful admission; preserve distinct rejected and genuinely unknown outcomes.turnStart: unsupportedfor this structured path, which has no correlated turn-start observer, instead of claiming an observed turn.Why
The host changed to return after transport admission, before a provider echo establishes message identity. Worker-start retained an accepted-only assumption and converted the normal
pendingresult intooperation_unknown. The fix aligns the consumer with host-owned admission; it introduces no additional delivery, polling or state store. Readiness confirms admission, while consuming durable mail still requires provider acceptance.Linked Issue
User-reported native structured worker-start regression.
Visual Proof
N/A — runtime admission and CLI receipt correction; no rendered UI changes. Automated regressions reproduce both providers before an echo and verify the resulting behavior.
Testing
pnpm tc:nodepassed.pnpm run check:code-quality:changedpassed with zero findings.git diff --checkpassed.ORCA_BACKGROUND_LAUNCH=1. Live authenticated providers, Electron UI, Windows/Linux and SSH were not exercised; full build and broader CI checks remain for CI.Review
Delivery remains a single host send. Pending admission preserves the worker hold; rejected and unknown results retain existing error classification and cleanup. No wire schema, provider protocol, SSH/WSL placement or folder-workspace logic changed.
Agent skill upstream boundary
Checklist