Skip to content

One definition for the two entry points: setup.sh becomes a shim over setup-project.py (follow-up of #49) #50

Closed

Description

@brettheap

Lane: xfactory-2 (xFactory-2)

Follow-up of #49 (native Windows path), filed by the lane that is building it; NOT claimed — it waits for #49 to land and for a green Windows run behind it.

What

setup.sh (bash) and setup-project.py (Python, arriving in #49) are two entry points with one contract: the same flags, the same eight phases, the same wording a human reads before typing yes. #49 keeps setup.sh byte-for-byte intact on purpose — its acceptance criterion is a different platform, and the bash path is what every current user and the openRepoShape command run — and holds the two together with a text-level parity test (tests/test_setup_project_py.py::test_the_two_entry_points_accept_the_same_flags: every --flag in one usage block is in the other, one named allowlist entry for the positional <Project>).

This issue is the consolidation: make setup.sh a ~60-line shim — self-bootstrap into a temporary clone (it cannot delegate to a file it does not yet have), find any Python ≥ 3.9 on the machine, exec setup-project.py with the caller's arguments — so the flow exists ONCE.

Acceptance

  • tests/test_setup_sh.py green with EXACTLY TWO edited assertions, each with a comment saying what moved and why: the preflight line that today asserts the literal python3 (the Python prints the running interpreter's name, which under actions/setup-python is python), and the usage banner usage: ./setup.sh (one implementation, invoked under two names).
  • The openRepoShape command and README.md § "Starting a project in a new organisation" keep working unchanged; tests/test_openreposhape_command.py green.
  • The parity test from No native Windows path: setup.sh and the openRepoShape command are bash; a Python entry point, Windows CI, and the README path #49 is either retired (one definition needs no parity check) or kept as a regression guard on the shim's pass-through — the PR says which and why.
  • A bisect over the two PRs points at the delegation, not at Windows support: that is why this is its own PR.

Lane: xfactory-2 (xFactory-2)

Activity

  1. brettheap commented on Sep 5, 2026

    @brettheap
    ContributorAuthor

    Lane: xfactory-2 (xFactory-2)

    CLAIMED — lane xfactory-2 (xFactory-2), session harness 6bdb2e35-cbc8-4b10-b13f-11d9b421fef9, 2026-09-05T21:40Z, for the whole of this issue: setup.sh becomes a shim over setup-project.py.

    RULING this claim executes — Brett Heap, 2026-09-05 ~21:40Z, in session, verbatim: "pick up #50 and #51 too" (after #49 → PR #53 3541dfa and #55 → PR #56 4fe7840 landed with a green windows-latest run behind them — the precondition this issue set).

    Rule 1 reads: (1) this issue: no comments, no other claim; (2) gh pr list --state all --search "setup.sh shim setup-project": #53 MERGED A native Windows path: setup-project.py, a windows-latest job, and the README route (#49); (3) git ls-remote --heads origin | grep -iE 'shim|setup-sh': no branch. Siblings on this repository: second window of this lane openreposhape-b1 holds #54 (macOS quick start: README, tests.yml, a macos-latest job — it RUNS tests/test_setup_sh.py on macOS, so this PR's two edited assertions must hold there too; sequenced: whichever lands second rebases); xFactory-1 on update-shape.py messages. #51 is claimed by this same window in parallel, in its own worktree; the two PRs touch different files (setup.sh, tests/test_setup_sh.py, README § "What setup.sh does" vs the templates and the copy lists) and are sequenced at merge.

    Plan first, then implement: the shim's self-bootstrap, its interpreter discovery (python3 then python, version ≥ 3.9 checked by the found interpreter, the existing refusal text otherwise), --into <invocation dir> injection preserved, --shape-ref/--keep-shape-checkout handled by the shim's own clone, everything else passed through; tests/test_setup_sh.py green with exactly the two edited assertions this issue names; the flag-parity test retired or repointed with the reason stated. Worktree fix/setup-sh-shim from origin/main 4fe7840.

    Lane: xfactory-2 (xFactory-2)

  2. brettheap commented on Sep 5, 2026

    @brettheap
    ContributorAuthor

    Lane: xfactory-2 (xFactory-2)

    Correction to the claim above (lane xfactory-2, 2026-09-05T21:40Z): read 3 did return one branch, v0.1/setup-sh — a leftover from the v0.1 cut, last commit long before this issue, no open PR; not a live sibling. Recorded so the claim's reads are accurate.

  3. added 2 commits that reference this issue on Sep 9, 2026
  4. added 2 commits that reference this issue on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions