Skip to content

--install and wip init add the hook pair only once ~/projects/xFactory/lanes-edit.sh answers guard, and take our guard entry back out until then, so a fresh install never leaves a prompt hook calling a missing command (#237) - #247

Merged
brettheap merged 7 commits into
mainfrom
fix/237-hook-gate
Oct 18, 2026

Conversation

@brettheap

@brettheap brettheap commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #237

--install and wip init add the SessionStart and guard hook pair only once ~/projects/xFactory/lanes-edit.sh exists, is executable and answers guard. Until then they defer the pair and say so, so a fresh install no longer leaves a prompt hook calling a command that is not there. That missing command is what made the guard fail with exit 127 on a fresh workstation, upstream of opensoft/openBenches#107.

The approach: the launcher's own rule. workBenches' claude-profile already gates both entries on its target answering guard (claude-profile:404-411), and strips its own exact guard entry when the target does not answer (:433-470, workBenches#89 and #90). This PR applies the same rule in both writers of the settings file.

The alternative was a stable hook target that the installer places. It was ruled out because, with no workspace, the guard refuses every prompt under ~/projects (lanes-edit.sh guard_run, AGENTS.md). A target that existed before wip init would lock the person out.

The contract change (#237: "document any contract change explicitly"):

  1. The count: --install places 29 artifacts always, plus the two hook entries once the target answers. It used to place 31 unconditionally.
  2. The gate: the target is [ -f ], [ -x ], plus the launcher's awk probe for guard. It is asked after the bin loop has placed lanes-edit.sh.
  3. When the target does not answer:
    • Nothing is added.
    • Our exact guard entry is taken out of a file that carries it, filtered on each entry's nested array as workBenches#89 does.
    • SessionStart (it ends in || true), foreign hooks and every other key are kept.
    • Every deferral and removal is printed with its reason and its remedy: openRepoTools wip init, or link-estates and --install again.
  4. The settings file's mode: it is 600 on every run that writes it or finds an entry of ours in it. A deferred run with nothing of ours to add or take out leaves the file, and its mode, as they were.
  5. A guard entry the filter cannot take apart is refused in plan_hook_merge, before anything is placed: "NOTHING was installed". There is one exception: a link to the bin directory's own lanes-edit.sh, which the bin loop repairs before the target is asked.
  6. wip init:
    • It reconciles the pair in step 10, after link-estates, and on step 1's "nothing to do" path.
    • On that path it re-runs link-estates first, but only when the target does not answer and ~/projects/xFactory exists, so a run cut off before linking heals.
    • --dry-run says it would merge, and writes nothing.
    • A reconcile it cannot make is printed as a note, and the exit stays 0. --help and README now say so beside "2 (refused)".
  7. Unchanged:

Where it is written down:

  • README: the install paragraph (:279), the mode sentence (:284-286), the count line (:302), the wip init note (:189-190) and its exits (:200-204);
  • AGENTS.md :45-46, which is line-neutral against main;
  • --help.

Tests (tests/test_install_hook_gate.py, new). All are hermetic: a sandbox HOME under tmp_path, no network, and LANES_* and TMUX* unset. They cover:

  • a fresh install defers the pair, says so, and places 29 artifacts with 29 receipt rows;
  • an interrupted setup leaves no hook naming a missing path;
  • a dangling link strips only our guard entry, and keeps SessionStart, foreign hooks and mode 600;
  • wip init completes the pair after link-estates. Its "nothing to do" path still reconciles, and re-runs link-estates only where ruling 9 says. --dry-run names the merge;
  • a repeat install after init is unchanged, with one entry of each;
  • a rival refuses while the pair is deferred, for both events;
  • a lanes-edit.sh without the guard verb defers;
  • a guard entry in an odd shape is refused with nothing installed. The same shape beside a link that the bin loop repairs is not refused;
  • a link into an emptied bin directory answers once the bin loop refills it;
  • --install with no jq still ends in the jq refusal, both when the target answers and when it does not;
  • the real guard still exits 2 after wip init;
  • a reconcile wip init cannot make is a note, and the exit stays 0.

The existing hook tests, test_installing_twice_changes_nothing and test_r12_an_adopted_install_keeps_modes_receipts_targets_and_what_is_not_ours get a link_xfactory(home) fixture. Without it they would see the pair deferred.

Runs

  • Through tests/run.sh, with -k "install_hook_gate or install_skill or openrepotools_command or install_payload_source or repo_hygiene or wip_init_command or install_by_rename": 551 passed, 9 skipped, exit 0, at 5912f93, which holds main a41adb6.
  • Against main's installer, the new file fails 14 cases: every defect case. The 8 that pass on main are the guards meant to pass there.
  • CI's Linux jobs on this PR are the record.

Review. A read-only opus-xhigh reviewer reviewed 016a07c and returned LAND after fixes, with two MUSTs.

  • M1: the README mode sentence was no longer true for a 644 file of the person's own.
  • M2: a new refusal came after placement.

Both MUSTs and SHOULDs S1 to S3 are fixed in 145e1ca and 5912f93, after main was merged in (22843b3). S1 was the untested wip init reconcile path, S2 the AGENTS.md cap and wording, and S3 the re-test on current main.

NITs N2, N3, N6, N7 and N8 are taken. N1 (the probe is byte-identical to the launcher's, so change both or neither), N4, N5 and part of N9 are left, each for the reason given in the review round.

Notes for other work:

Landing: Brett Heap's word, "yes, merge #237 when it's green". Lane openRepoTools-3 squash-merges once the Linux CI is green on current main.

Lane: openRepoTools-3

🤖 Generated with Claude Code

Summary by Sourcery

Defer the shared hook pair until its target is available and functional, and reconcile it safely during initialization without leaving broken prompt hooks behind.

New Features:

  • Gate installation of the SessionStart and UserPromptSubmit hook pair on the linked lanes-edit.sh target being executable and able to answer guard.
  • Reconcile deferred hooks during wip init, including dry-run reporting and recovery on no-op reruns.

Bug Fixes:

  • Prevent fresh installs from leaving prompt hooks that invoke a missing command and fail with exit 127.
  • Remove the project's guard entry when its target stops answering while preserving unrelated settings and hooks.

Enhancements:

  • Update installation counts, file-mode behavior, refusal handling, and user messaging to reflect deferred hook installation.

Documentation:

  • Document the conditional hook installation contract, revised artifact count, reconciliation behavior, and exit semantics in README.md, AGENTS.md, and command help.

Tests:

  • Add hermetic coverage for deferred and completed hook installation, interrupted setups, malformed entries, rival hooks, jq refusal ordering, wip init reconciliation, idempotence, and preservation of the guard's exit 2 behavior.

Brett Heap and others added 6 commits October 18, 2026 08:45
`link_xfactory(home)` makes `~/projects/xFactory/lanes-edit.sh` the way
`link-estates` leaves it: a symlink to the bin directory's `lanes-edit.sh`.
The eleven tests in tests/test_install_skill_and_hook.py that assert the
SessionStart entry and the UserPromptSubmit name guard are placed, and
test_installing_twice_changes_nothing's thirty-one `unchanged`, link it
first, so they keep asserting the merged pair once `--install` merges it
only for a target that answers `guard`. `ALWAYS` (29) is named beside
`ARTIFACTS` (31) for the count the gate makes conditional.

tests/test_install_payload_source.py's
test_r12_an_adopted_install_keeps_modes_receipts_targets_and_what_is_not_ours
makes the same link to its own bin directory's `lanes-edit.sh`, since it
asserts the guard entry is merged (the lead's ruling 7).

The fixture changes nothing on the current code, which ignores the link.

Lane: openRepoTools-3
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…answers `guard`, in --install and in wip init

A fresh `--install` merged the SessionStart entry and Amendment 12's
UserPromptSubmit name guard before anything had placed the path both call,
`~/projects/xFactory/lanes-edit.sh`, which `link-estates` links and only
`openRepoTools wip init` runs, after the install (opensoft/openBenches#107).
The guard then failed every prompt with exit 127 instead of refusing with 2.

Approach (A), the claude-profile launcher's own rule, in both writers:

- `--install` (`plan_hook_merge`, `place_hook_pair`) stages both outcomes
  before anything is placed and picks one after the bin loop. The pair is
  merged only when that path exists, is executable and answers `guard`, by
  the launcher's awk probe (claude-profile:404-411), plus `-x`.
- When it does not answer, nothing is added, and our EXACT guard entry is
  removed from a file that carries it, filtered on each entry's nested
  array (workBenches#89, #90). The SessionStart entry, every foreign hook
  and every other key stay; the file is written back at mode 600.
- Every deferral and every removal is printed with its remedy.
- `wip init` reconciles the pair in step 10, after `link-estates`, and on
  step 1's "nothing to do" path, where it first re-runs `link-estates` if
  the path does not answer and ~/projects/xFactory exists. `--dry-run`
  prints "would merge". A refusal there is a note and the exit stays 0.

THE CONTRACT CHANGE: `--install` places 29 artifacts always, plus the two
hook entries once that path answers `guard` (it was 31 unconditionally).
Unchanged: the hook strings and their exact-string identity, the rival
refusal (still refuses while the pair is deferred), the receipt (no hook
rows), the launcher contract, and the guard's real exit 2 (no `|| true`).

tests/test_install_hook_gate.py holds it: fresh, interrupted, dangling-link
migration, a target with no `guard` verb or no execute bit, the bin-loop
ordering, rivals while deferred, `wip init` after `link-estates`, on its
nothing-to-do path and after a cut, `--dry-run`, a repeat install, and the
installed guard's real exit 2 before and after the workspace exists, and
`--install` with no `jq` still ending in the `jq` refusal whether or not
the target answers (006's FR-018).

Lane: openRepoTools-3
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…it note and AGENTS.md

README: the install paragraph says both entries wait for the path they
call, what a deferred run prints and removes, and the remedy; the count
line reads "Twenty-nine artifacts always, plus the two hook entries once
the path they call answers `guard`"; the `wip init` note and its
idempotence paragraph say it completes the pair after `link-estates`.
AGENTS.md's "Shared hooks stay installed" line carries the same count.
No line is added to README (485, cap 486); AGENTS.md gains one (322, cap
323).

Lane: openRepoTools-3
Co-Authored-By: Claude Opus 5.5 <[email protected]>
… fixes

Brings in #240 (park, resume and status family folders). It shares no file
with #237.

Lane: openRepoTools-3
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…, and pin wip init's exit-0 reconcile

The independent review of 016a07c, M2: a guard entry in a shape the strip
filter does not take apart (a `UserPromptSubmit`, or an entry's `hooks`,
that is not an array), against a target that does not answer, was refused
only at placement, after the 29 artifacts were placed. The refusal is now
decided in `plan_hook_merge`, with "NOTHING was installed", like every other
file the merge cannot handle. The one target the bin loop can still repair,
a link to the bin directory's own `lanes-edit.sh`, is let through, and the
run merges once that loop has put the far end back. `hook_pair_defer` keeps
the same refusal as a backstop.

S1: `wip init` keeps exit 0 when the hook reconcile is refused, on step 10's
path and on step 1's, under one rule. `--help` now says so where it gives the
exit codes: "a hook reconcile it cannot make is printed, and the exit stays
0". It also gives ruling 9's condition, "and ~/projects/xFactory exists".

NITs taken:
- N2: an executable that cannot be read is named "is not readable", and a
  link that dangles or loops "does not resolve".
- N6: with no ~/projects/xFactory, the remedy first says that directory has
  to exist.

Tests:
- the odd shape now asserts nothing is placed;
- a new case: the odd shape beside a link the bin loop repairs is merged;
- a new parameter: a target that is not readable;
- S1: wip init's refused reconcile on both paths;
- N7: step 1 does not relink when the target answers or ~/projects/xFactory
  is absent;
- M1: a deferred run leaves a file of the person's own at its 644.

Lane: openRepoTools-3
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…AGENTS.md line net zero

The independent review of 016a07c:
- M1: README said the settings file is 600 "on every run". It is 600 on
  every run that writes it or finds an entry of ours in it. A deferred run
  with nothing of ours to add or take out leaves the file, and its mode, as
  they were. The install paragraph no longer claims 600 for the person's
  own hooks.
- S1: the `wip init` paragraph gives the exception where it gives the exit
  codes: a hook reconcile it cannot make is printed, and the exit stays 0.
- N8: ruling 9's condition, "and `~/projects/xFactory` exists".
- N3: "the launcher's probe, plus an execute bit", where it said "the
  launcher's own rule".
- S2: AGENTS.md's line is reworded for a `--install` that can now take our
  guard entry out ("Shared hooks stay installed while
  `~/projects/xFactory/lanes-edit.sh` answers `guard`; until then they are
  deferred and our guard entry taken out"). It is back to main's 321 lines,
  so #238's two lines still fit under the cap of 323.

README stays at main's 485 lines.

Lane: openRepoTools-3
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brettheap brettheap added the ready landing gate: runs tests-macos once before the squash label Oct 18, 2026
@brettheap brettheap added this to the v1.1.0 milestone Oct 18, 2026
@sourcery-ai

sourcery-ai Bot commented Oct 18, 2026

Copy link
Copy Markdown

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 3 days and 10 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 18, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR changes hook installation from unconditional placement to a launcher-compatible, target-readiness gate: installs always place 29 non-hook artifacts, add the hook pair only when lanes-edit.sh answers guard, safely remove stale owned guard entries, and have wip init reconcile the pair after linking, with documentation and extensive hermetic regression coverage.

Sequence diagram for wip init hook reconciliation

sequenceDiagram
    participant User
    participant WipInit
    participant LinkEstates
    participant Installer
    participant Settings
    User->>WipInit: wip init
    WipInit->>LinkEstates: link-estates
    LinkEstates-->>WipInit: lanes-edit.sh linked
    WipInit->>Installer: reconcile hook pair
    Installer->>Installer: probe lanes-edit.sh guard
    alt target answers guard
        Installer->>Settings: merge SessionStart and guard entries
        Settings-->>Installer: settings written mode 600
    else target does not answer guard
        Installer->>Settings: remove owned guard entry if present
        Settings-->>Installer: preserve unrelated entries
        Installer-->>WipInit: print note, keep exit 0
    end
    WipInit-->>User: complete
Loading

Flow diagram for gated hook installation

flowchart TD
    A["--install or wip init"] --> B["Place 29 non-hook artifacts"]
    B --> C{"lanes-edit.sh exists, executable, and answers guard?"}
    C -->|Yes| D["Merge SessionStart and guard hook entries"]
    C -->|No| E["Defer hook pair"]
    E --> F["Remove only owned guard entry if present"]
    D --> G["Write settings.json with mode 600"]
    F --> H["Keep SessionStart, foreign hooks, and other keys"]
    E --> I["Print reason and remediation"]
Loading

File-Level Changes

Change Details Files
Gate installation and reconciliation of both Claude hook entries on the linked target being a regular executable that answers guard, while preserving idempotence and launcher-compatible hook identity.
  • Defer adding the pair until ~/projects/xFactory/lanes-edit.sh passes file, execute-bit, and awk probe checks.
  • Keep the artifact install at 29 items when deferred and add the two hook entries only on a successful probe.
  • Reconcile the pair after link-estates in wip init, including the no-op path, recovery of interrupted linking, and dry-run reporting.
  • Remove only the exact owned guard entry when the target stops answering; preserve SessionStart, foreign hooks, other settings, and appropriate file modes.
  • Refuse unparseable owned guard entries during planning before placing any artifacts, while retaining rival and jq refusal precedence.
openRepoTools
Document the conditional hook contract, artifact counts, mode behavior, deferral remedies, and wip init reconciliation semantics.
  • Update installation and initialization documentation for deferred hooks and successful reconciliation.
  • Clarify exit behavior, dry-run output, and the distinction between deferred writes and settings files that are rewritten.
  • Record the 29-artifact baseline plus conditional hook entries and the requirement that the target answer guard.
README.md
AGENTS.md
Add hermetic coverage for the hook gate, downgrade behavior, initialization reconciliation, refusal ordering, and preservation of the guard's real exit status.
  • Test fresh installs, interrupted setups, dangling or non-answering targets, malformed entries, rival hooks, missing jq, and mode/preservation rules.
  • Test wip init completion after linking, no-op recovery, dry-run behavior, repeat-install idempotence, and non-fatal reconcile failures.
  • Update existing hook and artifact tests to create a target that answers guard when asserting the installed pair.
tests/test_install_hook_gate.py
tests/test_install_payload_source.py
tests/test_install_skill_and_hook.py
tests/test_openrepotools_command.py

Assessment against linked issues

Issue Objective Addressed Explanation
#237 Prevent fresh or interrupted installs from leaving the UserPromptSubmit name-guard hook calling a missing or unusable workspace executable, without masking genuine guard refusals. ✅
#237 Activate and reconcile the hook pair after workspace linking, including on repeat or already-initialized wip init runs, so hooks become active without manual settings repair. ✅
#237 Preserve hook identity, conflict and all-or-nothing install behavior, unrelated settings and private file modes, and document and test the changed installation contract and migration behavior. ✅

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

… the main it lands on

Main moved through AGENTS.md, lanes-edit.sh, park, resume, status and their tests
after the green run 39115443738; AGENTS.md is the one file both sides touch.

Lane: openRepoTools-3
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sonarqubecloud

Copy link
Copy Markdown

@brettheap
brettheap merged commit 586dea2 into main Oct 18, 2026
5 checks passed
@brettheap
brettheap deleted the fix/237-hook-gate branch October 18, 2026 14:29
brettheap pushed a commit that referenced this pull request Oct 19, 2026
…ed, the one-route sentence names both routes, and the v1.1.0 notes name #247 (#228)

S1: the assembly's README cap goes back to 510. assembly-0001's README part no longer applies (its hunks at :237 and :300 fail against T024's rewrite and #247's count paragraph), so 529 was arithmetic over a patch that does not apply; the re-cut sets the assembly's cap, as the 2026-10-18 AGENTS.md entry says for its 347. T024's dated entry says so, and tests/test_test_roots.py goes back to 510 and 511 with its docstring's numbers made true at this head (330 and 505 standalone; 347 and 510 at an assembly root).

S2: test_readme_says_what_a_release_is_and_offers_no_package_route reads README and holds: no line matches pipx or pip install before openrepotools in any case; the install section cites opensoft/openBenches#165; the version paragraph holds the three --version first lines; and 16 of 17 and 28 receipt rows stand beside pipx's link. The reviewer's mutants M1 to M4 and M6 each fail it.

S3: README's FR-047 sentence names the two routes it rules between, pipx's openrepotools and workBenches' ./setup.sh, in the same three lines (README stays at 505).

S4: the v1.1.0 notes fill <#237 PR> with #247, say that our exact guard entry is taken back out of a file that carries it while the pair is deferred, and rewrite the stale checklist item for a PR that had not landed.

Lane: openRepoTools-3
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 20, 2026
…e repository, the v1.1.0 notes are drafted, and README says what a release is, what --version prints and what a workstation with pipx's link sees (#228, PR 4 of 4) (#269)

Part of #228: **pull request 4 of 4** of feature `006-release-pypi`, plan.md "Delivery". It holds User Story 6, which is Phase 8 of `specs/006-release-pypi/tasks.md` (T022 to T024).

**The record now tells the truth about releases.** The v1.0.0 notes are in the repository, the v1.1.0 notes are drafted, and README says what a release is, what `--version` prints, and what a workstation with pipx's link sees.

Nothing is published here. The v1.1.0 notes are a draft with placeholders, and the GitHub Release is made from them only after PyPI serves 1.1.0 (`.github/workflows/release.yml:108-112`). README gives no install command for the package (FR-045). Every tag and upload still waits for Brett Heap's word (plan.md gate G8).

**What it adds**
- **`docs/release-notes/v1.0.0.md` (T022, `d637841`):** the published v1.0.0 Release body, byte for byte. It is exactly the output of `gh release view v1.0.0 --repo opensoft/openRepoTools --json body --jq .body` (research R15).
  - **How the verify proves it:** the task's verify runs that same command and pipes it into `cmp - docs/release-notes/v1.0.0.md`. One command wrote the file and checks it, so the two cannot disagree about a trailing newline. The suite does not repeat it, because it reaches no network.
  - The file is 15 lines (`git show --stat`). It is the Release body plus the one newline `--jq` adds (review N1).
- **`docs/release-notes/v1.1.0.md` (T023, `cb478cc`):** the draft v1.1.0 Release body, 90 lines. The Release is created from it after PyPI serves 1.1.0, so the notes never name a version PyPI lacks.
  - **What it holds:** `## What 1.1.0 adds` with six items (the package on PyPI as `openrepotools`; `--version` naming the release; `--install`'s rules for pipx's link and pip's console script; the hook pair that waits for its target, #237; the `package` job and the release workflow; releases as annotated tags), `## What else changed since v1.0.0`, and `## Install and upgrade` with seven items. The install section gives the move from the one-line install, `pipx install --force openrepotools` then `openRepoTools --install`, and why `--force` is needed.
  - **Placeholders:** nine, each a `<name>` in code font. Each is listed in the closing `## Before the tag` checklist, which has 11 items: eight for the placeholders (the tag time and the tag words share one) and three for facts to re-read, with no placeholder (the hook pair, the pin, the milestone).
  - **The last line** names the file's own path in the spec leg, `opensoft/openRepoTools-spec`'s `docs/release-notes/v1.1.0.md`.
- **README (T024, `ed72edf`):** what a release is, what `--version` prints, and what a workstation with pipx's link sees. README grows from 485 to 505 lines (`wc -l` at `29cc1b3` and at `9378103`), and gains no install command for the package.
  - **A release (`README.md:361-367`):** a release is an annotated tag `vX.Y.Z`, and the version comes only from the tag. The release build writes it into the `openrepotools` package, whose `--version` first line is `openRepoTools <version> (<repository> @ <commit>)`. A package built from a checkout prints `openRepoTools 0.0.0 (an unstamped package)`. A checkout and the one-line install print `openRepoTools (<repo> @ <ref>)`, as before (FR-043). This replaces "There is no version number here".
  - **One route (`:240-242`):** a workstation uses one install route or the other, never both, until opensoft/openBenches#165 lets `setup-estate-commands.sh` accept pipx's link (FR-047, Brett Heap's decision of 2026-10-18).
  - **Beside pipx's link (FR-044):**
    - the file count says SEVENTEEN, and SIXTEEN beside the link (`:244`);
    - the one link `--install` skips is pipx's, at `openRepoTools` (`:267-268`);
    - a new paragraph says the link is skipped, counted apart and given no receipt row, and that the count line reads `16 of 17 placed in <dir>, and 1 left to pipx` (`:271-276`);
    - the count invariant is 28 placed always, one left to pipx and 28 receipt rows, with the hook pair on top once its path answers (`:315-318`).
  - **`tests/test_repo_hygiene.py`:** README is now 505 lines, so `test_readme_is_short_enough_to_be_read` gets a dated entry (2026-10-18), and its cap goes from 486 to 505. The assembly's 510 does not move (review S1).
  - **`tests/test_test_roots.py`:** the lead widened T024's `files:` to it on 2026-10-18. After the fix round it changes one docstring.
- **The marks (`90794a3`):** `specs/006-release-pypi/tasks.md` marks T022 to T024 done, and adds `tests/test_test_roots.py` to T024's `files:`.

**What only becomes true at the v1.1.0 tag and the PyPI upload, or at a later step.** README gives no install command for the package. These places name the package, the release or a later step in the present tense:
- `docs/release-notes/v1.1.0.md:5-7` and `:11`: v1.1.0 "puts openRepoTools on PyPI", and is published from `opensoft/openRepoTools-code` after the migration (#186).
- `docs/release-notes/v1.1.0.md:14`, `:53` and `:57`: `pipx install openrepotools`, `pipx install openrepotools==1.1.0` and `pipx install --force openrepotools`. They work once PyPI serves 1.1.0, which is why the file is a draft.
- `docs/release-notes/v1.1.0.md:90`: the file's own path in the spec leg, which the cutover makes.
- `README.md:240-241`: names pipx's `openrepotools` as one of the two routes, and gives no command. The notes' `:7` has 1.1.0 as the first version on PyPI.
- `README.md:271-272`: "a link into pipx's `openrepotools` environment". Such a link exists on a workstation that has installed the package with pipx.
- `README.md:361-364`: "The release build writes it into the `openrepotools` package it builds". That build is PR 3's `release.yml`, and its first run is a later step, on Brett Heap's word.
- `tests/test_repo_hygiene.py:2536-2538`: the new README test says "FR-045's later PR (the change's tasks.md 6.4) rewrites this test", because that PR adds the pipx route to the assembly's README.
- `tests/test_repo_hygiene.py:2510-2513` and `tests/test_test_roots.py:367-368`: the re-cut of `assembly-0001` sets the assembly's caps. That is lane openRepoTools-1's step.

**Runs**
- **Queue prefix q4k** (branch `lane3-queue/q4k-228pr4-on-q3k`: q3k, which holds PR 3 at its fix head, + this head `26e5d9a`, on main `677acc0`, tree `4ea56ea`): `tests.yml` run 39373758353, green. This is the run of record for the landing.
- **The head:** `26e5d9a`, on PR 3's earlier head `1b41ce7`. PR 4's diff touches no file of PR 3's two fix rounds (`.github/workflows/release.yml`, `tests/test_release_workflow.py` and design.md), so the rounds and this PR share no file.

**Review.** An independent adversarial review (Opus) gave **LAND after fixes**, with no MUST and five SHOULDs (`briefs/rv-pr4-006-final.md` in lane 3's tree). It read T022 to T024 as they stood before the fix round.
- **Fixed here, in `3efcd71`:**
  - S1: the assembly's README cap stays 510, and is not 529. The README part of `assembly-0001` no longer applies (its hunks at `:237`, `:260` and `:300` fail), so 529 was arithmetic over a patch that does not apply. T024's dated entry says so, and `tests/test_test_roots.py` is back to 510 and 511 with a docstring whose numbers are true at this head;
  - S2: `test_readme_says_what_a_release_is_and_offers_no_package_route` reads README. It holds that no line matches `(?i)\bpipx?\s+install\b.*\bopenrepotools\b`, that the install section cites `opensoft/openBenches#165`, that the version paragraph holds the three `--version` first lines, and that `16 of 17 placed in <dir>, and 1 left to pipx` and `28 receipt rows` stand;
  - S3: README's one-route sentence names the two routes it rules between, pipx's `openrepotools` and workBenches' `./setup.sh`, in the same three lines, so README stays at 505 lines;
  - S4: the v1.1.0 notes fill `<#237 PR>` with `#247`, say that our exact guard entry is taken back out of a file that carries it while the pair is deferred, and turn the stale checklist item into a re-read item.
- **S5** needed nothing: `90794a3` already records T024's widened `files:`.
- **Not taken here:** the seven NITs, N1 to N7.
- **What the reviewer ran:**
  - the three verify commands at an assembled head, GitHub `main` `08e7550` with PR 1's head `08743b0` merged and the three T022 to T024 commits picked on it, each with the patch-id of its original: T022's `cmp` silent; T023's three greps pass; T024's guard passes and `bash tests/run.sh -k 'repo_hygiene or readme'` gave 207 passed;
  - `bash tests/run.sh -k test_test_roots`: 40 passed;
  - a trial of all 11 commits of PRs 2 to 4 on the same base, clean;
  - six README mutants: the pipx route offered, the FR-047 sentence dropped, "no version number" put back, and the wrong counts beside pipx's link all stayed green in the suite, which is S2. One line over the cap failed, and the verify's own grep missed `pipx install openRepoTools`;
  - not done: a full local suite (stopped at about 7%) and PR 4's Linux CI. CI's `tests` job is the suite of record.

**The fix round's re-check** (lane openRepoTools-5, Opus, #228 6267650575): **LAND after one line.** S1 to S4 are fixed. The new test fails on mutants M1, M2, M3, M4 and M6, each on the right assertion. With `26e5d9a`, PR 4 is LAND by this re-check (#228 6267768154).
- **Its SHOULD**, fixed in `26e5d9a`: T024's dated entry was headed "486 -> 505 HERE AND 510 -> 529 AT AN ASSEMBLY ROOT", against its own last paragraph. It now reads "486 -> 505 HERE, on 2026-10-18".
- **Its NIT**, fixed in the same commit: the entry named two of `assembly-0001`'s failing README hunks. It now names all three, each with what it changes and what it fails against. `git apply --check` on each hunk alone shows `:237`, `:260` and `:300` fail, and the other seven apply.
- **Its other two NITs**, left as they are: the new test's pattern lets `pip3 install`, `uv tool install` and a command wrapped across two lines through, which is no worse than before; and the count checks read the raw text, so a reflow turns them red.

**Notes for other work**
- **T025**, the quickstart run on PR 4's head, comes after this PR, as a small docs PR: lane openRepoTools-5's two commits and the `tasks.md` mark, on `26e5d9a`. It carries NIT-7's three citation fixes. #255 lands after that.

**Landing:** Brett Heap's decision 4 on #228 ("Yes, merge when green (Recommended)"), and his word of 2026-10-18T20:3xZ, "use this as approval to merge when green for all merges thru v1.1.0".
- Lane openRepoTools-3 lands the queue in one order: #262, PR 2, PR 3, PR 4, T025's docs PR, then #255.
- This PR squash-merges after an independent review, once Linux CI is green on the exact tree main will have after its squash. The record is a queue run of `tests.yml` on lane 3's prefix branch, under **Runs**.
- q4k is q3k plus this head, so PR 3's fix rounds are beneath it.
- When its turn comes, lane 3 pushes a head that merges main into `26e5d9a` with q4k's tree, as a fast-forward, so the tree under review is the tree that was tested.

Lane: openRepoTools-3

Landed by lane openRepoTools-3 as queue prefix q4k (tree 4ea56ea, tests.yml run 39373758353 green), on Brett Heap's word of 2026-10-18T20:37:07Z: "use this as approval to merge when green for all merges thru v1.1.0". Review: LAND after fixes, with no MUST; the fix round's re-check by lane openRepoTools-5 (#228 6267650575) left one SHOULD, fixed at 26e5d9a (tests/test_repo_hygiene.py:2485).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
brettheap pushed a commit that referenced this pull request Oct 21, 2026
…rea, and add the lines for #263, #289, #294 and #296, the changes after a42946e (#228)

`docs/release-notes/v1.1.0.md` takes the fixes of lane 3's review of d8a349d (#293 comments 6314185715 and 6314529807, the second of which replaces three of the corrected texts of the first) and the lines for the changes after a42946e.

The review's fixes:
- Line 45 (#255, #271) no longer says that `lane-reconcile` and `lane-handoff` read a dependency nested in a leg: only the sweep and `lane-end` do. It says that a leg directory this account cannot search is unreadable and never `absent`, that a nested dependency is unreadable to the sweep and `lane-end` too, and that the sweep still reads a declared leg beneath such a directory as `absent` (#272, open). It also says NOT POLLED where the tool does.
- Line 46 (#280, #283): an `awk` exits, it does not return, and the sentence on a status of 0 or 8 is gone.
- Line 61 (#214): the fence never checks whose a local commit is, only that it adds or changes a register or handoff file.
- The `<other-changes>` item counts 44 of the 53, because the openRepoShape pin's line (#233) is in the list, and the other 9, not 43 and 10. The milestone item names #247 and lists the six entries of 2026-10-20.
- #209 is not tests-only: its `-e` fixes `lanes`' stderr filter under macOS's BSD grep, so it moves from the test suite to the lane area, and its one line there carries its test changes too. It is cited once.

The lines for the changes after a42946e, each in its area and worded from its squash commit and description: #263 (d9065df) and #289 (fb2cf36) under the register and `lanes-edit.sh`, #294 (acc89ea, which closes #292) under `lane`, `lane-start`, `lane-end` and the name guard, and #296, which pins every Ubuntu runner to ubuntu-24.04, under the test suite and its checks. #296 has not landed yet: lane 3 lands it right before #293. The `<other-changes>` item says the lines were added on 2026-10-21 and are not in its counts, and the placeholder stays for #293 itself.

Not touched: lane 3's optional sentence on #271 and its NIT on the tag.

Lane: openRepoTools-2
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
brettheap added a commit that referenced this pull request Oct 21, 2026
… 1.1.0 and list, by area and from the squash titles of aaa7bc8..a42946e, what else changed on main since v1.0.0 (#228) (#293)

Part of #228. It brings `docs/release-notes/v1.1.0.md` up to date on main: first on `a42946e`, as lane 3 asked on Brett Heap's word (#228 comment 6303608345, the section for lane openRepoTools-2, task 1), then with lane 3's review of `d8a349d` (comments 6314185715 and 6314529807 on this pull request), with the lines for the three changes that landed after `a42946e`, and with the line for #296, which landed right before this pull request. It is one file, changed in two commits (`d8a349d` and `bebb77d`), 59 insertions and 4 deletions against main.

Lands last before rehearsal D's freeze; lane 3 reviews and merges it (#228 6303608345)

**What changed**
- **Lane 3's review is applied,** in the second commit:
  - **The line on #255 and #271** no longer says that `lane-reconcile` and `lane-handoff` read a dependency nested in a leg, since only the sweep and `lane-end` do. It says that a leg directory this account cannot search is unreadable and never `absent`; that a dependency nested in a leg whose directory, or one above it, it cannot search is unreadable to the sweep and `lane-end` too; and that one known gap remains, #272, where the sweep reads a declared leg beneath such a directory as `absent`, so `lane-end` does not hold on it. It also says NOT POLLED where the tool prints it, and it says that the item closes two gaps in #246, where it said "both gaps" with nothing before it to refer to.
  - **The line on #280 and #283:** an `awk` exits and does not "return", and the sentence on a status of 0 or 8 is gone, because a reader of the notes cannot act on it.
  - **The line on #214:** the fence passes a local commit only when it adds or changes a register or handoff file, and never checks whose it is, so the line no longer says "the lane tooling's own".
  - **The counts in the `<other-changes>` item:** the pin's line (#233) is in the list, so the list carries 44 of the 53, and the other 9 have their lines under "What 1.1.0 adds", not 43 and 10. The item says "the openRepoShape pin" where the runner pin of #296 could be taken for it.
  - **The milestone item** names #247, so it lists the six entries the milestone held on 2026-10-20.
  - **#209 is not tests-only.** Its `-e` fixes `lanes`' stderr filter under macOS's BSD `grep`, so it moves from the test suite to the lane area, after #208's, and its one line there also carries its test changes: the `repoG#8` assertion and the count of bash files in prose. It is cited once.
- **Lines for the changes after `a42946e`:** #263 (`d9065df`), #289 (`fb2cf36`) and #294 (`acc89ea`, which closes #292) landed on 2026-10-21, from 11:28Z to 11:30Z. Each has a line in its area, worded from its squash commit and its description: #263 and #289 under "The register and `lanes-edit.sh`", and #294 under "`lane`, `lane-start`, `lane-end`, the name guard and their helpers".
  - **#296 has its line too,** last under "The test suite and its checks": CI and the release workflow run on `ubuntu-24.04`, because `ubuntu-latest` is now Ubuntu 26.04, and `macos-latest` is unchanged. It landed right before this pull request, as `5afba4a`.
- **"What 1.1.0 adds" gains two lines,** after the annotated-tags item. They are for the three entries that closed in the v1.1.0 milestone after the draft was written:
  - **#255,** fixed by #271: the lane tools name what they could not read in a triad's legs. `lane-handoff` names every tree-inventory record that is not a whole schema-1 one, and a leg directory this account cannot search is unreadable and never `absent`. Only the sweep and `lane-end` also see a dependency nested in such a leg, since `lane-reconcile` and `lane-handoff` read declared legs only, and #272 stays open as the known gap.
  - **#280,** fixed by #283: `lane-handoff` reads the lane's lifecycle whole and parses it afterwards, so an `awk` that exits early can no longer turn `lane-state`'s SIGPIPE into a lifecycle that could not be read.
  - #283 is #280's pull request, so the three numbers make two lines. Each line cites the issue and its pull request, as the hook-pair line does for #237 and #247.
- **"What else changed since v1.0.0" is drafted** from `git log aaa7bc8..a42946e`, which is 53 squash commits, one pull request each and no merge commit. It is grouped by area, one line each, and each line ends with its pull request. It lists 44 of the 53: the pin's line (#233) at its head and 43 by area, as 4 on the estate commands, 10 on the register and `lanes-edit.sh`, 11 on `lane`, `lane-start`, `lane-end` and the name guard, 6 on the handoff and its skill, 1 on the lane tools in a triad's legs (#246), 9 on the test suite and its checks, and 2 on the triad migration's records.
  - **The other 9 are accounted for elsewhere:** the package series of #228 (#262, #267, #268, #269, #270 and #284) is covered by #228's lines, and #247, #271 and #283 have the lines above.
  - **The lines added on 2026-10-21** are for the four changes after `a42946e`: #263 and #289 on the register and `lanes-edit.sh`, #294 on `lane`, `lane-start`, `lane-end` and the name guard, and #296 on the test suite and its checks. The areas now hold 47 lines, one for each of 47 pull requests, and #233's line at the head of the list makes 48.
  - **The list is redone at the tag.** It is drafted from the squash titles only.
- **"Before the tag" is updated in three items:**
  - `<pr-count>` gives the count at `a42946e`, which is 53;
  - `<other-changes>` says what was drafted, which 9 pull requests have their lines under "What 1.1.0 adds", that the lines for #263, #289, #294 and #296 were added on 2026-10-21, and what is left to do at the tag; the placeholder's own line now stands for the changes after `a42946e` that have no line above;
  - the milestone item names the six entries the milestone held on 2026-10-20: #228 still open, #237 closed by its pull request #247, #255 closed, and #280 closed by its pull request #283.

**Not added:** nothing that has landed. #296 landed right before this pull request and has its line. This pull request itself, and whatever lands after it, is what the `<other-changes>` placeholder stands for. None of #263, #289, #294, #296 and #292 is in the v1.1.0 milestone, which still holds the six entries of 2026-10-20.

**How this keeps the draft's rules**
- **One-line paragraphs:** every added line is its own list item, and none is wrapped.
- **References:** every reference above "Before the tag" is spelled `opensoft/openRepoTools#N`, with no bare `#N`, since the notes are published from another repository after the migration.
- **Placeholders:** `<other-changes>` stays as a named placeholder in code font, as the closing line of the list and as its checklist item. `<pr-count>` is unchanged apart from the drafting-time count.
- **The file's closing lines are untouched:** the self-naming last line stays last.

**Tests**
- **T023's verify command** passes: the last line names `openRepoTools-spec` and `docs/release-notes/v1.1.0.md`, `## Before the tag` is there, and so is `pipx install --force openrepotools`.
- **Coverage:** a script over `git log aaa7bc8..acc89ea`, 56 commits and no merge, finds each pull request cited above "Before the tag" except the six of #228's package series, which #228's lines cover. That is 46 by area, #233 at the head of the list, and #247, #271 and #283 under "What 1.1.0 adds". #296 is not in that range, and its line cites it.
- **Hygiene:** by grep over `tests/`, no test names this file. The two that read its content scan every tracked file, and both are in `tests/test_repo_hygiene.py`. The only other test that names `release-notes` is in `tests/test_release_workflow.py`, and it reads `release.yml`, not the notes. All of `tests/test_repo_hygiene.py` was run on the file, through `tests/run.sh` with every `LANES_*` and `TMUX*` variable unset:

  ```text
  -k 'repo_hygiene' -v
  collected 2933 items / 2696 deselected / 237 selected
  237 passed, 2696 deselected in 2.59s
  ```
- **Not run:** the whole suite. CI's `tests` job is the suite of record. This pull request's own runs on `bebb77d` went red on `ubuntu-latest`, which is Ubuntu 26.04, for the reasons #296 gives, because #296 was not yet on main. The record is lane 3's queue run over main, #296 and `bebb77d`, on `ubuntu-24.04` (below).

**Where the draft's rules left room, and lane 3's answers (comment 6314185715)**
- **Which section holds #255 and #280:** "What 1.1.0 adds", because the milestone is Brett Heap's scope for the release and #237 with #247 already sit there.
- **`<other-changes>` stays** as a closing placeholder after the drafted list, since this pull request itself lands after `a42946e`.
- **How much to list:** the tests-only and migration-record lines stay through the tag, because the check that every pull request has a line depends on them. If Brett Heap wants a shorter body, they fold into one line that still lists every pull request number.
- **Issues and pull requests:** the milestone lines cite both, and the area lines cite the pull request only.

**Lane 3's re-check of `bebb77d`** (#293 6315668503) is MERGE AFTER FIXES.
- **What holds:** every line lane 2 listed, the recount behind line 140 (44 of the 53 pull requests in `aaa7bc8..a42946e`, and 56 in `aaa7bc8..acc89ea`), the file's rules, and T023's verify commands.
- **One SHOULD and two NITs, all wording:**
  - line 45's sentence on a dependency nested in a leg, where "one above it" reads as a directory above the leg, which is #272's case. The text was lane 3's own;
  - "One known gap" in the same line;
  - line 74's last clause.
- **Why they wait:** lane 3 merges the notes as tested and carries the three fixes into the notes' final pass at the tag. A push here would cost another CI round while lane 2 is out of usage until 15:30Z, and the notes are edited again at the tag in any case.

Lane: openRepoTools-2

Landed by lane openRepoTools-3, as queue prefix `lane3-queue-u/p2-293` (tree `9b879ca`; tests.yml run 39595166877, green on `ubuntu-24.04`), right after #296. Before the landing, lane 3 merged main into the branch, so that its own checks ran over main with #296; the content is unchanged. Brett Heap's word, of 2026-10-20T22:5xZ: "merge all when green for all merges thru v1.1.0. use this for all lanes" (#228 6303614082).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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.

Fresh install activates Claude name-guard hook before workspace linking supplies its target

1 participant