Repository navigation
devBenches/base-image: re-vendor openRepoShape at 3d46ab5 — --doctor renamed --preflight, a new --doctor [<path>] compliance check, bare usage, --install's machine report - #42
Conversation
…` renamed `--preflight`, `--doctor [<path>]` becomes the compliance check, bare usage, `--install`'s machine report (#41) `update-upstream.py apply --source openreposhape --at 3d46ab590351797f7570946aab422a940b44fded --yes`, taking opensoft/openRepoShape#96 (closes opensoft/openRepoShape#95) from the previously pinned `0fa73b7df704266589dcc27afca020c0127fa36f`. - `files/openreposhape/openRepoShape` — taken; byte-identical to `git -C ~/projects/openRepoShape show 3d46ab5:openRepoShape`. The machine check's variable and flag are renamed `DOCTOR`/`--doctor` -> `PREFLIGHT`/`--preflight`; `--doctor [<path>]` is a new mode running `shape-doctor.py` (beside the shim when there is a checkout, else a temporary clone) with a `set_mode` guard refusing two modes typed together; `--install` ends with a read-only `machine:` report (git/gh/python3/git-filter-repo, each present/MISSING, never changing the exit code); a bare run with no arguments now prints usage and exits 1 instead of falling into the scaffold path. - `files/openreposhape/templates/assembly-root/project.yaml` — unchanged (`apply` reports it `unchanged`; also confirmed byte-identical against the source at both the old and new pinned commit). - `devBenches/base-image/upstream-pin.yaml` — re-pinned to `3d46ab590351797f7570946aab422a940b44fded`. `update-upstream.py check` — exit 0, 5 rows across both sources. A full-repo search for this repository's own `--doctor`/`--preflight` text (setup.sh, the Dockerfile, both devcontainer test trees, README, docs, `scripts/setup-estate-commands.sh`) found nothing outside this vendored file, so no other text changes. Lane: openreposhape-2 (openRepoShape-2) Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
@codex review |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the base-image vendor of openRepoShape from 0fa73b7 to 3d46ab5, replacing only the shim and corresponding pin metadata; the upstream shim adds compliance diagnostics, renames the machine preflight mode, reports install prerequisites, and handles bare invocation explicitly. Repository-level checks and vendored-file comparisons pass, but the base-image rebuild and resulting container verification remain outstanding. Sequence diagram for openRepoShape doctor compliance checksequenceDiagram
participant User
participant Shim as openRepoShape
participant Checkout as LocalCheckout
participant Temp as TemporaryClone
participant Doctor as shape-doctor.py
User->>Shim: --doctor [path]
alt checkout beside shim exists
Shim->>Checkout: run shape-doctor.py
Checkout-->>Doctor: repository path
else no checkout beside shim
Shim->>Temp: clone standard shape
Temp-->>Doctor: repository path
end
Doctor-->>Shim: COMPLIANT / COMPLIANT, SHAPE BEHIND / DRIFTED / INVALID / NOT A SHAPE ROOT / CANNOT ANSWER
Shim-->>User: verdict
Flow diagram for openRepoShape mode selectionflowchart TD
Start["openRepoShape invocation"] --> Args{"Arguments present?"}
Args -->|No| Usage["Print usage and exit 1"]
Args -->|Yes| Mode{"Selected mode"}
Mode -->|--help| Help["Print help and exit 0"]
Mode -->|--doctor path| Doctor["Run repository compliance check"]
Mode -->|--preflight| Preflight["Check machine prerequisites"]
Mode -->|--install| Install["Install shape and print machine report"]
Mode -->|Scaffold arguments| Scaffold["Run scaffold behavior"]
Doctor --> Guard{"--install also supplied?"}
Guard -->|Yes| Refuse["Refuse conflicting modes"]
Guard -->|No| Verdict["Print one compliance verdict"]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
🟡 Changes recommended
Address the repeated --doctor argument handling and update the doctor help text.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Re-vendors openRepoShape at upstream commit 3d46ab5 and updates its integrity pin.
Changes:
- Updates the upstream revision and SHA-256 digest.
- Adds upstream doctor, preflight, usage, and install-report behavior.
File summaries
| File | Summary | Review findings |
|---|---|---|
devBenches/base-image/upstream-pin.yaml |
Records the new upstream revision and digest. | None. |
devBenches/base-image/files/openreposhape/openRepoShape |
Provides the updated CLI behavior. | Moderate: repeated --doctor arguments overwrite the earlier path. Nit: help omits the CANNOT ANSWER verdict and its exit behavior. |
Review details
Suppressed comments (1)
devBenches/base-image/files/openreposhape/openRepoShape:430
- A second
--doctoris accepted without any duplicate-argument check, soopenRepoShape --doctor first --doctor secondsilently overwritesDOCTOR_PATHand diagnoses onlysecond. Reject repeated doctor options (or at least a second path) instead of discarding the first repository requested.
if [ $# -gt 0 ]; then
case "$1" in
-*) ;;
*) DOCTOR_PATH="$1"; shift ;;
esac
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| one row per check and ONE verdict: COMPLIANT, COMPLIANT SHAPE BEHIND, DRIFTED, | ||
| INVALID or NOT A SHAPE ROOT. It writes nothing, and every finding names the | ||
| command that fixes it. Exit 0 compliant, 1 findings, 2 not a shape root, 3 | ||
| usage. Run beside a checkout of the standard it uses that one; run from |
Lane: openreposhape-2 (openRepoShape-2)
Claim: #41 (comment)
Closes #41.
What lands.
devBenches/base-image/upstream-pin.yaml'sopenreposhapesource moves from0fa73b7df704266589dcc27afca020c0127fa36f(pinned in #34, carried by #39) to3d46ab590351797f7570946aab422a940b44fded—gh api repos/opensoft/openRepoShape/compare/main...3d46ab590351797f7570946aab422a940b44fded -q .statussaysidentical, so it is the commitmaincarries (PR opensoft/openRepoShape#96, merged as this exact sha, closing opensoft/openRepoShape#95). The tool does not change — oneapplyrun and nothing else.Upstream, between the two commits (opensoft/openRepoShape#96, squash-merged to one commit on
main, seven commits on its own branch per the PR's account):DOCTOR/--doctor->PREFLIGHT/--preflight, freeing--doctorfor the next point.--doctor [<path>]is a new mode:shape-doctor.pyanswers whether an arbitrary repository is compliant with the shape and prints one verdict (COMPLIANT/COMPLIANT, SHAPE BEHIND/DRIFTED/INVALID/NOT A SHAPE ROOT/CANNOT ANSWER). The shim runs it from beside itself when there is a checkout there, else clones the standard into a temporary directory first (deliberately not--depth 1— the shape-currency row needs more than one commit to compare against). Aset_modeguard REFUSES--doctor <path> --installtyped together rather than silently dropping one (a review-round fix).--installends with a read-onlymachine:report —git,gh(and whether it's logged in),python3,git-filter-repo— eachpresent/MISSING, pointing at--preflightwhen something is short. It installs nothing and never changes--install's exit code.openRepoShape(no arguments at all) now prints usage and exits 1, instead of falling through into the scaffold path and refusing "no organisation." Any scaffold argument at all keeps today's behaviour, refusals included;--helpstill exits 0.shape-doctor.py— none of it reaches the shim surface further.The
applyrun, verbatim:templates/assembly-root/project.yamlcomes backunchanged— confirmed from a run, not from reasoning: it is byte-identical to the source at both the old and the new pinned commit (diff <(git -C ~/projects/openRepoShape show 0fa73b7:templates/assembly-root/project.yaml) <(git -C ~/projects/openRepoShape show 3d46ab5:templates/assembly-root/project.yaml)is empty). OnlyopenRepoShapeitself changed upstream, and only it istaken.No stale
--doctortext.--doctormeant "check this machine" in this repository's own words before opensoft/openRepoShape#96 renamed that to--preflightupstream. A full-repo search —grep -rn -- '--doctor\|--preflight' setup.sh devBenches/base-image/Dockerfile devBenches/devcontainer.test/*.sh README.md docs, and again overscripts/setup-estate-commands.shanddevcontainer.test/*.sh(the host-install script and its test, #40) — found no matches anywhere outside the vendored copy itself, both before and after this branch'sapply. Nothing in this repository's own scripts, Dockerfile, tests or docs names either flag, so there is no text to fix beyond the vendored fileapplyalready replaced.Proofs, all run on this branch's HEAD.
update-upstream.py checkopenreposhape:openRepoShape,templates/assembly-root/project.yaml;openrepotools:openRepoTools,park,resume)update-upstream.py listtest-speckit-git-feature.shtest-speckit-git-compat.shtest-openspeckit-bootstrap.shdevcontainer.test/test-setup-estate-commands.sh(setup.sh's host install, #40)git diff --statupstream-pin.yaml,files/openreposhape/openRepoShape— no tool change, no Dockerfile change,templates/assembly-root/project.yamluntouchedThe vendored shim diffs clean against the source at the pinned commit (local mirror clone
~/projects/openRepoShapeat3d46ab5, clean):diff <(git -C ~/projects/openRepoShape show 3d46ab5:openRepoShape) devBenches/base-image/files/openreposhape/openRepoShape— emptydiff <(git -C ~/projects/openRepoShape show 3d46ab5:templates/assembly-root/project.yaml) devBenches/base-image/files/openreposhape/templates/assembly-root/project.yaml— empty (byte-unchanged, asapplyitself reported)Not proven here: the image.
dev-bench-basecarries the new shim only after its next rebuild — not run in this PR. The command that proves it, per #34/#39's precedent:Not here. The base-image rebuild above, and the Eagle host reinstall — already done per Brett Heap's word (2026-09-10: "merge it when green, then re-vendor and reinstall on Eagle").
🤖 Generated with Claude Code
Summary by Sourcery
Re-vendor openRepoShape at the current upstream commit to expose its expanded compliance and diagnostics behavior.
New Features:
Bug Fixes:
Enhancements:
Tests: