Skip to content

docs/handbook.html: the designed reading of the README at cbca5b4 — the family workstation layout, --family, park/resume and the user commands, the workspace form; a guard that the page follows the README's outline (#89) - #90

Merged
brettheap merged 2 commits into
mainfrom
docs/handbook-regenerate
Sep 10, 2026

Conversation

@brettheap

@brettheap brettheap commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Lane: xfactory-2 (xFactory-2)
Claim: #89 (CLAIMED comment, 2026-09-10, on Brett Heap's "regenerate handbook.html with the missing sections")

Closes #89.

docs/handbook.html — the designed one-page reading of the README (#69/#71, cut at c093813) — regenerated against README.md at cbca5b4. Same design, same voice (a READING that reorders for a newcomer, never a copy), same guarantees: one self-contained file, inline CSS and one inline script, one Google Fonts link with real fallback stacks, no images, no other network calls; light and dark through the existing tokens only.

What the page gained, by section id: #park — new, all of ## Carrying in-flight work to another workstation (#80) with the park <Name> / resume <Name> user commands (#83: estate resolution, --repo, resume --workspace, the limits, "read the lines, not the exit code") and "who implements it, and what the record is" (the Speckit git extension, the record named once in ~/.agents/workspace.yaml, <user>-wip with the home-org default and the opt-in orgs: map (#86), nothing under worktrees/ committed, resume refusing on divergence, native Windows parking nothing); #families — the workstation layout (#79: the plain <Family>/ folder, the doubled <Family>/<Family> holder, --into, make siblings, which copy you work in, nothing ever moves a checkout) and the InkRouter example with the README's CURRENT command block (the old block still named ../InkRouter as the holder — the fidelity checker is how it was found); #start — "Joining a family" (--family, family-folder detection) and "What setup.sh actually runs" (#78), three commands installed and what park/resume do (#83), the Windows rehearsal spelling (#70); the masthead's fastest path; #legs — <user>-wip in the README's words, and the neutral-product-elects-the-shape paragraph the first cut never covered; #layout rows for park and resume; #agents — never reset, stash or force-push to make a refused park/resume succeed, and --workspace is not yours to pass; the rail nav; the footer's Regenerated from README.md at cbca5b4 on 2026-09-10; first cut from c093813 (#71).

Fidelity. 39 code blocks: 31 byte-identical to README.md/AGENTS.md fences, 0 re-wrapped, 5 quoted from README prose, 2 from inline code, 1 composed from three quoted commands (the masthead), 0 unmatched. 13 GitHub anchors all resolve to real README headings; 27 in-page anchors all resolve. html.parser clean; every one of the 40 element names the page uses has equal open/close counts. Every README ### has a home; the MedxEHR worked example is DELIBERATELY folded into #adopt (the page carries one worked example by design) and its .src link goes to the README.

The guard: tests/test_repo_hygiene.py::test_the_handbook_follows_the_readmes_outline — every README ## heading is in an explicit mapping table to a page element id (fence-aware heading extraction), no stale entry, every mapped id exists, no page <section> is unaccounted for (four are explained in a second table), and the page names its README commit exactly once with git diff <sha> -- README.md EMPTY — so the test goes red the moment the README moves past the page, and regenerating is the fix. That last check is skipped, and only it, when the commit object is absent (a fetch-depth: 1 checkout), so it does not bite in CI today — making it bite needs fetch-depth: 0 on the three checkout steps, a CI-wide change left for Brett's word. Five failure modes exercised in a throwaway clone. Full suite: 889 passed, 1 skipped.

Size: 1383 lines / 78.8 KB → 1634 lines / 99.5 KB. View: wslview docs/handbook.html from a checkout.

🤖 Generated with Claude Code

Summary by Sourcery

Regenerate the handbook to cover the latest README guidance and enforce its ongoing fidelity with repository hygiene checks.

New Features:

  • Expand the handbook with guidance for family workstation layouts, family joining, and the park/resume workflow for carrying in-flight work between workstations.

Bug Fixes:

  • Correct outdated handbook examples and platform-specific setup instructions, including the family holder paths and Windows rehearsal command.

Enhancements:

  • Add repository hygiene checks that explicitly map README headings to handbook sections and verify the handbook is based on an unchanged README commit.
  • Clarify naming rules, workspace repositories, installed commands, repository layout, and AI-assistant guidance in the handbook.

CI:

  • Use full Git history in all test workflow checkouts so the handbook staleness check runs in CI instead of being skipped.

Documentation:

  • Regenerate docs/handbook.html from README.md at cbca5b4 while preserving its designed, self-contained reading format and adding the newly documented workflows.

Tests:

  • Add coverage for README-to-handbook outline mapping, section accounting, handbook identifiers, source commit metadata, and README staleness.

…he family workstation layout, --family, park/resume and the user commands, the workspace form; a guard that the page follows the README's outline (#89)

The page was cut from README.md at `c093813` (#69, PR #71) and #88 fixed one
word in it. Everything the README gained in between was missing, so the
designed page told a newcomer less than the file it is a reading of. This is
the regeneration, at `cbca5b4`, in the page's own design and voice.

WHAT THE PAGE GAINED

- `#park`, a new section between "Keeping shape current" and "The degrade
  rule" — the whole of `## Carrying in-flight work to another workstation`
  (#80): the two root verbs and `ARGS=--dry-run`; `### park <Name>` and
  `resume <Name>`, from anywhere (#83) with the estate resolution, `--repo`,
  the fresh-machine `resume --workspace`, and what the two leave behind
  (including READ THE LINES, not the exit code); `### Who implements it, and
  what the record is` — the Speckit git extension rather than this
  repository, the person's record named once in `~/.agents/workspace.yaml`,
  `<user>-wip` with the home-org default and the opt-in `orgs:` map (#86),
  nothing under `worktrees/` ever committed, `resume` refusing on divergence,
  the family holder's dispatch into the WORKING clones, and native Windows
  parking nothing. One rail entry, `Park and resume`.
- `#families` gained two `<h3>`s: "The workstation layout: a plain folder,
  and two copies of every member" (#79) — the plain `<Family>/`, the holder
  at `<Family>/<Family>`, `--into` as the PARENT and `--work-dir` as the
  override, `make siblings`, which copy you work in, and that nothing ever
  moves a checkout — and "The InkRouter example", whose five `family.py`
  commands and two trees are the README's current ones (the block it
  replaced still named `../InkRouter` as the holder). Plus the holder's own
  `make validate` and its COPY pin.
- `#start` gained "Joining a family" (`--family <Family>`, and that standing
  in the folder needs no flag at all — AGENTS.md) and "What setup.sh actually
  runs", the seven-command flow including `mkdir -p <into>/<Family>` (#78),
  with the developer path from a checkout. The install step and the
  masthead's fastest path now say THREE commands, `unchanged` per file, and
  what `park` and `resume` are (#83). The rehearsal flag's Windows spelling
  is the README's own `py setup-project.py … --local-remote-dir .\rehearsal`
  (#70), replacing an aside that told the reader to go and read `--help`.
- `#legs` links `<user>-wip` to where such a repository lives, and gained the
  paragraph a reader of `openDox` needs: a neutral product may elect the
  shape and be its own assembly root, `also_matches` recorded rather than
  thrown away. `#layout` lists `park` and `resume`. `#agents` gained the rule
  that a refused `park` or `resume` is never worked around with a reset, a
  stash or a force-push, and that `--workspace` is nobody else's flag to
  pass.

FIDELITY. 39 code blocks on the page: 31 byte-identical to a README block
(whole, or a contiguous run of its lines), 0 re-wrapped, 5 quoted from README
prose, 2 from README inline code, 1 assembled by the page from three quoted
commands (the masthead). Every one of the 13 GitHub anchors resolves to a
real README or AGENTS.md heading, all 27 in-page hrefs resolve to an id on
the page, and the file still parses with `html.parser` with every tag
balanced: one file, inline CSS and one inline script, one Google Fonts link
with real fallback stacks, no images and no other network call.

THE GUARD. `tests/test_repo_hygiene.py::test_the_handbook_follows_the_readmes_outline`
ties the two files together, because nothing did: an explicit
`README_HEADING_TO_HANDBOOK_ID` maps every `## ` heading of README.md to the
id of the page element that carries it, so a new README section with no entry
fails NAMING THE HEADING and a heading deliberately folded into a neighbour
is a named decision; `HANDBOOK_SECTION_WITHOUT_A_README_H2` accounts for the
four page sections that are not a README `## ` at all, so a page section
cannot become unexplained. And the page names the README commit it is a
reading of, exactly once, whose README must be byte-identical to the one in
the tree — `git diff <sha> -- README.md`, against the working tree, so the
page goes stale the moment the README changes rather than one commit later.
That last check is skipped, and only that one, when the named commit is not
in the clone: a `fetch-depth: 1` CI checkout has one commit and the object is
absent there, while the outline checks are tree-only and run everywhere.

Evidence: `python3 -m pytest tests/test_repo_hygiene.py -q` 46 passed;
`python3 -m pytest tests -q` 889 passed, 1 skipped (`SHAPE_MEDXEHR_CLONE` is
unset — pre-existing and unrelated). The five ways the new guard can fail
were each exercised in a throwaway clone. Docs and one test only; no README,
script, template or workflow change, and both size caps are untouched.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 10, 2026 14:41
@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

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

@sourcery-ai

sourcery-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR regenerates docs/handbook.html against README commit cbca5b4, adding the missing family workstation and park/resume guidance while preserving the page’s designed reading format, and introduces an explicit outline-and-commit drift guard in repository hygiene tests.

Sequence diagram for parking and resuming in-flight work

sequenceDiagram
    participant User
    participant Command as park_or_resume
    participant Estate
    participant Speckit as Speckit_git_extension
    participant WIP as user_wip_repository

    User->>Command: park Name
    Command->>Estate: find estate
    Estate->>Speckit: make park
    Speckit->>WIP: record branches and commits
    Speckit-->>Estate: report parked and refused work
    Estate-->>User: print result

    User->>Command: resume Name --workspace owner/wip
    Command->>WIP: read workspace record
    Command->>Estate: clone or locate estate
    Estate->>Speckit: make resume
    Speckit->>Estate: recreate worktrees and un-commit parked work
    Speckit-->>User: report resumed or refused divergence
Loading

File-Level Changes

Change Details Files
Regenerated the designed handbook reading to cover the README’s newly added workstation, family, park/resume, setup, and naming guidance.
  • Added the #park section describing installed user commands, estate discovery, workspace records, refusal behavior, family dispatch, and Windows limitations.
  • Expanded startup and family sections with --family, setup execution flow, Windows rehearsal syntax, holder/workstation layout, sibling clones, and corrected InkRouter commands.
  • Updated navigation, repository layout, AI-assistant guidance, naming-family explanation, and regeneration metadata.
docs/handbook.html
Added a hygiene test that explicitly tracks handbook coverage and detects README drift.
  • Mapped every README ## heading to a handbook element and separately documented intentional handbook-only sections.
  • Validated mapping staleness, element IDs, unaccounted sections, and exactly one recorded README commit.
  • Compared the working README against the recorded commit when available, while skipping only that comparison for shallow checkouts.
tests/test_repo_hygiene.py

Assessment against linked issues

Issue Objective Addressed Explanation
#89 Regenerate docs/handbook.html so it includes the README sections and details added since #71, including the family workstation layout, --family setup flow, park/resume behavior and user commands, the workspace repository naming form and orgs override, updated installation details, and Windows rehearsal guidance. ✅
#89 Preserve the handbook's designed, self-contained reading of the README rather than turning it into a direct copy, while ensuring the added content remains faithful to the README and AGENTS.md. ✅
#89 Add a lightweight hygiene test that explicitly maps every README ## heading to a handbook element, detects stale or unaccounted page sections, verifies mapped IDs, and checks that the handbook's referenced README commit matches the current README when available. ✅

Possibly linked issues


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

The new hygiene test uses regex-based HTML “parsing” that can yield false positives/negatives and should be made robust before relying on it as a drift guard.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Regenerates docs/handbook.html to match the current README.md structure and content (family workstation layout, --family, park/resume, installed commands, workspace repo), and adds a hygiene test to prevent the handbook from drifting behind the README again.

Changes:

  • Regenerate docs/handbook.html with new sections and updated navigation/metadata (including the README commit marker).
  • Add test_the_handbook_follows_the_readmes_outline to map README ## headings to handbook section ids and enforce revision fidelity (when the referenced commit exists).
  • Add supporting tables/constants to explicitly account for handbook-only sections and the README→handbook mapping.
File summaries
File Description
docs/handbook.html Regenerated handbook content and structure to reflect README at cbca5b4, adding park/resume, families workstation layout, --family, and updated footer metadata.
tests/test_repo_hygiene.py Adds an outline/revision guard tying handbook sections to README ## headings and enforcing the recorded README revision when available.
Review details
  • 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 on lines +1230 to +1236
ids = set(re.findall(r'\sid="([^"]+)"', page))
absent = sorted(set(README_HEADING_TO_HANDBOOK_ID.values()) - ids)
assert not absent, (
f"docs/handbook.html has no element with id(s) {absent}, which "
"README_HEADING_TO_HANDBOOK_ID maps README headings to")

sections = set(re.findall(r'<section id="([^"]+)">', page))
Comment on lines +1251 to +1254
if subprocess.run(["git", "cat-file", "-e", sha + "^{commit}"],
cwd=str(REPO), capture_output=True,
text=True).returncode != 0:
return # a shallow checkout; see the docstring's last note
… in CI (#89)

Ruled by Brett Heap on 2026-09-10: *set fetch-depth 0 so the staleness check
bites in CI.*

`test_the_handbook_follows_the_readmes_outline` compares README.md against
the commit `docs/handbook.html` says it is a reading of, which needs that
commit's OBJECT present. `actions/checkout`'s default `fetch-depth: 1`
fetches one commit, so the object was absent and that one check skipped
itself: green in CI, red only on the machine where the page would be
regenerated, which is the wrong way round. All three jobs — `tests`,
`tests-windows`, `tests-macos`, the only three `actions/checkout` steps in
the file — now check out with `fetch-depth: 0`, and each says why in a
comment naming the test.

The test's BEHAVIOUR is unchanged: the "skipped when the named commit is not
in this clone" branch stays, because a `git clone --depth 1` still hits it
and a failure about the clone is not a failure about the page. Only its
docstring moves, to say that CI is no longer such a clone.

Evidence: `python3 -m pytest tests/test_repo_hygiene.py -q` 46 passed (with
tests/test_windows_paths.py, 84 passed). The workflow parses under PyYAML and
compares equal to HEAD's parse with the three checkout `with:` blocks removed
— nothing else in the file moved. No actionlint on this machine; CI's own
actionlint step lints `templates/assembly-root/.github/workflows/validate.yml`
only, which is untouched.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 10, 2026 14:49
@sonarqubecloud

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42e8813b3b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/handbook.html
Comment on lines +907 to +909
detects the organisation from a fork&rsquo;s <code>origin</code> remote, if you have one; a
plain clone of <code>opensoft/openRepoShape</code> itself is its own <code>origin</code>, so
that still needs an explicit <code>--org</code>.</p>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require --org in checkout instructions

When running from a fork checkout, this paragraph says the organization can be inferred from origin, making omission of --org appear supported and allowing the fork owner to be selected without the human explicitly choosing the scaffold destination. The repository procedure specifically requires checkout runs to retain an explicit --org; remove the detection claim and keep the example mandatory.

AGENTS.md reference: AGENTS.md:L62-L64

Useful? React with 👍 / 👎.

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.

🟢 Approval recommended

The changes are cohesive and low-risk (docs + guardrails), and the remaining feedback is limited to minor test reporting/error-message clarity improvements.

Review details

Suppressed comments (2)

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

tests/test_repo_hygiene.py:1265

  • The assertion message concatenates the git diff --stat output and the remediation text without a guaranteed separator; if the --stat output ever lacks a trailing newline, the message becomes hard to read. Add an explicit leading newline before the remediation sentence.

tests/test_repo_hygiene.py:1257

  • The docstring says check (4) is skipped when the README commit object is missing (e.g., shallow checkouts), but the test currently returns, which records as a pass rather than a skip in pytest output. Use pytest.skip(...) so the test report reflects what happened and makes shallow-checkout behavior explicit.
    if subprocess.run(["git", "cat-file", "-e", sha + "^{commit}"],
                      cwd=str(REPO), capture_output=True,
                      text=True).returncode != 0:
        return          # a shallow checkout; see the docstring's last note
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap
brettheap merged commit 5777ca8 into main Sep 10, 2026
6 checks passed
brettheap added a commit that referenced this pull request Sep 10, 2026
… continuing past a refusal; resume keeps the refusal; the handbook guard names the README by blob hash (#91) (#93)

* park: with no estate around you it parks every estate, in name order, continuing past a refusal; resume keeps the refusal (#91)

Brett Heap's RULING, 2026-09-10, verbatim: "for the park-all, lets make that
be park with no estate option. so just park will do park-all." This
SUPERSEDES ruling 3 of #82 ("with no <Name> and no estate around the cwd
this REFUSES and lists what it found") for that one case only: `park
<Name>`, `park --repo`, and the walk-up inside an estate — NEAREST STILL
WINS, so standing inside an estate parks that estate, never the whole
workstation — are exactly as they were. `resume`'s own bare form keeps
ruling 3's refusal deliberately: rebuilding every estate this machine has a
record of, by accident, is the opposite risk from `park` failing to park
the one you meant, and #91 names `park` only.

THE MECHANISM. The single-estate procedure — check the Makefile, build
`ARGS`, print the banner, run `make park`, print what did not carry, print
the outcome line — is factored out of the resolve-and-run tail into
`run_one_estate`, which RETURNS a status instead of exiting; the
single-estate call site (`park <Name>`, `park --repo`, bare `park` inside an
estate) turns that return straight into its own exit code, so a named run
behaves exactly as it always did. A new `refuse` helper is the print half of
`die` without the `exit`, so a park-everything run can report one estate's
"no Makefile" refusal and carry on to the next; `die` is now `refuse` plus
the exit, so the two can never print differently by accident.

`all_estate_dirs` discovers every estate under the projects directory with
the SAME rules the refusal's own listing already used — a family folder
(`<X>/<X>/family.yaml`) or a standalone root (`<X>/project.yaml`), one level
under `$PROJECTS_DIR` or both `~/projects`/`~/Projects` — which is what
already excludes a pinned `members/<X>` copy (three levels down) and a
linked feature worktree (`is_project_root` itself refuses one). It sorts by
NAME rather than by discovery order, so an estate under `~/projects` and one
under `~/Projects` interleave alphabetically instead of one spelling's
estates printing entirely before the other's.

`park_every_estate` prints the list first (`park: no estate around <cwd>;
parking every estate under <dir>:`, then the same rows the old refusal
printed), then runs `run_one_estate` for each discovered estate in name
order under an `=== park <Name> ===` header, CONTINUING PAST A REFUSAL OR A
NON-ZERO `make park` rather than stopping at the first one. A skip is not a
pass (#80's rule): an estate whose own `make park` exited 0 but still left
something behind ($LEFT > 0) counts against the overall result exactly as a
refused one does. The run ends with one summary line per estate (`parked`,
`refused (exit N)`, or `findings (N thing(s) not carried)`) and `park: N
estate(s) parked, M refused or with findings`; it exits 0 only when every
estate ran clean, else 1. `--dry-run`, `--lane` and `-- ARGS` are read once
per estate inside `run_one_estate`, so they reach all of them. With NO
estates anywhere, the old ruling-3 refusal and its `(none)` listing are
untouched, and it still exits 2 — there is no "every estate" to park-all
there, so this is not this object's case to change.

`resume` is UNCHANGED behaviourally: bare `resume` with no `<Name>` and no
estate around the cwd still refuses. Its header gains a note saying so
deliberately and why, so a reader of one file is not left wondering why the
sibling command diverged.

The shared estate resolver block — `# --- BEGIN`/`# --- END shared estate
resolver` — is untouched byte for byte in both files; every addition here is
either above it (the header comment, the `refuse` helper) or below it
(`require_make`, `run_one_estate`, `all_estate_dirs`, `park_every_estate`,
the resolve `else` branch). `test_the_two_commands_carry_the_same_resolver_
byte_for_byte` stays green.

Docs: `park --help`'s "With no <Name>" paragraph, the README's "How the
estate is found" paragraph, and AGENTS.md point 5's opening sentence all say
the same new thing — park-everything for `park`, the kept refusal for
`resume` — rather than one going stale next to the other. Caps move with
dated entries, in each function's own style: AGENTS.md 374 -> 381, README.md
1219 -> 1225.

Tests, `tests/test_park_resume_commands.py`: the old
`test_no_name_and_no_estate_refuses_and_lists_what_it_found` becomes four
park-everything tests — two estates (one family, one standalone) parked in
name order with the list printed first; one estate's `make park` exiting
non-zero reported while the other still parks, overall exit 1; the walk-up
still winning inside an estate, asserting the OTHER estate's stub never ran;
and `--dry-run`/`--lane`/`-- ARGS` reaching every estate. The existing
`test_no_name_and_no_estates_at_all_says_none` (exit 2, "(none)") and
`test_resume_with_no_name_and_no_estate_refuses` (resume unchanged) are
untouched, and both still pass.

`python3 -m pytest tests/test_park_resume_commands.py tests/test_repo_hygiene.py -q`:
122 passed. Full suite, `python3 -m pytest tests -q`: 891 passed, 1 skipped.
`bash -n` clean on both files; `shellcheck` (docker koalaman/shellcheck:stable)
clean on both, no new suppressions.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* The handbook names the README it was cut from by BLOB HASH, so the guard needs no history and squash-merges cannot orphan it; the page's park paragraph follows #91 (#91)

THE FLAW. #90 (5777ca8) landed `test_the_handbook_follows_the_readmes_outline`'s
check (4) as `git diff <sha> -- README.md` against the commit the footer
named, and #91's own README edit was about to turn that red in CI the moment
it merged with main. Worse than one red check: every PR in this repository
SQUASH-MERGES, so the README commit a feature branch names in the footer
never exists on main under that sha at all — it survives only as long as the
remote branch does, and once the branch is deleted the object is gone even
locally. The check needed `fetch-depth: 0` just to have a chance of seeing
that commit in CI, and even then it was diffing against something a
squash-merge workflow does not keep. `git merge --no-ff origin/main` (merge
commit 2c10faf) brings #90 in first, with no conflicts — #90 touched
docs/handbook.html, tests/test_repo_hygiene.py and
.github/workflows/tests.yml only, none of which #91 had touched yet, and
tests/test_repo_hygiene.py's own two cap edits (AGENTS.md 374->381, README.md
1219->1225) sit far enough from #90's pure append (the new test at EOF) that
git auto-merged the file with no help.

THE FIX. Check (4) now compares CONTENT, never history: the footer names
`README.md blob <hash>`, and the test asserts that hash equals
`git hash-object README.md` of the WORKING TREE file — no commit, no diff, no
`git cat-file -e` existence probe, no skip branch for a shallow clone. Two
files with identical bytes hash identically regardless of which commit either
one is, or is not, on; a squash-merge cannot orphan a blob hash the way it
orphans a feature-branch commit, because the blob IS the README, checked out
fresh on every clone at every depth. `HANDBOOK_README_SHA` (matched `README.md
at <hex>`) is now `HANDBOOK_README_BLOB` (matched `README.md blob <hex{40}>`,
full-length only, so it can never pick up one of the two commit shas sitting
in the prose sentence beside it). The footer keeps its history as PROSE —
"First cut from README.md at c093813 (#71); regenerated at cbca5b4 (#89)" —
which is not machine-checked and does not need to move for a small sync fix
like this one; only the blob hash moves, to this branch's final
README.md (e2598c1).

The test's docstring drops the now-false claim that check (4) skips itself in
a shallow clone (it never skips now, and needs no history to be exact in one)
and says what changed and why, citing #91 alongside #89's original
precedent. `.github/workflows/tests.yml`'s three `fetch-depth: 0` lines are
UNTOUCHED per Brett Heap's instruction — they stay a generally useful default
for whatever history-based check this suite grows next — only their comments
change, to say the handbook's own check no longer depends on them.

THE PAGE ITSELF. `docs/handbook.html`'s `#park` section's "How the estate is
found" paragraph now says what README.md says as of #91: with no estate
around the cwd either, `park` PARKS EVERY ESTATE it finds instead of
refusing (Brett Heap's RULING of 2026-09-10, #91, superseding ruling 3 of #82
for this one case), listing what it found and running itself on each in name
order, continuing past a refusal. The page's own `<span class="refuses">`
callout beside it — previously "Nothing is parked by guess: ... park REFUSES"
— is repurposed rather than deleted, since it is `resume`'s bare form that
still genuinely refuses now: "`resume` keeps the old refusal ... rebuilding
every estate on a fresh machine by accident is the opposite risk from `park`
failing to park the one you meant." Same `<p>` count before and after (two),
no `<section>`, `id`, or `<a class="src">` touched, so checks 1-3 and every
`dt`/`dd`/`div`/`ul`/`li`/`h2`/`h3`/`h4` count on the page stay balanced —
verified with a small tag-count script, not just by eye.

Evidence: `python3 -m pytest tests/test_repo_hygiene.py -q` 46 passed (was
red on `test_the_handbook_follows_the_readmes_outline` before this commit, on
the merge alone). `python3 -m pytest tests -q`: 892 passed, 1 skipped.
`python3 -c "import yaml; yaml.safe_load(open('.github/workflows/tests.yml'))"`
parses clean. A throwaway corrupted blob hash was confirmed to fail the guard
with a clear diff before being reverted, so the assertion is proven to bite,
not just to pass.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
@brettheap
brettheap deleted the docs/handbook-regenerate branch September 11, 2026 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants