Repository navigation
keep marker: start-time identity on every read + a true close budget (Fixes #67) - #69
Merged
nachumi-a2zoperations merged 4 commits intoNov 16, 2026
Conversation
…e close budget (orca #44) S1 (Fable-3 delta of PR 66): each macOS read is now `lstart=,command=` under LANG=C, TZ=UTC, three per pid: plain, -E, plain again. Every read's lstart must equal the entry's recorded start (a reused pid with the same command line is null), and the two plain reads must agree (a command line that grew across the -E read, e.g. setproctitle, is null). Linux: when the entry's start ticks are known, /proc/<pid>/stat must still show them after the environ read. S2: the WHOLE close is bounded by MARKER_CLOSE_BUDGET_MS. Each read's timeout is min(2 s, what is left); a read cut short by the budget ends the reading (what was read is kept, the rest null). A read that fails with its full 2 s still fails the read, as before. Before: 5 s checked only before each pid, worst case about 9 s. The reader now takes {pid, startedAt, startTicks} targets. Fixes #67 Signed-off-by: Nachumi Eliyahu <[email protected]>
…lose budget (#67) Refs #67 Signed-off-by: Nachumi Eliyahu <[email protected]>
…losed; cut-window failures count (Fable-3 on PR 69) S1: process-host SIGTERMs a timed-out helper and SIGKILLs it only after its 2 s exit grace, so a cut read could end up to 2 s past the budget. Each read's timeout is now min(2 s, what is left minus MARKER_EXIT_GRACE_MS = 2 s), so even a ps that ignores SIGTERM ends inside the 5 s. Row: the cut read gets 1.5 s and, with the grace, the close ends at 5 s (it was 7 s); a drift guard pins process-host's value. N1: Linux, an entry whose start ticks were never read is null (fail closed), not unchecked. Row. N2: inside the cut window only a TIMEOUT is the budget running out; any other failure is a failed read (counted). Row. Each fix reverted alone turns its row(s) red (grace 2, N1 1, N2 1). Refs #67 Signed-off-by: Nachumi Eliyahu <[email protected]>
Refs #67. fork-only gained PR 68 (restart carry-over). One conflict: pane-ownership-observer.ts, the import block. Both kept: PR 68's PaneCarry import and this branch's MarkerTarget type on the marker import. Auto-merged: the issue-44 design note (PR 68's carry-over section and this branch's marker section are separate hunks). 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 #67 (Refs #44, stage 3 piece b, the keep marker; follow-up to PR #66, Fable-3 delta S1 + S2). Observe only: nothing gains a way to signal.
S1: process identity on every read
macOS: each pid is read three times, every read
lstart=,command=underLANG=C,TZ=UTC(the stage-2 table's format):ps -wwo lstart=,command= -p <pid>: the command line;ps -wwE -o lstart=,command= -p <pid>: the command line, then the environment;ps -wwo lstart=,command= -p <pid>: the command line again.The marker is read only when all of these hold:
lstartequals the entry's recordedstartedAt, space-normalised (a reused pid with the same command line, case b, is null);-Eread, case a, e.g. setproctitle, is null);-Eline starts with the plain one (as in PR 66), and only what follows it is searched.Start time alone cannot catch case a (it is the same process), which is why the plain line is read a second time.
Linux:
/proc/<pid>/statis read afterenvironand must still show the entry's recorded start ticks (stage 2 records them on Linux). An entry whose ticks were never read is null: fail closed (Fable-3 N1).API: the reader now takes
{ pid, startedAt, startTicks }targets instead of pids (observer deps, factory and CPU harness are updated).S2: a true total budget
MARKER_CLOSE_BUDGET_MS(5 s) now bounds the whole close, process-host's exit grace included (Fable-3 S1). process-host SIGTERMs a timed-out helper and SIGKILLs it only after its 2 s exit grace (run-process.tsPROCESS_EXIT_GRACE_MS), so each read's timeout ismin(2 s, what is left − MARKER_EXIT_GRACE_MS). Even apsthat ignores SIGTERM then ends inside the 5 s. A drift guard pins process-host's value.markerFailurescounts it).pswith a pid LIST reads the whole process table (PR 66 finding), so reads stay single-pid.Tests (red first)
lstartspace-normalisation (a one-digit day);[2000, 2000, 2000, 1500]). With apsthat ignores SIGTERM (its timeout + the 2 s grace), the close ends at ≤ 5 s (7 s without the grace room). pid 1's answer is kept; pid 2 and 3 are null;Gates (MacBook,
PATH=$HOME/.local/node/node-v24.22.1-darwin-arm64/bin:$PATH, no override)pnpm check:changed --base=origin/blowzer/fork-only: 24/24 at f5ae40c and again 24/24 at 123adff. The second commit (69565cc) only updates the design note.Docs
docs/decisions/issue-44-pane-process-ownership.md§6, "As built": three reads, the identity rule, the true budget, Linux ticks.