Skip to content

park: with no estate around you it parks every estate, in name order, continuing past a refusal; resume keeps the refusal; the handbook guard names the README by blob hash (#91) - #93

Merged
brettheap merged 3 commits into
mainfrom
feat/park-everything
Sep 10, 2026
Merged

brettheap merged 3 commits into
mainfrom
feat/park-everything

Conversation

@brettheap

@brettheap brettheap commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Lane: xfactory-2 (xFactory-2)
Claim: #91 (CLAIMED comment, 2026-09-10)
Ruling: the RULING comment on #91 — Brett Heap, 2026-09-10, verbatim "for the park-all, lets make that be park with no estate option. so just park will do park-all" — superseding ruling 3 of #82 for the no-estate case only.

Closes #91.

Bare park with no estate around you parks every estate. With no <Name>, no --repo, and nothing found by the walk-up, park no longer refuses: it lists the estates under the projects directory (both spellings, deduped, family folders and standalone roots, pinned copies and worktrees skipped — the same discovery its refusal used), then runs its own single-estate procedure on each in name order under an === park <Name> === header, continuing past a refusal or a non-zero make park, and ends with a per-estate summary and exit 1 if anything refused or reported findings — a skip is not a pass. --dry-run, --lane and -- ARGS… reach every estate. UNCHANGED: park <Name>, park --repo, and bare park inside an estate, where the walk-up still wins (a park from inside IRRS must not park the whole workstation). No estates at all keeps its old wording and exit 2. resume's bare form deliberately KEEPS the refusal: rebuilding every estate on a fresh machine by accident is the opposite risk, and the ruling names park only. Mechanism: the single-estate path is factored into run_one_estate() (in-process, no recursive shell-out); the shared resolver block is untouched and still byte-identical in both files.

The handbook guard names the README by BLOB HASH, not commit. #90's guard compared README.md against a commit sha the page named, which (a) needed full history in CI and (b) can never hold across this repository's squash-merges — the README commit a branch names never lands on main under that sha. The footer now carries README.md blob <hash> and the test asserts git hash-object README.md equals it: content, no history, exact in any clone depth, no skip branch. The provenance sentence (first cut c093813, regenerated at cbca5b4) stays as prose. The page's #park paragraph follows #91's README wording; the resume-keeps-the-refusal callout beside it says why. Proven to bite with a corrupted hash. The fetch-depth: 0 lines stay (harmless); their comments no longer credit this test.

Tests: four new park-everything cases (in-order across both spellings; continue past a refused estate, exit 1; inside an estate only that estate parks; dry-run, lane and pass-through args reach every estate); the no-estates (none) case and resume's refusal unchanged and green; the resolver-identity test green. Full suite: 892 passed, 1 skipped. Caps moved with dated entries. Three commits: the feature, a merge of main (#90, no conflicts), the guard change.

🤖 Generated with Claude Code

Summary by Sourcery

Allow bare park outside an estate to process all discovered estates while preserving safe resume behavior and making handbook freshness validation history-independent.

New Features:

  • Make bare park discover and process every estate when invoked outside an estate, preserving ordering, option forwarding, continuation, and aggregate failure reporting.

Bug Fixes:

  • Keep bare resume refusal behavior unchanged to prevent unintended rebuilding of every estate.
  • Make the handbook consistency check validate the README's current blob content without depending on repository history or allowing skipped checks.

Enhancements:

  • Document the distinct bare-command behavior for park and resume across the project guidance and handbook.

CI:

  • Retain full-history checkouts as a general CI default while removing the handbook guard's dependency on checkout history.

Documentation:

  • Update README, AGENTS.md, and the handbook to describe park-all behavior and resume's retained refusal.
  • Record the handbook's README provenance using a blob hash rather than a commit hash.

Tests:

  • Add coverage for estate discovery order, continuation after refusal, walk-up isolation, option propagation, no-estate behavior, and resume refusal.
  • Update repository hygiene tests and line-length caps for the revised documentation and blob-hash guard.

brettheap and others added 3 commits September 10, 2026 11:37
… 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]>
…ard 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]>
@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 9 hours and 6 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sourcery-ai

sourcery-ai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR changes bare park outside any estate from a refusal into an ordered park-all operation with per-estate continuation, while deliberately preserving bare resume refusal and all explicit or walk-up targeting behavior. It also makes handbook freshness validation clone-depth independent by checking README content via its blob hash, with documentation and regression tests updated accordingly.

Sequence diagram for park-all continuation and option propagation

sequenceDiagram
    participant User
    participant Park
    participant Resolver
    participant Estate
    User->>Park: park --dry-run --lane -- ARGS
    Park->>Resolver: discover estates
    Resolver-->>Park: estates in name order
    loop each estate
        Park->>Estate: run_one_estate --dry-run --lane -- ARGS
        alt refusal or non-zero make park
            Estate-->>Park: failure or findings
            Park->>Park: continue to next estate
        else clean result
            Estate-->>Park: success
        end
    end
    Park-->>User: per-estate summary and exit status
Loading

Flow diagram for bare park estate selection and execution

flowchart TD
    A["bare park invoked"] --> B{"estate found by walk-up?"}
    B -->|yes| C["run_one_estate"]
    B -->|no| D["discover estates under projects directory"]
    D --> E["dedupe, sort by name, skip pinned copies and worktrees"]
    E --> F{"estates found?"}
    F -->|no| G["print (none), exit 2"]
    F -->|yes| H["run each estate under park header"]
    H --> I{"refusal or non-zero make park?"}
    I -->|yes| J["continue to next estate"]
    I -->|no| K["continue to next estate"]
    J --> L["print per-estate summary, exit 1"]
    K --> M{"more estates?"}
    M -->|yes| H
    M -->|no| N["print per-estate summary, exit 0 if no findings"]
Loading

Flow diagram for bare resume refusal outside an estate

flowchart TD
    A["bare resume invoked"] --> B{"estate found by walk-up?"}
    B -->|yes| C["resume the selected estate"]
    B -->|no| D["refuse and list discovered estates"]
    D --> E["exit with refusal status"]
Loading

File-Level Changes

Change Details Files
Make bare park operate on every discoverable estate when no estate is selected by the walk-up resolver.
  • Factored single-estate execution into an in-process run_one_estate() path.
  • Enumerate family and standalone estates with existing deduplication and skip rules, then process them in name order.
  • Continue after per-estate refusal or non-zero make park, propagate flags and pass-through arguments, and return failure if any estate refused or reported findings.
  • Preserve walk-up behavior inside an estate, explicit-name and --repo behavior, and the no-estates response.
park
resume
tests/test_park_resume_commands.py
Keep bare resume refusal semantics distinct from the new bare park behavior.
  • Document that bare resume still refuses outside an estate to avoid rebuilding all estates accidentally.
  • Add regression coverage ensuring the unchanged refusal remains enforced.
resume
AGENTS.md
README.md
docs/handbook.html
tests/test_park_resume_commands.py
Replace handbook provenance validation against a commit with an exact working-tree README blob-hash check.
  • Store README.md blob <hash> in the handbook footer and compare it with git hash-object README.md.
  • Remove the shallow-clone skip path and update the hygiene test guidance and corruption coverage.
  • Retain full checkout depth while no longer describing it as required by this specific check.
docs/handbook.html
tests/test_repo_hygiene.py
.github/workflows/tests.yml
Synchronize repository guidance and documentation with the changed command semantics and provenance mechanism.
  • Update AGENTS.md and README.md to describe park-all discovery, ordering, continuation, and resume's separate refusal.
  • Update the handbook's park/resume section and provenance footer.
  • Adjust documentation line-count caps and explanatory comments.
AGENTS.md
README.md
docs/handbook.html
tests/test_repo_hygiene.py

Assessment against linked issues

Issue Objective Addressed Explanation
#91 Change bare park with no estate around the current directory to discover and process every eligible estate under the projects directory, in name order, while preserving the walk-up behavior when invoked inside an estate. ✅
#91 Ensure the park-everything operation applies all relevant options and arguments to each estate, continues after refusals or non-zero per-estate park results, reports each estate and a final summary, and returns the required exit statuses for failures, findings, and no estates. ✅
#91 Keep bare resume refusal behavior unchanged and update the user-facing documentation and command guidance to describe the new park behavior. ✅

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

@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.

🟢 Approval recommended

The behavior change is well-scoped, matches the linked ruling/issue, and is backed by targeted new tests plus updated documentation and a more robust handbook guard.

Pull request overview

This PR updates the user-level park/resume tooling and documentation to implement Issue #91: when park is invoked outside any estate with no <Name>/--repo, it now parks all discovered estates (while bare resume still refuses), and the handbook freshness guard becomes history-independent by checking README.md by blob hash.

Changes:

  • Implement “park-everything” behavior in park by factoring single-estate execution into run_one_estate() and adding park_every_estate() for the no-estate case.
  • Replace the handbook README staleness check from commit-diff-based to git hash-object README.md blob-hash-based verification, and update the handbook footer accordingly.
  • Expand/adjust tests and docs (README/AGENTS/handbook) to reflect the new park behavior and the retained safety refusal for bare resume.
File summaries
File Description
park Adds park-all behavior for the bare/no-estate case and factors single-estate execution into a reusable function.
resume Clarifies (in header docs) that bare resume with no estate still refuses, intentionally unchanged.
tests/test_park_resume_commands.py Adds coverage for park-all ordering, continuation after a refusal, “nearest wins”, and option/pass-through propagation.
README.md Updates the park/resume estate-resolution paragraph to document park-all vs resume-refusal behavior.
AGENTS.md Updates assistant guidance to match the new bare park behavior and preserve bare resume refusal guidance.
docs/handbook.html Updates the #park section wording and records README.md blob <hash> in the footer metadata.
tests/test_repo_hygiene.py Switches the handbook guard from README commit SHA diffing to README blob-hash checking; bumps doc line caps.
.github/workflows/tests.yml Keeps fetch-depth: 0 but updates comments to reflect that the handbook check no longer depends on history depth.
Review details
  • Files reviewed: 8/8 changed files
  • Comments generated: 0
  • Review effort level: Lite

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

park with no estate around you parks every estate (reverses ruling 3 of #82 for the no-estate case); resume unchanged

2 participants