Repository navigation
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
Conversation
… 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]>
|
@codex review |
There was a problem hiding this comment.
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.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Reviewer's GuideThis PR changes bare Sequence diagram for park-all continuation and option propagationsequenceDiagram
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
Flow diagram for bare park estate selection and executionflowchart 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"]
Flow diagram for bare resume refusal outside an estateflowchart 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"]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
There was a problem hiding this comment.
🟢 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
parkby factoring single-estate execution intorun_one_estate()and addingpark_every_estate()for the no-estate case. - Replace the handbook README staleness check from commit-diff-based to
git hash-object README.mdblob-hash-based verification, and update the handbook footer accordingly. - Expand/adjust tests and docs (README/AGENTS/handbook) to reflect the new
parkbehavior and the retained safety refusal for bareresume.
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.



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
parkwith no estate around you parks every estate. With no<Name>, no--repo, and nothing found by the walk-up,parkno 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-zeromake 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,--laneand-- ARGS…reach every estate. UNCHANGED:park <Name>,park --repo, and bareparkinside an estate, where the walk-up still wins (aparkfrom 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 intorun_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 assertsgit hash-object README.mdequals 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#parkparagraph follows #91's README wording; theresume-keeps-the-refusal callout beside it says why. Proven to bite with a corrupted hash. Thefetch-depth: 0lines 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 andresume'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
parkoutside an estate to process all discovered estates while preserving saferesumebehavior and making handbook freshness validation history-independent.New Features:
parkdiscover and process every estate when invoked outside an estate, preserving ordering, option forwarding, continuation, and aggregate failure reporting.Bug Fixes:
resumerefusal behavior unchanged to prevent unintended rebuilding of every estate.Enhancements:
parkandresumeacross the project guidance and handbook.CI:
Documentation:
Tests: