Skip to content

fix(review): close the 4 small lock gaps from #1434 - #1453

Merged
amiddavid merged 2 commits into
mainfrom
fix/review-lock-gaps
Nov 26, 2026
Merged

amiddavid merged 2 commits into
mainfrom
fix/review-lock-gaps

Conversation

@amiddavid

@amiddavid amiddavid commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Behavior change, approved by the owner: offload-review.sh now needs bash 4 or newer. On macOS, /bin/bash is 3.2, so install bash with brew install bash and put it first on PATH. On bash 3 the script stops with that message. Before, it ran on bash 3.2 with a weaker lock.

Summary

Tooling only. No product behavior change. No data dependence change.
This closes the 4 small gaps in the offload-review lock code that #1434 left.

Refs #1436

What changed

  1. unlock checks the pid. It removes the lock only when the pid file holds this process's pid. It now replaces unlock_if_held, which did the same job.
  2. An empty pid file means "not yet written". lock_take_stale no longer reads it as dead. The new helper lock_orphan decides for a renamed lock that cannot go back: remove it when the pid is dead, or empty and the dir is 60 s old or older; keep it otherwise. The waiter and lock_orphan both use "60 s or older".
  3. The script refuses to run on bash older than 4. It prints a clear message and says macOS needs Homebrew bash. #!/usr/bin/env bash finds it when it comes first on PATH.
  4. Test (d) asserts that --cleanup removes the scratch rules file.
  5. SKILL.md says the rules file folder is $OFFLOAD_RULES_DIR (default /tmp).

Why option (a) for bash 3.2

  • Nothing else in scripts/offload-review* needs bash 4. So this is a real choice.
  • Option (b) cannot work well. On bash 3.2 a subshell and the script report the same pid. The EXIT trap cannot tell who holds the lock.
  • Option (a) is one check at the start. It also lets self_pid use $BASHPID with no fallback.
  • Cost: a Mac with only /bin/bash 3.2 must install bash. The message says how.

How it was tested

Tests ran on macOS, Go 1.27.4 (no Go code changed).

  • bash scripts/offload-review_test.sh (bash 5.2): all passed. New cases: (g) a stale holder's unlock keeps a new holder's lock, (h) a young lock with an empty pid is waited for and not taken, and lock_orphan keeps young+empty and live, removes old+empty, dead and age-60, (i) bash 3 is refused with a clear message.
  • /bin/bash scripts/offload-review_test.sh (bash 3.2): prints the refusal and stops.
  • Case (i) also runs the script under /bin/bash and checks the refusal.
  • bash -n on the 3 scripts: ok. shellcheck is not installed.
  • A scratch edit that removed the empty-pid rule from lock_orphan made test (h) fail. A scratch edit from -ge to -gt made the age-60 case fail. Both were reverted.

- unlock removes the lock only when the pid file holds this
  process's pid. It replaces unlock_if_held.
- An empty pid file in lock_take_stale means "not yet written",
  not "dead". The 60 s age rule applies.
- The script refuses to run on bash older than 4, with a clear
  message. Bash 3.2 has no BASHPID, so a subshell cannot be told
  from the script.
- Test (d) checks that --cleanup removes the scratch rules file.
- SKILL.md names $OFFLOAD_RULES_DIR as the rules file folder.

Refs #1436

Signed-off-by: DAVID AMID <[email protected]>
Assisted-By: Claude Opus 5.5
@amiddavid

Copy link
Copy Markdown
Collaborator Author

Local tests: waived (owner rule)

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 offload-review skill, @amiddavid's session fresh 1 of 2 1 of 2 622074823a52 blocking

Verdict: blocking

Findings

  1. scripts/offload-review_test.sh:127-133 — the put-back test does not run the new code, and passes on the old code too
    • What fails: the new branch in lib.sh:62 (a renamed lock with an empty pid, on a failed put-back, is kept while young) has no test. The PR names this half of gap 2, and the test comment claims to cover it. It does not.
    • Proof: trace lock_take_stale "999999" in that setup.
      • $lockdir holds the live lock (pid $other). The empty-pid dir sits at $lockdir.stale.test.
      • gone is "$lockdir.stale.<pid>.$RANDOM" (lib.sh:50) — a fresh name, not .stale.test.
      • mv "$lockdir" "$gone" (lib.sh:51) renames the live lock, not the empty-pid one.
      • now = $other (lib.sh:52) — non-empty, so the elif at lib.sh:62 cannot run even if the block is reached.
      • mv "$gone" "$lockdir" (lib.sh:60) succeeds: the first rename just vacated the path. So the whole || { ... } block is skipped.
      • The assertion [ -d "$lockdir.stale.test" ] is true because nothing in the function ever touches that directory. Delete the new elif from lib.sh and revert to the base put-back: the test still passes.
    • Fix: make the branch reachable and deterministic. Factor the keep-or-remove decision into a helper that takes <gone> <now> as arguments (for example stale_putback <gone> <now>), and test that helper directly with an empty now. Or force the put-back to fail: a background helper that re-creates $lockdir in the window between the two mv calls.

Non-blocking

  • lib.sh:59 — the comment says an empty-pid renamed lock "stays until it is 60 s old". Nothing checks it again: each .stale.* name is unique, and no code sweeps them. A kept one stays forever, like the live-pid case above it. Say "stays" without the 60 s claim, or add a sweep. Also note the kept directory serves no holder: the lock it named was already moved away, so this half of gap 2 is garbage retention, not recovery.
  • .claude/skills/offload-review/SKILL.md:101,154 — the example commands still hardcode /tmp/offload-review-pr<N>-rules.md. The parenthetical at line 95 covers it, but the examples could mislead when OFFLOAD_RULES_DIR is set. Parameterize them.

What I checked

  • Read the full diff (4 files) and the full text of scripts/offload-review/lib.sh, scripts/offload-review.sh, scripts/offload-review_test.sh, and the changed parts of SKILL.md.
  • Compared with the base (3ef26ffd): the OFFLOAD_RULES_DIR header line and the --cleanup rm -f were already there; this PR adds only the doc catch-up and the assertion for them.
  • Grepped all callers of unlock, unlock_if_held, self_pid, BASHPID and OFFLOAD_RULES_DIR. No caller left that needs the old unconditional unlock; unlock_if_held has no remaining reference.
  • Traced pid matching across subshells: ensure_wt calls lock and unlock in the same subshell, so BASHPID matches. The top-level EXIT trap runs in the main shell, which never holds the lock, so it stays a no-op safety net. Same as the base design.
  • Traced require_bash4 placement: it runs before any repo, gh or network access, and no bash-4-only syntax is evaluated before it under bash 3.2 (sourcing lib.sh only defines functions). The refusal exits clean, with no EXIT trap set yet.
  • Traced the other new tests by hand: (g) both halves, (e), (h) first half, (i) all three parts, (d) rules-file assertion. Each runs the code it names.
  • Checked data dependence, host boundary and client rules: tooling only (scripts/, skill docs), no component or host package touched. No row update needed. The PR says so and the diff agrees.
  • Read the PR body and issue #1434. Read no PR comments or reviews (round 1).

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 offload-review skill, @amiddavid's session fresh 2 of 2 1 of 2 622074823a52 blocking

Verdict: blocking

Findings

  1. scripts/offload-review_test.sh:127-132 — the put-back test does not run the new code. It passes on the old lib.sh too.
    • What fails: the test claims to cover the new empty-pid branch of lock_take_stale (lib.sh:60-63). That branch never runs. The new behavior ships with no effective test.
    • Proof: trace of lock_take_stale "999999" on the state the test builds (a live lock at $lockdir with pid $other, and a separate $lockdir.stale.test with an empty pid):
      • The function makes its own gone name, $lockdir.stale.$(self_pid).$RANDOM (lib.sh:50). It never sees $lockdir.stale.test.
      • Its first mv "$lockdir" "$gone" (lib.sh:51) moves the live lock that line 130 created.
      • now reads $other, which is not empty. seen is 999999. So the else branch runs (lib.sh:53).
      • The put-back mv "$gone" "$lockdir" (lib.sh:60) succeeds, because the function itself removed $lockdir one line earlier. The new elif at lib.sh:62 never executes.
      • The assertion [ -d "$lockdir.stale.test" ] passes because no code under test touches that directory. I checked the base lib.sh (3ef26ff): it produces the same result. The test cannot tell old code from new.
    • Fix: make the branch reachable from a test. Extract the decision into a helper, for example lock_orphan <dir> <pid>: remove the dir when the pid is dead, or when the pid is empty and the dir is over 60 s old; keep it otherwise. lock_take_stale calls it when the put-back fails. Then test the helper directly: a young dir with an empty pid stays, an old one goes, a dead-pid one goes. The race itself (a new lock between the two mv calls) is too narrow to drive from outside the function.

Non-blocking

  • .claude/skills/offload-review/SKILL.md:101 — the example still hardcodes /tmp. Lines 95-96 say: use $OFFLOAD_RULES_DIR in every path below that names the rules file. Line 101 is below and names it: --live-tests /tmp/offload-review-pr<N>-rules.md. When OFFLOAD_RULES_DIR is set and the agent follows line 101, the file lands in /tmp, but --cleanup removes it from $OFFLOAD_RULES_DIR (offload-review.sh:137). One leftover file. Update the example, or say the default in it.
  • PR body: the "Local tests: waived (owner rule)" line is not in it. check-ready.sh looks for it in the body or a PR comment (interim rule). I did not read the PR comments, so it may be there. The PR-owning session should confirm before the hand-off.

What I checked

  • The full diff (4 files) and the code around each change: lib.sh before and after, offload-review.sh, offload-review_test.sh line by line, and the two SKILL.md hunks.
  • The lock state machine by hand, for each new branch: conditional unlock from a holder, from a non-holder, and from the main shell's EXIT trap; the empty-pid elif in the failed put-back (young keeps, over 60 s goes, stat failure reads as age 0 and keeps); lock_age fallbacks on macOS and Linux; require_bash4 with and without an argument.
  • Bash semantics, with small probes on this machine (not repo tests): a subshell and a backgrounded function get their own BASHPID while $$ stays the script's pid (so on bash 3.2 the old code could not tell them apart — the gate is needed); subshells and background functions do not run the parent's EXIT trap (so the global trap cannot remove an attempt's lock or $skipdir).
  • The exit path of offload-review.sh under bash 3.2: it stops at line 67, before gh or any repo write. The /bin/bash probe in test (i) is side-effect free.
  • That nothing else in the repo calls unlock_if_held (deleted) or sources lib.sh outside offload-review.sh and its test.
  • Test (d)'s new assertion against offload-review.sh:137, and test (g)/(e)/(i) against the new functions: each exercises the code it names.
  • The 4 gaps this PR closes against the #1434 round-2 review: 3 are closed and tested; the empty-pid put-back gap is closed in code but its test is finding 1.
  • Repo rules: scripts and docs only, no library or host package, so no data-dependence row, no client rule and no behavior-change approval. Conventional title, Signed-off-by and Assisted-By present.
  • No tests were run (live tests not approved). The bash probes above check shell semantics only; they do not run this repo's test files.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (bob, user of @amiddavid) IBM Bob Shell 1.0.3 offload-review skill, @amiddavid's session fresh 1 of 2 1 of 2 622074823a52 blocking

Verdict: blocking

Findings

  1. PR description — Undocumented breaking change for bash 3.2 users

    • What fails: Users on macOS with /bin/bash (version 3.2) will get an error and the script will refuse to run. Before this PR, the script worked on bash 3.2.
    • Proof:
      • Line 7 of scripts/offload-review/lib.sh: require_bash4() checks BASH_VERSINFO[0] and returns 1 if less than 4
      • Line 67 of scripts/offload-review.sh: require_bash4 || exit 1 stops the script
      • Line 16 of scripts/offload-review/lib.sh: self_pid() now uses $BASHPID with no fallback. On bash 3.2, $BASHPID is undefined, so self_pid returns empty string
      • The old code at base commit used ${BASHPID:-$$} as fallback for bash 3.2
      • Test at line 139-143 of scripts/offload-review_test.sh verifies the refusal message
    • Fix: The PR description must state this behavior change at the top: "Breaking: offload-review now requires bash 4 or newer. Users on macOS with /bin/bash (3.2) must install bash 4+ with brew install bash and put it first on PATH. The script will refuse to run on bash 3 with a clear error message." A human developer must approve this change before merge, per RELEASING.md "Behavior changes need a human's permission".
  2. scripts/offload-review/lib.sh:59-62 — Empty pid file logic may leave stale locks

    • What fails: When lock_take_stale puts back a renamed lock with an empty pid file, it checks the lock's age. But if the lock is exactly 60 seconds old or younger, it stays as .stale.* forever. The condition [ "$(lock_age "$gone")" -gt 60 ] only removes locks older than 60s, not equal to 60s.
    • Proof: Line 61: elif [ "$(lock_age "$gone")" -gt 60 ]; then rm -rf -- "$gone"; fi. A lock at age 60 is not removed. The next waiter will see the main lock (put back by another process) and the .stale.* lock. The .stale.* lock blocks nobody, but it accumulates.
    • Fix: Change line 61 to elif [ "$(lock_age "$gone")" -ge 60 ]; then rm -rf -- "$gone"; fi to remove locks at 60s or older. Or document that locks younger than 60s are kept intentionally.

Non-blocking

  • The new lock_age() helper at line 19-21 is a good refactoring. It removes code duplication and makes the age calculation consistent.
  • The test coverage for the new bash 4 requirement (lines 139-146 of scripts/offload-review_test.sh) is thorough. It tests both the refusal message and the acceptance of bash 4.
  • The empty pid file handling (lines 123-135 of scripts/offload-review_test.sh) adds a real edge case that was missing before. A lock with an empty pid file is now correctly treated as "not yet written" rather than "dead".
  • The function rename from unlock_if_held to unlock is clearer. The new name matches what the function does.

What I checked

  • Read every changed line in the diff
  • Compared the new scripts/offload-review/lib.sh with the base version to understand what changed
  • Read the test file scripts/offload-review_test.sh to verify test coverage
  • Checked the skill documentation update in .claude/skills/offload-review/SKILL.md
  • Verified against CLAUDE.md rules: no host boundary violations (these are shell scripts), no client-specific code (N/A), no data-dependence changes needed (N/A)
  • Checked RELEASING.md for behavior change requirements
  • Traced the bash 3.2 compatibility removal through require_bash4(), self_pid() and the script's exit on failure
  • Verified the empty pid file logic in lock_take_stale() against the test cases

- lock_orphan <dir> <pid> holds the keep-or-remove rule for a renamed
  lock that could not go back. lock_take_stale calls it. Tests call
  it directly.
- The age rule is "60 s or older" in both places (waiter and orphan).
- SKILL.md examples use $OFFLOAD_RULES_DIR.

Refs #1436

Signed-off-by: DAVID AMID <[email protected]>
Assisted-By: Claude Opus 5.5
@amiddavid

Copy link
Copy Markdown
Collaborator Author

Fixed in the new commit. The keep-or-remove rule is now lock_orphan <dir> <pid>, and lock_take_stale calls it. Tests call it directly: young+empty kept, old+empty removed, dead pid removed, live pid kept. I removed the empty-pid rule in a scratch edit: test (h) failed. I reverted the edit.

@amiddavid

Copy link
Copy Markdown
Collaborator Author

Fixed: both places now use "60 s or older" (-ge). A test at exactly age 60 fails with -gt in a scratch edit (reverted).

@amiddavid

Copy link
Copy Markdown
Collaborator Author

Done: the PR body now starts with the behavior-change note, approved by the owner.

@amiddavid

Copy link
Copy Markdown
Collaborator Author

Done: the SKILL.md examples now use ${OFFLOAD_RULES_DIR:-/tmp}. The comment about the 60 s claim now says a kept orphan blocks nobody.

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 1 (bob, user of @amiddavid) IBM Bob Shell 1.0.3 offload-review skill, @amiddavid's session resumed 1 of 2 2 of 2 c78aeb4be87c approve

Verdict: approve

Findings

None. Both findings from round 1 are fixed.

Status of round 1 findings

My findings (bob reviewer 1, round 1)

  1. PR description — Undocumented breaking change: FIXED

    • The PR body now starts with: "Behavior change, approved by the owner: offload-review.sh now needs bash 4 or newer..."
    • The comment at 2026-11-26T11:24:36Z confirms the owner approved it
    • Verified: the behavior change is documented and approved
  2. scripts/offload-review/lib.sh:59-62 — Empty pid file logic may leave stale locks: FIXED

    • Line 34 now uses if [ "$age" -ge 60 ] (was -gt 60)
    • Line 67 in lock_orphan() uses elif [ "$(lock_age "$1")" -ge 60 ]
    • Both places now use "60 s or older" consistently
    • Test at line 138 verifies a lock at exactly 60s is removed: touch -t "$(date -v-60S ..." then lock_orphan "$d/o4" ""
    • Verified: the age check is correct and tested

Other reviewers' findings (glm reviewer 1 and 2, round 1)

Both glm reviewers raised the same core finding: the put-back test did not run the new code. The author fixed it by:

  1. Extracting lock_orphan() helper (lines 62-71 of lib.sh):

    • Takes <dir> <pid> as parameters
    • Removes dir when pid is dead (line 64)
    • Removes dir when pid is empty and dir is 60s or older (line 65-66)
    • Keeps dir otherwise (live pid, or empty pid younger than 60s)
    • lock_take_stale calls it at line 58 when the put-back fails
  2. Testing lock_orphan() directly (lines 127-139 of offload-review_test.sh):

    • Young empty-pid: kept (line 128-129)
    • Old empty-pid: removed (line 130-131)
    • Dead pid: removed (line 132-133)
    • Live pid: kept (line 134-136)
    • Exactly 60s old: removed (line 138-139)

The test now exercises the actual code path. I verified by tracing each test case against the lock_orphan() implementation.

Non-blocking

  • The SKILL.md examples now use ${OFFLOAD_RULES_DIR:-/tmp} (lines 101 and 154), addressing the non-blocking comment from glm reviewer 2.
  • The commit message follows conventions: conventional title, Signed-off-by, Assisted-By, and Refs #1436.

What I checked

  • Last review: round 1, 6220748, 2026-11-26T11:21:37Z
  • New commits read: 1 commit (c78aeb4 "fix(review): test the empty-pid put-back rule through lock_orphan")
  • Read in full: 4 reviews, 5 comments, 0 inline comments (from the three files)
  • New items since my last review:
    • Comment at 11:24:33Z: confirms lock_orphan() extraction and test coverage
    • Comment at 11:24:34Z: confirms both age checks now use -ge 60
    • Comment at 11:24:36Z: confirms PR body updated with behavior change note
    • Comment at 11:24:38Z: confirms SKILL.md examples updated
  • Verified the new commit's diff line by line:
    • lib.sh lines 24, 34, 58, 62-71: age check fixed, lock_orphan() added
    • offload-review_test.sh lines 127-139: direct tests of lock_orphan()
    • SKILL.md lines 101, 154: examples now use ${OFFLOAD_RULES_DIR:-/tmp}
  • Traced each test case in lines 127-139 against lock_orphan() implementation to verify coverage
  • Checked that the PR body starts with the behavior change note and owner approval
  • Verified no new host boundary violations, client rules, or data-dependence changes (still scripts only)
  • Confirmed the "Local tests: waived (owner rule)" line is in the comments (2026-11-26T11:12:07Z)

@amiddavid amiddavid left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer Kind Started by Context Review Round Head Verdict
Reviewer 2 (glm, user of @amiddavid) GLM rits/zai-org/glm-5-3 via Claude Code 2.1.332 offload-review skill, @amiddavid's session resumed 2 of 2 2 of 2 c78aeb4be87c approve

Verdict: approve

The new commit fixes my round-1 finding the right way. The keep-or-remove rule is now a
helper the tests can reach, and every case the rule names has a real test. I found no new
defect.

Earlier findings

  • My finding 1 (the put-back test does not run the new code): fixed. lock_orphan <dir> <pid> (lib.sh:65-72) holds the rule, lock_take_stale calls it on a failed put-back
    (lib.sh:58), and the tests call it directly. I traced each new test against the code:
    young + empty pid kept, old + empty pid removed, dead pid removed, live pid kept, and the
    exact age-60 boundary removed. Each one fails if the rule is inverted or dropped. The
    author also verified this by scratch-editing the rule out and seeing test (h) fail.
  • Reviewer 1, finding 1 (same defect): fixed, agree. Same proof as above.
  • Reviewer 1, non-blocking (the comment claimed a kept lock "stays until it is 60 s old",
    but nothing re-checks it): fixed. The lock_orphan comment says a kept one blocks
    nobody and makes no 60 s claim.
  • Reviewer 1's and my non-blocking (SKILL.md examples hardcoded /tmp): fixed. Both
    examples now use ${OFFLOAD_RULES_DIR:-/tmp} (SKILL.md:101, 154).
  • Reviewer 1 (bob), finding 1 (the bash 4 gate is a behavior change that needs a note and
    the owner's yes): fixed. The PR body now starts with the note, and it names the owner's
    approval. The note also states the old behavior correctly: bash 3.2 ran before, with a
    weaker lock.
  • Reviewer 1 (bob), finding 2 (-gt 60 keeps an age-60 orphan): fixed. Both the waiter
    and lock_orphan use -ge 60 now, the comments say "60 s or older" in both places, and a
    test pins the boundary: touch -t <now minus 60 s> then remove. I checked the arithmetic:
    the mtime is 60 s before the touch, and lock_orphan runs after the touch, so the age is
    always 60 or more. The test is deterministic.
  • My non-blocking (the "Local tests: waived (owner rule)" line was not in the PR body):
    resolved. It is on the PR as a comment from 2026-11-26T11:12:07Z.

Findings

None.

Non-blocking

  • scripts/offload-review_test.sh — the put-back path of lock_take_stale now has no test.
    The deleted vacuous test was the only one that ran the else branch (lib.sh:56-59): a
    mismatched pid goes back to $lockdir. That branch is unchanged, pre-existing code, so
    this does not block. One assertion would restore the coverage: create a lock with a live
    pid, call lock_take_stale "999999", then check the lock is back at $lockdir with the
    same pid. The waiter's own age boundary (exactly 60 s in lock(), lib.sh:34) is also
    untested, while lock_orphan's is. The same scratch-edit method would cover both.

What I checked

  • Last review: round 1, 6220748, 2026-11-26T11:20:40Z
  • New commits read: 1 (c78aeb4 "fix(review): test the empty-pid put-back rule through
    lock_orphan")
  • Read in full: 3 reviews, 5 comments, 0 inline comments (from the three files)
  • New items since my last review, and what I did about each:
    • Reviewer 1's round-1 review (glm, 11:18): same finding as mine, plus two non-blocking
      notes. Checked each against the fix commit; all fixed.
    • Reviewer 1's round-1 review (bob, 11:21): two findings. Checked both; both fixed.
    • Author comments at 11:24: four replies, one per finding. Verified each claim against the
      code and the PR body, not only the reply text.
    • Author comment at 11:12 ("Local tests: waived (owner rule)"): resolves my round-1 note.
  • The full diff of the new commit (3 files) and the final lib.sh, offload-review_test.sh
    and SKILL.md around each change. The diff from base to HEAD is the two commits together;
    nothing else moved.
  • lock_orphan by hand: dead pid removes, live pid keeps, empty pid removes at 60 s or
    older and keeps below, stat failure reads as age 0 and keeps, return 0 protects
    set -e callers.
  • The lock_take_stale wiring: mv ... || lock_orphan "$gone" "$now" is the same logic as
    the round-1 code, one line shorter.
  • The -gt to -ge change: traced both places and the new boundary test for determinism
    (see above). No test relied on the old boundary.
  • The new tests for pid fixtures: the dead pid is a reaped background subshell, the live pid
    is a sleep 30; both are sound.
  • The PR body: starts with the behavior-change note and the owner's approval, and the
    "What changed" list matches the final code.
  • Repo rules: still scripts and docs only. No data-dependence row, no host package, no
    client rule. The new commit has a conventional title, Signed-off-by and Assisted-By.
  • No tests were run (live tests not approved).

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

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant