Skip to content

setup-project.py: Copilot's five post-merge findings on #53 (docstring claim, --into help, OPENREPOSHAPE_REPO injection guard, retypable interpreter, duplicated strings) #55

Closed

Description

@brettheap

Lane: xfactory-2 (xFactory-2)

Follow-up of #49 / PR #53 (merged 3541dfa). Copilot left six inline review comments on #53 across three rounds; the PR was merged on the standing "merge on green" word before the last round was read. Five stand against the merged code; one (--shape-ref forwarded unvalidated) was already fixed by checked_ref in acd460b. This issue is the governing record for landing the five.

The five, against setup-project.py at 3541dfa

  1. The module docstring overclaims "output is pure ASCII". The script prints user-supplied values (--elected-by, git config user.name) and inherits child output. Constrain the claim to the SOURCE and to the fixed markers the script itself emits.
  2. --help says --into defaults to .. always. In self-bootstrap mode the effective parent is the invocation directory (injected --into). Say so in the usage text.
  3. OPENREPOSHAPE_REPO reaches git clone as a positional with no -- terminator and no leading-- refusal. A value starting with - is an option to git — the same argument-injection class checked_value exists for. Refuse a leading - (and control characters) and put -- before the repository argument. setup.sh shares the exposure (git clone … "$SHAPE_REPO"); it is byte-frozen until One definition for the two entry points: setup.sh becomes a shim over setup-project.py (follow-up of #49) #50 — note it there.
  4. PYTHON_CMD = Path(sys.executable).name is not reliably retypable (an absolute-path interpreter not on PATH). Use the platform-conventional command, matching scripts/repo_shape.py's PYTHON (python on Windows, python3 elsewhere) in every human-facing string; keep sys.executable for argv.
  5. _main() duplicates the git-missing and prerequisites-missing strings instead of using the GIT_MISSING / PREREQ_MISSING constants introduced to keep the wording identical.

Acceptance: the five changes above, tests/test_setup_project_py.py extended for 3 (a -c value in OPENREPOSHAPE_REPO refuses, exit 2, and the clone argv carries --) and 4 (the remediation names python3/python by platform), source still pure ASCII, all printed strings otherwise byte-identical, full suite green on both jobs.

Claim

CLAIMED — lane xfactory-2 (xFactory-2), session harness 6bdb2e35-cbc8-4b10-b13f-11d9b421fef9, 2026-09-05T21:15Z, for the PR above. Rule 1 reads: (1) no other record — this issue; (2) gh pr list --state all --search "copilot setup-project": none besides #53; (3) no branch. Siblings: second window openreposhape-b1 holds #54 (macOS; README/tests.yml — not setup-project.py); xFactory-1 on update-shape.py. No overlap.

Lane: xfactory-2 (xFactory-2)

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