Repository navigation
status: the fourth file, and its local layer — what is in and out of sync across an estate, read-only, as of the last fetch - #9
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]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…f sync across an estate, read-only, as of the last fetch Brett Heap's RULING of 2026-09-10, verbatim: "lets go with a fourth file. start with the local status layer." `status [<Name>] | --all` finds the estate exactly as `park` and `resume` do — the shared resolver block is now carried byte for byte by three files — and then only READS: for the holder or root, each member's working clone and every mounted leg, whether the tracking branch is ahead of or behind its origin, what is dirty or stashed, a root off its tracking branch or detached, feature branches never pushed or whose remote branch is gone, dirty feature worktrees, a leg checked out away from its pin or pinned behind its origin or on an unpushed leg commit, a leg on a feature branch, a leg declared and not mounted, and a member with no working clone. It fetches nothing, says "as of the last fetch" on every run, and takes no lock (`git --no-optional-locks`). Exit 0 in sync, 1 findings printed, 2 refused. Bare `status` inside an estate reads that one; outside every estate it reads them all WITHOUT asking, because nothing writes; `--fetch` refuses by name as the next layer. - `openRepoTools --install` places FOUR files; the count line says `4 of 4`. - README and AGENTS.md (new rule 4) document it; caps raised in dated entries. - CI parses the fourth file with /bin/bash -n. - `park` and `resume` change only in comments: the shared block now says three copies. An independent review of the first draft (14 synthetic estates, a full-tree snapshot proving nothing is written) found six things, all fixed here: a git that cannot run is refused rather than reported as an empty estate; the one unguarded pipeline; 0x1F rather than TAB between for-each-ref fields so an empty field cannot shift; "0 commit(s) never pushed" reworded; a missing flag value exits 2 in the command's own words, not bash's exit 1; a valueless .gitmodules key no longer invents a leg. Plus the gap it flagged: a leg on a feature branch at its pin is a finding, as AGENTS.md rule 1 already names it. Tests 160 -> 187: a new tests/test_status_command.py (22, real bare remotes and a leg submodule, one scenario each), the installer and hygiene suites taught the fourth file, and the resolver identity held three ways. 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 38 minutes by commenting @sourcery-ai review. Upgrade to get a review now.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Reviewer's GuideThis PR introduces the fourth installed command, Sequence diagram for the read-only local status reportsequenceDiagram
participant User
participant status
participant Resolver as EstateResolver
participant Git
User->>status: status Name
status->>Resolver: resolve estate
Resolver-->>status: root, members, legs
status->>Git: git --no-optional-locks local reads
Git-->>status: refs, worktree, stash, submodule state
status-->>User: findings as of the last fetch
status-->>User: exit 0 clean, exit 1 findings, or exit 2 refusal
Flow diagram for status scope and exit semanticsflowchart TD
Start[status invocation] --> Resolve[Resolve selected estate or all estates]
Resolve --> Read[Read repositories and legs with git --no-optional-locks]
Read --> Findings{Findings present?}
Findings -->|No| Clean[Print clean report; exit 0]
Findings -->|Yes| Report[Print per-repository findings]
Report --> Exit1[Exit 1]
Start --> Refusal{Unsupported option or unavailable Git?}
Refusal -->|Yes| Exit2[Print refusal; exit 2; read nothing]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
🟡 Changes recommended
An unresolved critical status error-handling issue and a moderate --repo coverage gap remain, alongside documentation nits.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a read-only status command for local estate synchronization checks without fetching or modifying repositories.
Changes:
- Reports repository, branch, leg, worktree, and family findings.
- Updates installation, documentation, resolver metadata, and CI for four shipped files.
- Adds comprehensive status, refusal-path, and no-write tests.
File summaries
| File | Review summary |
|---|---|
tests/test_status_command.py |
Adds status behavior, refusal, and no-write coverage. |
tests/test_repo_hygiene.py |
Extends hygiene checks for the new command. |
tests/test_park_resume_commands.py |
Verifies resolver consistency across three commands. |
tests/test_openrepotools_command.py |
Tests four-file installation behavior. |
status |
Implements local status reporting. Critical (1 vote): handle git worktree list failures instead of reporting an incomplete scan as clean. Moderate (3 votes): cover successful and no-match --repo resolution. Nit (2 votes): update the shared comment to reference three commands. |
resume |
Updates shared resolver metadata. |
README.md |
Documents status behavior and exit semantics. |
park |
Updates shared resolver metadata. |
openRepoTools |
Installs and documents the fourth command. |
AGENTS.md |
Adds status operating guidance. Nit (3 votes): change “two INSTALLED commands” to “three INSTALLED commands.” |
.github/workflows/tests.yml |
Adds status shell syntax validation. |
.gitattributes |
Extends line-ending rules to status. Nit (1 vote): update the explanation from three to four installed files. |
Review details
Suppressed comments (1)
.gitattributes:9
- The explanation below still says a second install can report three files as
updated at, but--installnow places four files. This leaves the line-ending rationale inconsistent with the new four-command install; update the count.
# `\n` in `openRepoTools`, `park`, `resume` and `status` into `\r\n`, and every one
- Files reviewed: 12/12 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| path=""; branch="" | ||
| ;; | ||
| esac | ||
| done < <(g "$repo" worktree list --porcelain 2>/dev/null; printf '\n') |
| --repo) | ||
| [ $# -ge 2 ] || die "--repo needs a value: <owner>/<name>, or any url spelling of one." | ||
| REPO_SLUG="$2"; REPO_ARG="$REPO_SLUG"; shift 2 ;; |
| and this repository pins the commit its tests were verified against. Read that | ||
| repository's `AGENTS.md` for the Make targets (`make park`, `make resume`) and | ||
| everything about a project's layout; what follows is only what changes when a | ||
| person is driving the two INSTALLED commands. |
| # One indent-zero scalar out of a small YAML file, with parameter expansion | ||
| # only: no YAML library, no python per line, no forks per line. This is the | ||
| # reader the Speckit extension's `workspace_read_scalar` is, narrowed to the | ||
| # keys these two commands read (`kind`, `name`, `family`, `tracking_branch`). |
…s diff is its own change Co-Authored-By: Claude Fable 5.1 <[email protected]>
The base branch was changed.
|
…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, verbatim: "lets go with a fourth file. start with the local status layer." From the brainstorm that preceded it: the sync check was the strongest candidate, a third of it already lived inside
park's not-carried report, and a fourth file beats apark --statusflag because a read-only report should not sit under a verb whose name means commit-and-push.Stacked on #8 (
feat/park-all-flag), which is why the base is that branch; it carries only this change on top.What
statusisThe read-only view of an estate: what is in and out of sync. It finds the estate exactly as
parkandresumedo — the shared resolver block is now carried byte for byte by THREE files, and both identity tests hold it three ways — and then only READS.Per repository — the holder or root, each member's working clone beside the holder, and every mounted leg, the same rows
park's report reads:origin/<tracking>; dirty (with--ignore-submodules=all, so a moved leg is not counted twice); stashes; on a feature branch or detached; feature branches never pushed, with unpushed commits, or whose remote branch is[gone]; dirty linked worktrees (the extension's feature worktrees).origin/<tracking>; pin on a commit the leg never pushed; on a feature branch at its pin (AGENTS.md rule 1'sresumerefusal, named on the leg's own row); declared in.gitmodulesand not mounted.It fetches nothing — every run prints
as of the last fetch: status reads local refs only and fetches nothing.— and it writes nothing: every git call goes throughgit --no-optional-locks, so it never takes a lock and never refreshes an index. Exit 0: in sync and clean. Exit 1: findings printed. Exit 2: refused, nothing read. READ THE LINES — an unpushed feature commit is a fact to look at, and exactly whatparkexists to carry.Bare
statusinside an estate reads that estate. Outside every estate it reads them ALL, without asking — unlikepark's bare form, which asks before a sweep that writes; a question before a read is only friction.status --all/-asays the same from anywhere.status --fetchrefuses by name: this is the LOCAL layer, and fetching is the next one.Not here yet, by design and in this order:
--fetch; the fork's origin against its upstream (gh); the estate's copied shape files againstcontracts/shape-pin.yamland the pinned openRepoShape against openRepoShape's main; the parked record in~/.agents/workspace.yamlagainst the worktrees on disk.Everything else that changed
openRepoTools --installplaces FOUR files,4 of 4 placed; all four in hand before any is placed, as before.--helplistsstatus [<Name>]. The refusal namesstatus --helptoo. The "FOURTH FILE" argument for the duplicated fetch shim is now the "FIFTH FILE" argument.parkandresumechange only in comments: the shared block's header says three copies and a fifth file; the two "Installed with the other two" lines say three.statusfetches nothing, exit 1 is findings not failure, nevergit fetchon its behalf, bare form reads all without asking), caps raised in dated docstring entries..gitattributesand the CI comments count four; the macOS job parsesstatuswith/bin/bash -n.Review
An independent adversarial review of the first draft ran it against 14 synthetic estates (standalone and family; legs mounted, unmounted, moved, unfetched; worktrees; stashes; every
%(upstream:track)form; sweep; refusals) and proved the no-write claim with a full-$HOMEsnapshot that is byte-, size-, mtime- and mode-identical before and after — and NOT identical with--no-optional-locksremoved. It found six things, all fixed here:|| true-guarded so a missing ref is a finding — which meant a git that could not run at all (or one older than 2.15, which rejects the flag) was REPORTED as an estate with no commits and no legs, exit 1. Now refused by name, exit 2.git stash list | wc -l), latent underpipefail.for-each-reffields: TAB is IFS whitespace, so an empty middle field shifts the rest left; 0x1F (%1f/$'\037') does not collapse.0 commit(s) never pushedfor a branch with no commit of its own — reworded, behaviour kept.${2:?}message — and 1 is what this command means by "findings". NowREFUSED, exit 2..gitmoduleskey printed bare and became a phantom leg.Plus the gap it flagged: a leg on a feature branch at its pin now has its own finding.
Tests
160 -> 187. New
tests/test_status_command.py(22): real bare remotes with a root that mounts a leg, per-test remotes so a pushed commit cannot leak into the next test's clone; one scenario per finding, the caveat proved (a commit on origin is invisible until the clone fetches), the family (borrowing the estate fixture),--all/-a/ bare-outside / bare-inside, every refusal including the git shim and the missing value, and the one promise: refs, HEAD, porcelain and stash list identical before and after, noindex.lock, nothing fetched. The installer and hygiene suites are taught the fourth file; a new hygiene test holds "fetches nothing", "as of the last fetch", "local layer" and the four-file count in README, AGENTS.md and the command's header.bash -non all four;shellcheck statusreports only SC2317 (functions called indirectly).python3 -m pytest tests -q: 187 passed locally with the submodule initialised.Not merged
Opened for review, stacked on #8. workBenches re-vendors all four after this lands.
🤖 Generated with Claude Code
Summary by Sourcery
Add a read-only local status layer that reports estate synchronization findings as of the last fetch without changing or fetching anything.
New Features:
statuscommand that reports local synchronization findings across estate roots, members, worktrees, and mounted legs without fetching or modifying repositories.--all/-astatus scans with explicit refusal handling and exit codes for clean results, findings, and refused requests.Bug Fixes:
Enhancements:
park,resume, andstatus.CI:
statusscript with Bash syntax checks in the macOS CI job.Documentation:
Tests: