Repository navigation
carry-over follow-ups: carriesFrom only for a proven PTY, attach rows, claim-unmatched line (Fixes #70) - #72
Merged
nachumi-a2zoperations merged 2 commits intoNov 16, 2026
Conversation
…TY, attach rows, claim-unmatched line (orca #70) Observe only, Refs #44 stage 3 piece (a); follow-up to PR #68. S3 (option B, the lane lead's ruling): stopReplacedPaneOwner now marks the replaced owner `proven` when main proved the PTY was the pane's (a bound owner with that ptyId, or the PTY's own ptyPaneKey record). carryOverFor sends carriesFrom only for a proven replacement, on both routes (it now reads ctx.replacedPaneOwner; replace() runs before the spawn options are built). No refusal was added: an unproven window restart still runs exactly as before and carries nothing, so the old pane's held set expires with its carry-unclaimed line. S1: attach rows. The adapter puts no carriesFrom on the wire for an attach-only spawn; admission drops it from an attach-only request a client sends; an attach to an existing agent pane never calls noteCarry. S2: a claim that never meets a hold within CARRY_HOLD_MS logs one pane-ownership-carry-claim-unmatched line instead of expiring silently. Nit: spawn-carry-over.test.ts asserts on behaviour (carryOverFor), and the route rows run real spawns (window harness, runtime addendum). Fixes #70 Signed-off-by: Nachumi Eliyahu <[email protected]>
Refs #70 Signed-off-by: Nachumi Eliyahu <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #70 (Refs #44, stage 3 piece (a), restart carry-over, observe only). These are the follow-ups from PR #68's Reviewer and Fable-3 reads.
S3: carriesFrom only for a PROVEN PTY (option B, the lane lead's ruling in #70)
replacesPtyIdonly against a bound owner, so an unbound pane's restart named its PTY to the daemon unproven. The risk was a mislabelled carry if that id restarted within 60 s.stopReplacedPaneOwner(shared by both routes) now marks the replaced ownerproven: truewhen main proved the PTY was the pane's: a bound owner with that ptyId, or (unbound) the PTY's ownptyPaneKeyrecord = this pane.carryOverFor(ctx.replacedPaneOwner)sendscarriesFromonly for a proven replacement, on both routes.replace()runs before the spawn options are built (spawn-operation.ts), so the proof is known in time.carry-unclaimedline.spawn-replacement.ts), so it is always proven there.S1: an attach never carries
carriesFromon the wire. A spy on the publicDaemonClient.prototype.requestchecks that.carriesFromreaches the host without it (a rawDaemonClientrequest).noteCarry.S2: claim-unmatched line
CARRY_HOLD_MSnow logs onepane-ownership-carry-claim-unmatchedline{from, to}instead of expiring silently.Nit: behaviour, not source text
spawn-carry-over.test.tsnow testscarryOverForonReplacedPaneOwnervalues (proven, unproven, null).pty-pane-restart-carry.test.tson the restart harness:carriesFromsent;carriesFrom;ptyPaneKey→ sent;ctx.spawnOptions.carriesFrom= the old id.Red first (all local, MacBook, Node 24.22.1 +
--config; the Reviewer's Dell run is the evidence)!attachOnlyguard → 1 failed;reportCarryis structural: the host reports only fromonCreated, which an attach never reaches. Removing that guard stays green; the host attach row pins the behaviour.spawn-replacement.test.ts's expected owner gainsproven: true(the runtime route always proves).src/main/ipc/pty, pane-ownership, terminal-host, the adapter carry file and the session-move test, 360/360 (74 files).Gates (MacBook, Node 24.22.1, no override)
pnpm check:changed --base=origin/blowzer/fork-only: 24/24 at f9e5c12.pane-ownership-observer.tsis untouched (orca Keep-marker nits from the PR #69 review (stat read after a null environ, now() before spawn, Linux ticks retry, drift-guard source match) #71, the grok seat, works there).