Repository navigation
Keep relay completion evidence live/unverifiable/exited, never coerced - #16926
brennanb2025 wants to merge 14 commits into
Conversation
|
Validation ran at exact SHA
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change adds structured foreground and child-process evidence with Merge Risk: 🔵 Low · up to The PR prevents current-version clients from treating failed process checks as confirmed agent exits, but mixed-version relay/client pairings may still interpret an unavailable check as no remaining process and trigger completion too early. The change is mergeable with explicit owner awareness and follow-up to negotiate structured-evidence support or disable completion-sensitive automation for unsupported peers. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description gives detailed context, implementation scope, compatibility analysis, failure reproduction, testing evidence, and reliability requirements. However, it omits the required Linked Issue section and does not fully follow the repository template for Visual Proof, Review, Notes, and Checklist. ✨ 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.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f81fc278-5412-4704-81d0-e81484e92f7e
📒 Files selected for processing (17)
src/main/providers/pty-process-inspection.tssrc/main/runtime/orca-runtime.tssrc/preload/index.tssrc/relay/pty-handler-attach-replay.test.tssrc/relay/pty-handler-spawn-admission.test.tssrc/relay/pty-handler-startup-command-delivery.test.tssrc/relay/pty-handler-test-harness.tssrc/relay/pty-handler.tssrc/relay/pty-process-probes.test.tssrc/relay/pty-process-probes.tssrc/relay/pty-shell-utils.test.tssrc/relay/pty-shell-utils.tssrc/renderer/src/components/terminal-pane/agent-completion-process-monitor.tssrc/renderer/src/components/terminal-pane/agent-completion-unverifiable-evidence.test.tssrc/renderer/src/runtime/runtime-terminal-inspection.tssrc/shared/pty-process-inspection-evidence.tstests/e2e/relay-completion-evidence/relay-inspection-unverifiable-completion.unit.test.ts
💤 Files with no reviewable changes (1)
- src/relay/pty-shell-utils.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Adversarial review @
|
| Hunk reverted (my patch) | Mine | Claimed |
|---|---|---|
children-probe catch → exited |
6 failed | 6 |
foreground ps catch → observed null |
1 failed | 1 |
handler stops attaching processEvidence |
3 failed | 3 |
| monitor unverifiable gate removed | 5 failed | 5 |
| evidence normalization removed | 1 failed | 1 |
| Windows native-table branch removed | 3 failed | 3 |
legacy collapse altered (unverifiable → true) |
1 failed | 1 |
No uncovered production hunk found. Note the ps-catch discrimination hangs on a single unit test (keeps a timed-out ps read unverifiable) — thin but real coverage.
Pre-fix repro on base 3ed7796624 — confirmed genuine
Ported only the repro test onto a clean worktree at the base commit (imports repointed at the pre-split pty-shell-utils; no production code carried). Both behavioral tests fail with exactly the claimed false completion — dispatchCompletion('codex', { source: 'process-exit', terminalIdleConfirmed: true, quietedHookDone: false }) — and the wire-shape test fails on the missing field. On this head: 37/37 green, including the recovery case proving a real exit still completes.
processEvidence end-to-end trace — arrives; one stale type at the true boundary (F2, P2)
Every hop checked for reconstruction/stripping: relay pty-handler.inspectProcess → SSH mux JSON-RPC (SshChannelMultiplexer.request resolves the raw result, no schema) → ssh-pty-provider.ts:263 (cast passthrough) → inspectPtyProviderProcess (passthrough) → ipcMain 'pty:inspectProcess' (passthrough) → preload arrow returns ipcRenderer.invoke directly (src/preload/index.ts:1232, no mapping) → renderer. Paired-runtime path: terminal.inspectProcess returns the runtime result wholesale; RpcSuccess.result is unknown and callRuntimeRpc<T> is a cast — so yes, results on this path are unvalidated casts: the type system could never have caught a drop, which is why runtime proof was required.
Runtime proof: the "handler stops attaching processEvidence" ablation flips the real renderer coordinator through the real RPC dispatch (3 tests red) — the renderer decision provably consumes the field as delivered — and a structuredClone assertion (the ipcRenderer.invoke result algorithm) confirms the payload survives the Electron hop. Web client: web-terminal-api.ts inspectProcess rejects by design; web uses only the runtime RPC path.
F2 (P2): the renderer-visible declaration of window.api.pty.inspectProcess is PtyApi in src/preload/api/pty-api.ts:110 (via api-types.ts → Window.api), and it was not updated — the +2 in src/preload/index.ts edits a redundant inline annotation only. The value flows regardless (width subtyping hides the gap), but the declared boundary contract is now stale and divergent. Add processEvidence to PtyApi.inspectProcess, or better, collapse the five structural copies (pty-api, preload/index, orca-runtime ×2, runtime-terminal-inspection) onto one shared type.
Wire ruling — Rule 1 confirmed; one Rule 3 content change, judged safe
- New optional JSON field on two existing RPC results (
pty.inspectProcess,terminal.inspectProcess). No new opcode anywhere in the diff → no capability negotiation needed. Cross-version wire harness 5/5 at this SHA. - Old client + new host (POSIX): legacy fields byte-identical — proven by the e2e
toEqualassertions and by ablation 7 (altering the collapse turns the suite red). - New client + old host: field absent →
readPtyProcessInspectionEvidencereturns the legacy interpretation; the monitor test "still completes from legacy fields when the host predates evidence" pins it; no reader requires the field. Malformed/foreign shapes (null, unknown verdicts) normalize tounverifiable, never to an observation.
Win32 legacy correction — safe; conservative only in the completion-blocking direction
On Windows relay hosts, legacy hasChildProcesses was a constant false (swallowed pgrep ENOENT). Now probeProcessChildren reads the native process-table snapshot: descendants > 0 → live (legacy true), root observed with zero descendants → exited (legacy false), table unreadable or root missing from snapshot → unverifiable (legacy false). So the legacy bit can only change false → true, which can only block a premature completion. exited requires a successful table read that observed the PTY root (windows-foreground-process-rows.ts:72-74 returns null → unverifiable otherwise), and candidates is all descendants, unfiltered — a live non-agent child reads live. Residual: the 500 ms-TTL cached snapshot can miss a just-spawned child → exited for one poll — identical to the pre-fix constant-false reading, and the monitor's two-sample confirmation spans multiple polls, so no new false-completion window exists. It cannot make a live process look exited anywhere it didn't before; the change converges Windows with POSIX semantics and with the local Windows provider, which already answers from the same table. Native-module load is lazy and win32-gated — POSIX relays never touch it.
Extraction audit — move verified
Mechanical function-level diff base → head: processHasChildren, isProcessAlive, collectDescendants, candidateScore, processCommandToken, candidateMatchesFallbackWrapper, getRecognizedForegroundDescendant are byte-identical. Only getForegroundProcessName was reshaped (into observeForegroundProcess + a collapse wrapper); every branch's legacy output is equivalent — the wrapper collapses unverifiable to null exactly where the old catch returned null, so pty.getForegroundProcess and pane titles are unchanged. No stale importers of the moved symbols remain.
Performance (manual review; per-completion-check path)
POSIX per-poll subprocess profile unchanged: same single pgrep, same foreground fast paths (recognized fallback → zero subprocess), ps -axo snapshot behind the 500 ms single-flight TTL. Win32 drops a doomed per-poll pgrep fork for the TTL-cached native read (~16 ms fresh, shared with foreground resolution). Failure classification is pure CPU on error objects; ~150 B extra JSON per result; unverifiable feeds the existing bounded backoff (cap max(10s, base)), so a distressed host is polled less. No new subprocess, timer, listener, or unbounded state.
Other findings
- F3 (out of scope, recorded): other renderer consumers of the same inspection still read only legacy fields —
running-terminal-close-guard.ts:124,pane-serializer-settle.ts:153,agent-ready-wait.ts:94. Same coercion class, bytes unchanged here; they join the declared sibling sites (daemon protocolinspectProcess, local provider collapses,orca-runtime.tshasChildProcesses?.catch(() => false)). - F4 (not PR-caused):
pty-handler-startup-command-delivery.test.ts› "emits shell-ready markers for renderer-delivered Codex native prefill commands" fails on my machine identically at base3ed7796624and at this head (env-sensitive; green in CI). - Mobile: no mobile-facing surface touched (
mobile/srchas noinspectProcess/processEvidenceconsumer). - Security: no new dependencies, argv-array subprocess calls only, no shell strings, no network sinks.
Superseding bar
I would not rewrite this. Written from scratch, exactly two things differ — and they are the two findings: subprocess calls go through src/shared/child-process from day one (F1), and one shared inspection-result type instead of five inline structural copies (F2 is the realized cost of that duplication). The evidence contract shape (per-probe discriminated unions with no payload on the unverifiable arms), the monitor semantics (recognized foreground still registers past an unverifiable child probe), and the test architecture (real adapter → real coordinator repro) are what we would write.
Required before merge: fix F1 (route pty-process-probes.ts spawns through runProcess/spawnProcess), ideally fold in F2, re-run CI to green.
Fix for the two blocking findings — head
|
| Hunk reverted | r1 review | This head |
|---|---|---|
children-probe failure → exited |
6 | 6 failed |
foreground ps failure → observed null |
1 | 1 failed |
handler stops attaching processEvidence |
3 | 3 failed |
| monitor unverifiable gate removed | 5 | 6 failed (+1 = the new preload-typed case) |
| evidence normalization removed | 1 | 1 failed |
| Windows native-table branch removed | 3 | 3 failed |
legacy collapse altered (unverifiable → true) |
1 | 1 failed |
Every hunk still has red coverage; the only delta is an increase from the added test.
Local verification at this head
- 58/58 across the six suites: both ratchet suites,
pty-process-probes.test.ts,pty-shell-utils.test.ts, the e2e relay repro, and the renderer evidence suite pnpm tcexit 0
CI (including the real Windows shards) is running on this push; Windows-job confirmation to follow before any merge consideration.
Cross-PR audit follow-up @ exact SHA
|
A failed pgrep/ps probe on a relay host resolved as
{foregroundProcess: null|fallback, hasChildProcesses: false}, which the
agent-completion monitor read as positive exit evidence and turned into
a process-exit completion. Probes now return live/unverifiable/exited
verdicts, the relay publishes them in a new optional processEvidence
field beside byte-identical legacy fields, and the monitor refuses to
treat an unverifiable probe as exit evidence.
The monitor entered the completion path on children !== 'live' after the unverifiable early-return — a fall-through, not a positive 'exited' match (the polarity shape fixed in #16900/#16908). A fourth verdict arm admitted by a future evidence funnel would have silently read as exit evidence. Completion now requires children === 'exited'; anything outside the known vocabulary re-arms like a failed inspection. Pinned by an out-of-contract monitor test (fails on the previous head) and a funnel-level normalization unit test that keeps the normalize hunk independently covered.
…spection-evidence reader A foreign host can put any JSON in processEvidence. An observed verdict carrying a non-string processName rode through normalization into recognizeAgentProcess and counted toward the 'foreground is not a recognized agent' leg of the positive-exited gate; non-string unverifiable reasons were forwarded as-is. Out-of-type payloads now degrade to unverifiable (malformed-evidence reason), and non-string reasons fall back to 'unspecified'.
…d gate The two hardening arms added in 7f00203 were mutually redundant: reverting either alone left the suite green, so either could have been deleted without CI noticing. Three tests now isolate the vocabulary guard: - a foreground verdict outside 'observed' paired with a positively matched 'exited' children probe — the exit gate reads a legitimate exit here, so only the foreground arm can refuse it; - the companion that the refusal does not wedge the monitor; - an out-of-contract children verdict must take the inspection-error backoff, the guard's stated promise to re-arm "like any other failed inspection". All three fail with the vocabulary guard reverted and pass with the exited gate reverted, so they pin that arm alone.
…base #17012 landed on main spying on ptyShellUtils.isProcessAlive while this branch moved the probe into pty-process-probes. The rebase merges textually clean but breaks 6 of the file's 9 tests and the node typecheck.
3ca44ad to
66abb42
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
…cabulary guard The two hardening arms were mutually redundant in coverage: reverting either alone left the suite green. The out-of-vocabulary guard is now pinned on its own; this pins the other half. Given the vocabulary guard, every sample reaching the exit gate already carries 'live' or 'exited'. On a host that builds its wire result with buildPtyProcessInspectionWireResult the legacy `hasChildProcesses` boolean is exactly `children.verdict === 'live'`, so reading the boolean and requiring a positive 'exited' agree — the arm is invisible there. They part on the shape the reader is written to survive: a peer this client cannot vouch for, whose two fields disagree. readPtyProcessInspectionEvidence never cross-checks the legacy scalar against the evidence union, so `hasChildProcesses: false` can arrive beside a positively observed `children: 'live'`. That boolean's `false` is the lossy collapse conflating "no children" with "could not tell" (#16900/#16908). The evidence union is authoritative, so 'live' must refuse even though the legacy field waves it through. Reverting the positive-exited arm alone turns two of these red with a false `process-exit` completion; reverting the vocabulary guard alone leaves all three green.
…eld contradicts The exit gate used to read `if (result.hasChildProcesses)` and refuse on `true`. Moving it onto the evidence union dropped the legacy field, so the gate now refuses only on a children verdict other than 'exited'. That is more conservative in one direction — the direction the positive-exited arm pins — and less conservative in its mirror: `hasChildProcesses: true` beside `children: 'exited'` is a shape the boolean-only line refused and the verdict-only gate dispatches a process-exit completion for. Only the boolean's `false` pole is the lossy collapse this batch removes; it conflates "no children" with "could not ask". Its `true` pole is a positive observation on every producer — buildPtyProcessInspectionWireResult sets it from `children.verdict === 'live'`, processHasChildren from a pgrep that exited 0 with output, and the daemon host from an observed non-shell foreground. Dropping a positive liveness observation to honour a disagreeing 'exited' is the #16900/#16908 polarity bug pointing the other way, so the gate now refuses whenever either half reports live children. No conforming host is affected: readPtyProcessInspectionEvidence's legacy fallback maps `true` to 'live', which the verdict term already refuses, and the wire builder never emits the disagreeing pair. Only a peer this client cannot vouch for can, which is the same premise the mirror arm is pinned on. Pinned by three monitor tests through the real reader with no mock (all three fail on the previous head, each with a false process-exit completion). The four-way ablation keeps the arms independent: reverting only this term reddens its three tests and leaves the vocabulary-guard and positive-exited pins green.
The mirror of the children-axis rule, one axis over. Recognition used to read
`recognizeAgentProcess(result.foregroundProcess)`. Moving it onto the evidence
union made it read `evidence.foreground.processName`, so a sample whose union
reports `{observed, processName: null}` beside a legacy `foregroundProcess:
'codex'` no longer recognizes an agent. Its foreground verdict is still inside
the vocabulary, so the out-of-vocabulary guard cannot refuse it either, and the
sample falls through to the exit gate and dispatches a process-exit completion
for an agent the host still names in the foreground.
Only the `null` pole of the legacy scalar is the lossy collapse this batch
removes; it conflates "no agent in the foreground" with "could not ask". A
recognized non-null name is a positive observation on every producer:
buildPtyProcessInspectionWireResult copies it straight off an `observed`
foreground verdict, and the ps/pgrep probes only set it from a command line the
host actually read back. Discarding a positive liveness observation to honour a
union reporting no name is the #16900/#16908 polarity bug on the foreground
axis, so the gate now refuses whenever either half still names an agent.
The refusal is added at the exit gate rather than by widening recognition, so
the arm can only ever withhold a dispatch, never introduce one: reading the
legacy name into handleRecognizedProcess would fire a process-replacement
completion on a disagreeing name, which is less conservative, not more.
No conforming host is affected. To reach the gate the foreground verdict is
already 'observed', so buildPtyProcessInspectionWireResult's legacy scalar is
byte-identical to the union's processName the gate already found unrecognized,
and a host predating the field gets that same scalar through the reader's legacy
fallback. Only a peer this client cannot vouch for can disagree, the same
premise the children-axis arm is pinned on.
Pinned by four monitor tests through the real reader with no mock; all four fail
on the previous head, each with an actual false process-exit completion for
'codex'. The four-way ablation keeps the arms independent: reverting only this
term reddens its four tests and leaves the vocabulary-guard, positive-exited and
legacy-live-children pins green.
Greptile SummaryThe PR adds explicit process-inspection evidence so failed relay probes remain unverifiable instead of being coerced into completion evidence.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/relay/pty-process-probes.ts | Adds platform-aware foreground and child-process probes that distinguish positive absence from probe failure. |
| src/shared/pty-process-inspection-evidence.ts | Defines and normalizes the optional evidence contract while preserving legacy wire-field behavior. |
| src/relay/pty-handler.ts | Publishes foreground and child evidence alongside backward-compatible inspection fields. |
| src/renderer/src/components/terminal-pane/agent-completion-process-monitor.ts | Prevents unverifiable evidence from advancing exit confirmation while preserving positive live-agent observations. |
| tests/e2e/relay-completion-evidence/relay-inspection-unverifiable-completion.unit.test.ts | Exercises failed and recovered relay probes through the real inspection and completion path. |
Sequence Diagram
sequenceDiagram
participant M as Completion monitor
participant H as Relay handler
participant F as Foreground probe
participant C as Children probe
M->>H: inspectProcess
H->>F: observe foreground
H->>C: probe children
F-->>H: observed or unverifiable
C-->>H: live, exited, or unverifiable
H-->>M: legacy fields plus optional evidence
alt recognized foreground
M->>M: Track live agent
else unverifiable evidence
M->>M: Re-arm exit confirmation
else positive exited evidence
M->>M: Confirm exit across samples
end
Reviews (5): Last reviewed commit: "Merge commit '3031c2330cd7ea3772fe4ccf43..." | Re-trigger Greptile
|
Thank you for this careful work. The SSH relay (and its |
ELI5
Orca watches the processes inside an SSH relay terminal to notice when an agent (Codex, Claude Code, …) finishes. Those checks run small commands (
pgrep,ps) on the remote machine. When a check itself failed — the box is overloaded, or the tool isn't installed — the failure was silently converted into "no agent, no children", which is exactly what a finished agent looks like. Two such polls in a row and Orca declared the agent done while it was still working. Now a failed check says "could not ask" and can never be read as "finished".User-facing before/after
When you'd hit this: you run an agent in a terminal on an SSH remote and (a) the host comes under heavy load (probes exceed their 3s deadline — e.g. the agent itself is compiling or the box is swapping), or (b) the host is a minimal image without
procps(pgrepmissing), or (c) the host is Windows, wherepgrepnever exists.unverifiable: Orca keeps polling (with the existing error backoff, so a struggling host is polled less), keeps the agent marked as running, and only concludesexitedfrom a probe that ran and positively observed absence (pgrepexit 1,psexit 1, or a Windows process table that observed the PTY root with no descendants). Real exits still complete: the repro suite proves completion fires once probes answer again.What changed
src/relay/pty-process-probes.ts(split out ofpty-shell-utils.ts, which was over the line cap):probeProcessChildrenandobserveForegroundProcessreturn exhaustivelive / unverifiable / exited(children) andobserved / unverifiable(foreground) verdicts. Exit-code discrimination separates "ran and matched nothing" (positive absence) from ENOENT/timeout/signal (could not ask). On Windows the children probe reads the native process table the relay already uses for foreground resolution (TTL-cached; replaces a per-poll doomedpgrepfork).src/shared/pty-process-inspection-evidence.ts(new): the contract types, the wire builder that collapses legacy fields exactly as before, and the client-side reader that treats absent evidence as the legacy reading and malformed evidence asunverifiable. The unverifiable arms carry noprocessName/boolean payload, so an unverifiable result is not assignable where a confirmed observation is expected — no casts added.src/relay/pty-handler.ts:pty.inspectProcesspublishesprocessEvidencebeside the unchanged legacy fields.agent-completion-process-monitor.ts: an unverifiable probe re-arms the two-sample exit confirmation and counts as an inspection error (backoff), never as exit evidence. A recognized foreground observation still registers even when the child probe is unverifiable.pty-process-inspection.ts,orca-runtime.ts,preload/index.ts,runtime-terminal-inspection.tscarry the optional field through IPC and runtime RPC.Wire compatibility ruling
Two independent-update surfaces carry this result: the SSH relay mux RPC
pty.inspectProcessand the paired-runtime RPCterminal.inspectProcess. Perdocs/reference/remote-wire-compatibility.mdthis change is Rule 1 — a new optional JSON field on an existing frame. It is not a stream opcode (Rule 2 N/A). Rule 3 was audited:foregroundProcess/hasChildProcessesfields are computed by the same collapse the old code performed; the wire-contract test asserts byte-identical values under probe failure. The unknown key is ignored by the JSON readers on the old side.hasChildProcesseswas previously a constantfalse(a coercedpgrepENOENT — itself an instance of this defect class). It now reports the native-table answer. This is strictly conservative for old clients —truecan only block a premature completion, andexitedstill collapses tofalseso real exits complete — and it converges Windows semantics with POSIX.processEvidenceis absent;readPtyProcessInspectionEvidencereturns the legacy interpretation, so behavior is exactly today's (the pre-existing coordinator tests, which build evidence-free results, pin this pairing). The client never requires the field.tests/e2e/cross-version-wire/cross-version-terminal-wire.unit.test.tspasses (5/5) — the terminal-stream surface is untouched.inspectProcessand separate host implementation; it is untouched here (absent evidence ⇒ legacy reading) and remains a sibling site.Pre-fix reproduction (fails on the base commit)
tests/e2e/relay-completion-evidence/relay-inspection-unverifiable-completion.unit.test.tsdrives the real relay adapter and RPC handler (execFile failing with timeout kills, the swallowing adapter — not a throwing controller) into the real completion coordinator. On the base commit (3ed7796624) both behavioral tests fail with:— i.e. a coerced probe failure became a confirmed
process-exitcompletion. Post-fix all pass, including the recovery case proving a genuine exit still completes.Ablation (re-measured at head
ad919dc212)Evidence suite: 9 files, 72 tests, all green at head —
src/shared/pty-process-inspection-evidence.test.ts(6),src/relay/pty-process-probes.test.ts(30),src/relay/pty-shell-utils.test.ts(12),src/renderer/src/components/terminal-pane/agent-completion-unverifiable-evidence.test.ts(6),…/agent-completion-legacy-foreground-agent.test.ts(4),…/agent-completion-legacy-live-children.test.ts(3),…/agent-completion-out-of-contract-verdict.test.ts(5),…/agent-completion-positive-exit-requirement.test.ts(3),tests/e2e/relay-completion-evidence/relay-inspection-unverifiable-completion.unit.test.ts(3).Each production hunk reverted alone, tree restored between runs.
exited)psfailure discrimination (catch → observed null)processEvidenceunverifiable→true)hasChildProcessesvote removedTwo corrections to the numbers this table used to carry. The monitor gate row said 5 and
reddens 4; the normalization row said 1 and reddens 5. Both were measured before the
two rows in bold existed, and both are re-measured above.
The two rows in bold were missing entirely
They are the last two commits on this branch, and neither had a row here.
Moving the exit gate onto the evidence union dropped two legacy reads it used to make.
if (result.hasChildProcesses)became a children-verdict test, andrecognizeAgentProcess(result.foregroundProcess)becameevidence.foreground.processName.Each is more conservative in one direction and less conservative in its mirror: a sample
carrying
hasChildProcesses: truebeside a publishedchildren: 'exited', or a legacyforegroundProcess: 'codex'beside a union reporting{observed, processName: null}, is ashape the old boolean-only lines refused and the verdict-only gate would have completed on.
Only each field's lossy pole is being removed by this batch —
falseconflates "nochildren" with "could not ask",
nullconflates "no agent" with "could not ask". The otherpole is a positive observation on every producer, so it keeps its vote. Together the two
votes are worth 7 red tests, which is the coverage the table was silently omitting.
Reliability contract
relay-completion.exit-evidence): a completion may only be concluded from probes that ran and positively observed absence; "could not ask" (unverifiable) never becomes a completion, on any client/host version pairing.pty-shell-utilscaughtpgrep/psfailures intofalse/null, and the completion monitor acted on the coerced values as confirmed idle evidence.pgrepfork per poll and reuses the TTL-cached native table read; +~120 bytes JSON per inspection result; unverifiable results engage the existing bounded backoff (≤10s), reducing poll pressure on distressed hosts.unverifiable.reasonnames the probe and failure class (deadline vs could-not-run) for future surfacing; no user data included.Testing
ad919dc212src/relay/(145 files) andsrc/renderer/src/components/terminal-pane/+ runtime inspection suites (404 files, 3941 tests): passtests/e2e/cross-version-wire/cross-version-terminal-wire.unit.test.ts: 5/5pnpm tc: clean;oxlint+oxfmt --checkon all changed files: cleanAuthor: @BrennanKB5