Skip to content

tests-macos becomes a landing gate on the ready label plus nightly on main; Copilot capped at two rounds; CI is the suite of record — Brett Heap's three rulings of 2026-09-16 - #119

Merged
brettheap merged 3 commits into
mainfrom
chore/macos-landing-gate-and-cycle-rules
Oct 3, 2026
Merged

brettheap merged 3 commits into
mainfrom
chore/macos-landing-gate-and-cycle-rules

Conversation

@brettheap

@brettheap brettheap commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

The rulings

Brett Heap, 2026-09-16 ~12:55Z, verbatim "do all three" on the coordinator's
proposals; measured: tests-macos 49-54 min per push vs Linux 17-22; PRs
6-12 Copilot rounds; local suite queues up to 1h20:

THE RULINGS (Brett Heap, 2026-09-16 ~12:55Z, verbatim "do all three", on
the coordinator's proposals; measured: tests-macos 49-54 min per push vs
Linux 17-22; PRs 6-12 Copilot rounds; local suite queues up to 1h20): (1)
tests-macos leaves the per-push gate: on pull_request the workflow
runs tests, tests-no-submodule and tests-windows only; tests-macos
runs (a) on pull_request ONLY when the PR carries the label ready
(the coordinator applies it once before the squash — the landing gate),
(b) on push to main, (c) nightly on main (schedule), (d) on
workflow_dispatch; a red nightly/main macOS is a follow-up issue, not a
revert. (2) Copilot review is capped at TWO rounds per PR: rounds 1-2 are
taken; every finding after that is filed as an issue and the PR lands.
(3) CI is the suite of record: a writer runs the shell-suite section they
touched locally (bash tests/test_lane_helpers.sh in full is fine when
the box is quiet); the full local tests/run.sh behind the workstation
lock is no longer required before a push — CI's tests job is the
footer of record. tests/run.sh stays as the way to run the whole suite
locally when wanted.

What changed

.github/workflows/tests.yml:

  • on: gains push: branches: [main] and schedule: - cron: '17 4 * * *'
    (04:17 UTC nightly), keeps workflow_dispatch, and pull_request gains
    types: [opened, synchronize, reopened, labeled] so applying the ready
    label to an already-open PR itself fires the workflow.
  • tests-macos gets if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ready') — true for
    push/schedule/workflow_dispatch unconditionally, and true for
    pull_request only once ready is on the PR.
  • The /bin/bash -n syntax parse splits out of tests-macos into a new
    parse-macos job that runs on every pull_request push and every push
    to main, gated on nothing, no submodule, no Python — just the checkout
    and the parse, meant to answer in well under a minute. It has to stay on
    macos-latest: the parse's whole value is catching bash-4-only grammar
    that macOS's stock bash 3.2 rejects and Linux's bash 5 accepts, so
    running it in the Linux tests job would enforce nothing.
  • tests, tests-no-submodule and tests-windows are unchanged — no new
    if:, still run on every pull_request (now including a labeled
    event, since the whole workflow shares one on: block — see the code
    comment on it).
  • Created the ready label on this repository
    (landing gate: runs tests-macos once before the squash, #0E8A16).

AGENTS.md ("Testing your changes to this repository"): replaces the
sentence that made the full local tests/run.sh run the standard with the
three rulings above, dated and attributed, ahead of the unchanged
lock/wrapper mechanics and the unchanged macOS-bash-3.2 paragraph.

docs/README-lanes.md: not touched. Its "landing" sections are all Rule 6
LANDING/LANDED register bookkeeping for the lane-collision-protocol,
an unrelated meaning of the word — and it never mentions Copilot — so
there is no existing section for a ready-label/two-round-cap paragraph
to join.

tests/test_repo_hygiene.py: raises the AGENTS.md line-count hygiene
cap from 265 to 292 and adds the dated docstring entry that test's own
ritual requires, naming the rule the new lines bought.

Copilot review (capped at two rounds per the ruling above)

Rounds 1 and 2 both landed real findings and both are taken here:

  • Fixed — the workflow's header comment claimed every checkout takes
    submodules: true; parse-macos checks out submodules: false on
    purpose, so the comment now says so.
  • Fixed — AGENTS.md said parse-macos runs "on every push"; the
    push: trigger is branches: [main] only, so the sentence now names
    the two triggers that actually fire it (pull_request, and push to
    main) instead of overclaiming.
  • Filed as a follow-up issue, not fixed here — round 2's point that a
    skipped tests-macos satisfies a required GitHub status check, so
    branch protection alone won't enforce the ready label if tests-macos
    is ever made a required check. That's a branch-protection design
    decision (an always-running aggregator job, vs. the coordinator manually
    confirming green after labeling, which is what the ruling's own wording
    describes) beyond this PR's brief: Landing gate: a skipped tests-macos satisfies a required status check, so branch protection alone will not enforce the ready label #125.
  • Not changed — gating tests/tests-no-submodule/tests-windows to
    the label, or splitting parse-macos into a separate workflow with an
    unrestricted push: so it also covers a feature branch with no open PR.
    Both are deliberate: the brief asked for exactly the shared on: block
    and the three-rulings design above (documented in-line in the workflow's
    own comments), and reworking it on a review nit is what the two-round
    cap in ruling (2) exists to stop.

No third round was requested, and one landed anyway (this repository
auto-runs Copilot review on every push) — four small, individually-correct
precision nits (a missing static test for the gate's own trigger logic, and
three places where a comment or AGENTS.md line is one job-name short of
matching this PR's own diff). Per the ruling they're filed rather than
chased with a fourth commit: #126.

Validation

  • actionlint .github/workflows/tests.yml — clean.
  • python3 -c 'import yaml,sys; yaml.safe_load(open(".github/workflows/tests.yml"))' — parses.
  • bash -n on every shipped bash file (openRepoTools, park, resume,
    status, lane, lanes, lane-handoff, lanes-edit.sh, lane-start,
    lane-end, link-estates, tests/test_lane_helpers.sh, tests/run.sh)
    — all parse; none of them changed in this PR.
  • python3 -m pytest tests/test_repo_hygiene.py -q — 144 passed.
  • This PR's own tests-macos will not run unless it is labeled
    ready — that is the change working as designed, not a gap.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EaHzfTLW4u9ukpWuw8Dt6r

…y; Copilot capped at two rounds; CI is the suite of record

Brett Heap's RULING of 2026-09-16, "do all three", on the coordinator's
three proposals — measured: `tests-macos` running 49-54 minutes per push
against Linux's 17-22, pull requests drawing 6-12 Copilot review rounds,
and the local suite queuing up to 1h20 behind the workstation lock.

1. `tests-macos` leaves the per-push `pull_request` gate. It now runs on
   `pull_request` only once the coordinator has put the `ready` label on
   the PR (the landing gate, applied once before the squash), and
   unconditionally on `push` to main, nightly at 04:17 UTC, and on
   `workflow_dispatch`. `tests`, `tests-no-submodule` and `tests-windows`
   are unchanged and still run on every `pull_request`. The bash-3.2
   `/bin/bash -n` parse — the one piece of the old job whose value is
   specific to macOS's stock bash 3.2, since Linux's bash 5 accepts the
   bash-4-only grammar it exists to catch — splits into its own
   `parse-macos` job so it keeps running on every push, gated on nothing.
2. Copilot review is capped at two rounds per pull request; a finding
   after round two is filed as an issue rather than blocking the PR.
3. CI's `tests` job (`ubuntu-latest`) is the suite of record. A writer
   runs the shell-suite section they touched locally; the full local
   `tests/run.sh` behind the workstation lock is no longer required
   before a push.

Also creates the `ready` label (opensoft/openRepoTools) that the new
`tests-macos` gate reads.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EaHzfTLW4u9ukpWuw8Dt6r
Copilot AI lite review requested due to automatic review settings September 16, 2026 13:05

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 12 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR removes the expensive full macOS suite from the per-push gate while preserving macOS Bash 3.2 syntax coverage on every run, adds ready-label/main/nightly execution paths for the full suite, and documents the two-round Copilot and CI-as-record policies.

Flow diagram for macOS test execution triggers

flowchart TD
    PR[pull_request] --> Core[tests, tests-no-submodule, tests-windows]
    PR --> Parse[parse-macos<br/>Bash 3.2 syntax parse]
    PR --> Ready{ready label present?}
    Ready -->|yes| Mac[tests-macos]
    Ready -->|no| Skip[skip full macOS suite]
    Main[push to main] --> Mac
    Nightly[schedule 04:17 UTC] --> Mac
    Manual[workflow_dispatch] --> Mac
Loading

File-Level Changes

Change Details Files
Reworked macOS CI into a conditional landing gate plus always-on lightweight syntax validation.
  • Added main push, nightly, and manual workflow triggers, and enabled label-triggered pull request runs.
  • Gated the full macOS suite on the ready label for pull requests while retaining unconditional main, nightly, and manual runs.
  • Extracted Bash 3.2 syntax checks into an independent, fast macOS job that runs on every workflow trigger without submodules or Python.
  • Created the repository ready label for the landing gate.
.github/workflows/tests.yml
Updated contributor guidance to establish the new testing and review operating rules.
  • Documented the ready-label macOS landing gate and the separate always-on parse-macos check.
  • Specified a two-round Copilot review cap and issue filing for later findings.
  • Made CI the required suite of record while retaining tests/run.sh as an optional serialized full local run.
AGENTS.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved workflow-scope issues and an AGENTS.md hygiene test failure block approval.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR makes macOS testing a ready-label landing gate, adds scheduled/main coverage, and updates testing guidance.

Changes:

  • Adds workflow triggers and a lightweight macOS Bash parser.
  • Updates AGENTS.md with CI and review policies.
  • Keeps the full macOS suite outside ordinary PR runs.
File summaries
File Summary and findings
AGENTS.md Documents revised testing guidance. Critical: exceeds the repository’s line-count limit (1 vote). Nit: omits parse-macos from the PR check description (2 votes).
.github/workflows/tests.yml Adds triggers and separates macOS parsing. Moderate: parser does not run on all feature-branch pushes (1 vote); non-PR triggers also run the existing full suite (1 vote). Nit: checkout invariant incorrectly describes submodule behavior (1 vote).
Review details

Suppressed comments (3)

.github/workflows/tests.yml:211

  • This checkout now uses submodules: false, which makes the file-level claim at lines 7–12 that every checkout uses submodules: true inaccurate. Please update that invariant to exempt parse-macos; otherwise a later workflow edit could mistakenly restore submodule materialization and defeat this parse-only job's purpose.
          submodules: false

.github/workflows/tests.yml:42

  • These workflow-level triggers also schedule the existing tests, tests-no-submodule, and tests-windows jobs (none has a job-level if:), not just tests-macos. A main push or nightly run therefore launches the full Ubuntu/Windows suite as well; if the new cadence is meant to add only macOS coverage outside PRs, gate the other jobs to pull_request or split the macOS workflow so the expensive work is not broadened unintentionally.
  push:
    branches: [main]
  schedule:
    - cron: '17 4 * * *'          # 04:17 UTC, nightly

.github/workflows/tests.yml:40

  • push is restricted to main, so this workflow is never dispatched for ordinary feature-branch pushes. As a result, the new parse-macos job does not run “on every push” as promised in the PR description and AGENTS.md; it only runs for the other configured events and main pushes. Use an unrestricted push trigger and gate tests-macos to main separately (or put the parser in a workflow with an unrestricted push trigger).
    branches: [main]
  • Files reviewed: 2/2 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread AGENTS.md Resolved
Comment thread AGENTS.md Resolved
…tual

tests-windows on this branch's first push failed
test_repo_hygiene.py::test_agents_md_is_short_enough_to_be_read: the
previous commit's rewrite of the "Testing your changes" section (Brett
Heap's three rulings of 2026-09-16, replacing the sentence that made
tests/run.sh the standard) grew AGENTS.md from 265 to 291 lines, past
that test's cap.

The test's own docstring gives the exit for exactly this: "the exit is
to raise it and say here, in a dated entry in this docstring, which
RULE the new lines bought — never for prose." This adds that entry
(265 -> 291 on 2026-09-16, for the three rulings, with the measured
numbers and what each of the 26 lines buys) and raises the assertion
to 291. Confirmed locally: `python3 -m pytest tests/test_repo_hygiene.py -q`
— 144 passed.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EaHzfTLW4u9ukpWuw8Dt6r
Copilot AI review requested due to automatic review settings September 16, 2026 13:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Unresolved workflow trigger and gating issues remain, along with documentation corrections.

Review details

Suppressed comments (5)

.github/workflows/tests.yml:38

  • Because this is a workflow-level pull_request trigger, every job now starts for every label, not only ready; tests-macos is skipped only when the PR lacks ready. Thus an unrelated label causes the three full Linux/Windows jobs to run, and on a PR that already has ready it also starts the 49–54 minute macOS suite. That makes label automation repeatedly consume the long CI jobs. Gate the non-Mac jobs and require github.event.label.name == 'ready' for the label-triggered macOS run (or split the ready gate into its own workflow).
    types: [opened, synchronize, reopened, labeled]

.github/workflows/tests.yml:211

  • This new checkout sets submodules: false, but the workflow header still says that every checkout takes submodules: true (lines 7-12). That leaves the workflow's documented invariant false; please narrow the header to the suite jobs or explicitly exempt parse-macos.
          submodules: false

.github/workflows/tests.yml:260

  • When ready is absent, this job is skipped. GitHub treats skipped jobs as successful for required-check evaluation, so making tests-macos a required status will not actually prevent a PR from merging without a macOS run. Please add an always-running gate/aggregator that fails until the labeled macOS result exists, or enforce the label outside branch protection.
    if: >-
      github.event_name != 'pull_request' ||
      contains(github.event.pull_request.labels.*.name, 'ready')

.github/workflows/tests.yml:40

  • The only push trigger is restricted to main, so parse-macos is not scheduled for pushes to feature branches (or any non-main ref) unless they also have a pull request that emits synchronize. This does not provide the every-push Bash 3.2 gate described by the job comment and AGENTS.md; please move this parser to a separate workflow with an unrestricted push trigger, or broaden this workflow and add the corresponding guards to the other jobs.
    branches: [main]

AGENTS.md:228

  • This guidance says the parser runs on every push, but the workflow's push trigger only matches main. As written, a contributor pushing a standalone feature branch will not receive the promised macOS Bash 3.2 parse; please align this sentence with the corrected trigger behavior.
   or main `tests-macos` is a follow-up issue, never a revert. `parse-macos`
   is the one piece of the old per-push job that never left: it runs the
   bash-3.2 parse below on every push, gated on nothing, because that parse
   is worthless on Linux's bash 5.
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

…ment and the parse-macos push wording

Round 1 flagged that the top-of-file "EVERY CHECKOUT TAKES
submodules: true" comment went stale the moment parse-macos checked
out with submodules: false; round 2 flagged that AGENTS.md's "runs
... on every push" for parse-macos overstates a `push:` trigger that
is `branches: [main]` only. Both are precise, cheap, and correct, so
they are taken now rather than filed:

- tests.yml's header comment now scopes the submodules:true invariant
  to jobs that run the suite and names parse-macos as the exception.
- AGENTS.md now says parse-macos runs on `pull_request` and on push
  to main — the same two triggers as the three jobs beside it —
  instead of the unqualified "every push".

Everything else in both rounds (gating tests/tests-no-submodule/
tests-windows to the label, splitting parse-macos into its own
unrestricted-push workflow, and the required-status-check "skipped
counts as passed" semantics for how the ready label actually gets
enforced) is a design question beyond this PR's brief or a decision
for Brett/the coordinator, not a defect in what was asked for; the
last of those is filed as a follow-up issue. Per Brett Heap's ruling,
Copilot's two rounds on this PR are now taken and no further round is
being requested.

AGENTS.md's line-count hygiene cap moves from 291 to 292 for the one
extra line the wording fix adds, with the docstring entry updated in
place rather than given a second dated paragraph for the same rule.
Confirmed locally: `python3 -m pytest tests/test_repo_hygiene.py -q`
— 144 passed; `actionlint .github/workflows/tests.yml` — clean.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EaHzfTLW4u9ukpWuw8Dt6r
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Unresolved workflow and documentation findings must be addressed before approval.

Review details

Suppressed comments (5)

Previously missed (1) — in code that hasn't changed since the last review.

.github/workflows/tests.yml:46

  • These workflow-level triggers apply to every job, so adding push, schedule, and workflow_dispatch makes the unchanged tests, tests-no-submodule, tests-windows, and parse-macos jobs run on main pushes, nightly runs, and manual dispatches too. The stated design gives those extra entry points to tests-macos; this also adds the long Linux/Windows suite to every nightly/main run. Add event guards to the other jobs or split the macOS triggers into a separate workflow.

.github/workflows/tests.yml:263

  • The new landing-gate behavior is central to this change, but the existing hygiene test only verifies the /bin/bash -n file list; it does not assert the labeled trigger or that tests-macos is skipped without ready and runs with it. A typo in either the event list or this expression could therefore silently remove the landing check while the suite stays green. Add a static workflow assertion covering the trigger and both label cases.
    if: >-
      github.event_name != 'pull_request' ||
      contains(github.event.pull_request.labels.*.name, 'ready')

.github/workflows/tests.yml:30

  • This comment says push and nightly are the two non-PR homes, but workflow_dispatch is also configured at lines 42-46 and the job's condition explicitly runs for it. Please include workflow_dispatch here so the workflow documentation does not omit one of the supported execution paths.
# (main only) and the nightly `schedule` are `tests-macos`'s other two homes
# now that it has left the per-push gate — see the comment on that job

.github/workflows/tests.yml:10

  • The new exception list omits tests-no-submodule, whose checkout at lines 106-109 explicitly uses submodules: false. As written, the “every checkout ... takes submodules: true” invariant is false and conflicts with the following paragraph; name both exceptions here.
# EVERY CHECKOUT THAT RUNS THE SUITE TAKES `submodules: true`, `parse-macos`
# excepted: it runs no pytest, reads no estate fixture, and checks out
# `submodules: false` on purpose, so it is not one more job the claim below
# has to be quietly true of. The estate tests read eight of openRepoShape's

AGENTS.md:222

  • This says the pull-request workflow runs only the three suite jobs, but parse-macos also runs on every pull-request event under the new trigger list. Please include parse-macos in this list so the contributor guidance matches the workflow.
1. **`TESTS-MACOS` LEAVES THE PER-PUSH GATE.** On `pull_request`
   (`.github/workflows/tests.yml`) this workflow runs `tests`,
   `tests-no-submodule` and `tests-windows` only; `tests-macos` itself runs
   there only once the coordinator has put the `ready` label on the PR — the
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap brettheap added the ready landing gate: runs tests-macos once before the squash label Oct 2, 2026
@brettheap
brettheap merged commit 92bd21f into main Oct 3, 2026
17 of 19 checks passed
@brettheap
brettheap deleted the chore/macos-landing-gate-and-cycle-rules branch October 3, 2026 00:53
brettheap added a commit that referenced this pull request Oct 3, 2026
…e-listing

#119 moved tests-macos to the `ready` label, capped Copilot at two rounds
and made CI the suite of record, buying 27 lines of AGENTS.md; this branch
had bought 11 for the one-line `awk -v` rule. The one conflict is the
AGENTS.md cap in tests/test_repo_hygiene.py: both histories are kept and
the cap is the merged file's count, 303 = 265 + 11 + 27, which is the rule
the 224 entry of that docstring states and the 259 entry applied the last
time two sides met there.

Lane: openRepoTools-3
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Oct 3, 2026
…rwin crossed 3600

tests-macos on this PR has failed the same way twice, and not in #107's
class (the pty driver's 60 s SIGKILL, read as exit 137): the wrapper's own
bound killed the whole shell suite —
`subprocess.TimeoutExpired: … timed out after 3600 seconds` — at 08dad90
(`1 failed, 680 passed in 3961.39s`) and at 968ab5e (`1 failed, 693
passed in 3927.56s`), so neither run says which assertion was in flight.
Amendment 19 adds ~220 cases, and main at 69bf48d was already within
minutes of the bound (3741.66 s for the whole job's pytest). Since #119
`tests-macos` is the landing gate on the `ready` label, a bound the suite
cannot finish inside is a gate nothing passes and nobody can read.

This is the third raise for the same reason (900 -> 2400 -> 3600), dated
and measured beside the other two. The liveness fixture moves with it,
4200 -> 6000, because the pair is asserted: the wrapper refuses a sleep
that does not outlive its own timeout. The honest fix is still the
suite's duration, #77.

Lane: openRepoTools-3
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Oct 3, 2026
…Copilot capped at two rounds, CI the suite of record) into the #64 branch

Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 3, 2026
…#131 #133 #135 #136): one cap conflict, settled at the count of what merged

One textual conflict, the AGENTS.md line cap in
tests/test_repo_hygiene.py: this branch raised 265 to 278 for Amendment
18's ONE BINDING rule, and #119 raised the same 265 to 292 for the
cycle's three rulings. AGENTS.md itself auto-merged to 305 lines,
265 + 13 + 27, with both paragraphs whole and #135's profile-only guard
sentence beside them. So the cap is 305, with a dated MEET AT entry in
the form the 224 entry's rule asks for, rather than either side's
number.

Everything else auto-merged and was read for meaning, not just for
markers. #135 hoists the global-flag parse in lanes-edit.sh above the
path probes and exits 0 for `guard` under exact CLAUDE_NO_LANE=1; this
branch's guard clauses (d) and (e) sit inside the guard, after that
exit, which is right because a profile-only session holds no binding.
Every positional read between the new and old parse sites is inside a
function. #129's lclaude-first launcher in `lane` is the one this
branch's elsewhere and available paths already call. #133's
stable_lane_row and #129's lclaude fakes are cases of their own and
touch none of this branch's.

Lane: openRepoTools-3
Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 3, 2026
…retires a repository's dormant rows on a word, and a retired position is never reissued (#93)

* Nineteen lines for five lanes: a closed or dormant lane leaves the listing, one sweep retires a repository's dormant rows on a word, and a retired position is never reissued (Amendment 19)

`lanes` inside the openxFactory checkout on 2026-09-14 listed NINETEEN rows for
five lanes: the five live under team-01b, and fourteen marked `NO LOG` — lanes
that ran between 2026-08-27 and 2026-09-02, before Amendment 7 gave every lane
an object log, and that no writer today can close, because `lane-end` wants a
live session or a log to write into and they have neither. They sat at the top
of every listing and the next free position was read past them. Brett Heap,
verbatim: "openxfactory has 19 lanes showing with command 'lanes'. we need tools
to clean them up" — and, of the three choices he was given, "Retire them in one
sweep", "Hide by default, --closed shows", "Amendment 19". Ratified
2026-09-14T13:46:16Z, verbatim "ratify 19".

(a) TWO STATES BELOW PARKED. CLOSED is a lane whose object log's last lane-kind
line is `ENDED` or `RETIRED`. DORMANT is a row with NO object log and no live
session on this workstation — asked of the facts table the listing already
builds, not of the filesystem, so it costs nothing. One row with no log is NOT
dormant: one whose state cell is Amendment 13(a)'s phrase naming a state other
than ENDED, RETIRED or the migration's MIGRATED. The register says where a lane
IS (13(a)), and hiding a row that says PAUSED would hide a lane a person can
still pick up.

(b) THE LISTING. `lanes` lists neither by default; `--closed` adds them — a
CLOSED lane with the closing line's verb and its time, a DORMANT row as `NO LOG`
with its start date, its state cell's head and FLAGS where that cell says the
work was unpushed, lost, a loss or owed, or still says LIVE. It combines with
`--all`, `--here` and the narrowing flags, and `--lane <name>` is never filtered:
its caller has named the lane, and an empty answer would read as "no such lane".
The row gains four columns at the end — class, started, the cell's head, the
flags — and both surfaces that split it by position were taught to read them.
THE NEXT FREE POSITION IS COMPUTED OVER EVERY ROW: `next-free` now unions the
rows on stdin with this checkout's register and the archive below, so a position
the listing hides still holds, and a retired `<repo>-<n>` is never reissued.
A LIVE lane's line now prints the ATTACH — `lane <name>`, the same word, under
its own label (Amendment 18 Addendum 1: a lane live here is attached to and
never started a second time). The column said `none` for the one row where the
act is "go to it".

(c) THE SWEEP. `lane-end --retire-dormant <repo> [--reason "<why>"] [--yes]` is
a DRY RUN that names every dormant row of that repository with its start, its
workstation and its cell's head, and FLAGS the ones above — so the person sees
what the sweep will close before it closes it; an agent's stdin is not a
terminal, so the word is `--yes` typed by a person. With `--yes` it is ONE
commit (`lanes-edit.sh retire-rows`, the lock held once, the scan inside it):
each lane's log is created with a single `RETIRED` line carrying the reason and
the row's own last words, and the row's state becomes
`RETIRED · <UTC> · <why>; was: <head>`. Clause (c) spells that cell
`RETIRED <UTC> · <why> · was: <head>`, which is four parts where 13(a)'s cell
has three and whose first word is a state no reader knows; the phrase written
here carries the same four facts through `row_state_check`, the gate
`set-row-state` uses. It refuses a lane a live session holds here, a row whose
log carries a lane-kind line other than ENDED/RETIRED (a parked lane is not
dormant), a repository with no dormant row (nothing to do is said, not done),
and a session-record read that failed — a read that failed is not "nothing is
live". Any one refuses the whole run before a byte is written, because one
commit is one decision. Nothing outside the register and the logs is touched.

(d) THE ARCHIVE, a second act on a second word: `lanes-edit.sh archive-rows
<repo> [--yes]` moves every RETIRED row of that repository into
`lanes/archive/LANES-retired.md` in one commit naming each lane. The archive is
written FIRST and the rows removed second — `delete_lines` proves N removed and
zero rewritten — so a refusal between them leaves a copy in the archive and the
register whole, never a row in neither. `register_lanes`, the register index and
the next-free reader all read the archive beside the register, which is the
amendment's own sentence.

The payload on a `RETIRED` line is this amendment's own: 7(b) gives that verb
none and A11 clause (c) keeps it that way, and 19(c) — later, ratified, spelled
out character by character — carries the row's last words into the log so that
nothing the row said is lost when the row stops saying it.

Tests: a seeded register of its own (a live lane, a parked one, an ended one,
three rows with no log, and a seventh whose 13(a) cell says PAUSED) — the
default lists two, `--closed` six, the dry run flags the `unpushed` cell and
writes nothing, `--yes` writes three logs and three cells in ONE commit whose
every path is under `lanes/`, a second `--yes` says nothing is dormant, a live
lane and a parked one are refused by the writer itself, the RETIRED line's
session field is the WRITER's uuid (7(b)), `archive-rows` moves the rows and the
position still skips them, and the wrapper prints the attach for a live lane.
Three existing cases are amended rather than worked around: the row's field
count, the pair that asserted an ENDED lane is still in the listing (19(b)
amends 11(j)), and the pick's fixture read, which now asks for `--closed` so
that the partition still has a closed row to drop.

Docs: the two states, the sweep and the archive in `docs/README-lanes.md`, plus
the `--retire` paragraph that still described Amendment 13(a)'s removed two-step
(Copilot round 4 on #82, suppressed comment `docs/README-lanes.md:463`).

Closes #42

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* The retired `append-row-status` names its replacements on a machine with no workspace too (#82, Copilot round 4)

It is out of the dispatcher's WRITER list and says of itself that it refuses
"before the workstation guard and before the register is even looked for" — but
the generic guard one case below caught it all the same. On a machine with no
configured workspace the caller got the WORKSPACE refusal (exit 1) instead of
the RETIREMENT refusal (exit 2) naming `set-row-state` and `log NOTED`, which
are the two acts that replace it. A compatibility refusal that only fires where
the register is already reachable is not one.

Taken from the suppressed comments of Copilot's last review on #82
(`lanes-edit.sh:7525`), which its writer was cut off before reading; the rest
are filed as issues of their own.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* `add-row` refuses a lane name the archive holds, so a retired position cannot be reissued by hand either (Amendment 19)

`next-free` counts the archive and never OFFERS a retired `<repo>-<n>`, but
nothing refused one that was typed: `archive-rows` moves a RETIRED row out of
`lanes/LANES.md`, and every duplicate test this writer makes reads the register
alone — so `lane-start <repo> 4` on an archived position would have appended a
second row for a lane whose object log already exists. That log is APPEND-ONLY:
the new lane would write its life into the old one's file, and every read of it
— who holds what, when it was claimed, which session paused it — would answer
for two lanes at once.

The archive is asked beside the register, the refusal names the file, the
spelling it found and that lane's log, and it stays a REFUSAL rather than a
resolution: `row_line` and `canon_lane` still read the register alone, because a
line number from the archive would rewrite the wrong file.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* A lane named twice in one sweep is a refusal, and the archive report drops a `--` sed will not need

Two small ones, both about acts that are ONE commit. `retire-rows repo19-4
repo19-4` would have appended the same `RETIRED` line to that lane's log twice,
inside a single commit, in a file that is append-only and that no later line can
correct — so a duplicate in the argument list is refused by name, compared on
the RESOLVED lane so that two spellings of one lane are one lane here as they
are everywhere else (Amendment 15).

And `archive-rows`'s dry run printed its names through `sed -n 's/^/  /p' --
<file>`; the `--` buys nothing there and this file is parsed and run under BSD
userland on the macOS job. One `awk` instead, which is how the rest of this file
indents a list.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* The pick's read case follows the amendment, and the archive's refusal of a reissued name is asserted

Two test changes. `lanes --prefix repoPick` no longer carries the CLOSED lane —
the pick hid it before the read did, and 19(b) takes it out of the read too —
so that case now asserts the absence and a new one asserts that `--closed` puts
it back with the line saying which verb closed it. What has not moved is the
POSITION, and the footer assertion beside it still proves that.

And the archive's half of "a retired `<repo>-<n>` is never reissued" is asserted
where it is enforced: `add-row` refuses a lane name the archive holds, naming
the archive and that lane's log, while the free position beside it is still
added.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* The sweep's `--reason` is refused as an argument, once, rather than as a cell half-way down the scan

It goes into every row the sweep rewrites, so a `|`, a second ` · ` or a newline
in it is a refusal of the ARGUMENT — named as one, with the words that are
wrong — instead of `row_state_check` dying on the first row with a message about
a cell the caller never wrote. Nothing had been written either way (every test
in that act is made before the first byte), but a refusal a person cannot act on
is a refusal that costs them the run twice.

The cap beside it is 180 where the cell's own line is 240, because the row's OWN
last words go in beside the reason and a reason that fills the cell leaves none
of them.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* The unknown-subcommand refusal names `retire-rows` and `archive-rows`, because it is where a person learns what this file answers to

`tests/test_repo_hygiene.py::test_the_unknown_subcommand_refusal_names_every_
subcommand_there_is` caught it on the Windows job, which is the one that runs
the static tests alone: the two new arms existed and worked, and a person who
mistyped either was told by omission that it does not exist. That is F-X16's own
defect — `fetch-age` was missing from the same list for the same reason — and
the test derives the list from the dispatcher's own arms precisely because a
restated list is the thing that drifts.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* A published archive this read could not render is not an empty archive

`archive_text` swallowed a failed `git show` and answered with nothing, which
for this file is not a small loss: its rows hold POSITIONS, and read as absent a
retired `<repo>-<n>` comes back on offer — the one thing Amendment 19(d) exists
to prevent. It now falls through to this checkout's own copy and says on stderr
that it did, which is `log_sync`'s own posture for a fetch that did not answer.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* An untracked log — or an untracked archive — is somebody's uncommitted work, and neither act may commit it

The finding `migrate-state-cells` took in round 2 of #82, in the two acts that
have its shape. A TRACKED file that is dirty is already refused for the whole
run by `refuse_dirty_checkout`, which exempts the register alone and reads
staged and unstaged alike; an UNTRACKED file is in neither of those lists, so
appending to it would put a peer's first lines into this act's one commit, under
this act's message.

For the sweep that is a lane's object log: a dormant row usually has none at
all, but a MIGRATED one has a log of NOTED lines, and that is the file this
meets. For the move it is the archive itself. Both are checked in the scan,
before a byte is written, and both name the commit that settles them.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* The untracked-log refusal is asserted where the sweep would have committed it

`repo19-6` — the row the `add-row` case leaves behind, dormant and with no log —
gets an uncommitted log beside it, and the sweep refuses by name rather than
carrying a peer's first lines into its own commit. Nothing is written and the
file is taken away again.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* The manual names the six other refusals and what the archive does when it cannot be read

The section listed clause (c)'s three refusals and stopped there, while the act
also refuses a checkout behind or dirty, a row whose separators hide the state
cell, a log needing Amendment 15's rename, an untracked log, a lane named twice
and a `--reason` that would forge a cell — and the archive half now says that a
published file it cannot render falls back rather than reading as empty, and
that `add-row` refuses a name the archive holds. A manual that lists some of the
refusals reads as a list of all of them.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* Copilot round 1 on #93: the liveness test reads both rows, the writer re-proves the listing's dormancy, the archive is read where it actually is, and a flag is never a value

Six takes, each with its own reason.

**A flag is not a value.** `lane-end --retire-dormant repo --reason --yes` took
`--yes` as the reason, fell back to the dry run and exited 0 — a malformed line
that RAN and did not do what it said. Refused now, in `lane-end`'s `--reason`
and in `retire-rows`'s `--reason` and `--writer`, with the `=` spelling named
for a reason that really begins with a dash.

**The LIVE test reads BOTH rows' session ids**, in the listing and in the
writer. The published cell is R19's source for everything else, but a lane whose
`append-session-id` has landed in this checkout and not yet been pushed carries
its current transcript in the local row alone — and `live_session_ids` can see
that very session running. Read from the published cell only, such a lane is not
LIVE, which under 19(a) makes it DORMANT: hidden, and offered to the sweep,
while somebody is working in it.

**The writer re-proves the row's own claim.** Amendment 13(a) makes the state
cell the lane's current state, and the listing does not hide a no-log row whose
cell is the phrase naming anything but `ENDED`/`RETIRED`/`MIGRATED`. The sweep
trusted `lane-end`'s filtered list for that half, so `retire-rows <lane>` by
hand could retire a row the listing calls parked — two surfaces disagreeing
about one answer, which is the defect clause (h) exists to prevent.

**`next-free` reads the PUBLISHED register and archive**, with this checkout's
as the fallback: reading only the local files missed a row that is on
`origin/<branch>` and not pulled here — hidden from the stdin rows by clause (b)
and absent from the union, so its position came back on offer. And a source that
EXISTS and cannot be read is now a refusal rather than an empty set, because a
position is handed out once and a read that failed is never an answer (7(d)).

**`add-row` asks both copies of the archive**: `archive_text` answers with the
published file wherever there is one, so a move committed here and not yet
pushed was invisible and its name came back on offer.

**`archive-rows` refuses a row of its repository that it cannot take apart**,
where it used to skip it silently: the act says it moves EVERY `RETIRED` row,
and a row whose separators hide the state cell may be one — moving the others
and saying nothing about that one reports a partial act as a whole one.

Declined, with the amendment's own words: making DORMANT depend on a log FILE
existing rather than on the log carrying a lane-kind line. The sweep's own
refusal is "a log that already carries a lane-kind line other than
ENDED/RETIRED", so the two must be the same test or they disagree; and
`migrate-state-cells` creates logs of `NOTED` lines, which under the file test
would take exactly the fourteen rows this amendment was written for out of the
sweep's reach, silently. The one already fixed in this branch is the
unknown-subcommand list, which now names both new verbs.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* The sweep's dry run holds its columns against the register's own free text

Measured on the live register, where the fourteen dormant rows of openxFactory
carry `started` cells like `2026-09-02 ~22:30Z; RESUMED 09-03 12:55Z and 19:27Z`
and workstation cells reading `<workstation? — owner fills>`: either pushes
every column after it out of line, in the one report a person reads to decide
whether to say the word. Both are cut to their width; the LANE is widened
instead of cut, because it is the name they act on. The cut is a bash expansion
and not printf's `%.Ns`, which counts BYTES and would tear the `≤` and `—` those
same cells carry.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* Copilot round 2 on #93: the pick drops a row by its class, the dry run previews the act it will run, and no read of the archive answers "empty" for "unreadable"

Nine takes.

**The pick was still reachable by a dormant row.** `lane_groups` filtered on the
STATE word, and a dormant row's state is `NO LOG`, which is in none of its
lists — so a row arriving from a read that does not hide it (`--closed`, or
`lane <name>`'s own `--lane` read, which is never filtered because its caller
named the lane) was grouped as available, and the word would have offered to
bind a lane whose last act was its last. It drops on column 13 now, which is the
read's own answer to exactly that question.

**The dry run must be a preview of the act it prints.** `--reason` was checked
only inside `retire_rows`, which `--yes` reaches and the dry run does not, so a
reason carrying a `|` printed a clean preview of a run that could not happen.
Checked in `lane-end` too, by the writer's own rules, before anything prints.
And the reason is forwarded as ONE argument — `--reason=<why>` — because split
in two, the documented spelling for a reason that BEGINS with a dash arrived at
the writer as a flag and was refused there by design.

**The liveness snapshot is taken inside the lock.** Read before `acquire_lock`,
a lane could go live behind it: `lane-start` appends its id to the row under
that same mutex, so the scan would read the new id and compare it against a
fence that predates it. And the lane-kind check reads THIS CHECKOUT's copy of
the log beside the published one, for the reason the session ids are read from
both rows: the `behind` guard refuses a checkout that is behind, one that is
AHEAD is legitimate, and there a `STARTED` that exists only here was invisible.

**No read of the archive answers "empty" for "unreadable."** `archive_text`
returns non-zero where the published file exists, will not render, and there is
no local copy to fall back to; `lane_position_rows` treats an empty answer from
a non-empty register as a failure; `add-row` refuses rather than missing a
retired name; and the listing — which may not refuse, because it sits in front
of a launch — SAYS that the archive could not be read and that the position will
be refused rather than guessed.

**`add-row` compares the POSITION and not only the name.** `lane_next_free`
reserves `repo-4` and `repo-4a` as one position — "a re-cut position is not
free" — so a name test alone let `repo-4a` through against a retired `repo-4`.

**An empty listing is not an empty register.** Since 19(b) a repository whose
every row is CLOSED or DORMANT lists nothing, and `lanes`'s empty branch offered
"next free position: 1" — a number a dormant row holds. The position is asked
for now (`next-free` reads the register and the archive itself, so it answers
over an empty listing), and the line says which of the two emptinesses it is.

Six cases added: the pick dropping on the class, the dormant-only repository's
footer, the reason refused before the preview, the `=` spelling surviving, and
the two from round 1's archive work.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* The manual says what an empty listing means now, and that the pick drops a row on its class

Two sentences for two things a person meets: a repository whose every row is
closed or dormant lists NOTHING, and the footer there says which emptiness it is
and offers the position it read rather than assuming 1; and a closed or dormant
row never reaches the numbered pick even when it is asked for by name, because
`lane <name>`'s read is deliberately unfiltered and `lane-groups` drops it on the
class rather than on the state word.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* The empty listing will not offer a position over a read that did not answer either

The branch I added for a repository whose rows are all hidden fell back to 1 whenever `next-free` failed — including the case that read refuses ON PURPOSE since round 2, a source it must count that could not be read. Offering 1 there hands out a position a retired row may hold, which is the one thing the amendment is for. The un-upgraded workstation (exit 2, no `next-free` at all) keeps the old answer of 1, because that is what this branch printed before the read existed.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* Copilot round 3 on #93: the sweep's flags belong to the sweep, the hidden rows are asked about rather than inferred, and no log read answers "no lane-kind line" for "could not be read"

Six takes, one already in this branch, one declined again.

**The sweep's own flags belong to the sweep.** They are parsed for every
invocation, so `lane-end <lane> --yes` ran the ORDINARY ending — a line that
reads like a confirmed sweep doing something else entirely — and `lane-end
<lane> --reason "<why>"` dropped the words on the floor. Both are refusals now,
each naming the act the word belongs to.

**Whether there are hidden rows is ASKED.** The empty branch used
`next-free != 1` as a proxy, which is wrong for the register holding ONE hidden
row at position 2 or later: there the lowest free position really is 1, and the
listing said "no lane of <repo> is recorded" about a repository that has one.
The `--closed` read answers it directly, on the path that has already found
nothing to show.

**No log read answers "it has no lane-kind line" for "it could not be read."**
`lane_log_events` ends in `git show … | parse_log_stream` and this file sets no
`pipefail`, so a `git show` that failed was masked by the parser exiting 0 over
empty input — and an unreadable log then read as the one answer that lets the
sweep through. The published object is proved readable by name first, and this
checkout's copy is read with the same posture instead of `|| :` (the untracked
guard does not catch a TRACKED file that will not open).

**`next-free` reads the published register even where the working tree has no
file**, which is `register_text`'s own rule; gated on the local file existing,
it skipped the published source entirely on a checkout that lacks it.

**A row is never classed DORMANT over a liveness read that failed**: dormant is
"no object log AND no live session here", and where the session records could
not be read the second half was never established. The class is left unset, so
the row stays LISTED and the sweep is never offered it — the listing already
says the read failed; this is what it does about it.

Already in this branch: the empty listing refusing to offer a position over a
failed `next-free` (`a8e56dd`). Declined again, with 19(c)'s own words: refusing
a lane whose log already ENDS. The clause refuses "a lane-kind line other than
`ENDED`/`RETIRED`", so a closed log passing is the amendment's text, and writing
a `RETIRED` line into a finished lane is Amendment 6(d)'s own act — what
`lane-end --retire` has always meant, in a file where a second closing line
loses nothing.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* One `log_path_ci` per lane in the sweep, not two

Round 3's readability probe resolved the published log path and the guard below it resolved the same path again — `log_path_ci` is an `ls-tree` of the whole log directory and this loop runs per lane, so that is a second read of the same tree for an answer already in hand.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* Copilot round 4 on #93: a log only this checkout has is still an object log, the archive is not exempt from the dirty guard, and two more reads stop answering "empty" for "failed"

Four takes and one decline.

**A log this checkout has and `origin` has not is still an object log.** The
facts pass reads the PUBLISHED logs (R19), so a log committed here and not yet
pushed is in no fact the listing has — while the sweep has read the local log
since round 3. The two would have disagreed about the amendment's own condition
on a checkout that is merely AHEAD. One `ls` of the log directory for the whole
listing, lower-cased and matched per lane, because a lane name is one name under
any case.

**The archive is no longer exempt from `refuse_dirty_checkout`.** It was,
because this act writes it — but `handle_preexisting` captures the REGISTER
alone, so a tracked edit somebody else left in the archive rode into this commit
under this act's message. Dropping the exemption also makes a half-done move
safe: if the append lands and the removal or the commit does not, the archive is
dirty and the next run refuses by name instead of appending the same rows twice.

**Two more reads stop answering "empty" for "failed".** `archive-rows` read the
register inside a here-document, where a failed `awk` is discarded and the act
reports "no row has the state RETIRED" about a file it never read; and
`lane-end --retire-dormant` counted zero dormant rows and announced that none
are dormant when the listing had just said this workstation's session records
could not be read — a reason it has not got, since DORMANT is "no object log AND
no live session here".

**Declined**, with the sibling act's precedent: staging the log appends and
replacing them atomically. Nothing is half-PUBLISHED — the commit is the only
thing that publishes, and every refusal is made in the scan — and a failure in
the writes themselves leaves the checkout dirty and the register unpublished,
which `git status` shows and `git checkout -- lanes` undoes whole, with the next
run refused by the dirty guard rather than made twice. That is what
`migrate-state-cells` does under the same amendment family and the same review.
The manual now says it in those terms rather than leaving it to the code.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019UFwD7bCS73jaUMJ2vuo5m

* The pick stopped answering inside the terminal's minute: the state cell's head and its flag words leave the table every lane walks

Amendment 19(b) put two FREE-TEXT fields — the state cell's head, up to 280
characters, and the flag words read from the whole of that cell — into
`lanes_register_index`, which is the table `lanes_rows` hands to `table_lookup`
ONCE PER LANE IN THE ESTATE. That is ruling 12's own trap, and it was measured:
on a seeded register of 132 rows one `lanes --dir … --repo … --prefix <repo>`
took **42 s** where this branch's parent took **14**, and on the live register
8.8 s against 4.9. `lane`'s numbered pick prints NOTHING until that read
returns, so in CI its terminal cases — which write one answer into a pty and
give the word sixty seconds to say something — were killed with no output at
all. **Fifty assertions**, on every platform: the pick's own thirteen and every
`lanes`/`lane-start` case downstream of them, plus the suite's `sleep 3000`
liveness fixture, which the thirteen minutes of timeouts outran.

**The two fields are a table of their own** — `lanes_register_index --cells`,
`<lane>` and those two and nothing else — built ON FIRST USE and asked for
BELOW the narrowing filter, and only for a row with NO OBJECT LOG. That is the
only row they are about: 19(a)'s dormant row is a row whose CELL is all the
listing has, while a row with a log has the log, and `lanes` prints neither
field for it. The four short facts every row needs, `started` among them —
`--closed` prints it for a CLOSED row too, and it is a date and not free text —
stay where they were.

Measured after: 16.7 s against the parent's 11.7 on the same 132 rows, and
level with it on the live register. Every class (column 13) and every DORMANT
row of the live register is byte-identical across the change; what moves is
columns 15 and 16 of a row that HAS a log, which are `none` now.

**The case that catches it** is the structure and not a stopwatch — a clock
assertion on a shared runner is a flake, while a row that has a log carrying
its cell's text is the defect itself, in one field. `repo19-3`'s cell now says
`unpushed` and `lost` on purpose, and four assertions read the two fields off
the two rows that have logs and off the dormant rows beside them. Three of the
four fail on the parent commit and all four pass here.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EaHzfTLW4u9ukpWuw8Dt6r

* The manual says which rows carry the state cell's head, because "every row" is what cost the listing three times its time

The table row in `docs/README-lanes.md` listed Amendment 19's four new columns
without saying that the last two are a row's ONLY where it has no object log.
That is not a detail of the rendering: they are free text of up to 280
characters per row, the table the listing joins on is walked once per lane, and
carrying them for every row is what took `lanes --prefix <repo>` from 14 s to
42 s on a register of 132 rows and killed `lane`'s terminal cases in CI. The
sentence carries the measurement, so the next person who wants a fifth
free-text column reads the cost beside the column.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EaHzfTLW4u9ukpWuw8Dt6r

* A row the cells pass did not see is not a row with no state cell

The split one commit up reads the state cell's head and flag words from a
SECOND pass over the same register text, and an empty answer from it is not
the same fact as an empty cell: `mig_cell_is_phrase` is false over nothing, so
a row the second pass missed would be classed DORMANT — hidden from the listing
and offered to the sweep — even where its cell says `PAUSED`, which is the one
case Amendment 13(a) is in this rule to protect. The two passes read ONE
register text, so a row in the first table and not the second is a read that
answered differently the second time (Amendment 7(d)), and `lr_cellrow` carries
whether it was seen. Without it the class is left unset and the row stays
LISTED, which is the posture round 3 gave the liveness read one screen up.

The published pass is the one that carries it, because the published row is the
only one the class is ever decided on: `lr_row` is `lr_ixl`, and a row this
checkout alone has is in no class either way.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EaHzfTLW4u9ukpWuw8Dt6r

* The ten macOS reds at 758a536 were two defects: a `-v` that spans lines, which one-true-awk refuses outright, and a liveness fixture bounded below the timeout that was raised past it

Both are invisible on Linux, and both answered as something other than
themselves, which is why the job's transcript had to be reverse-engineered
before either could be named.

SIX OF THEM: `awk -v` CARRIES ONE LINE, AND `delete_lines` HANDED IT MANY.
A `-v name=value` is processed as if it were a string literal and a string
literal cannot span lines: macOS's awk is the one-true-awk, which refuses a
newline in one outright — `awk: newline in string … at source line 1`, exit 2,
NO OUTPUT AT ALL — while gawk and mawk accept it silently. So `archive-rows
--yes` appended the three rows to the archive, read an EMPTY rewrite of the
register, failed its own line-count proof and died 5 with the register whole:
`archive-rows --yes exits 0` got 5, `…in ONE commit` got 0, `…and the rows are
out of the register` got 3, and three more fell out behind them. Measured both
ways against a shim that IS that rule, on this workstation:

    pre-fix,  one-true-awk   rc=5  rows-left=4  archived=3
                             awk: newline in string list... at source line 1
                             lanes-edit: removing 3 row(s) changed the line
                             count by 8; refusing
    post-fix, one-true-awk   rc=0  rows-left=1  archived=3   committed
    post-fix, gawk           rc=0  rows-left=1  archived=3   committed

The list goes through the environment and is read with `ENVIRON`, which is
POSIX awk and has no such restriction — the spelling `who_landing` settled on
when it paid for this same rule in round 5 of A9 Addendum 4 (R-A9-11). The pass
is read with its OWN status as well: an awk that failed writes an empty file,
and an empty file is not "no rows matched" (Amendment 7(d)).

AND THE CASE THAT CATCHES IT EVERYWHERE. A shim on `PATH` refuses a `-v` whose
value carries a newline exactly as one-true-awk does and `exec`s the real awk
for everything else; `repo19d` is a repository of two RETIRED rows archived
under it, asserted to exit 0, in one commit, with the rows moved. The shim is
itself asserted two cases above — it bites, and it passes a one-line `-v`
through — so it cannot make the case pass vacuously. AGENTS.md now carries the
rule beside the bash-3.2 one, for the reason that one is there: a constraint
only one job can see belongs where it is read before the code is written.

FOUR OF THEM: THE LIVENESS FIXTURE EXPIRED INSIDE A RUN THE WRAPPER WAS STILL
WAITING ON. `tests/test_lane_helpers_suite.py` lets this file run for 3600 s —
raised from 2400 when the macOS job spent 2722 s in it — while the fixture was
still bounded at 3000, so the suite was licensed to outlive its own evidence by
600 s. It did: tests-macos reached the Amendment 19 section, the last 5% of the
file, with the fixture already reaped, and the LIVE lane's attach line and the
sweep's live-session refusal both read `none`. 4200 is 3600 plus ten minutes.

The pair is now ASSERTED and not merely written down twice: the wrapper reads
the `sleep <n> & LIVE_PID=$!` line and refuses a bound that does not exceed its
own `TIMEOUT_SECONDS`, so the next person to raise one is told about the other
in seconds on every platform, rather than in an hour on one.

Copilot's round 5 on #93 is filed as #120 and claimed, under the two-round cap:
the register rewrite's unchecked status in both places that make one, the
sweep's published-path preflight asking a weaker question than `ensure_log`'s
own, and `retire-rows`' refusal telling an already-CLOSED log to `lane-end`
itself. The first two are taken there as real; the third is declined as a rule
with 19(c)'s own word — *carries*, not *ends with* — and taken as a sentence.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01EaHzfTLW4u9ukpWuw8Dt6r

* Keep lane fixtures isolated from host launchers and tmux names

Provide a non-colliding window table for unrelated lane-start checks and pin the picker to its fake launcher.

Lane: openRepoTools-3

* Fence archive writes and bypass grep wrapper

Stop archive-rows when the register rewrite fails, and prove duplicate archive rows with the real grep command. Cover read-only register and wrapper retry cases.

Lane: openRepoTools-3

* Keep live lane binding reads local

Preserve the picker no-fetch contract for both register-row probes before a LIVE attachment; add a regression wrapper that refuses fetch-capable probes.

Lane: openRepoTools-3

* fix: fence retired lane identities across rebase and attach

Lane: openrepotools-3 (openRepoTools-3)

* test: align helper dispatch and early fixture setup

Lane: openrepotools-3 (openRepoTools-3)

* fix: refuse divergent attach and malformed dormant rows

Lane: openrepotools-3 (openRepoTools-3)

* fix: neutralize rejected add-row before later pushes

Lane: openrepotools-3 (openRepoTools-3)

* test: keep lclaude visible in no-lane fixture

Lane: openrepotools-3 (openRepoTools-3)

* test: clear explicit launcher override in fallback case

Lane: openrepotools-3 (openRepoTools-3)

* Put the lclaude fixture back in a17bin, where the case that needs it can see it

The one red line on Linux at 08dad90, in both `tests` and
`tests-no-submodule`, was "the lane-aware restart line is printed when
lclaude is installed": `lane-handoff` printed `pclaude --lane repoHF-1`
because no `lclaude` was on the PATH that case runs under.

925995b meant to move the --restart case's fake `lclaude` into a directory
of its own, but both cases open with the identical `cat > a17bin/lclaude`
line and the hunk landed on the FIRST: that case then wrote its fake into
`a17-launcher-only` (not on `$A17PATH`) and `chmod`ed an `a17bin/lclaude`
that did not exist. The --restart case went on passing only because it
picked up the first case's leftover file, made executable by its own
`chmod`.

What the --restart case actually lacked at afd5481 was not a directory:
`a17bin` holds no `lane`, so `$A17PATH_NOLANE` keeps it. It was the
`PCLAUDE` override 8326e68 exports for the picker cases, which
`lane-handoff --restart` honours before any PATH lookup — and 08dad90's
`env -u PCLAUDE` already removes it for that one invocation. So both
cases return to main's `a17bin` form and the only difference from main
here is that `env -u PCLAUDE`.

Lane: openRepoTools-3
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Say what a published archive that will not render does: it refuses

d0310f6 made `archive_text` fail closed when origin holds the archive and
`git show` cannot render it — a local copy may lack a retired position the
published one holds — but the manual's Amendment 19(d) paragraph still
promised the fallback to this checkout's copy that the change removed.
Taken from the review of d0310f6 on #93 (docs/README-lanes.md:2490).

Lane: openRepoTools-3
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Offer the sweep's reason back as one shell-quoted --reason= word

The dry run of `lane-end --retire-dormant` ends with the line that makes
it the act, and it rendered an accepted reason as `--reason "<why>"`. For
`--reason=--why` — the spelling the parser documents for a reason that
begins with a dash — that line is a dash-led value the same parser
refuses, so following the preview failed; and a reason carrying `"` or
`$(` came back as shell syntax the person would run. The line now carries
`--reason=%q`, which is the one-argument form the confirmed act already
forwards to the writer. Taken from the review of 44b77c3 on #93
(lane-end:697); two assertions pin it.

Lane: openRepoTools-3
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Give the shell suite 5400 s and its liveness fixture 6000, because darwin crossed 3600

tests-macos on this PR has failed the same way twice, and not in #107's
class (the pty driver's 60 s SIGKILL, read as exit 137): the wrapper's own
bound killed the whole shell suite —
`subprocess.TimeoutExpired: … timed out after 3600 seconds` — at 08dad90
(`1 failed, 680 passed in 3961.39s`) and at 968ab5e (`1 failed, 693
passed in 3927.56s`), so neither run says which assertion was in flight.
Amendment 19 adds ~220 cases, and main at 69bf48d was already within
minutes of the bound (3741.66 s for the whole job's pytest). Since #119
`tests-macos` is the landing gate on the `ready` label, a bound the suite
cannot finish inside is a gate nothing passes and nobody can read.

This is the third raise for the same reason (900 -> 2400 -> 3600), dated
and measured beside the other two. The liveness fixture moves with it,
4200 -> 6000, because the pair is asserted: the wrapper refuses a sleep
that does not outlive its own timeout. The honest fix is still the
suite's duration, #77.

Lane: openRepoTools-3
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Ask lane-start's window-name fence only of a NEW lane, not of a lane Amendment 18 hands over

At the #83 merge (7c1aef2) Linux `tests` went red on two of #83's own
Amendment 18 cases, both `lane-start` exiting 2:

  FAIL …which it now does, with nothing refused            expected [0], got [2]
  FAIL `lane-start --dry-run --request-handoff` prints a plan instead of
       refusing on a release it did not make                expected [0], got [2]

Both lanes (repoBind-3 after a forced release, repoBind-12 bound in
another container) have their own window in the shared tmux server —
`cloudsess:4 @62 repoBind-3`, `cloudsess:6 @65 repoBind-12` — and the
server-wide window-name fence d0310f6 added to step 4 refused the second
place's bind because another window carried the name. Amendment 18 rules
that takeover in: a bench in another container keeps the lane's name
until that session hands off, and binding after a release or through
`--request-handoff` is the flow. main has no such fence and is green.

The fence keeps the case it was written for: a NEW lane (no row), whose
name on any other window is certainly foreign because nothing has bound
it. That is this branch's own assertion — `REPOA-8` on @99 still
refuses — and the manual's sentence now says which launches it asks.

Lane: openRepoTools-3
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Let the sweep retire a no-log row whose cell already says RETIRED, as the listing says it may

The listing classes a row with no lane-kind log line DORMANT unless its
Amendment 13(a) cell names a state other than ENDED, RETIRED or MIGRATED,
so a no-log row whose phrase says RETIRED is dormant and the preview names
it. d0310f6 made `retire_rows` refuse that cell as "already retired", so
the act could not take a row its own preview offered, and because the
sweep is all-or-nothing that one row stopped every other retirement in the
repository. The row a migration leaves is that row: the phrase in the
cell, NOTED lines in the log.

A second retirement is a second RETIRED line in an append-only log, and
refusal 2 directly above already refuses that, reading the log. The cell
test goes back to accepting ENDED, RETIRED and MIGRATED, so the read and
the writer agree again, and a new case (`repo19ret-1`) pins it: dormant to
the listing, retired by the writer, one RETIRED line in its new log.
Taken from Copilot round 20 on #93 (lanes-edit.sh:10044).

Lane: openRepoTools-3
Co-Authored-By: Claude Fable 5.1 <[email protected]>

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
brettheap added a commit that referenced this pull request Oct 3, 2026
Bring in #119, #103, #83, #139 and #93 so #61 lands last in the queue
on the main it will actually land on. One textual conflict:

- lanes-edit.sh, the `*)` arm's unknown-subcommand list: main added
  `binding`, `request-handoff`, `register-row-local`, `retired-identity`
  (#83) and `retire-rows`, `archive-rows` (#93); this branch added
  `duplicate-holder`. Every name is kept, in main's order with
  `duplicate-holder` after `forks` as before, and the list still equals
  the dispatcher's arms exactly (test_repo_hygiene's derived check).

Checked against #61's code, nothing else needed a change: the suite's
fake-command block (tmux, claude, pgrep, ps, gh) is intact and no new
main code calls pgrep or ps; #93's columns 14-17 and #83's column 13
are in the `lanes` listing rows, which #61 never reads; LOG_AWK's
fields, live_holder's, transcript_holders' and lane_forks' output
formats are unchanged; #83's HANDOFF-REQUESTED is a lane-kind verb that
changes no state and holder_is_dead's five-verb whitelist skips it as
every last-line reader must; and lane-end's --retire-dormant sweep is
refused beside --retire and exits before the fork/duplicate retire path.

Lane: openRepoTools-3
Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 4, 2026
Bring #97 onto a current base before the seam rework Brett Heap ruled on
2026-10-04 ("managed ledger owns enrolled lanes; #97 owns legacy — rework
both"). Main moved 14 commits past 957a26f, to daed209: #81 lane-rename,
#83 Amendment 18, #93 Amendment 19, #61 claim --force takeover, #146,
#119, #101-#103, #129, #131, #133, #135, #136, #139 and #134.

Four files conflicted, and in every one both intents survive:

- lanes-edit.sh, the function sections: both sides appended after
  migrate_state_cells. Main's Amendment 19(c)/(d) sweep and archive stay
  directly under it, because its header says "the shape
  `migrate-state-cells` has one screen up"; #97's lifecycle and
  inventory section follows them.
- lanes-edit.sh, the unknown-subcommand refusal: the union of both lists,
  56 names, the same set as the dispatcher's 56 arms.
- lanes-edit.sh, the exit-code table, and the manual's copy of it: #97's
  7 row ("another act got there first", in three verbs) is kept, and exit
  9 now has two meanings, one per verb. #61 spent 9 on `claim --force`'s
  abandoned takeover and #97 spent it on `lane-state`'s unreadable
  snapshot, and each PR took it as unused. Neither verb can return the
  other's 9, so the table names both and nothing is renumbered in a
  merge. The manual's 9 row said "(`claim` only)", which the merge would
  have made false; its 7 row now names #97's two fenced writers too, as
  the code table already did. The next commit moves #97's 9 to 10.
- lane-handoff, the late-record restart line: #129's
  `$lane_profile_word` (lclaude) with #97's lifecycle line under it.
- docs/README-lanes.md: Amendment 19's section, then #97's #91 section,
  so the amendment sections stay in number order.
- tests/test_lane_helpers.sh: main's Amendment 19 and Amendment 18
  sections run first, in main's order (A18's restores its fixtures), and
  #97's self-contained #91 section follows them, before the
  workstation-seam section, as it did on #97's branch.

lane-start auto-merged around #134's rewrite. #97's section 4a still
prints the reconciliation after Amendment 18's binding gate and before
section 5 and the STARTED/RESUMED write in 5b. AGENTS.md, README.md,
tests/test_repo_hygiene.py and skills/ are byte-identical to main, so
the 316- and 486-line caps already match the merged counts.

Locally, tests/run.sh -k 'lane_helpers_suite or repo_hygiene or
lane_start_claude_current or guard_launch_mode or install_skill_and_hook':
274 passed, 600 deselected, in 1560 s.

Lane: openRepoTools-3
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready landing gate: runs tests-macos once before the squash

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants