Repository navigation
Agent status C7: mirror host status across desktop, phone, and CLI - #21060
brennanb2025 wants to merge 10 commits into
Conversation
…atus-c7-host-replicas # Conflicts: # src/relay/agent-hook-server.ts
Review and validation handoff — 2026-09-16Draft / not merge-ready. Published at the user's request before review/QA completion. Published head: What has been doneInitial review-and-fix and focused replication/SSH checks passed; earlier hidden Electron QA at 94c3053 observed real provider transitions but left remote/mobile gaps. A later independent architecture review of current f024f05 FAILED, identifying the concrete blockers below. The earlier QA does not certify this head. These are recorded worker/reviewer results from the stated revisions, not a fresh coordinator rerun, CI result, or blanket approval of today's PR head. Recovery/review workers used GPT-5.6 Sol xhigh; provider interruptions prevented some follow-up stages from finishing. What still needs to be doneKNOWN BLOCKERS: capable-SSH negotiation blackhole; no production canonical host reducer; relay cache inventories marked complete without authoritative membership; epoch rollback; missing evidence/contact delivery to readers. Replace parallel legacy semantics with one host-owned engine, fix negotiation/reconnect/epoch behavior, then independently re-review and repeat exact-head Electron plus remote/mixed-version QA. Before marking ready: address proven findings, reconcile current main and cross-batch overlap, complete independent review of the final diff, rerun relevant tests/typechecks/quality, and perform fresh manual Electron QA against that exact head. Use background/hidden CDP validation; unavailable auth/platform scenarios remain explicitly unverified. No successful final-head review or QA should be inferred from old report filenames or task completion labels. Related batch PRsC1: #21053 · C10: #21054 · C2: #21056 · C3: #21055 · C4: #21057 · C5: #21058 · C6: #21059 · C7: #21060 The remaining full-batch work stays open; opening this draft does not mark those requirements complete. |
|
Integrated current
GitHub currently reports the draft as mergeable, with checks unstable/pending. The pre-existing uncommitted lockfile change and private reports remain outside the commit. |
…ound frame size A mirrored row ran through normalizeAgentStatusPayload only as a boolean predicate, and the raw wire object was what got stored and handed to readers. The normalizer coerces rather than validates -- it truncates prompt, agentType, model, toolName, toolInput, interactivePrompt and lastAssistantMessage, strips embedded newlines, and clears interrupted/sessionBoundary off a non-done state -- so every one of those caps was computed and discarded on the replicated path. An execution host could therefore place an arbitrarily large or newline-injected field into a row that reached the renderer and the mobile projection, while the same field arriving over the local path stayed capped. Store the normalizer's output instead, and give frame validation the entry ceiling it was missing: only ownerEpoch length was bounded, leaving rows and changes unbounded. The ceiling sits above every producer's own pane cap, so a legitimate host cannot reach it. Tests pin both halves and fail without the change.
… is enforced The ceiling was a literal justified by two producer caps. One of them does not exist: MAX_AGENT_HOOK_STATUS_CACHE_PANES is only read by upsertBoundedAgentHookStatus, which has no production caller, so it bounds nothing. The bound that is actually enforced on the desktop publisher's snapshot is AGENT_STATUS_STORE_LIMITS.parents, and at 2048 it was above the ceiling -- so a large legitimate host would be rejected by the validator the moment anything applied it to that path. Derive the ceiling from that limit instead, and say what it is for: the main hook server's pane map is uncapped, so no constant here can bound a real census. It only has to sit clear of the enforced bound so that reaching it means the frame is malformed or hostile.
|
Closing this draft from the September 14 agent-status plan. That plan was re-examined against current main and replaced. This branch conflicts with main, and its central work duplicated contracts that had already merged (the canonical status store and the child-work contract landed on 15–16 September). The replacement work is being done as smaller root-cause PRs, each planned, challenged and reviewed first. |
Orca can show different agent status on the desktop, phone, and command line because each side can build its own answer from different events and clocks. This draft adds an ordered host-to-client status stream so a machine running agents can send a full inventory followed by updates, and clients can mirror those rows across desktop, headless, SSH, and session-tab paths.
The direction is useful, but the current implementation failed architecture review and is not merge-ready. It does not yet provide one trustworthy status owner on every execution host, and several known paths can still lose, erase, or resurrect rows.
Before / after
unverifiablecontact state and the main teardown path retains rows.The implemented transport mechanics are covered by focused tests. They do not establish user-ready correctness because the failed review found that the stream is built around legacy bounded caches rather than the same production status engine on desktop, headless, and SSH hosts.
Issue status
No issue is closed by this draft.
Partially addressed and still open:
Original C7 roster items that remain open and are not fixed by this PR:
At verification time, STA-1869 was In Review; the other nine Linear records were Todo. All five linked GitHub issues were open.
Why this mechanism, and why this draft is blocked
The execution host is the right place to own status because it is the machine that receives provider events and can observe the processes. A full host inventory followed by ordered updates can recover a delete that a disconnected client missed. Keeping connection health separate means “cannot reach the host” does not become “the agent exited.”
The main alternatives do not remove the failure: comparing timestamps from two machines has no reliable ordering; merging snapshots without complete membership cannot remove missed rows; and letting every reader choose its preferred source recreates the desktop/phone/CLI disagreement.
However, this branch implements the delivery layer before completing the ownership layer. The relay publishes from a 256-row legacy cache, while local and SSH paths still apply different lifecycle and identity checks. The capable-SSH cutover can also suppress the old writer before the new writer is valid. The required replacement is one production host status engine for local, headless, and SSH inputs, with the legacy format kept only as a negotiated compatibility projection. Adding another fallback or reader rule would preserve the underlying split and is not recommended.
Scope, dependencies, overlap, and blockers
Review and validation status
Draft / not ready for merge. The current-head architecture review failed at
f024f0586130803b2691d40814d9ef2bf262285e; merging current main and resolving the RPC registration conflict did not address those findings. Fresh independent architecture review is required after the ownership design is replaced.At head
112af4120fc2a7156aff88fc3592b3b0c761ccda, merged on upstream36cdb34097a7075718abe41c29d559101841166a:Earlier hidden Electron QA was performed on older revisions only. One older real-SSH run reproduced row loss during contact loss; later source review did not use that older reproduction as proof of every current path, but the current code findings remain blocking. No Electron/mobile app, real provider-over-SSH, released old/new peer, two-host, Windows/WSL/macOS remote, or full desktop/mobile/CLI/dashboard/folder-workspace journey was run at this head.