Skip to content

bug(test): locks-cli.integration.test.ts:201 flake — signal-other takeover returns null status #633

Closed

Description

@admarble

Problem

`src/commands/tests/locks-cli.integration.test.ts:201` — `sequant locks acquire --force --signal-other --skip-pid-check` (skill takeover) — fails intermittently in CI with:

```
AssertionError: expected null to be +0 // Object.is equality

  • Expected: 0
  • Received: null

❯ src/commands/tests/locks-cli.integration.test.ts:201:27
201| expect(result.status).toBe(0);
```

The assertion is on `result.status` from a `spawnSync` of `dist/bin/cli.js`. `status === null` indicates the child was terminated by a signal (rather than exiting with an exit code), so the CLI process was killed mid-execution.

Frequency

Observed on PR #630 (issue #605): first build matrix run failed on both Node 20.x AND 22.x; re-run of the same commit passed cleanly on both. So roughly 1/2 attempts on a single push — high enough to bite future PRs.

Verbatim CI evidence

The diff under test was completely unrelated to the locks subsystem (it touched bin/cli.ts, run-orchestrator.ts, github.ts/test, run-command.md, merger skill mirrors), so the trigger is not in the test's own input — it's environmental.

Why this matters

This is the only `--signal-other` test in the suite. The CLI under test calls `process.kill(9999, 'SIGTERM')` (per `--signal-other --force` with a long-dead PID 9999). The test expects the CLI to:

  1. SIGTERM PID 9999 → ESRCH (no such process)
  2. Print `Could not signal PID 9999 for feat(#74): implement graceful shutdown for sequant run #77`
  3. Continue and successfully claim the lock with exit code 0

When the CLI returns `status === null`, the CLI process itself died — most likely from a signal it propagated to its own group, or from vitest worker cleanup interrupting the spawn boundary.

Reproduction notes

Suggested investigation directions

(For the assignee — do not implement blind.)

  1. Process-group leak: verify the CLI's signal-other implementation doesn't accidentally signal its own group (e.g. `kill(-pid, 'SIGTERM')` with a negative pid that could match itself). `process.kill` with a positive PID is safe; with a negative PID it signals the group.
  2. `spawnSync` env passthrough: `runCli` spreads `process.env` and adds `SEQUANT_ORCHESTRATOR: ""`. Empty-string env vars are still set on POSIX — verify this doesn't trip the orchestrator no-op path partially (e.g. detecting set-but-empty).
  3. Vitest worker isolation: if vitest's worker pool runs this in parallel with another test that touches the same lock dir or PID space, signal-other could race. The test does isolate via `mkdtempSync` per-test, so this is less likely but worth confirming concurrency settings.
  4. Per `feedback_flaky_test_fixes.md`: eliminate the non-determinism, do NOT widen tolerances (don't retry, don't loosen the `expect(status).toBe(0)` to `.not.toBeNull()`).

Severity

Low — re-run passes cleanly. Filed because it caused an unnecessary CI roundtrip on #630 and will keep biting future PRs until fixed.

References

Activity

  1. added
    bug
    on May 13, 2026
  2. admarble commented on May 13, 2026

    @admarble
    ContributorAuthor

    → PROCEED — Flake fix; spec must convert investigation directions into concrete ACs

    Workflow: spec → exec → qa
    Command: npx sequant run 633 -q

    No explicit - [ ] checkbox ACs — the body provides a concrete failure signature (status === null at test:201) and four investigation directions. /spec is responsible for choosing a hypothesis and producing testable ACs. Per feedback_flaky_test_fixes.md: fix must eliminate non-determinism, NOT widen tolerances (do not loosen expect(status).toBe(0)). -q recommended because flaky-test fixes routinely need a second pass to confirm determinism.

  3. admarble commented on May 13, 2026

    @admarble
    ContributorAuthor

    Plan (/spec 633)

    Complexity: Standard (5 ACs, 1 directory)

    AC Quality Check

    Issue body has no - [ ] checkbox ACs — /spec synthesizes them from the four investigation directions per the /assess comment. ACs below are written to be measurable (specific assertions preserved, file paths named, repeat-count threshold for non-determinism).


    Scope Assessment

    Non-Goals: No explicit Non-Goals section. Implied: do NOT loosen the expect(result.status).toBe(0) assertion or any other existing assertion in the test (per feedback_flaky_test_fixes.md).

    Metric Value Status
    Feature count 1 (flake fix) ✅
    AC items 5 ✅
    Directory spread 1 (src/commands/__tests__/) — src/lib/locks/ only if optional defensive guard adopted ✅

    Verdict: ✅ SCOPE_OK


    Root-Cause Hypothesis

    Reading signalOther (src/lib/locks/lock-manager.ts:287) and defaultIsPidAlive (src/lib/locks/lock-manager.ts:95), the CLI under test does:

    1. forceAcquire(77, ..., { skipPidCheck: true }) — succeeds, returns previous = { pid: 9999, hostname: os.hostname(), ... }.
    2. signalOther(previous):
      • holder.hostname === this.hostname → continues (same host).
      • isPidAlive(9999) calls process.kill(9999, 0).
      • If PID 9999 happens to be alive on the CI runner (a sibling vitest worker, the vitest main process, or any other CI infrastructure process), isPidAlive returns true.
      • process.kill(9999, "SIGTERM") is then sent to that real process.
    3. If the SIGTERM victim is an ancestor of the spawned CLI (vitest main/worker), its death tears down the stdout pipe → CLI dies with SIGPIPE during the next console.log → result.status === null.

    PID 9999 is well within the live-PID range on a Linux CI VM after a few minutes of process churn (Linux default pid_max is 32768 or 4194304; PIDs are assigned sequentially). The issue body's investigation direction #1 ("process-group leak") is close in spirit but the wrong mechanism — it's not negative-PID group signaling, it's a hard-coded "I assume this PID is dead" assumption that holds locally but breaks under CI process pressure.

    This also explains the other observations cleanly:

    • Why the diff didn't matter (feat(#605): --stacked flag — chain-mode PR base to predecessor branch #630 touched unrelated code) — the trigger is environmental (which PIDs are alive on the CI runner), not in the test's inputs.
    • Why re-runs pass — PID 9999's liveness varies per VM boot / job startup; re-runs get a different process landscape.
    • Why both Node 20.x and 22.x failed on the first try — both matrix jobs share the same runner image / scheduling pressure, so PID 9999 liveness correlates across them.

    The investigation directions #2 (orchestrator env passthrough) and #3 (vitest worker isolation) don't survive inspection: Boolean("") === false so the orchestrator no-op is not triggered, and mkdtempSync per-test means lock-dir collisions can't happen.


    Acceptance Criteria

    AC-1: Test fixture no longer relies on a hardcoded PID being dead

    Verification: Integration Test
    Scenario: Given the flaky test at src/commands/__tests__/locks-cli.integration.test.ts:177-212 → When the test fixture is rewritten to remove the pid: 9999 assumption → Then signalOther does not invoke process.kill on any potentially-live PID, and result.status === null cannot occur.
    Assumptions: The chosen approach (cross-host hostname OR spawn-and-wait PID) reliably hits a code path that returns false from signalOther without ever calling process.kill on a real PID.

    AC-2: --signal-other CLI flag wiring is still exercised

    Verification: Integration Test
    Scenario: Given the modified test → When the CLI is invoked with --force --signal-other → Then stdout matches /Could not signal PID \d+ for #77/ (the exact PID number may change with the fix; the assertion uses a regex or matches against the new fixture's PID literal).
    Assumptions: The test asserts on the message format, not on whether process.kill succeeded.

    AC-3: Existing assertions remain intact — no widening of tolerances

    Verification: Integration Test
    Scenario: Given the modified test → Then expect(result.status).toBe(0) is preserved verbatim (per feedback_flaky_test_fixes.md); expect(result.stdout).toContain("✓ Acquired lock for #77 (forced)") is preserved; expect(after.command).toBe("/fullsolve 77 (takeover)") is preserved; expect(after.pid).not.toBe(<fixture pid>) is updated only if the fixture PID changes.
    Assumptions: None of .toBe(0) → .not.toBeNull(), retry wrappers, or --repeat flags are introduced as a workaround.

    AC-4: Determinism is demonstrated under repeat execution

    Verification: Integration Test
    Scenario: Given the fixed test → When run 20 times locally (npx vitest run src/commands/__tests__/locks-cli.integration.test.ts -t "skill takeover" --repeat 20 or equivalent loop) and in CI (the implementer's PR triggers ≥1 CI run) → Then 20/20 local runs pass and CI is green without retry.
    Assumptions: Local reproduction is hard (the issue body confirms this), so the determinism evidence is primarily the architectural guarantee that process.kill is no longer invoked on a guessed PID, plus a clean CI pass on the fix PR.

    AC-5: Root cause is documented in code

    Verification: Manual Test (code review)
    Scenario: Given the fix → When a reviewer reads the test file → Then a comment (≤4 lines) above the modified fixture explains why the previous PID 9999 approach was brittle and which signalOther branch the new fixture exercises, so a future maintainer doesn't regress it.
    Assumptions: The comment is concise and points at the hostname/spawn-and-wait choice, not a generic "flaky test fix" tag.


    Implementation Plan

    Phase 1: Decide approach (no code yet)

    The exec phase should pick ONE of these. Recommendation: Option A.

    Option Mechanism Pros Cons
    A (recommended) Set hostname: "definitely-not-this-host" in the pre-written 77.lock. signalOther short-circuits on the cross-host check (lock-manager.ts:289) and returns false without touching isPidAlive or process.kill. 1-line fixture change. Fully deterministic. CLI emits the cross-host branch of the "Could not signal" message (...cross-host or already exited) — unchanged wording matches the existing regex assertion. The integration test now exercises the cross-host branch instead of the same-host-dead-PID branch. The same-host-dead-PID branch has unit coverage at src/lib/locks/lock-manager.test.ts:294 already, so no coverage gap.
    B Spawn a real node -e "process.exit(0)" subprocess, await child.on("exit"), capture its PID, use that PID in the fixture. Preserves original same-host semantics. Theoretical race: OS can recycle the captured PID between exit and process.kill(0). Smaller chance on a quiet box but not zero — still a flake source. More test code.
    C (paired with A) Add `if (holder.pid === this.pid holder.pid === process.ppid) return false;toLockManager.signalOther` as defense-in-depth.

    Phase 2: Apply Option A

    1. Edit src/commands/__tests__/locks-cli.integration.test.ts:181-190 — change hostname: require("os").hostname() to hostname: "definitely-not-this-host". Add a 2-3 line explanatory comment.
    2. Adjust the stdout assertion at line 204 if needed — verify the current regex /Could not signal PID 9999 for #77/ still matches; the CLI message is "Could not signal PID 9999 for #77 (cross-host or already exited)" (src/commands/locks.ts:189), so the existing regex passes.

    Phase 3: Apply the same hostname-cross-host pattern to the sibling test (sibling-site scan)

    1. The neighboring test at src/commands/__tests__/locks-cli.integration.test.ts:214-238 ("--force without --signal-other does NOT print the signal line") also writes pid: 9999 with hostname: require("os").hostname() at line 218. It is not currently flaky (the test does not pass --signal-other, so signalOther is never invoked). But applying the same defensive pattern keeps the file internally consistent and protects against future test edits that add --signal-other. Lightweight win — do it in the same PR.

    Phase 4: Verify

    1. npm run build && npx vitest run src/commands/__tests__/locks-cli.integration.test.ts — green.
    2. Repeat-loop locally: for i in {1..20}; do npx vitest run src/commands/__tests__/locks-cli.integration.test.ts -t "skill takeover" || break; done — 20/20 green.
    3. Push and confirm CI green on first attempt.

    Optional follow-up issue (not in scope here)

    File a separate issue to add Option C (defense-in-depth self-PID guard in signalOther) if the team wants to harden the production code. Marked optional because it doesn't change behavior for any valid input — only narrows the failure mode if a future caller passes the manager's own PID.


    Sibling-Site Scan

    pid: 9999 appears at:

    • src/commands/__tests__/locks-cli.integration.test.ts:184 — the flaky test (in scope).
    • src/commands/__tests__/locks-cli.integration.test.ts:218 — sibling without --signal-other (not flaky, but covered in Phase 3 above for consistency).
    • src/lib/locks/lock-manager.test.ts (22 occurrences) — safe: all of these unit tests construct LockManager with the isPidAlive constructor seam, so they never invoke the real process.kill. Out of scope.

    Design Review

    1. Where does this logic belong? The fix belongs in the test file. The CLI's signalOther behavior is correct given its inputs — the bug is the test feeding it inputs that were never guaranteed to be safe. (Optional Option C would belong in LockManager.signalOther as defense-in-depth.)
    2. What existing pattern does this follow? The cross-host hostname pattern matches how lock-manager.test.ts:322 already tests the cross-host branch of signalOther. The integration test gets to exercise the same branch via the actual CLI binary.
    3. What would a senior reviewer challenge? "You changed the test's semantics from 'same-host dead PID' to 'cross-host' — are you losing coverage?" Answer: no, the same-host-dead-PID branch is covered by the unit test at lock-manager.test.ts:294 (which stubs process.kill cleanly). The integration test's job is to prove the CLI's --signal-other flag is wired through to signalOther and that the negative-result message is printed — both branches of signalOther print the same message via src/commands/locks.ts:189, so either branch satisfies the integration intent.

    Open Questions

    1. Adopt Option C (self-PID guard in signalOther)? — Recommendation: file as a separate follow-up, not in this PR. Impact if skipped: a future caller could regress and the guard would have caught it; low-probability path.

    Recommended Workflow

    Phases: spec → exec → qa
    Quality Loop: enabled (per the /assess comment; flake fixes routinely need a second pass)
    Reasoning: No new feature, no UI, no new unit/integration test stubs needed — the fix IS the test. Skip testgen. Standard exec → qa is sufficient. Quality loop catches the case where the first fix overshoots (e.g., weakens an assertion or breaks the sibling test).


    Label Review

    Current: bug
    Recommended: keep bug. No flake/test-flake/ci labels exist in this repo.
    Quality Loop: Auto-enables via the /assess directive (quality-loop=true).

  4. added
    planned
    on May 13, 2026
  5. admarble commented on May 13, 2026

    @admarble
    ContributorAuthor

    --- DRAFT GITHUB ISSUE COMMENT (PROGRESS UPDATE) ---

    /exec 633 — Implementation Complete

    Approach: Option A from the spec — sentinel cross-host hostname so signalOther short-circuits before process.kill is ever invoked. Phase 3 also applied to the sibling fixture for consistency.

    AC Coverage

    AC Description Status
    AC-1 Test fixture no longer relies on hardcoded PID being dead ✅ Implemented
    AC-2 --signal-other CLI flag wiring still exercised ✅ Implemented
    AC-3 Existing assertions remain intact (no widening) ✅ Implemented
    AC-4 Determinism under repeat execution ✅ Implemented (20/20 local)
    AC-5 Root cause documented in code ✅ Implemented

    Files Changed

    • src/commands/__tests__/locks-cli.integration.test.ts — +12 / -3
      • Replaced hostname: require("os").hostname() with hostname: "definitely-not-this-host" in both --signal-other and sibling --force fixtures.
      • Added an explanatory comment (6 lines) above the modified fixture explaining the previous brittleness and which signalOther branch the new fixture exercises.

    Checks

    Check Result
    npm run build ✅ Clean
    npm run lint ✅ Clean (0 errors, 0 warnings)
    npx vitest run src/commands/__tests__/locks-cli.integration.test.ts ✅ 13/13 pass
    npx vitest run src/lib/locks src/commands/__tests__/locks-cli.integration.test.ts ✅ 59/59 pass
    Repeat loop (--repeat 20) of takeover test ✅ 20/20 pass
    CI on first push ⏳ Pending verification

    Test Coverage Analysis

    The changed file IS a test file. The coverage shift (same-host-dead-PID → cross-host) is intentional and called out in the spec:

    Branch Previous Coverage New Coverage
    Cross-host short-circuit unit: lock-manager.test.ts:322 unit + integration (this test)
    Same-host-dead-PID unit: lock-manager.test.ts:294 + integration (flaky) unit only (still covered)

    No coverage gap — the same-host-dead-PID branch retains clean unit coverage via the isPidAlive constructor seam, which avoids the brittle real-PID assumption.

    Pre-PR Confidence Check

    • Weakest part: AC-4 evidence is primarily architectural ("process.kill is no longer called on a guessed PID"), not empirical CI proof. Local repeats can't fully reproduce CI process-group pressure. CI on this PR's first push will provide the final signal.
    • Coverage gaps: None introduced. The integration test moved from one signalOther branch to another; both branches print the same CLI message. The unmoved branch (same-host-dead-PID) retains unit-test coverage at lock-manager.test.ts:294.

    Quality Plan Alignment

    Quality Plan Alignment: N/A — no Feature Quality Planning section in the /spec comment for this issue (flake fixes don't go through /testgen).

    PR Status

    ✅ Created: #634

    Next Steps

  6. admarble commented on May 13, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #633 (Simple Fix)

    Size Gate

    Check Value
    Diff size 15 lines (threshold: 100)
    package.json changed No
    Security-sensitive paths No
    Decision Inline checks

    AC Coverage

    AC Description Status Notes
    AC-1 Test fixture no longer relies on hardcoded PID being dead MET hostname: "definitely-not-this-host" makes signalOther short-circuit on the cross-host check at lock-manager.ts:289 before isPidAlive / process.kill are touched. No surviving os.hostname() call on the fixture path (only inside the explanatory comment).
    AC-2 --signal-other CLI flag wiring still exercised MET Test still passes --signal-other at locks-cli.integration.test.ts:205. signalOther is invoked; cross-host branch returns false; CLI emits Could not signal PID 9999 for #77 (cross-host or already exited) at locks.ts:189, which matches the existing /Could not signal PID 9999 for #77/ regex.
    AC-3 Existing assertions remain intact — no widening MET expect(result.status).toBe(0) preserved verbatim at line 208. toContain("✓ Acquired lock for #77 (forced)"), the toMatch regex, after.pid).not.toBe(9999), command).toBe(...), skipPidCheck).toBe(true) all preserved. No toBeNull, --repeat, or retry patterns introduced.
    AC-4 Determinism under repeat execution PENDING Local 20/20 confirmed by exec phase + 13/13 in my own re-run. CI build matrix (Node 20.x and 22.x) is still IN_PROGRESS at QA time — that's the final empirical signal called out in the spec.
    AC-5 Root cause documented in code MET 6-line comment at lines 181–187 explains the previous brittleness, points at lock-manager.ts:289, and names the specific signalOther branch the new fixture exercises. Within the ≤4 lines spec target if we count only the explanatory body, slightly over with the visual separator — acceptable.

    Coverage: 4/5 AC items fully met; AC-4 pending CI completion.


    Quality Metrics

    Metric Value Status
    Type issues (any) 0 OK
    Deleted tests 0 OK
    Files changed 1 OK
    Lines added +12 -
    Lines deleted -3 -
    Security patterns 0 OK

    CI Status

    Check State Bucket Impact
    typecheck SUCCESS pass MET
    validate-skills SUCCESS pass MET
    validate-plugin SUCCESS pass MET
    build (20.x) IN_PROGRESS pending PENDING
    build (22.x) IN_PROGRESS pending PENDING

    CI Summary: 3 passed, 2 pending, 0 failed
    CI-related AC items: AC-4 ("CI green without retry") → PENDING (build matrix in progress)

    The diff is a .ts test file, not markdown-only — the build matrix is gating, no relaxation applies.


    Code Review

    Strengths:

    • Root-cause hypothesis in spec (signalOther invoking process.kill on a PID that's actually alive on the CI runner) is mechanically correct and traced through lock-manager.ts:287–297.
    • Cross-host branch fix is the smallest possible change that eliminates the non-determinism — no production-code change, no widened assertion, no retry. Aligns with feedback_flaky_test_fixes.md.
    • CLI message at locks.ts:189 deliberately prints the same wording for both signalOther false-branches, so the existing regex assertion still passes — no coverage gap surfacing as a brittle assertion.
    • The unmoved branch (same-host-dead-PID) retains unit coverage at lock-manager.test.ts:294 via the isPidAlive constructor seam, which is the right place for that branch anyway.
    • Sibling fixture at line 221 got the same sentinel-hostname treatment as a defensive measure, even though it doesn't pass --signal-other today — protects against a future edit that adds the flag.
    • Inline comment names the file + line of the branch being exercised, which is the kind of "why" comment that survives refactors.

    Issues:

    • None blocking.

    Suggestions:

    • The literal "definitely-not-this-host" is fine, but if you wanted to be defensive against a future where some real machine happens to be named that, a UUID-suffixed sentinel ("sequant-test-host-${randomUUID()}") would be guaranteed-unique. Not worth changing for this PR; flag for follow-up only if you ever see this string elsewhere in the codebase.

    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    src/commands/__tests__/locks-cli.integration.test.ts Standard (test file IS the change) Self —

    Coverage: N/A — the changed file is itself the test. Coverage shift (same-host-dead-PID → cross-host integration branch) is intentional and called out in the spec; the same-host-dead-PID branch retains unit coverage at lock-manager.test.ts:294.


    Anti-Pattern Detection

    No anti-patterns surfaced — pure fixture / comment change.


    Risk Assessment

    • Likely failure mode: AC-4 fails if CI is still flaky for an unrelated reason (e.g. a different test in the suite has its own PID-pressure assumption). The root-cause analysis only covers this specific test. If the next CI push is red, it's a different bug.
    • Not tested: Empirical CI proof is in-flight at QA time. Locally, the architectural guarantee (process.kill is no longer invoked on a guessed PID) is airtight, but CI is the verification AC-4 actually requires.
    • Sibling sites considered: Spec scanned pid: 9999 across the repo — lock-manager.test.ts (22 occurrences) is safe because those unit tests use the isPidAlive constructor seam and never call real process.kill. No cross-file siblings need fixing.
    • Sibling-line audit: The neighboring test at locks-cli.integration.test.ts:221 (no --signal-other) was preemptively given the same sentinel hostname, even though it's not currently flaky. This is the right intra-file move — keeps the fixture pattern consistent and future-proofs against an edit that adds --signal-other to that test.

    Verdict: NEEDS_VERIFICATION

    AC-1, AC-2, AC-3, and AC-5 are fully MET on code review. AC-4's empirical half (CI green without retry) is still in flight — both build (20.x) and build (22.x) are IN_PROGRESS. The architectural guarantee that resolves the flake is in place and locally verified (13/13 on this run, 20/20 per exec), so the expected outcome is READY_FOR_MERGE once CI completes — but per spec AC-4 wording (CI is green without retry), I'm not marking READY until those checks actually finish green.

    Documentation

    • N/A — Bug fix in a test file. No user-facing surface, no README/CHANGELOG entry needed (commits prefixed fix(#633): per conventional commits, but the change isn't user-facing).

    Next Steps

    1. Wait for build (20.x) and build (22.x) to complete on PR fix(#633): eliminate locks-cli takeover test flake via cross-host sentinel #634.
    2. If both green on first attempt → merge (verdict promotes to READY_FOR_MERGE on re-QA).
    3. If either fails → investigate; the fix should make the flake impossible, so a red CI here is a separate bug, not a retry trigger.
    4. Optional follow-up (spec called out): file a separate issue for Option C — a defense-in-depth self-PID / parent-PID guard in LockManager.signalOther. Not required for this PR.
  7. admarble commented on May 13, 2026

    @admarble
    ContributorAuthor

    QA Re-Review for Issue #633 — Verdict Promoted

    Diff and HEAD (1307f04058f5e264979339f90bc0b950f8933931) unchanged from the prior QA at the same SHA. Re-running because AC-4's external gate (CI build matrix) has now resolved. Code review, AC-1/2/3/5 evaluation, risk assessment, and sibling-site scan from the prior comment all still apply verbatim.

    CI Status (updated)

    Check State Bucket Impact
    typecheck SUCCESS pass MET
    validate-skills SUCCESS pass MET
    validate-plugin SUCCESS pass MET
    build (20.x) SUCCESS pass MET
    build (22.x) SUCCESS pass MET

    CI Summary: 5 passed, 0 pending, 0 failed — green on first attempt after the fix, which is exactly the empirical signal AC-4 was waiting on.

    AC Coverage (delta only)

    AC Prior Status Updated Status Notes
    AC-4 PENDING MET Build matrix green on first push; 20/20 local + 13/13 in-QA local re-run already in evidence. The architectural guarantee (process.kill no longer invoked on a guessed PID via the cross-host short-circuit at lock-manager.ts:289) is now backed by clean CI.

    AC-1, AC-2, AC-3, AC-5 remain MET (unchanged).

    Coverage: 5/5 AC items fully met.

    Verdict: READY_FOR_MERGE

    The prior NEEDS_VERIFICATION verdict was strictly waiting on the build matrix. Both Node 20.x and 22.x are now green on first attempt, satisfying AC-4's CI is green without retry clause. No code, scope, or risk changes since the prior QA.

    Next Steps

    1. Merge PR fix(#633): eliminate locks-cli takeover test flake via cross-host sentinel #634.
    2. Optional follow-up (spec-called-out): file a separate issue for Option C — defense-in-depth self-PID / parent-PID guard in LockManager.signalOther. Not required for this PR; flagged so it isn't lost.
  8. added
    ready-for-review
    on May 13, 2026
  9. added a commit that references this issue on May 13, 2026
  10. admarble commented on May 13, 2026

    @admarble
    ContributorAuthor

    Gap fixes follow-up

    Adversarial re-read after the READY_FOR_MERGE verdict surfaced four gaps. Fixed on PR #634 + #637:

    # Gap Resolution
    1 Test title "...for dead PID" no longer matched what the test exercises (cross-host branch). Renamed to "...for cross-host holder" in 94efc9e.
    2 Assertion regex /Could not signal PID 9999 for #77/ was loose enough that a future refactor inverting the false-branch (printing the "Signaled..." line) would still pass. Tightened to anchor on the full (cross-host or already exited) suffix in 94efc9e. Documented the residual CLI-message-level limitation (the same suffix is printed for both signalOther false-branches) in the explanatory comment.
    3 AC-4 evidence framing — one CI run isn't strong determinism proof (original flake rate was 1/2). No code action — the spec's AC-4 already hedged ("architectural guarantee... plus a clean CI pass"), and the QA comment honored that hedge. Acknowledged here for the record.
    4 Option C (production-code self-PID guard in signalOther) not filed. Filed as #637.

    CI on the new commit will re-validate. Verdict still READY_FOR_MERGE for #634 once green.

  11. added a commit that references this issue on May 13, 2026
  12. added a commit that references this issue on May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplannedready-for-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions