Skip to content

test: tolerate host systemd child subreaper in procevent and session-lock tests - #7044

Open
RooseveltAdvisors wants to merge 2 commits into
kunchenguid:mainfrom
RooseveltAdvisors:fm/fm-subreaper-init-assertions
Open

RooseveltAdvisors wants to merge 2 commits into
kunchenguid:mainfrom
RooseveltAdvisors:fm/fm-subreaper-init-assertions

Conversation

@RooseveltAdvisors

Copy link
Copy Markdown
Contributor

Intent

Tolerate host systemd child subreaper in procevent and session-lock-ancestry test suites

What Changed

  • Added an is_orphaned <pid> helper to tests/fm-procevent.test.sh and tests/fm-session-lock-ancestry.test.sh. It treats a process as orphaned when its parent is PID 1, or when its parent is a subreaper one hop below init (for example systemd --user). Before this change, both tests required ppid == 1.
  • In the procevent orphan-listener fixture, the reparenting precondition now uses is_orphaned. On hosts where a per-user systemd manager adopts orphans, the fixture no longer fails.
  • In the session-lock-ancestry fixtures, the generated session.sh, daemon.sh and frontend.sh scripts now carry an inline copy of the helper and use it in their wait-for-orphan loops. The recycled-chain test also uses it to wait for and assert the pty-host's reparenting.

Risk Assessment

✅ Low: Test-only change: the old checks required the orphaned process's parent to be PID 1 exactly. The new is_orphaned helper also accepts a parent whose own parent is PID 1, such as a systemd --user subreaper. I traced each fixture's launch chain (bash -c '... &' launchers and procevent reconcile). Before reparenting, the immediate parent's parent is the test shell or a fixture process, not init, so the wider check cannot pass early. In the session-lock suite the old wait loops simply timed out after 10s and continued, so the only behavior change there is a faster wait. The change matches the stated intent.

Testing

This host has a systemd --user child subreaper, so it reproduces the problem. I ran each suite at the base commit and at the fix. Before the fix, the session-lock-ancestry suite failed with "the pty-host was not reparented to init". The procevent suite failed with "the listener under test was not reparented away from its session (ppid 2896748)". After the fix, both suites pass in full with exit 0: session-lock-ancestry took 43s and procevent took 621s. That includes the reparented-listener and recycled-chain e2e cases. I did not run the full repository suite. This change only touches tests, so there is no UI surface to capture. The temporary base copies were removed and the worktree is clean.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
On a host where systemd --user adopts orphans, the procevent suite passes and accepts a listener adopted by the subreaper as orphaned ✅ pass live after-procevent.log: 'all procevent tests passed', EXIT=0. Probe showed the subreaper is pid 2896748, whose parent is 1
On the same subreaper host, the session-lock-ancestry e2e cases (pty-host reparenting, fixture orphan waits) pass ✅ pass live after-session-lock-ancestry.log EXIT=0
Regression check: the pre-fix suites fail on this host with the subreaper symptom, showing the fix is what makes them pass ✅ pass live before-procevent.log '(ppid 2896748)' EXIT=1; before-session-lock-ancestry.log 'pty-host was not reparented to init' EXIT=1
Evidence: procevent suite before fix (fails under subreaper)

Source: procevent suite before fix (fails under subreaper)

not ok - the listener under test was not reparented away from its session (ppid 2896748) EXIT=1

ok - no configured source means no generated state and no process
ok - one blocking completion yields exactly one bounded normalized event
ok - a home reached through a symlinked ancestor runs its sources normally
not-autohandled: direct-src (left for the handler; still unacknowledged)
ok - public start owns the process group recorded by its claim
ok - public start never claims an inherited caller process group
ok - an unhandled result survives restart and repeat drains, and only explicit acknowledgement stops its re-announcement
ok - publication cannot race a handled acknowledgement
ok - handled acknowledgement creation is private and fails safely
ok - automatic application waits for durable publication and failed publication remains recoverable
ok - a self-announcing adapter applies quietly and still publishes what it could not apply
not-autohandled: ends-src (left for the handler; still unacknowledged)
ok - an adapter-classified terminal result is captured once, announced, and retires its source automatically
not-autohandled: open-src (left for the handler; still unacknowledged)
ok - a source stays armed unless its own adapter classifies the result terminal
not-autohandled: replace-src (left for the handler; still unacknowledged)
ok - terminal retirement preserves and releases a concurrently replaced registration
ok - failed terminal retirement is fail-closed and idempotently recoverable
ok - one Send & End yields exactly one captured result, automatic retirement, and no recurring poll
ok - an empty board close is captured and recorded handled without ever waking the captain
ok - worker board replies and recovered listeners derive their server from the board session
ok - worker-owned Lavish rounds deliver to the worker, acknowledge on re-arm, and stop at session end
ok - a capture interrupted before its result commit does not wedge its source
ok - an orphaned capture is not acknowledged by a worker it never reached
ok - a worker-owned board is only armed for an owner its feedback can reach
ok - an acknowledged note is never resurrected and stops ringing across repeated reconciles
ok - acknowledging a terminal round concludes that round only
ok - an interrupted conclude leaves the ended board unpollable and finishes on retry
ok - a re-arm that cannot acknowledge its round leaves the running generation alone
ok - a worker-owned board is armed once and re-armed only to acknowledge an open round
ok - a board close carrying the captain's real answer is still announced
ok - the shipped poll governor bounds an instantly returning source
ok - a transient Lavish poll interruption is retried quietly and never announced
ok - a staged worker reply is handed to the board once across quiet poll retries
ok - a listener whose staged reply is gone polls the board without one
ok - a listener that refuses its own setup leaves the staged reply for the next one
ok - a listener whose artifact vanished leaves the staged reply for the next one
ok - an interruption that outlives the bounded retries is captured and announced
ok - only the exact interruption is retried; an unrelated SERVER_ERROR still surfaces
ok - only the literal two-line interruption enters the quiet retry policy
ok - arm rejects malformed and out-of-range retry delays before registration
ok - poll cleanup safely handles an apostrophe-containing TMPDIR
ok - Lavish classification staging stays bounded while nonmatches stream
ok - a drained-but-unhandled result survives a replacement session and is retired only by explicit handling, never twice
ok - pending results preserve numeric order and distinct wake identity
ok - one owner per canonical source across homes
ok - retiring a never-completing source stops its runner and its blocked child
ok - reconcile reaps a runner whose source registration is gone
not-autohandled: stale-src (left for the handler; still unacknowledged)
ok - stale-owner recovery removes abandoned output without displacing a live owner
not-autohandled: cross-home-src (left for the handler; still unacknowledged)
ok - cross-home stale recovery removes abandoned output from the old state directory
not-autohandled: race-src (left for the handler; still unacknowledged)
not-autohandled: race-src (left for the handler; still unacknowledged)
not-autohandled: race-src (left for the handler; still unacknowledged)
ok - concurrent stale-claim replacement starts exactly one runner
ok - an ambiguous leaderless group is preserved without replacement
ok - a truly dead generation with no surviving group is still safely reclaimed
ok - reconcile reclaims a dead generation whose state-root identity no longer matches
ok - retire releases a dead generation's claim instead of refusing forever
ok - a live generation is never reclaimed, drifted state root or not
ok - a reused pid never makes its surviving process group reclaimable
ok - start reclaims a reused-pid claim whose leftovers can still be tidied
ok - a launch that cannot confirm is announced once per failure episode
ok - a 64-char source id keeps the launch-failed key within the watcher's marker bound
ok - reconcile reports a launch it could not confirm instead of counting it as a start
ok - a launch that finished before confirmation looked is still reported as started
ok - a zero-padded launch confirm window is honored as base 10
ok - an unusable launch confirm window is refused by name instead of blamed on the sources
ok - a dead generation whose leftovers cannot be tidied never keeps owning its source
ok - claim replacement cannot produce a torn ownership snapshot
ok - retirement and start share one serialized lifecycle boundary
ok - detected PID reuse is refused before signalling
ok - transient identity failure preserves the live source for retry
ok - bounded home sweep preflights then retires every locally owned source
ok - home sweep leaves foreign-home claims and runners untouched
ok - home sweep refuses safely until runner identity is readable
ok - healthy runtime behavior remains registration-only
ok - registration rejects unrepresentable newline arguments
ok - nonzero exit with no output stays armed and silent
ok - oversized output is bounded rather than published whole or dropped
ok - live output stays bounded and retirement reaps the whole source group
ok - stop mismatch evidence preserves the proved-stop boundary
ok - stop unreadable evidence preserves the proved-stop boundary
ok - stop unreadable-pgid evidence preserves the proved-stop boundary
ok - stop nonleader evidence preserves the proved-stop boundary
ok - invalid output bounds fail closed
ok - the adapter derives physical identity without newline path corruption
ok - source-only homes trigger the general supervision guard
ok - the adapter classifies published poll output safely
ok - poll derives host and port from the artifact session, not ambient or configured routing
ok - quiet retries use the board session regardless of configuration changes
ok - missing or unreadable session routing preserves replies and never guesses another server
ok - the adapter owns which Lavish results end a source, and payload text cannot forge one
ok - the adapter owns which Lavish results are silent, and fails closed on everything else
ok - read distinguishes a live captain message from a session-ending message
ok - read names the message count with the same label as the message section
ok - read presents every annotation and a distinct session-ending message
ok - read never certifies rows missing declared fields as complete
ok - read keeps every annotation when the session-ending message is absent
ok - read surfaces a typed comment on an annotated element
ok - read still surfaces a typed comment that matches the element text
ok - read still presents a pure annotation with no comment
ok - read does not present choice context as a comment
ok - read still presents a pure message with no selector
ok - read distinguishes a feedback capture from an ended-with-nothing close
ok - an adapter with no silence verdict keeps announcing every result
ok - the published interfaces state the loss limitation and claim no lossless delivery
registered: floor-src (lavish)
ok - an orphaned source command obeys the launch floor during its grace window
ok - a replacement registration starts with one fresh launch floor
ok - a superseded sleeping runner cannot recreate stale pacing state
ok - post-commit pacing cleanup cannot veto registration publication
ok - a pre-reboot monotonic stamp is treated as expired
ok - an expired owner lease stops a self-relaunching source generation
ok - a recreated state path does not preserve the old runner
registered: guard-fail-src (lavish)
ok - a runner fails closed when its owner guard cannot initialize
registered: attached-src (lavish)
ok - a foreground start refreshes its lease while its caller remains attached
ok - wall-clock corrections do not alter owner lease age
registered: detached-attached-src (lavish)
ok - an attached-start keeper stops refreshing after its parent exits
ok - a detected ambiguous reused-PID group is not signalled
not ok - the listener under test was not reparented away from its session (ppid 2896748)
EXIT=1 secs=177
Evidence: procevent suite after fix

Source: procevent suite after fix

ok - a detached listener starts reparented, with a live descendant tree under it ok - retiring a source reaps its reparented listener and every descendant under it all procevent tests passed EXIT=0

ok - no configured source means no generated state and no process
ok - one blocking completion yields exactly one bounded normalized event
ok - a home reached through a symlinked ancestor runs its sources normally
not-autohandled: direct-src (left for the handler; still unacknowledged)
ok - public start owns the process group recorded by its claim
ok - public start never claims an inherited caller process group
ok - an unhandled result survives restart and repeat drains, and only explicit acknowledgement stops its re-announcement
ok - publication cannot race a handled acknowledgement
ok - handled acknowledgement creation is private and fails safely
ok - automatic application waits for durable publication and failed publication remains recoverable
ok - a self-announcing adapter applies quietly and still publishes what it could not apply
not-autohandled: ends-src (left for the handler; still unacknowledged)
ok - an adapter-classified terminal result is captured once, announced, and retires its source automatically
not-autohandled: open-src (left for the handler; still unacknowledged)
ok - a source stays armed unless its own adapter classifies the result terminal
not-autohandled: replace-src (left for the handler; still unacknowledged)
ok - terminal retirement preserves and releases a concurrently replaced registration
ok - failed terminal retirement is fail-closed and idempotently recoverable
ok - one Send & End yields exactly one captured result, automatic retirement, and no recurring poll
ok - an empty board close is captured and recorded handled without ever waking the captain
ok - worker board replies and recovered listeners derive their server from the board session
ok - worker-owned Lavish rounds deliver to the worker, acknowledge on re-arm, and stop at session end
ok - a capture interrupted before its result commit does not wedge its source
ok - an orphaned capture is not acknowledged by a worker it never reached
ok - a worker-owned board is only armed for an owner its feedback can reach
ok - an acknowledged note is never resurrected and stops ringing across repeated reconciles
ok - acknowledging a terminal round concludes that round only
ok - an interrupted conclude leaves the ended board unpollable and finishes on retry
ok - a re-arm that cannot acknowledge its round leaves the running generation alone
ok - a worker-owned board is armed once and re-armed only to acknowledge an open round
ok - a board close carrying the captain's real answer is still announced
ok - the shipped poll governor bounds an instantly returning source
ok - a transient Lavish poll interruption is retried quietly and never announced
ok - a staged worker reply is handed to the board once across quiet poll retries
ok - a listener whose staged reply is gone polls the board without one
ok - a listener that refuses its own setup leaves the staged reply for the next one
ok - a listener whose artifact vanished leaves the staged reply for the next one
ok - an interruption that outlives the bounded retries is captured and announced
ok - only the exact interruption is retried; an unrelated SERVER_ERROR still surfaces
ok - only the literal two-line interruption enters the quiet retry policy
ok - arm rejects malformed and out-of-range retry delays before registration
ok - poll cleanup safely handles an apostrophe-containing TMPDIR
ok - Lavish classification staging stays bounded while nonmatches stream
ok - a drained-but-unhandled result survives a replacement session and is retired only by explicit handling, never twice
ok - pending results preserve numeric order and distinct wake identity
ok - one owner per canonical source across homes
ok - retiring a never-completing source stops its runner and its blocked child
ok - reconcile reaps a runner whose source registration is gone
not-autohandled: stale-src (left for the handler; still unacknowledged)
ok - stale-owner recovery removes abandoned output without displacing a live owner
not-autohandled: cross-home-src (left for the handler; still unacknowledged)
ok - cross-home stale recovery removes abandoned output from the old state directory
not-autohandled: race-src (left for the handler; still unacknowledged)
not-autohandled: race-src (left for the handler; still unacknowledged)
not-autohandled: race-src (left for the handler; still unacknowledged)
not-autohandled: race-src (left for the handler; still unacknowledged)
ok - concurrent stale-claim replacement starts exactly one runner
ok - an ambiguous leaderless group is preserved without replacement
ok - a truly dead generation with no surviving group is still safely reclaimed
ok - reconcile reclaims a dead generation whose state-root identity no longer matches
ok - retire releases a dead generation's claim instead of refusing forever
ok - a live generation is never reclaimed, drifted state root or not
ok - a reused pid never makes its surviving process group reclaimable
ok - start reclaims a reused-pid claim whose leftovers can still be tidied
ok - a launch that cannot confirm is announced once per failure episode
ok - a 64-char source id keeps the launch-failed key within the watcher's marker bound
ok - reconcile reports a launch it could not confirm instead of counting it as a start
ok - a launch that finished before confirmation looked is still reported as started
ok - a zero-padded launch confirm window is honored as base 10
ok - an unusable launch confirm window is refused by name instead of blamed on the sources
ok - a dead generation whose leftovers cannot be tidied never keeps owning its source
ok - claim replacement cannot produce a torn ownership snapshot
ok - retirement and start share one serialized lifecycle boundary
ok - detected PID reuse is refused before signalling
ok - transient identity failure preserves the live source for retry
ok - bounded home sweep preflights then retires every locally owned source
ok - home sweep leaves foreign-home claims and runners untouched
ok - home sweep refuses safely until runner identity is readable
ok - healthy runtime behavior remains registration-only
ok - registration rejects unrepresentable newline arguments
ok - nonzero exit with no output stays armed and silent
ok - oversized output is bounded rather than published whole or dropped
ok - live output stays bounded and retirement reaps the whole source group
ok - stop mismatch evidence preserves the proved-stop boundary
ok - stop unreadable evidence preserves the proved-stop boundary
ok - stop unreadable-pgid evidence preserves the proved-stop boundary
ok - stop nonleader evidence preserves the proved-stop boundary
ok - invalid output bounds fail closed
ok - the adapter derives physical identity without newline path corruption
ok - source-only homes trigger the general supervision guard
ok - the adapter classifies published poll output safely
ok - poll derives host and port from the artifact session, not ambient or configured routing
ok - quiet retries use the board session regardless of configuration changes
ok - missing or unreadable session routing preserves replies and never guesses another server
ok - the adapter owns which Lavish results end a source, and payload text cannot forge one
ok - the adapter owns which Lavish results are silent, and fails closed on everything else
ok - read distinguishes a live captain message from a session-ending message
ok - read names the message count with the same label as the message section
ok - read presents every annotation and a distinct session-ending message
ok - read never certifies rows missing declared fields as complete
ok - read keeps every annotation when the session-ending message is absent
ok - read surfaces a typed comment on an annotated element
ok - read still surfaces a typed comment that matches the element text
ok - read still presents a pure annotation with no comment
ok - read does not present choice context as a comment
ok - read still presents a pure message with no selector
ok - read distinguishes a feedback capture from an ended-with-nothing close
ok - an adapter with no silence verdict keeps announcing every result
ok - the published interfaces state the loss limitation and claim no lossless delivery
registered: floor-src (lavish)
ok - an orphaned source command obeys the launch floor during its grace window
ok - a replacement registration starts with one fresh launch floor
ok - a superseded sleeping runner cannot recreate stale pacing state
ok - post-commit pacing cleanup cannot veto registration publication
ok - a pre-reboot monotonic stamp is treated as expired
ok - an expired owner lease stops a self-relaunching source generation
ok - a recreated state path does not preserve the old runner
registered: guard-fail-src (lavish)
ok - a runner fails closed when its owner guard cannot initialize
registered: attached-src (lavish)
ok - a foreground start refreshes its lease while its caller remains attached
ok - wall-clock corrections do not alter owner lease age
registered: detached-attached-src (lavish)
ok - an attached-start keeper stops refreshing after its parent exits
ok - a detected ambiguous reused-PID group is not signalled
ok - a detached listener starts reparented, with a live descendant tree under it
ok - a listener whose owning session is gone stops itself and its whole process group
ok - reaping the listener stops the process churn under it
ok - an identical listener in a home whose session is still there is untouched
ok - retiring a source reaps its reparented listener and every descendant under it
ok - a stop the guard cannot prove is retried until the expired runner is reaped
ok - retirement escalates after TERM leaves a surviving child (absent leader)
ok - retirement escalates after TERM leaves a surviving child (zombie leader)
ok - an expired runner's guard escalates past a signal-proof child
guard phase: fresh read 6.042-6.047s, expiry 8s, two full intervals could not finish before 18.042s (deadline 17s)
guard bound: lease=7s check=6s reaped 12.4s after the last owner activity, documented bound 15s
ok - an orphaned runner is reaped within the lease plus ONE check interval
decimal interval: 08 halves to 4s and its listener started
decimal interval: 010 halves to 5s and its listener started
ok - a zero-prefixed decimal interval starts its listener and halves as decimal
ok - one unreadable read does not end a live runner
ordinary stop: start status=143 retirement=210ms sampled windows=2018/2019ms
ok - a runner exits on the ordinary stop signal instead of outliving it
ok - a group whose leader died to something else is still refused, not signalled
ok - arm reports ready only after the listener is running
ok - arm waits out a delayed listener start before reporting ready
ok - arm fails when the listener cannot claim, and leaves the registration retire refused
ok - arm waits out the confirm window before reporting that the listener is not running
ok - re-arm over a live earlier listener reports it still serving the board
ok - older compatible Lavish versions retain the poll-with-reply behavior
ok - a refused synchronous reply fails arm before source registration
ok - a refused synchronous reply leaves the same arm retryable
ok - an arm refused for ownership, round, or endpoint never posts its reply
ok - direct poll confirms a new-version reply before polling
ok - an unknown Lavish version fails arm and poll closed, keeping the staged reply
ok - arm posts and confirms the staged reply before reporting listener readiness
ok - re-arm launches the new generation once a draining earlier claim is released
ok - arm does not launch beside a stale claim whose process group is alive

all procevent tests passed
EXIT=0 secs=621
Evidence: session-lock-ancestry suite before fix (fails under subreaper)

Source: session-lock-ancestry suite before fix (fails under subreaper)

not ok - the pty-host was not reparented to init after the daemon ended EXIT=1

ok - session-lock: a version-named Claude Code session is identified from its install path and argv[0]
ok - session-lock: a harness that is pid 1 of its own namespace is examined, not skipped
ok - session-lock: ordinary script paths under a harness directory are not harness processes
ok - session-lock: ownership stops at the first non-harness gap above the contiguous run
ok - session-lock: a live version-named session holding the lock is not mistaken for a stale owner
ok - session-lock: a trusted same-session id keeps owning a recycled background chain, and nothing weaker does
ok - session-lock: a trusted id anchors the lock on the model-loop process, anything else on the outermost pid
ok - session-lock e2e: a version-named session claims the home and arms supervision
ok - session-lock e2e: a session parented by a harness-named daemon claims the home and arms supervision
ok - session-lock e2e: a version-named session under a harness-named daemon keeps its own lock
not ok - the pty-host was not reparented to init after the daemon ended
EXIT=1 secs=87
Evidence: session-lock-ancestry suite after fix

Source: session-lock-ancestry suite after fix

ok - session-lock: a verified reclaim keeps the new sidecar beside the new pid EXIT=0

ok - session-lock: a version-named Claude Code session is identified from its install path and argv[0]
ok - session-lock: a harness that is pid 1 of its own namespace is examined, not skipped
ok - session-lock: ordinary script paths under a harness directory are not harness processes
ok - session-lock: ownership stops at the first non-harness gap above the contiguous run
ok - session-lock: a live version-named session holding the lock is not mistaken for a stale owner
ok - session-lock: a trusted same-session id keeps owning a recycled background chain, and nothing weaker does
ok - session-lock: a trusted id anchors the lock on the model-loop process, anything else on the outermost pid
ok - session-lock e2e: a version-named session claims the home and arms supervision
ok - session-lock e2e: a session parented by a harness-named daemon claims the home and arms supervision
ok - session-lock e2e: a version-named session under a harness-named daemon keeps its own lock
ok - session-lock e2e: a background session keeps its lock and its supervision across a recycled helper chain
ok - session-lock: a same-session confirmation waits for the claim lock and refreshes a re-keyed id
ok - session-lock: a waiting confirmation does not steal another session's lock
ok - session-lock: a failed lock write restores the previous sidecar
ok - session-lock: a failed lock write removes a newly created sidecar
ok - session-lock: a verified reclaim keeps the new sidecar beside the new pid
EXIT=0 secs=43

Pipeline

Updates from git push no-mistakes

✅ **intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 3 of 3 scenarios driven live against the product
Scenario Result Live Evidence
On a host where systemd --user adopts orphans, the procevent suite passes and accepts a listener adopted by the subreaper as orphaned ✅ pass live after-procevent.log: 'all procevent tests passed', EXIT=0. Probe showed the subreaper is pid 2896748, whose parent is 1
On the same subreaper host, the session-lock-ancestry e2e cases (pty-host reparenting, fixture orphan waits) pass ✅ pass live after-session-lock-ancestry.log EXIT=0
Regression check: the pre-fix suites fail on this host with the subreaper symptom, showing the fix is what makes them pass ✅ pass live before-procevent.log '(ppid 2896748)' EXIT=1; before-session-lock-ancestry.log 'pty-host was not reparented to init' EXIT=1
  • Orphan probe: started a double-forked sleep and checked its ppid. It was 2896748, which is /usr/lib/systemd/systemd --user, and that process's parent is 1
  • bash tests/fm-session-lock-ancestry.test.sh at da14ba53 (fixed)
  • bash tests/fm-procevent.test.sh at da14ba53 (fixed)
  • Pre-fix copies from 4735ddc6 (git show 4735ddc6:tests/&lt;suite&gt;), run in the same worktree on the same host to reproduce the failure. The temporary copies were deleted afterwards.
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…ssion-lock tests

Accept a child subreaper registered by systemd directly below init as a valid orphan reaper alongside init itself.

On hosts running a user-level process manager (such as systemd --user), orphaned processes are adopted by the per-user subreaper rather than reparenting directly to PID 1. Recognize this hierarchy by checking if the process parent is PID 1 or if its parent is a direct child of PID 1, matching the existing helper in tests/fm-remote-job-orphan-reap.test.sh.
@DiefOu

DiefOu commented Oct 26, 2026

Copy link
Copy Markdown

Pushed b3917e72ad (fast-forward, no rebase): cherry-picked the two test-only commits d3da8cfcef (pin the clock in the lifecycle block) and beefb22552 (reset gauge fixture), then a plain merge of origin/staging to pick up the mixed-version harness fix (#7038). The fix itself is untouched: the services/control-plane/src diff against staging is byte-identical before and after.

@DiefOu

DiefOu commented Oct 26, 2026

Copy link
Copy Markdown

/ocr review

@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thank you @RooseveltAdvisors, and sorry this sat untriaged for a while. A desktop Linux host with systemd --user as a child subreaper is a common setup, and the test suite should pass there.

What I checked at da14ba53 against main 127f0f30: the change touches tests only, tests/fm-procevent.test.sh and tests/fm-session-lock-ancestry.test.sh. The new is_orphaned helper replaces the strict ppid == 1 checks. It accepts a parent that is PID 1, or a parent whose own parent is PID 1. Product code isn't touched. The before/after runs on a subreaper host show that the fix is what turns both suites green. It has no workflow, credential or network surface. The no-mistakes attestation binds this head (live 3/3). It's still mergeable with main. It shares no files with our CI-shard work in #7706 and #7775.

One small, optional note, not blocking: the grandparent check is a bit wider than "adopted by a subreaper". It would also pass for a process whose parent is still alive, if that parent happens to sit directly under PID 1 (for example a test shell launched straight by a container's init). In these fixtures the parent you're waiting on is a launcher or daemon that the test ends first, so I don't see a false pass here. If you ever want it tighter, you could also check that the parent is no longer the original launcher pid.

Contract-class: restore (my own read). These suites are meant to pass on an ordinary Linux host, and on subreaper hosts they didn't. The product's unconfigured behaviour doesn't change.

VISION: One captain: n/a · Authority: n/a · Scripts vs judgment: aligns · Restart: n/a · Delegation: aligns (the tests that guard orphan reparenting keep working on more hosts) · Vendor: aligns (not tied to one init setup) · Scope: aligns (this repo's own validation).

CI: the only red on this head is Behavior portable serial 2 from 2026-10-11. It was cancelled at the 30-minute job cap, not failed by a test. That's a shard-size problem on our side. Main's CI is also currently red from the ubuntu 26.04 runner move, and that's ours too, not yours. A fix is pending.

Status: waiting on CI, and nothing is needed from you. Once main is fixed we'll rerun this, and when it's green and clean it can merge.

…2 shard failure (pr-babysit flake triage, corr=fm-9etlh)
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge.

Reviews (1) · Last reviewed commit: "ci: retrigger checks after stale 2026-10..." · Reviewed by Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants