Skip to content

The Mac path, a rehearsal that creates nothing, and what a failed scaffold leaves (#54) - #57

Merged
brettheap merged 3 commits into
mainfrom
docs/macos-quick-start
Sep 5, 2026
Merged

brettheap merged 3 commits into
mainfrom
docs/macos-quick-start

Conversation

@brettheap

@brettheap brettheap commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Lane: xfactory-2 (xFactory-2)
Claim: #54 (claim in the issue body)

Closes #54.

What this changes

The Mac path, a rehearsal that creates nothing, and what a failed scaffold leaves. Brett Heap, 2026-09-05, in session: "we have the case for windows only and wsl/linux users and mac users. we need to make sure it is explained for all. i think we have nothing so far for mac users" → "go, file the issue and pick it up after #49 lands". Read against main after #46 and #49: macOS was one line (brew install gh), nothing had ever run on a Mac, the gh api one-liner decoded with base64 -d (a flag BSD base64 does not take), and a first-time user could neither rehearse the run nor learn what a failure part-way leaves behind.

  • README § Quick start, platform block: now Linux / macOS / Windows, natively / Windows via WSL2. The macOS paragraph: the Xcode Command Line Tools supply git, make and python3 (xcode-select --install, or a bare git on a fresh Mac offers it; the preflight prints the python3 it found and refuses below 3.9); Homebrew is its own install — LINKED to brew.sh, not pasted — and its installer prints the Apple Silicon PATH line; brew install gh; brew install git-filter-repo only for adopting; the stock /bin/bash 3.2 is enough because neither bash entry point uses newer syntax (grepped for ${x,,} ${x^^} readarray mapfile declare -A local -n |& &>> ;;& coproc: none), and zsh as the login shell changes nothing because both run under bash explicitly.
  • base64 -d → base64 --decode in the gh api one-liner; the only occurrence in the repository, no test asserted the old spelling.
  • "Rehearse first, creating nothing" after step 4: --local-remote-dir <dir> — same preflight (gh neither required nor checked), naming check, plan, typed yes, clone and make bootstrap, against three bare repositories on disk; gh is never called and nothing is created on GitHub; --org is still required but is only a string there, never checked against GitHub. The paragraph says exactly which route still touches the network: the openRepoShape command fetches setup.sh, and setup.sh self-bootstraps by cloning the standard; ./setup.sh from a checkout touches nothing. Verified by running it with a gh shim that logs and exits: the log stayed empty.
  • "If it fails part-way" in the worked example: nothing is created before the typed yes; creation order is <Project>-spec, <Project>-code, <Project> — the root LAST (scaffold-project.py, for role in ("spec", "code", "assembly")); there is NO rollback anywhere in the source; a failed push says so in the tool's own words; a second run is refused while the legs exist and there is no --force; the exits are gh repo delete (which needs the delete_repo scope; gh repo delete --help names gh auth refresh -s delete_repo) or a different --project; --reuse-empty-repo covers exactly a zero-commit ROOT and nothing else; internal is offered only by GitHub Enterprise Cloud organisations and refused by GitHub, not by this tool.
  • tests-macos job in tests.yml on macos-latest, mirroring the Linux job: identical action shas, pytest==8.3.4 and git-filter-repo==2.47.0 pinned identically, the same per-invocation git identity. One extra step prints /bin/bash --version and runs /bin/bash -n setup.sh and /bin/bash -n openRepoShape SEPARATELY (bash -n a b parses only a). The comment says what -n can and cannot catch (grammar such as ${x,,}, |&, ;;&, coproc; not a bash-4 builtin) and that the job cannot assert which bash /bin/bash is — it prints it. Green on macos-latest is what "runs on a Mac" means here; there is no Mac on this side.
  • README hygiene cap 881 → 945 (after Templates ship a .gitattributes so a Windows clone of a scaffolded project passes its own gate (follow-up of #49) #51's 872 → 881), rationale beside it in the file's convention. AGENTS.md unchanged (273 = cap). No script changes.

Adversarial Opus review before opening found four defects, all fixed: the rehearsal paragraph claimed "no network" of a route that fetches setup.sh and clones the standard; the failure paragraph attributed the "NOTHING has been rolled back" line to any failure when only a failed push prints it (RULESET_HINT), and described a clone-failure message that setup.sh prints only when the clone target already exists; the tests.yml comment claimed bash -n catches mapfile, declare -A and local -n (runtime builtins, not grammar — proved by parsing a file that uses all three); and the macOS prose asserted which bash the runner's /bin/bash is. Plus trims: the repo_shape.py internals sentence, "delete the empty repositories" (a leg can hold commits after a partial failure) → "delete what was created".

Not verifiable from this side, stated as such in the prose or hedged: every macOS-environment fact (Command Line Tools contents and version — CLT ships python3 3.9.6; the fresh-Mac git prompt; Homebrew's /opt/homebrew and shellenv line; that BSD base64 takes --decode — it certainly does not take -d; that internal needs Enterprise Cloud). The bash half is settled by the tests-macos job on this PR.

Evidence

Linux: python3 -m pytest tests -q — 583 passed on the tree at head 2830d07 (a merge of main at 0a84d6c, #58, into the branch; the tree is byte-identical to the branch rebased onto that commit, which is where the run was made — the ruleset refuses a force-push, so the rebase is carried as a merge commit). Earlier heads: 570 on the branch before #56, 573 after it. Sequenced after #49 (#53: shared README platform paragraph, cap line and tests.yml) and after #58 (#51: shared cap line; this branch's cap entry now reads 881 -> 945, after #51's 872 -> 881). macOS: the tests-macos job on this PR is the acceptance; on the first head it passed in 2m53s and its log shows the runner's /bin/bash is GNU bash, version 3.2.57(1)-release (arm64-apple-darwin25), under which both entry points parsed.

Copilot's one review finding (the macOS paragraph implied the Command Line Tools' python3 always suffices; older Tools shipped 3.8) is folded in as one sentence naming the exit, cap 933 → 936 before the re-count.

Merge word: Brett Heap, 2026-09-05, "merge #54 on green too" — green including the macOS job.

🤖 Generated with Claude Code

…ffold leaves (#54)

Brett Heap, 2026-09-05: "we have the case for windows only and wsl/linux
users and mac users. we need to make sure it is explained for all. i think we
have nothing so far for mac users" then "go, file the issue and pick it up
after #49 lands". Read against main after #46 and #49, macOS was one line
(`brew install gh`), nothing had ever run on a Mac, the `gh api` one-liner
decoded with a flag BSD base64 does not take, and a first-time user could
neither rehearse the run nor learn what a failure part-way leaves behind.

README § Quick start: the platform block is now Linux / macOS / Windows,
natively / Windows via WSL2. The macOS paragraph names where git, make and
python3 come from (the Xcode Command Line Tools), that Homebrew is its own
install (linked, not pasted) and prints the Apple Silicon PATH line, `brew
install gh`, `brew install git-filter-repo` only for adopting, and that the
stock /bin/bash 3.2 is enough because neither bash entry point uses newer
syntax. `base64 -d` becomes `base64 --decode`. A "Rehearse first, creating
nothing" paragraph documents `--local-remote-dir <dir>` and says exactly which
route still touches the network (the command fetches setup.sh and setup.sh
self-bootstraps; from a checkout nothing does) and that `--org` is only a
string there. An "If it fails part-way" paragraph gives the creation order
(spec, code, root last), that there is no rollback, the refusal of a second
run, `--reuse-empty-repo` as root-only, `gh repo delete` and its scope, and
`internal` as Enterprise Cloud only — each sentence checked against
scaffold-project.py, shape_materialize.py and setup.sh.

tests.yml gains a `tests-macos` job on macos-latest mirroring the Linux job
(same action shas, same pins, same per-invocation identity), plus a step that
prints /bin/bash --version and runs `/bin/bash -n` on setup.sh and on
openRepoShape separately, because `bash -n a b` parses only `a`. Green on
macos-latest is what "runs on a Mac" means here; there is no Mac on this side.

Adversarial Opus review before opening found four defects, all fixed: the
rehearsal paragraph claimed "no network" of a route that fetches setup.sh and
clones the standard; the failure paragraph attributed the "NOTHING has been
rolled back" line to any failure when only a failed push prints it, and
described a clone-failure message that setup.sh prints only when the target
already exists; the tests.yml comment claimed `bash -n` catches mapfile,
declare -A and local -n, which are runtime builtins, not grammar; and the
macOS prose asserted which bash the runner's /bin/bash is.

README 872 -> 933, cap moved with the rationale beside it. AGENTS.md
unchanged. 570 tests pass on Linux.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

Copilot AI lite review requested due to automatic review settings September 5, 2026 21:50

@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 16 hours and 2 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 5, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR documents the complete macOS path, adds a macOS CI acceptance job, provides a local rehearsal mode explanation, and makes scaffold failure cleanup behavior explicit, with a portable base64 command and an updated README length guard.

Sequence diagram for the local scaffold rehearsal

sequenceDiagram
    actor User
    participant openRepoShape
    participant setup_sh as setup.sh
    participant LocalRemotes as Local bare repositories
    participant Project as Local project directory

    User->>openRepoShape: openRepoShape Atlas --org org --local-remote-dir rehearsal
    openRepoShape->>setup_sh: pass --local-remote-dir
    setup_sh->>setup_sh: preflight and naming check
    setup_sh->>User: print plan and Type yes to continue:
    User->>setup_sh: yes
    setup_sh->>LocalRemotes: clone and make bootstrap
    setup_sh->>Project: create ./Atlas
    Note over setup_sh,LocalRemotes: gh is never called, GitHub is not contacted
Loading

Flow diagram for scaffold creation order and partial failure

flowchart TD
    A[Preflight, naming check, and plan] --> B{Typed yes}
    B -->|No| C[Nothing created]
    B -->|Yes| D[gh repo create Project-spec]
    D --> E[gh repo create Project-code]
    E --> F[gh repo create Project]
    F --> G[Seed and push spec and code]
    G --> H[Build and push root]
    H --> I[Set topic on all three repositories]
    D -. failure .-> J[Created resources remain; no rollback]
    E -. failure .-> J
    F -. failure .-> J
    G -. failure .-> J
    H -. failure .-> J
    I -. failure .-> J
Loading

File-Level Changes

Change Details Files
Adds documented macOS support and CI coverage for both Bash entry points.
  • Documents Xcode Command Line Tools, Homebrew, gh, optional adoption tooling, Bash 3.2 compatibility, and zsh usage.
  • Adds a pinned-dependency macos-latest job that runs the test suite, prints /bin/bash version, and separately syntax-checks both scripts.
  • Keeps action revisions, dependency pins, and Git identity aligned with existing CI jobs.
README.md
.github/workflows/tests.yml
Adds a filesystem-only rehearsal path for scaffolding and explains its network boundaries.
  • Documents --local-remote-dir as a full rehearsal using three bare repositories without invoking gh or creating GitHub repositories.
  • Clarifies that the downloaded command self-bootstraps over the network, while running ./setup.sh from a checkout is offline.
  • Provides a concrete rehearsal invocation and describes local artifacts left behind.
README.md
Documents partial-failure behavior and practical cleanup or rerun options.
  • Describes the confirmation boundary, repository creation order, absence of rollback, and artifacts that may remain after failure.
  • Explains refusal of reruns, manual deletion with the required GitHub CLI scope, alternate project names, and the exact zero-commit root reuse case.
  • Clarifies Enterprise Cloud-only behavior for internal visibility.
README.md
Makes the documented GitHub API decoding command portable to macOS.
  • Replaces BSD-incompatible base64 -d with base64 --decode.
README.md
Raises the README hygiene limit to accommodate the expanded operational guidance.
  • Updates the cap and records the rationale for the macOS, rehearsal, and failure-handling additions.
tests/test_repo_hygiene.py

Assessment against linked issues

Issue Objective Addressed Explanation
#54 Document a complete macOS quick-start path, including Xcode Command Line Tools, Python version requirements, Homebrew installation and PATH setup, GitHub CLI installation, bash compatibility, and zsh behavior. ✅
#54 Make the README's GitHub API example work on macOS by replacing the incompatible BSD base64 -d flag with the portable base64 --decode form. ✅
#54 Document safe rehearsal and failure recovery: explain --local-remote-dir and --help, the no-GitHub rehearsal flow, scaffold creation order, lack of rollback, cleanup options, --reuse-empty-repo, visibility limitations, and validate macOS compatibility through a full CI job with the hygiene cap updated. ✅

Possibly linked issues


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.

🟡 Changes recommended

The new macOS quick-start text asserts Xcode Command Line Tools provide python3, which can mislead users because the tooling only requires python3 3.9+ to be present and may need a separate install.

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

Pull request overview

This PR improves first-time onboarding and cross-platform support by expanding the README for macOS, documenting an offline rehearsal mode and partial-failure cleanup, and adding a macOS CI job to validate behavior and bash syntax assumptions.

Changes:

  • Expand README quick start to cover Linux/macOS/Windows separately, add --local-remote-dir rehearsal guidance, and document partial-failure cleanup.
  • Update the gh api one-liner to use base64 --decode for better cross-platform compatibility.
  • Add a tests-macos GitHub Actions job and raise the README length hygiene cap accordingly.
File summaries
File Description
README.md Adds macOS quick-start guidance, rehearsal mode documentation, failure cleanup notes, and updates the base64 decode spelling.
tests/test_repo_hygiene.py Raises README length cap and records the rationale alongside existing hygiene conventions.
.github/workflows/tests.yml Adds a macOS CI job that runs the suite and explicitly parses both bash entry points with /bin/bash.
Review details
  • Files reviewed: 3/3 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.

Comment thread README.md Outdated
Comment on lines +39 to +42
Xcode Command Line Tools supply `git`, `make` and a `python3` — install them
with `xcode-select --install`, or type `git` once on a fresh Mac and the
installer offers itself; step 4 opens with a preflight that prints the
`python3` it found and refuses anything below 3.9. `gh` comes from Homebrew,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taken, in 9cedaa4. The Tools do supply a python3 on current macOS, but older Tools shipped 3.8, which the preflight refuses, and the paragraph gave no exit. It now says: if the preflight refuses the one the Tools supplied, install a newer one from python.org or with brew install python, and the preflight finds it first on PATH. Cap 933 -> 936 for the reflowed paragraph.

Lane: xfactory-2 (xFactory-2)

Copilot AI review requested due to automatic review settings September 5, 2026 22:03
…ilot on #57)

Copilot's one finding on PR #57: the macOS paragraph read as claiming the
Xcode Command Line Tools' python3 always suffices, while the preflight only
requires a python3 of 3.9 or newer and points at python.org when it is
missing. Older macOS Command Line Tools shipped 3.8, which the preflight
refuses. One sentence names the exit: install a newer one from python.org or
with `brew install python`, and the preflight finds it first on PATH.

README 933 -> 936 (the paragraph reflowed); cap moved with the rationale.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>

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

The README’s updated base64 --decode one-liner is not compatible with macOS’s default base64 implementation and will fail for macOS users as written.

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

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread README.md
Comment on lines 208 to +210
```sh
gh api repos/opensoft/openRepoShape/contents/setup.sh --jq .content \
| base64 -d | bash -s -- --org <your-org> --project Atlas
| base64 --decode | bash -s -- --org <your-org> --project Atlas
…counted 881 -> 945

#58 landed first and moved the README to 881 lines. This merge keeps its
`.gitattributes` rows and rationale entry, and re-counts this branch's cap
entry from 872 -> 936 to 881 -> 945 after it. The tree is identical to the
branch rebased onto 0a84d6c, on which 583 tests passed; the ruleset refuses a
force-push, so the rebase is carried as a merge.

Lane: xfactory-2 (xFactory-2)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 5, 2026 22:11
@sonarqubecloud

sonarqubecloud Bot commented Sep 5, 2026

Copy link
Copy Markdown

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

The new README rehearsal section contains an inaccurate absolute claim about gh never being invoked when using openRepoShape, which should be corrected for consistency and user guidance accuracy.

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

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread README.md
whole of that against three BARE repositories in `<dir>`: the same preflight
(where `gh` is neither required nor checked), the same naming check, the same
plan, the same `Type yes to continue:`, the same clone and `make bootstrap`.
`gh` is never called and nothing is created on GitHub. `--org` is still
@brettheap
brettheap merged commit 1a706dc into main Sep 5, 2026
6 checks passed
@brettheap
brettheap deleted the docs/macos-quick-start branch September 5, 2026 22:19
brettheap pushed a commit that referenced this pull request Oct 13, 2026
…5 cites the 34 pull requests merged since #343, section 6 drops the 13 known-limit issues that closed and adds the 63 checklist lines the five parents gained, section 7 lists the 12 open milestone issues, and the preflight sentence offers only what the preflight offers (#472)

Refresh round 1 of the draft, against main d41cc29 (#402, merged
2026-10-13T21:17:39Z). GitHub was read between 21:23 and 21:43 UTC: the
merged pull requests, the v1.0.0 milestone open and closed, every open
issue, and the five tracking parents with their sub-issues, bodies and
comments. Every merge commit of the 217 merged pull requests is on main.

Section 5 places each of the 34 pull requests merged after #343
(2026-10-12T22:31:20Z) in its area, from its own body, one clause each;
all 217 merged pull requests are now cited, with #16, #53 and #57 still in
two areas. Three earlier sentences are made true of main: `check` has
more verdicts than the four it named, and #465's docs and #505's accuracy
pass show that `validate-pins.py` may ask `gh api` and that
`openRepoShape --preflight` offers only `gh`, its login and its credential
helper (`setup-project.py --preflight` also offers `git`).

Section 6 lists the 47 open, unmilestoned sub-issues (it listed 60). It
drops #189, #293, #303, #328, #386, #286, #259, #275, #322, #324, #338,
#339 and #359, which closed. #389 is reworded now that #305's refusal has
landed. #420 and the `a=b` line are narrowed to a hand-edited
`adopt_branch:`, because an offline probe on d41cc29 shows #493's
`plan-tracking-branch-missing` now stops a bad `tracking_branch:` at
`check`, with no leg made, while `adopt_branch: "a..b"` still passes
`check` and fails after both legs exist. The family annotated-tag line
says `bump --to` now refuses one (#466). The 63 new lines are the
parents' checklist lines posted or added since the first build, each
checked against the code at d41cc29. Left out, and said so in the
refresh record: docstring, comment and wording nits (as L2-7 was), lines
that describe a branch not on main (#504's, #507's, #511's, #515's and
#517's), lines filed into the milestone (#485, #514, #516), and three with
no effect a person meets.

Section 7 lists the 12 open milestone issues; 24 of the 30 it listed have
closed. Lane 4's #510, #511, #512 and #513 have not landed, so #471,
#499, #500, #501 and #502 stay open here and the Windows qualifier stays.

Lane: openreposhape-4 (openRepoShape-4)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

The Mac path, a rehearsal that creates nothing, and what a failed scaffold leaves: README follow-up of #46, sequenced after #49

2 participants