Skip to content

tests-macos: the pty driver's 60s bound is the same 60s as acquire_lock, so a quiet lane_pick child is SIGKILLed and reported as a wrong exit code #107

Closed

Description

@brettheap

Lane: openRepoTools-3 (openRepoTools-3)

tests-macos is the only red job on opensoft/openRepoTools#83, and what it reports is not a wrong answer: it is the suite's own pty driver killing a child that had gone quiet. Filed rather than guessed at, under the ruling of 2026-09-16 that darwin is no longer a per-push gate.

What is seen

tests/test_lane_helpers.sh, run 35043370287 at 024fd41 — 2719 passed, 3 failed, 7 skipped, and the three are one case:

FAIL answering `f` where next-free is MISSING refuses with the contract's 2
       expected [2], got [137]
FAIL …saying the workstation predates the addendum rather than that a read broke
       expected to contain [predates lane-collision-protocol Amendment 18]; got: f
FAIL …and naming the one act that fixes it
       expected to contain [openRepoTools --install]; got: f

137 is 128 + 9. Nothing in lane exits 137 and nothing sends that signal but the suite itself: pty-run.py (tests/test_lane_helpers.sh:8509) does

ready, _, _ = select.select([fd], [], [], 60)
if not ready:
    os.kill(pid, 9)

so the child wrote NOTHING to the terminal for sixty seconds and was killed. got: f is the whole of what the terminal saw — the line discipline's echo of the answer the driver wrote in, and not one character from lane.

Why the transcript is empty, and why that is the clue

lane prints nothing at all until the listing is rendered. Every read in front of it is inside a command substitution: lane:294 (workstation), lane:364/:381 (lanes), lane:409 (lane-groups), lane:1296 (next-free). A read that blocks before the listing therefore produces EXACTLY this signature — the echo, silence, the kill — and a read that is merely slow produces it too. The failure says where the child was, not what it answered.

It is not this case, and not this commit

  • It moves. Run 34990787448 (e369a6e2) killed the case one block earlier — answering `f` where the position read FAILED refuses with 1, expected [1], got [137], the nfbroke fixture at :8770. Runs 35016562276 (7ac8e7c7), 35019896892 (6950eaa2) and 35043370287 (024fd41) killed the nfold fixture at :9353.
  • The two fixtures are the same shape — a wrapper that refuses next-free and execs the real helper for everything else, differing only in the code it refuses with (2 against 6). On run 35043370287 the nfbroke case is ok and the nfold case is the 137, in one run, on one host.
  • The tree flipped green to red across a DOCS-ONLY commit. f13b585 — tests-macos success, run 35042399593. 024fd41 — tests-macos failure, run 35043370287. Between them: git diff --stat f13b585..024fd41 is docs/README-lanes.md | 9 ++++++++-, and nothing else. No code, no test, no fixture.

So it is not a darwin defect in the code under test. It is a sixty-second bound being crossed, by a different case each time.

The two readings, and neither should be chosen without measuring

  1. The driver's bound is the same number as the thing under test. lanes-edit.sh:942-965 waits up to 60s for $LANES_DIR/.lanes-edit.lock and then refuses with its own words and exit 4 ("could not acquire … after 60s"). The driver's select timeout is also 60. Any run that reaches that wait is killed at the instant the helper was about to say so, and a refusal that would have been readable arrives as expected [2], got [137]. (acquire_lock is taken by writers only — set-row-state, replace-in-row, append-session-id, append-line, add-row, commit — so a lane READ path reaching it would itself be the finding.)
  2. Darwin is simply slower, and one lane invocation crosses 60s. One lane forks the 10k-line helper four times before it prints anything. On run 35043370287 tests-macos ran 01:15:42Z→02:13:39Z (58 min) against tests 01:15:38Z→01:42:07Z (26 min) for the same suite.

What would settle it

  • Give pty-run.py a bound that is not the bound of the thing it is driving, and make a timeout report as a timeout — "the child wrote nothing for Ns and was killed" — with the partial transcript printed. A case that cannot tell a hung child from a wrong answer costs a reader an hour every time it fires.
  • Then measure one lane invocation on the darwin runner. If it is seconds, reading 1 is the answer and the lock wait wants a bound of its own; if it is tens of seconds, the bound is the answer and the number is the fix.
  • Either way the suite keeps its property: no lane_pick case may report a SIGKILL as though it were the command's own exit code.

Not blocking #83

tests, tests-no-submodule and tests-windows are green at 024fd41 and the same three were green at f13b585 with 2737 passed, 0 failed. Amendment 18's own cases — repoBind-*, the guard's window disjunct, the binding identity — are among them on every one of those runs.

🤖 Generated with Claude Code

Activity

  1. brettheap commented on Sep 16, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-16T13:00:45Z, for #107

    Logged in lanes/log/openRepoTools-3.md at 6a7725d1148b808880455ab76875a4b14020026b.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#107:
       none
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#107"`, kept where the row or its body names `#107`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoTools` branches naming `107` as a whole token:
       none
    
  2. brettheap commented on Sep 16, 2026

    @brettheap
    ContributorAuthor

    CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-16T13:03:52Z, for #107

    Logged in lanes/log/openRepoTools-3.md at b70c5adfb87a217efbc792ba4f36eeeb3d71e263.

    The three reads (lane-collision-protocol Rule 1):

    1. existing `CLAIMED —` comments on opensoft/openRepoTools#107:
    6:CLAIMED — lane openRepoTools-3, session 4135b2c9-34a6-47e3-a156-5adebb632fae@Eagle, 2026-09-16T13:00:45Z, for opensoft/openRepoTools#107
    13:1. existing `CLAIMED —` comments on opensoft/openRepoTools#107:
    2. `gh pr list --repo opensoft/openRepoTools --state all --search "#107"`, kept where the row or its body names `#107`:
       none
    3. `git ls-remote --heads [email protected]:opensoft/openRepoTools` branches naming `107` as a whole token:
       none
    
  3. brettheap commented on Sep 16, 2026

    @brettheap
    ContributorAuthor

    Reading 2 measured, and on Linux — so this is not a darwin defect at all, it is the harness's bound against a slow read.

    2026-09-16T13:2xZ, this Eagle workstation, load average 19 (three lane worktrees running tests/test_lane_helpers.sh at once). A lane_pick child, caught mid-flight:

     566572   00:48  python3 /tmp/tmp.c30bpyUOaU/pty-run.py f env -C …/home/projects/repoPick
                       …/bin/lane --dry-run --dir …/home/projects/repoPick
     566610   00:48  bash …/bin/lane --dry-run --dir …/home/projects/repoPick
     566873   00:48  bash …/bin/lanes-edit.sh lanes --dir … --prefix repoPick --repo opensoft/repoPick
     567044   00:33  bash …/bin/lanes-edit.sh lanes --dir … --prefix repoPick --repo opensoft/repoPick
    

    Forty-eight seconds, with nothing on the terminal, and the process tree says exactly where: lane:364/:381, ROWS_OUT="$(LANES_NO_FETCH=1 "$LANES_EDIT" lanes "$@")" — a command substitution, which is why the transcript stays empty and why the failure's got: is the echoed answer and nothing else. Twelve more seconds and pty-run.py would have sent the 9 and the suite would have printed expected [2], got [137], which is precisely the darwin line.

    Three things follow.

    1. It is not acquire_lock. Reading 1 in the issue body is out: the child was in the lanes READ the whole time, and acquire_lock is taken by writers only. The 60s coincidence is a coincidence.
    2. It is not darwin. That sandbox is not even this lane's — …/bin/lanes-edit.sh in it carries neither the round-9 comment nor its correction, so it belongs to one of the sibling worktrees running the same suite from another branch. Same harness, same case, same silence, on Linux. Darwin is simply where the margin runs out first, which is also why the failing case MOVES between runs.
    3. The fix is the harness's, and it is small. Give pty-run.py a bound that is not the bound of anything it drives, and make a timeout report as a timeout — "the child wrote nothing for Ns and was killed" — with the partial transcript printed. A case that reports a SIGKILL as though it were the command's own exit code costs a reader an hour every time it fires, and this issue is that hour.

    A second, cheaper half is available if anyone wants the margin back rather than just the diagnosis: lane prints nothing until the listing because all four of its reads are command substitutions, so any one of them going slow spends the whole budget invisibly. Nothing about that is wrong, but it is why the symptom has no diagnosis in it.

    🤖 Generated with Claude Code

  4. brettheap commented on Sep 16, 2026

    @brettheap
    ContributorAuthor

    Fifth run, fourth distinct case, same 137. tests-macos on 0433c399 (run 35100278258) — 2720 passed, 5 failed, 7 skipped, and the five are one lane_pick:

    FAIL answering with the number of an AVAILABLE lane exits 0
           expected [0], got [137]
    FAIL …which offers the new-lane answer with the position filled in
    FAIL …having asked exactly one question
    FAIL …cd-ing there first (Evidence 3)
    FAIL …and the launch goes through the LAUNCHER, in the lane's own directory and profile
    

    That is tests/test_lane_helpers.sh:8707, lane_pick 1 — not either of the f cases that were killed on the four runs before it, and this one is not even a refusal path: it is the ordinary answer, the one that launches. The roster of cases this has now killed is lane_pick f with nfbroke (34990787448), lane_pick f with nfold (35016562276, 35019896892, 35043370287) and lane_pick 1 (35100278258). Nothing they share is in lane; what they share is the driver's sixty seconds and a child that prints nothing until its four reads are done.

    The same commit's tests, tests-no-submodule and tests-windows are green, and bash tests/test_lane_helpers.sh on the same tree here ran to 2740 passed, 0 failed, 0 skipped, 0 pending.

    🤖 Generated with Claude Code

  5. brettheap commented on Oct 3, 2026

    @brettheap
    ContributorAuthor

    Measured on 2026-10-03 by lane openRepoTools-3's #61 finisher, with the pty driver's 60 s bound raised locally so the calls could finish:

    Consequence tonight: the class is no longer macOS-only. #61's ready-label run (37124906535) went red on BOTH Linux jobs on a slow runner (62 min for the job against 33–36 min on the green runs of the same head 3de40b1): 14 pick cases, every one got [137]. The re-run of the failed jobs is the remedy until the bound and the per-call cost are fixed. The landing gate's macOS reds on #119, #83 (suite timeout) and #93 tonight were this class as well.

    Lane: openRepoTools-3

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions