Repository navigation
Bare park parks the estate around the cwd and ASKS before sweeping; park --all / -a is the sweep unasked - #8
Conversation
… `park --all` / `-a` is the sweep unasked Brett Heap's RULING of 2026-09-10, verbatim: "lets change that so it parks the current repo. if not in a repo, then asks if want to park all. and park all should be park -a or park --all." It supersedes his openRepoShape #91 ruling of the same day, under which bare `park` with no estate around the cwd parked every estate unasked. - The walk-up is unchanged: inside an estate, bare `park` parks that one. - Outside every estate, at a terminal: list, then `park every estate above? [y/N]` on stderr. Only y/yes runs #91's sweep; anything else exits 2 with "nothing was parked". - Outside every estate, with no terminal on stdin: refuse, list, and name `--all`. Never hang on a question nobody can see. - `park --all` / `park -a`: the sweep from anywhere, unasked. Refused alongside <Name> or --repo, and when no estate exists at all. - `resume --all` / `-a` refuses by name and says why `resume` has no sweep, instead of the generic "put it after `--`". - The sweep itself (name order, continue past a refusal, skip roots without the overlay, one summary) is untouched; it now takes its rows from the caller that listed them. Tests 147 -> 160: the question under a real pseudo-terminal (y/Y/yes/YES, Enter/n/no/other), the no-terminal refusal, --all and -a, --all from inside an estate, the flag conflicts, and the sweep tests now driven by --all. README 178 -> 182 and AGENTS.md 95 -> 99, caps raised in dated docstring entries. Co-Authored-By: Claude Fable 5.1 <[email protected]>
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 2 hours and 55 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Reviewer's GuideChanges Sequence diagram for interactive park confirmationsequenceDiagram
actor User
participant Park
participant Terminal
participant EstateList
participant Estates
User->>Park: park
Park->>EstateList: list estates under projects directory
Park->>Terminal: write confirmation question to stderr
User->>Terminal: enter y, yes, or another answer
alt answer is y or yes
Terminal-->>Park: affirmative answer
Park->>Estates: park_every_estate(listed estates)
Estates-->>Park: one summary
else answer is not yes
Terminal-->>Park: non-affirmative answer
Park-->>User: exit 2, nothing was parked
end
Sequence diagram for explicit park all sweepsequenceDiagram
actor Caller
participant Park
participant EstateList
participant Estates
Caller->>Park: park --all or park -a
Park->>EstateList: list estates under projects directory
Park->>Estates: park_every_estate(listed estates)
Estates-->>Park: continue past refusals and report one summary
Park-->>Caller: sweep result
Flow diagram for park command routingflowchart TD
Start["park invocation"] --> Mode{"--all or -a?"}
Mode -->|yes| List["List estates under projects directory"]
Mode -->|no| Estate{"Estate around cwd?"}
Estate -->|yes| One["Park cwd estate"]
Estate -->|no| TTY{"stdin is a terminal?"}
TTY -->|no| Refuse["Refuse and name --all"]
TTY -->|yes| Ask["Ask whether to park every listed estate"]
Ask --> Answer{"Answer is y or yes?"}
Answer -->|yes| List
Answer -->|no| Exit["Exit 2; park nothing"]
List --> Sweep["Sweep listed estates in name order"]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
There was a problem hiding this comment.
🟡 Changes recommended
Moderate findings remain in sweep ordering and PTY test reliability, alongside documentation and regression-test updates.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Updates park to target the current estate, prompt before an unqualified sweep, and require --all/-a for unprompted sweeps. resume now rejects those flags.
Changes:
- Adds interactive confirmation and explicit sweep handling.
- Expands command and PTY test coverage.
- Updates README.md, AGENTS.md, and command help.
File summaries
| File | Summary and final review findings |
|---|---|
tests/test_repo_hygiene.py |
Updates documentation assertions and limits. No final review comments. |
tests/test_park_resume_commands.py |
Adds interactive and sweep coverage. Moderate (2 votes): PTY helper may fail with EIO when the child exits before input is written. |
resume |
Rejects -a/--all. Nit (2 votes): add regression coverage for both spellings and the dedicated refusal. |
README.md |
Documents the new invocation behavior. Nits (1 vote each): qualify the no-estate exception and document acceptance of y/yes in any case. |
park |
Implements confirmation and explicit sweep handling. Moderate (2 votes): display the captured estate rows to preserve sweep ordering. Nits (1 vote each): qualify the no-estate exception and document y/yes acceptance. |
AGENTS.md |
Updates assistant guidance. Nit (1 vote): qualify the bare non-terminal refusal for cases where estates were found. |
Review details
Suppressed comments (5)
AGENTS.md:34
- This rule says a bare invocation outside an estate refuses and names
--all, but with no estate under the projects directory the implementation exits earlier withnothing to parkand deliberately omits--all(the new no-estate test asserts that exception). Qualify the rule to the case where at least one estate was found, and keep the exception consistent in README.md and the command help.
under which the bare form swept unasked). YOUR STDIN IS NOT A TERMINAL, so
in your hands a bare `park` outside every estate refuses and names `--all`:
when the person wants everything parked, run `park --all`; when they named
README.md:88
- This paragraph says a bare non-terminal invocation refuses and names
--all, but when no estate exists the implementation exits earlier withnothing to parkand deliberately omits--all(the new no-estate test asserts that exception). Qualify the sentence to the case where at least one estate was found, and keep the exception consistent in the command help and AGENTS.md.
parked. With no estate around it either, `park` lists every estate it finds
under your projects directory and ASKS whether to park them all — `y` runs the
sweep, anything else parks nothing, and where stdin is not a terminal nothing
is asked: it refuses and names `--all`. `park --all` (or `park -a`) is that
README.md:87
- This user-facing description only says that the literal
yruns the sweep, but the implementation acceptsyoryesin any combination of case (park:866-867), and the new tests exerciseyes. Please document both accepted answers so the prompt contract does not contradict the command.
under your projects directory and ASKS whether to park them all — `y` runs the
sweep, anything else parks nothing, and where stdin is not a terminal nothing
park:87
- This help text says a non-terminal bare invocation always refuses and names
--all, but the no-estate path exits earlier withnothing to parkand deliberately omits--all(covered bytest_no_name_and_no_estate_anywhere_refuses_without_asking). Qualify this sentence to the case where at least one estate was found, and keep the exception consistent in README.md and AGENTS.md.
park`, then one summary. Where stdin is not a terminal the bare form cannot
ask, so it refuses and names `--all` - a script that wants the sweep says so.
park:83
- The
park --helptext has the same mismatch: it says anything butyis rejected, althoughyesand mixed-caseyesare accepted by the implementation. Since this is the installed command's contract, mention both accepted forms here.
directory and ASKS whether to park them all; anything but `y` parks nothing.
- Files reviewed: 6/6 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| say "park: no estate around $PWD, and no <Name> was given. Every estate under ${PROJECTS_DIRS[*]}:" | ||
| say "" | ||
| say "$(estates_or_none)" |
| slave = -1 | ||
| # Typed before `park` reads it: the line discipline holds the line, | ||
| # exactly as a terminal holds one typed ahead of the prompt. | ||
| os.write(master, (answer + "\n").encode()) |
| -a | --all) die "\`$SELF_NAME\` has no \`--all\`, deliberately: rebuilding every estate on this | ||
| machine from one command is the accident its own bare-form refusal exists | ||
| to prevent. Name the one you want: \`$SELF_NAME <Name>\`." ;; |
…s diff is its own change Co-Authored-By: Claude Fable 5.1 <[email protected]>
…R's diff is its own change Co-Authored-By: Claude Fable 5.1 <[email protected]>
…am, so this PR's diff is its own change Co-Authored-By: Claude Fable 5.1 <[email protected]>



Ruling: Brett Heap, 2026-09-10, in the session that opened this PR, verbatim: "lets change that so it parks the current repo. if not in a repo, then asks if want to park all. and park all should be park -a or park --all"
It supersedes his openRepoShape #91 ruling of the same day ("so just park will do park-all"), under which bare
parkwith no estate around the cwd PARKED EVERY ESTATE unasked. #91 had itself superseded ruling 3 of openRepoShape #82 (refuse and list). The sweep #91 and #7 built is unchanged; how it is reached is what changes here.Why
Since #91, a
parktyped in the wrong folder swept the whole workstation with no confirmation. The one flag-less command that commits and pushes in every estate you own should not be one keystroke away from acdmistake — and a script or an assistant that WANTS the sweep should have to say so, rather than get it as the fallback for standing nowhere.What it does now
Inside an estate, bare
parkparks that estate. The walk-up is exactly as it was under #82.Outside every estate, at a terminal, it lists and ASKS:
Only
y/yes(any case) runs #91's sweep. Enter,n, or anything else exits 2:REFUSED: nothing was parked: the answer was not yes.— namingpark <Name>,park --all, and standing inside an estate as the three ways forward. The question goes to stderr, where a prompt belongs, sopark > logstill shows it.Outside every estate, with no terminal on stdin — a pipe,
/dev/null, cron, an assistant's tool call — nothing can be asked, so nothing is parked. It refuses with ruling 3's list and names--all. It never hangs on a question nobody can see.park --all/park -ais the sweep from anywhere, unasked, under its ownpark --all: parking every estate under …heading. Standing inside an estate does not narrow it. It is refused alongside<Name>or--repo("both … and --all"), and when there is no estate under the projects directory at all.= "standalone"positive match), one summary.park_every_estatenow takes its rows from the caller that listed them, so what was listed — or asked about — is exactly what runs, and nothing prints twice.resume --all/-arefuses by name and says whyresumehas no sweep, instead of the generic "put it after--" hint, which would have handed the extension a flag nobody meant.resume's bare form keeps ruling 3's refusal, as before.test_the_two_verbs_carry_the_same_estate_resolver_byte_for_bytestill passes and no hunk falls inside the block.parkoutside every estate is a refusal naming--all: runpark --allwhen the person wants everything parked, and never reach for it when they named one estate.Tests
147 -> 160. A
run_at_a_terminalhelper puts a real pseudo-terminal (pty.openpty) on stdin, so[ -t 0 ]answers yes and the question is actually asked; stdout and stderr stay pipes so the question and the report are captured apart. New: the question answeredy/Y/yes/YES(sweep, name order, summary); answered Enter/n/no/other (exit 2, nothing ran); the no-terminal refusal naming--all;--alland-a;--allfrom inside an estate;--allwith<Name>or--repo;--alland bareparkwith no estate anywhere. The #7 sweep tests are driven with--all. Hygiene: the bare-form document test now asserts--all,-a, ASKS, the #91 citation and name order in README, AGENTS.md andpark's header.bash -npasses for all three shipped files;shellcheck park resumereports the same 30 + 3 info-level notes as before this change, all in untouched code.python3 -m pytest tests -qis 160 passed locally with the submodule initialised, on the tree rebased onto main after #7 merged.Docs: README.md 178 -> 182 lines, AGENTS.md 95 -> 99, both caps raised in a dated docstring entry naming the rule the lines bought.
Not merged
Opened for review. workBenches re-vendors
parkandresumeafter this lands.🤖 Generated with Claude Code
Summary by Sourcery
Make bare
parktarget the current estate or request confirmation before sweeping, while requiring--allor-afor an unprompted estate-wide operation.New Features:
parkwhen run outside an estate and introducepark --all/-afor explicitly requesting the estate-wide sweep.Bug Fixes:
parkinvocation outside an estate, including non-interactive executions.Enhancements:
parkfocused on the estate surrounding the current directory and makeresume --allexplicitly invalid.Documentation:
Tests: