Skip to content

park and resume move here from openRepoShape, with their own openRepoTools --install, their own suite, and the openRepoShape commit they were verified against pinned as a submodule (opensoft/openRepoShape#92) - #1

Merged
brettheap merged 8 commits into
mainfrom
feat/park-resume-and-installer
Sep 10, 2026

Conversation

@brettheap

@brettheap brettheap commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Lane: xfactory-2 (xFactory-2)
Claim: opensoft/openRepoShape#92 (comment)

Part of opensoft/openRepoShape#92 (slice T1). openRepoShape pinned at d090a7a141048b214f0420a8c7afbfff62472d1a.

This repository's content: the two estate verbs, an installer for them, their suite, and the openRepoShape commit they were verified against mounted as a submodule. LICENSE is untouched (261eeb9e, byte-identical to openRepoShape's).

THE PIN MOVED MID-FLIGHT, ON PURPOSE — read this before diffing. openRepoShape's main advanced to d090a7a while this branch was being written: its #93 landed Brett Heap's RULING of 2026-09-10 (#91) — bare park, with no <Name> and no estate around the cwd, now PARKS EVERY ESTATE under the projects directory in name order, continuing past a refusal, superseding ruling 3 of #82 for that one case; resume deliberately keeps the refusal for its own bare form, because rebuilding every estate on a fresh machine by accident is the opposite risk. This branch first carried the pre-#91 commands and has been re-synced to d090a7a (decision recorded on opensoft/openRepoShape#92, comment 5621844306), because S2 is about to delete the post-#91 park and the carve would otherwise have silently lost a one-day-old ruling. gh api …/compare/main...d090a7a → identical, and that tree still carries park. The re-take used exactly the discipline the first take used, so the diff against main is still header + provenance + rename only; #93's four new park-everything tests come over with the file rather than being written here.

park and resume, verbatim but for three things. diff against openRepoShape@d090a7a's copies is 6 lines for park (1 changed, 1 added) and 18 for resume (4 changed, 1 added):

  • park 7c7 / resume 6c6 — the header comment Installed with the other two by openRepoShape --install becomes ... by openRepoTools --install.
  • park 27a28 / resume 29a30 — one provenance line, appended at the end of each file's ruling block: # openRepoShape #82 wrote this, its #93 last changed it, its #92 moved it here. (79 characters, the house width.)
  • resume 79c80, 544c545, 554c555 — $OPENREPOSHAPE_REMOTE_BASE → $OPENREPOTOOLS_REMOTE_BASE, in the --help block, the comment above clone_url_for and its body. Same length, so nothing realigned. Amendment 19: a closed or dormant lane leaves the listing, one sweep retires a repository's dormant rows on a word, and a retired position is never reissued #93's nine new lines in resume carry no occurrence of it; re-grepped, three before and three after.

Nothing else, because anything else would be an unreviewed behaviour change to two commands people already have on their PATH. The sentences that name openRepoShape as the STANDARD stay — "IT ADDS NO MECHANICS, exactly as the openRepoShape command adds none", and #93's own paragraphs about ruling #91. The byte-identical shared estate resolver survives the move (365 lines, cmp clean, and a hygiene test says so).

tests/test_park_resume_commands.py: 50 lines of diff, 12 changed and 1 added, all mechanical — the module docstring's env name, the conftest import, NEEDS_UPSTREAM on pytestmark, the eight REPO / "templates" | "scripts" paths pointed at UPSTREAM, and the two env renames. No test body changed.

openRepoTools --install, and nothing else. INSTALLABLES=(openRepoTools park resume); $OPENREPOTOOLS_REPO (default opensoft/openRepoTools), _REF (main), _BIN_DIR (~/.local/bin). openRepoShape's shim's exact semantics: gh api …?ref=<ref> with Accept: application/vnd.github.raw first and raw.githubusercontent.com second (authenticated call first, because an org can block raw downloads and still have a working gh); run from a file it copies the siblings beside it and calls no gh at all; run from stdin it fetches all three; ALL THREE IN HAND BEFORE ANY IS PLACED (#82, F10 of the review on #83), so a failed fetch replaces nothing and names the file; installed at / updated at / already installed … (unchanged) per file, then 3 of 3 placed in <dir> and one PATH note for the three of them. --version prints openRepoTools (<repo> @ <ref>) — no version number, for the reason openRepoShape has none. The forty lines of fetch logic are a DELIBERATE copy and the file says so with the reason: a shared library would be a FOURTH FILE for --install to place and a broken installer the first time somebody copied only three of them — the same argument the estate resolver already carries. Anything that is not --install, --help or --version is refused, exit 2, naming park --help and resume --help; a bare openRepoTools prints the usage on stdout and exits 0, because typing a name to see what it is is a question, not a mistake.

The pin, and the lockstep test. contracts/openreposhape-pin.yaml — pin_role: upstream-standard, materialization: mounted, commit: d090a7a…, digest_definition: sorted-ls-tree-r-v1, digests.tree_sha256: 87260095119241499e347f61a9642fc0879e3a44d0cc1d436c67501526dafb39, verify_pin: tests/test_upstream_pin.py. MOUNTED, not copied: test_park_resume_commands.py builds real estates out of EIGHT of the standard's own files, and a submodule hands it those bytes at the pinned commit rather than copies here that could have been edited into agreeing with a broken expectation. The header says the other two things out loud — the dependency runs one way (openRepoShape pins this repository nowhere and knows of it only through one pointer line in its own --install), and the pin file and the gitlink are ONE invariant that moves in ONE commit, which the re-sync commit is itself an instance of. tests/test_upstream_pin.py checks: 40 lowercase hex; the gitlink out of git ls-tree HEAD agrees, with no import from the submodule, so it bites in a clone that never materialized it; .gitmodules names the same path and url; mounted plus the source slug and a 64-hex digest; and — under NEEDS_UPSTREAM — tree_digest(UPSTREAM, "HEAD") recomputed with the pinned checkout's own scripts/repo_shape.py and its own TREE_DIGEST_DEFINITION, so this repository carries no copy of the standard's code and the number is checked against the pinned commit's own definition of it. Plus two witnesses: the checked-out submodule is at the recorded commit, and the pinned tree carries the eight files this suite reads plus park — the pre-carve witness, whose docstring names the exit (delete that one entry in the commit that bumps the pin past S2).

Adversarial review (READY, zero defects) — the one nit fixed. The README's ### Bumping the pin block staged the pin file on the line ABOVE the sentence telling the reader to edit it, so run literally it committed the moved gitlink with the old pin — invisible locally (the suite reads the pin from the working tree and the gitlink from git ls-tree HEAD), red only in CI. The edit is now a step inside the block, git commit is its last line, and a paragraph says why the order is the order; proved by running the corrected block literally in a throwaway recursive clone (d090a7a → 5777ca8: the commit carries both facts, the lockstep test is green in a fresh worktree of it, 141 passed at the bumped pin). The host-absolute-path guard's comment claimed the workflow file was "excluded by name"; it is scanned like every other file and it is the runner's fixed ACCOUNT that the (?!runneradmin\) lookahead exempts — the comment now says that, and says a real user's path in that workflow is still a finding. README cap 165 → 172 with a dated entry.

Review comments. Sourcery: no review — 7-day diff-character budget exhausted. Codex: no review — account usage limit for code reviews. Copilot, two findings, both about resume and both answered rather than fixed: (a) "make siblings still runs when the holder was refused" and (b) "make resume can still run at a refused family holder" — that is the design, not a defect. A refused holder skips its OWN fast-forward and bootstrap, which are the operations that would reset a pin bump; make siblings and the holder's make resume write to the MEMBERS' working clones, which is where the work is and which the holder's refusal says nothing about. Probed empirically on the dirty-holder fixture: the holder's HEAD does not move, its branch does not move, its uncommitted file survives, both members get the verb, and the run exits 1 — a refusal is still not a pass. test_a_dirty_holder_is_refused_and_its_bootstrap_never_runs pins exactly that (the staged gitlink and the pinned copy survive), and test_a_refused_member_does_not_get_the_verb pins the case where the verb IS withheld. Beyond that: these are openRepoShape's bytes carried verbatim, so changing them here would break this PR's central claim and fork the standard — if the behaviour is to change it changes there, under a ruling, and arrives by a pin bump.

The documents, re-lifted rather than patched. AGENTS.md's rule 1 and the README's "how the estate is found" sentence come from d090a7a's own text, because openRepoShape's S2 removes that paragraph and this repository becomes the only place it lives — a document still saying park refuses would not read as broken, only as wrong, sending an assistant to ask for an estate name the bare form no longer needs. Caps move 84 → 90 (AGENTS.md) and 160 → 165 (README.md), each with a dated docstring entry naming the rule it bought, tracking openRepoShape's own 374 → 381 and 1219 → 1225 for the same ruling. New: test_the_documents_say_what_bare_park_does_now holds both halves of the ruling — park-everything, in name order, and resume's deliberately kept refusal — in both documents and in park itself.

Lifted from #93's other files: nothing, and here is why. Its tests/test_repo_hygiene.py change (128 lines) is the handbook staleness guard moving from git diff <sha> -- README.md to a README.md blob <hash> the working tree can hash with no history, plus openRepoShape's own two cap entries — there is no docs/handbook.html here and the caps are per-repository counts. Its .github/workflows/tests.yml change (21 lines) is three checkout comments explaining that fetch-depth: 0 is now only a generally useful default; this workflow already takes fetch-depth: 1 and states that reason. Its macOS /bin/bash -n step is byte-identical at d090a7a (diff clean), so the step that moved here needed no rewording.

The skip path. NEEDS_UPSTREAM in tests/conftest.py probes upstream/openRepoShape/scripts/repo_shape.py — the FILE, not the directory, because a non-recursive git clone leaves an empty directory behind and is_dir() would answer yes. It marks pytestmark of test_park_resume_commands.py and the digest half of test_upstream_pin.py. A fresh non-recursive clone runs pytest tests -q to 53 passed, 88 skipped, exit 0, every skip naming git submodule update --init upstream/openRepoShape. One CI job checks out with submodules: false, asserts the submodule really is not materialized (so the job cannot prove nothing), and runs the suite with -rs.

CI. The same two pinned action commits openRepoShape pins, submodules: true and fetch-depth: 1 on every checkout. tests (ubuntu, pytest==8.3.4, per-invocation git identity env). tests-no-submodule (ubuntu, the skip path above). tests-windows (PYTHONUTF8=1, GIT_CONFIG_COUNT=2 for core.autocrlf=false and core.longpaths=true, --basetemp=${{ runner.temp }}\t) — it proves the checkout and the hygiene tests; everything shell-shaped carries WINDOWS_SKIP and the job comment says why. tests-macos: /bin/bash --version, then -n openRepoTools, -n park, -n resume, one command per file, then the suite — that step moves here with the files, because these three are what a stock Mac's bash 3.2 has to parse. No git-filter-repo, no actionlint.

Hygiene. SHIPPED_BASH = ["openRepoTools", "park", "resume"] (shebang, mode bit, set -euo pipefail, bash -n); the host-absolute-path guard (estate Rule 1) over every tracked file; CLAUDE.md points at AGENTS.md. Tests this repository is new in needing: the shared estate resolver is byte-identical in park and resume where neither the submodule nor a shell is required to check it (the copy in test_park_resume_commands.py skips without both); neither verb reads an $OPENREPOSHAPE_* variable, names a raw URL or calls gh api — the dependency direction as a test rather than a paragraph; and the installer fetches only from $OPENREPOTOOLS_REPO. Plus: the README carries the install line openRepoShape's pointer will print, byte for byte, and its gh api twin; neither document offers an Invoke-WebRequest two-liner, because native Windows parks nothing and both say WSL2 instead; and the three bash files are i/lf in the index, which is .gitattributes' rule checked against the object store rather than against the intention.

Tests run, all after the re-sync. Recursive clone: git submodule update --init upstream/openRepoShape && python3 -m pytest tests -q → 141 passed, 0 skipped (re-run after the fix round). Throwaway non-recursive clone of this branch: 53 passed, 88 skipped, exit 0, no failures. bash -n clean on all three; shellcheck 0.11.0 clean on all three. OPENREPOTOOLS_BIN_DIR=$(mktemp -d) bash openRepoTools --install places three 0755 files byte-equal to the checkout and prints 3 of 3 placed; a second run prints already installed … (unchanged) three times. Gitlink and pin agree: git ls-tree HEAD -- upstream/openRepoShape → 160000 commit d090a7a141048b214f0420a8c7afbfff62472d1a.

Decisions beyond the plan, for the reviewer.

  1. resume keeps $OPENREPOSHAPE_SETUP_SH (one comment line). The plan listed that line among the _REMOTE_BASE renames, but it holds a different variable — a cross-reference to openRepoShape's own shim's documented offline path, which still exists there. Renaming it would invent $OPENREPOTOOLS_SETUP_SH, a variable no file defines. It is the only OPENREPOSHAPE string left in either verb, it is inside a comment, and test_the_verbs_name_no_runtime_dependency_on_the_standard therefore reads code with whole-line comments dropped, and says why: matching on the word alone would make a comment into a finding, which teaches the next person to delete the comment.
  2. WINDOWS_SKIP's reason is rewritten, not copied: openRepoShape's names setup-project.py / test_setup_project_py.py, neither of which exists here.
  3. The test file's module docstring is renamed too. The plan's rewiring list covered the two code sites; a docstring naming a variable the command no longer reads would be false, and it is still mechanical.
  4. The byte-identical-resolver test is duplicated, not moved — openRepoShape's copy now sits behind NEEDS_UPSTREAM and a bash guard, so it skips exactly where the invariant still holds. Both copies say why.
  5. A bare openRepoTools prints usage and exits 0 rather than refusing; the refusal is reserved for an argument that was actually wrong.
  6. .gitattributes retells openRepoShape's rule with this repository's two reasons — --install's own cmp -s, and the byte-identical resolver claim — rather than its scaffold-digest ones, which do not apply here.
  7. openRepoShape#92 says "seven of this repository's files" and then lists EIGHT — the two root Makefiles, their two .gitignores, the two bootstrap.pys, siblings.py and scripts/repo_shape.py. Every document here says eight, and test_upstream_pin.py parametrizes over the list so it counts by construction.

Nothing red. Squash-only merges are set on this repository (squashMergeAllowed: true, the other two false), so a pinned commit is always a commit on main the next reader can fetch — openRepoShape#92, decision 3.

…nk under one test

The estate commands' suite builds real projects out of seven of the standard's
own files, so the standard is MOUNTED here as a submodule at
`upstream/openRepoShape` rather than copied: the tests then run on openRepoShape's
real bytes at a commit, not on copies in this tree that could have been edited
into agreeing with a broken expectation. `contracts/openreposhape-pin.yaml`
records that commit and the `sorted-ls-tree-r-v1` tree digest, and
`tests/test_upstream_pin.py` is what says the pin file, `.gitmodules` and the
gitlink still name one commit — four of its checks read `git ls-tree HEAD` and
import nothing from the submodule, so the lockstep check bites in a clone that
never materialized it, and the digest is recomputed with the PINNED CHECKOUT'S
OWN `scripts/repo_shape.py` so this repository carries no copy of the standard's
code. `NEEDS_UPSTREAM` in `tests/conftest.py` makes a non-recursive clone SKIP
rather than fail, naming `git submodule update --init upstream/openRepoShape`.

Part of opensoft/openRepoShape#92 (slice T1).

Lane: xfactory-2 (xFactory-2)
…erbatim but for three things

Their new home. The whole diff against `openRepoShape@5777ca8`'s copies is the
header line naming the installer (`openRepoTools --install`), the
`$OPENREPOSHAPE_REMOTE_BASE` -> `$OPENREPOTOOLS_REMOTE_BASE` rename in `resume`
(a documented offline TEST path no production run sets; a prefixed variable in a
shipped file should name the tool that ships it), and one provenance line each —
2 changed and 1 added line in `park`, 5 changed and 1 added in `resume`, and
nothing else, because anything else would be an unreviewed behaviour change to
two commands people already have on their PATH. The sentences that name
openRepoShape as the STANDARD stay: these two add no mechanics, exactly as its
own command adds none.

`tests/test_park_resume_commands.py` moves with them under mechanical rewiring
only — the import, `NEEDS_UPSTREAM` on `pytestmark`, and the seven template
paths pointed at `upstream/openRepoShape` instead of at a checkout that is no
longer around them. No test body changed.

Part of opensoft/openRepoShape#92 (slice T1).

Lane: xfactory-2 (xFactory-2)
…ything else

One install line for the whole toolset, with openRepoShape's shim's exact
semantics: `gh api` with `Accept: application/vnd.github.raw` first and
`raw.githubusercontent.com` second, run from a file it copies the siblings
beside it and needs no network at all, run from stdin it fetches all three at
the same ref, and ALL THREE ARE IN HAND BEFORE ANY IS PLACED — so a failed fetch
replaces nothing and names the file it could not get (openRepoShape #82, F10 of
the review on its #83). `installed at` / `updated at` / `already installed …
(unchanged)` per file, then the count and one PATH note.

The forty lines of fetch logic are duplicated from that shim DELIBERATELY and
the file says so: a shared library would be a fourth file for `--install` to
place and a broken installer the first time somebody copied only three of them,
which is the same argument the estate resolver inside `park` and `resume`
already carries. `--install`, `--help`, `--version` and nothing else: anything
else is refused, exit 2, naming `park --help` and `resume --help`, because this
command has no verb and `openRepoShape` is the standard's front door.

Part of opensoft/openRepoShape#92 (slice T1).

Lane: xfactory-2 (xFactory-2)
…ests, and CI on three platforms

`README.md` replaces the stub: what the two commands are, that they ADD NO
MECHANICS, both install forms (the `curl` line byte-identical to the pointer
openRepoShape's own `--install` prints), the three variables, the dependency
direction — this repository pins openRepoShape, openRepoShape pins this
nowhere — how to bump the pin and how the digest is recomputed, and how to run
the tests. `AGENTS.md` takes the installed-commands paragraph and rules 5-6 of
openRepoShape's "Parking and resuming", which is where an agent driving these
two will now read them, plus three rules for the pinned submodule: never edit it
in place, never pin a commit that is not on that repository's `main`, and the
digest is recomputed and never adjusted.

`tests/test_repo_hygiene.py` holds the three bash files to the shebang, mode bit
and `set -euo pipefail` rule, guards estate Rule 1 (no host-absolute path in any
committed file), and asserts two things this repository is new in needing: that
the shared estate resolver is byte-identical in `park` and `resume` where no
submodule and no shell is required to check it, and that neither verb reads an
`$OPENREPOSHAPE_*` variable or fetches anything — the dependency direction, as a
test rather than a paragraph.

CI mirrors openRepoShape's, same pinned action commits, `submodules: true` on
every checkout: ubuntu, windows (which proves the checkout and the hygiene
tests; the rest is bash and carries `WINDOWS_SKIP`), macOS (`/bin/bash -n` per
file, the step that keeps the bash-3.2 claim true, moved here with the files),
and one ubuntu job that checks out WITHOUT submodules to prove the suite skips
rather than fails.

Part of opensoft/openRepoShape#92 (slice T1).

Lane: xfactory-2 (xFactory-2)
…able file

`--install` places all three or none, and the claim people care about is that a
`park` they already have keeps working when the run cannot fetch a new one. The
test pre-placed only an older `openRepoTools`, which the withheld-file run could
have replaced and did not; it now pre-places a `park` too and asserts its bytes
afterwards.

Part of opensoft/openRepoShape#92 (slice T1).

Lane: xfactory-2 (xFactory-2)
…arries

openRepoShape#92 says the estate suite reads "seven of this repository's files"
and then lists eight — the two root Makefiles, their two `.gitignore`s, the two
`bootstrap.py`s, `siblings.py` and `scripts/repo_shape.py`. Every document here
had inherited the wrong number. `tests/test_upstream_pin.py` parametrizes over
the list itself, so it counts by construction and says which number the issue
miscounted.

Part of opensoft/openRepoShape#92 (slice T1).

Lane: xfactory-2 (xFactory-2)
Copilot AI lite review requested due to automatic review settings September 10, 2026 16:09
@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 12 hours and 53 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 carves park and resume out into a standalone openRepoTools repository, adds an atomic three-file installer, mounts and verifies the exact upstream openRepoShape commit used by the estate tests, and establishes comprehensive offline, hygiene, and cross-platform CI coverage.

Sequence diagram for atomic openRepoTools installation

sequenceDiagram
    participant User
    participant Installer as openRepoTools
    participant Source as Checkout_or_Remote
    participant BinDir as BIN_DIR

    User->>Installer: --install
    alt Running from checkout
        Installer->>Source: Read openRepoTools, park, resume
    else Running from stdin
        Installer->>Source: Fetch all three files
    end
    Installer->>Installer: Validate all three files are in hand
    Installer->>BinDir: Place openRepoTools, park, resume
    Installer-->>User: installed/updated/already installed per file
    Installer-->>User: 3 of 3 placed and PATH note
Loading

Sequence diagram for pinned upstream verification

sequenceDiagram
    participant Tests
    participant Git as Git metadata
    participant Pin as Pin manifest
    participant Upstream as Mounted openRepoShape
    participant Digest as Pinned repo_shape.py

    Tests->>Git: git ls-tree HEAD
    Tests->>Pin: Read commit and tree_sha256
    Tests->>Git: Compare gitlink with pinned commit
    Tests->>Upstream: Verify checkout is at pinned commit
    Tests->>Digest: tree_digest(UPSTREAM, HEAD)
    Digest-->>Tests: Recomputed tree digest
    Tests->>Pin: Compare recomputed digest
Loading

Flow diagram for optional upstream test materialization

flowchart TD
    Start[pytest tests -q] --> Probe{upstream/openRepoShape/scripts/repo_shape.py exists?}
    Probe -->|Yes| Run[Run estate and digest tests]
    Probe -->|No| Skip[Skip upstream-dependent tests]
    Skip --> Hint[Name git submodule update --init upstream/openRepoShape]
    Run --> Result[Suite exits successfully]
Loading

File-Level Changes

Change Details Files
Move the estate commands into this repository with only installer/dependency-name/provenance edits, preserving their behavior and shared resolver.
  • Add park and resume as standalone Bash commands.
  • Rename installer-related variables and comments to openRepoTools while retaining standard-facing comments and the documented setup reference.
  • Keep the shared estate resolver byte-identical and add provenance annotations.
park
resume
Add a self-contained installer that places the complete three-file toolset atomically and supports local, authenticated, and raw-source installation paths.
  • Implement openRepoTools --install, --help, and --version with strict argument handling.
  • Install openRepoTools, park, and resume together, reporting per-file status and PATH guidance.
  • Copy siblings when invoked from a file; otherwise fetch all three through authenticated gh api followed by raw URL fallback.
  • Stage all fetched files before replacing any destination and constrain fetches to OPENREPOTOOLS_REPO.
openRepoTools
tests/test_openrepotools_command.py
Pin the upstream standard as a mounted submodule and verify the pin, digest, required source files, and dependency direction.
  • Add the openRepoShape submodule at the exact verified commit and record its source, materialization, digest, and verifier.
  • Check gitlink/YAML lockstep without requiring a materialized submodule, then validate the pinned checkout and its own digest definition when available.
  • Verify the pinned tree contains the eight estate fixture inputs plus the pre-carve park witness.
.gitmodules
upstream/openRepoShape
contracts/openreposhape-pin.yaml
tests/test_upstream_pin.py
Add an offline test suite covering command behavior, installer semantics, estate resolution, resume safety, and dependency invariants.
  • Exercise real estate flows using temporary homes, bare repositories, local remotes, stubs, and fake fetch tools.
  • Cover refusals, dry runs, dirty or feature-branch protection, workspace configuration, cloning, fast-forwarding, and refusal propagation.
  • Test that verbs avoid upstream runtime dependencies and that the duplicated resolver remains byte-identical.
tests/conftest.py
tests/test_park_resume_commands.py
tests/test_openrepotools_command.py
Add repository hygiene rules, contributor guidance, documentation, and cross-platform CI for the Bash toolset.
  • Enforce executable Bash files, strict mode, syntax validity, LF index contents, path hygiene, documentation caps, and install-line consistency.
  • Document installation, command usage, WSL2-on-Windows guidance, one-way dependency rules, and submodule pin maintenance.
  • Run the suite on Ubuntu, Windows, and macOS, including an explicit non-recursive-clone skip-path job and Bash 3.2 parsing.
.gitattributes
.github/workflows/tests.yml
.gitignore
AGENTS.md
CLAUDE.md
README.md
tests/test_repo_hygiene.py

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.

🔵 Needs a closer look

The change set introduces multiple shipped shell commands plus an installer and a pinned-submodule contract, which is inherently high-impact despite strong test coverage.

Pull request overview

This PR establishes openRepoTools as a standalone repository that ships the park and resume estate commands plus an openRepoTools --install installer, and verifies behavior against a pinned openRepoShape upstream revision mounted as a submodule.

Changes:

  • Add shipped commands: park, resume, and the openRepoTools installer, preserving the “adds no mechanics” contract and installer semantics.
  • Add a pinned-upstream contract (contracts/openreposhape-pin.yaml + gitlink) and tests that keep the pin YAML and submodule gitlink in lockstep and recompute the pinned tree digest from the upstream’s own code.
  • Add a comprehensive offline test suite and CI matrix (including a “no submodule materialized” job) plus repo hygiene guards (LF normalization, shipped-bash invariants, doc caps).
File summaries
File Description
openRepoTools Adds the installer command (--install, --help, --version) with “all-or-nothing” placement and API-first fetch fallback.
park Adds the park command as an installed estate verb wrapper that resolves estates and runs make park without adding mechanics.
resume Adds the resume command that rebuilds/refreshes estates, performs refusal guards, and runs make resume without adding mechanics.
tests/conftest.py Shared fixtures/markers, including NEEDS_UPSTREAM skip path and WINDOWS_SKIP behavior.
tests/test_openrepotools_command.py Offline tests for installer behavior, fetch order, idempotency, and all-or-none install semantics.
tests/test_park_resume_commands.py Extensive offline integration coverage for estate resolution and end-to-end park/resume behaviors.
tests/test_repo_hygiene.py Repository invariants: shipped bash checks, doc caps, no host-absolute paths, LF-in-index, etc.
tests/test_upstream_pin.py Pin/gitlink lockstep validation and digest recomputation using pinned upstream’s own repo_shape.py.
contracts/openreposhape-pin.yaml Records pinned upstream revision metadata and digest, plus bump procedure documentation.
README.md Documents install/usage, dependency direction, pin bumping, and testing approach for the new repo.
AGENTS.md Agent/operator guidance for using park/resume and maintaining the pinned upstream submodule.
CLAUDE.md Points assistants to AGENTS.md.
.github/workflows/tests.yml Adds CI jobs across Linux/macOS/Windows plus a “no submodule” job to prove skip behavior.
.gitattributes Enforces LF normalization to support byte-level comparisons and installer semantics across platforms.
.gitmodules Declares the upstream/openRepoShape submodule mount.
.gitignore Basic Python cache ignores for the test suite.
Review details
  • Files reviewed: 16/17 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.

…e bytes it belongs to

openRepoShape's main moved while this branch was being written: its #93 landed
Brett Heap's RULING of 2026-09-10 (#91) — bare `park`, with no <Name> and no
estate around the cwd, now PARKS EVERY ESTATE under the projects directory in
name order, continuing past a refusal, superseding ruling 3 of #82 for that one
case; `resume` deliberately keeps the refusal for its own bare form, because
rebuilding every estate on a fresh machine by accident is the opposite risk.
This branch had the pre-#91 commands, and S2 is about to delete the post-#91
ones from openRepoShape — so the carve would have silently lost a ruling that
is one day old. Decision recorded on opensoft/openRepoShape#92.

The pin moves to d090a7a (`compare/main...d090a7a` is `identical`; its tree
still carries `park`) and the gitlink moves with it in this one commit, the
digest recomputed with the pinned checkout's own `scripts/repo_shape.py`.
`park`, `resume` and `tests/test_park_resume_commands.py` are re-taken from
d090a7a under EXACTLY the discipline the first take used, and the diffs are
unchanged in shape: `park` 6 lines (the installer header, one provenance line),
`resume` 18 (those two plus the three `_REMOTE_BASE` renames; #93's nine new
lines carry no occurrence, and `$OPENREPOSHAPE_SETUP_SH` still stays because it
is openRepoShape's own shim's variable), the test file 50 (13 mechanical
rewirings and NEEDS_UPSTREAM; no test body changed) — and #93's four new
park-everything tests come over with it.

AGENTS.md rule 1 and the README's "how the estate is found" sentence are
RE-LIFTED from d090a7a's own text rather than patched, because openRepoShape's
S2 removes that paragraph and this repository becomes the only place it lives —
a document that still said `park` refuses would not read as broken, only as
wrong, and an assistant would tell somebody to name an estate the bare form no
longer needs. Caps move 84 -> 90 and 160 -> 165 with dated entries naming the
rule they bought, and a new hygiene test holds both halves of the ruling in
both documents and in `park` itself.

Nothing was lifted from #93's changes to openRepoShape's own
`tests/test_repo_hygiene.py` or `.github/workflows/tests.yml`: both are the
handbook staleness guard and the `fetch-depth: 0` it no longer needs, plus that
repository's own two caps. There is no handbook here, and this workflow already
takes `fetch-depth: 1` for a reason it states. Its macOS `/bin/bash -n` step is
byte-identical at d090a7a.

Part of opensoft/openRepoShape#92 (slice T1).

Lane: xfactory-2 (xFactory-2)
Copilot AI review requested due to automatic review settings September 10, 2026 16:40

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

resume can still run make siblings and/or make resume after the holder/root was refused, violating the “refused clones are not touched / not given the verb” guarantee.

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

Review details

Suppressed comments (1)

resume:1290

  • If the estate root/holder was refused above, the verb section can still run make resume in $ESTATE_ROOT for family estates (because the current guard excludes ESTATE_KIND=family). That violates the rule that refused clones are not given the verb. Handle ROOT_REFUSED=1 for all estate kinds and exit non-zero without running make resume.
elif [ "$ROOT_REFUSED" -eq 1 ] && [ "$ESTATE_KIND" != "family" ]; then
    # A standalone root that was refused is one checkout, and it is the one
    # the verb would run in. Nothing here was touched, and that includes this.
    say "  NOT run: $ESTATE_ROOT was refused above. Nothing here was touched."
    say "  Sort that checkout out - the lines above name what it is - and re-run."
  • Files reviewed: 16/17 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread resume
Comment on lines +1191 to +1204
if [ "$DRY_RUN" -eq 1 ]; then
say " would run: make siblings ($ESTATE_ROOT)"
else
SIBLINGS_LOG="$(mktemp)"
say " --- $ESTATE_NAME: make siblings ---"
set +e
(cd "$ESTATE_ROOT" && exec make siblings) 2>&1 | tee "$SIBLINGS_LOG"
SIBLINGS_STATUS=${PIPESTATUS[0]}
set -e
if [ "$SIBLINGS_STATUS" -ne 0 ]; then
REFUSED=$((REFUSED + 1))
say " FINDING: \`make siblings\` exited $SIBLINGS_STATUS; read its findings above."
fi
fi
…th guard's comment says what its regex does

Adversarial review of PR #1 (READY, zero defects; three nits).

README's `### Bumping the pin` block staged `contracts/openreposhape-pin.yaml`
on the line ABOVE the sentence telling the reader to write the new commit and
digest into it. Run literally, the edit was never staged and the commit carried
the moved gitlink with the OLD pin — the exact drift
`tests/test_upstream_pin.py` exists to catch, and invisible where you are
standing: that suite reads the pin out of the WORKING TREE and the gitlink out
of `git ls-tree HEAD`, so it is green in your checkout and red in CI, which is
the wrong way round. The edit is now a step inside the block, `git commit` is
the last line, and a paragraph says why the order is the order. Proved by
running the corrected block literally in a throwaway recursive clone, bumping
d090a7a -> 5777ca8: the commit carries `commit: 5777ca8…` and
`160000 commit 5777ca8…` together, `pytest tests/test_upstream_pin.py` is green
in a FRESH WORKTREE of that commit (as CI sees it), and the whole suite is green
at the bumped pin (141 passed). Two of the three places that carry this
procedure already had it right — the pin file's own header and AGENTS.md — which
is why only the README moved.

`tests/test_repo_hygiene.py`'s host-absolute-path guard said the workflow file
"is excluded by name rather than matched". It is not: the file is scanned like
every other, and it is the GitHub runner's own fixed ACCOUNT that is exempted,
by the `(?!runneradmin\)` lookahead in the pattern. The comment now describes
the mechanism the code has, and says what still is a finding — a real user's
path in that same workflow.

README cap 165 -> 172 with a dated entry naming the rule the seven lines bought.
No shipped byte changed: `park`, `resume`, `tests/test_park_resume_commands.py`
and the pin are untouched by this commit.

Part of opensoft/openRepoShape#92 (slice T1).

Lane: xfactory-2 (xFactory-2)
Copilot AI review requested due to automatic review settings September 10, 2026 17:01

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.

🔵 Needs a closer look

resume contains an unquoted array iteration in add_workspace() that can break deduping when workspace paths contain spaces, causing incorrect manifest-selection behavior.

Review details

Suppressed comments (1)

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

resume:952

  • add_workspace() iterates over WORKSPACES using an unquoted array expansion (for existing in ${WORKSPACES[@]+"${WORKSPACES[@]}"}), which will word-split entries containing spaces. That can break the dedupe logic and lead to false positives like “workspace manifests record … in different orgs” when a configured workspace path includes a space. Use a quoted array expansion instead (safe here because WORKSPACES is always initialized).
  • Files reviewed: 16/17 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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.

2 participants