Skip to content

fix(starter): restore Bash setup on native Windows - #330

Draft
arniebradfo wants to merge 4 commits into
build/hub/newfrom
fix/starter-git-bash
Draft

arniebradfo wants to merge 4 commits into
build/hub/newfrom
fix/starter-git-bash

Conversation

@arniebradfo

Copy link
Copy Markdown
Collaborator

Why

#293 moved V2 starter setup from Bash to Node. We want one Bash workflow that also works with Git for Windows. The old Bash creator could mistake a Windows checkout for an archive because Git and Git Bash spelled the same path differently, causing it to copy untracked files.

What changes

The download installer validates the V2 archive and calls the same Bash creator used from a checkout. The creator copies tracked starter files and leaves the new repository without a commit or remote. The setup guide gives native Windows agents the Git Bash command, the PowerShell fallback, and the fresh Copilot session handoff.

Hub launches the verified Git for Windows Bash executable for example seeding and still creates the example commits separately. Starter CI adds one focused Windows job without duplicating the Linux build matrix.

The public download remains on main and needs an end-to-end check once V2 is released there. Native Windows dependency installation through the Copilot app's Startup runner was not verified.

arniebradfo and others added 3 commits November 20, 2026 13:55
Restore the V2 creator and download installer that #293 moved to Node. Compare checkout paths by directory identity so Git Bash copies only tracked starter files even when Git uses a Windows drive path. Keep archive validation, cleanup, and a new repository without a commit or remote.

Have Hub select the Git for Windows Bash wrapper when it seeds its own example history. Preserve its independent npm and file URL fixes. Document the native Windows commands and fresh Copilot handoff without changing the release URLs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run the focused creator and download installer tests with Git for Windows and one Node version. Leave the existing Linux build and runtime matrix unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
List tar members in a UTF-8 locale and compare full paths case-insensitively before extraction. Cover names that differ only by a non-ASCII letter and distinguish the focused Windows command from Linux plugin checks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@arniebradfo
arniebradfo requested review from a team and nshki as code owners November 20, 2026 22:18
Copilot AI adaptive review requested due to automatic review settings November 20, 2026 22:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

A critical race allows an attacker to substitute a destination directory link before the copy, potentially overwriting files outside the requested destination.

1 open issue
What changed in this PR

Restores a shared Bash workflow for starter creation and installation, replacing the Node entrypoints introduced in #293 while supporting native Windows through Git for Windows.

Changes:

  • Adds Bash scripts for tracked-file copying, archive validation, and uncommitted repository creation.
  • Updates Hub example seeding to launch Git for Windows Bash and adds focused Windows setup coverage.
  • Revises setup guidance for shell selection, fresh-session handoff, and separate Copilot Startup verification.
File Description
starter/​README.md Clarifies creation prerequisites and Windows Startup checks.
starter/​AGENTS.md Guides copied repositories to resume setup without recreating them.
scripts/​install-starter.sh Adds archive validation and Bash-based installation.
scripts/​install-starter.mjs Removes the Node installer.
scripts/​create-prototype-repo.test.mjs Adapts setup tests for Bash and native Windows.
scripts/​create-prototype-repo.sh Adds the shared Bash repository creator.
scripts/​create-prototype-repo.mjs Removes the Node creator.
scripts/​check-ci-workflows/​index.ts Requires the Windows setup job.
hub/​server/​scripts/​run-local-builds/​index.test.ts Updates the creator path fixture.
hub/​server/​scripts/​enqueue-local-builds/​index.test.ts Updates the creator path fixture.
hub/​server/​domains/​local-development/​read-local-development-configuration/​index.ts Selects the Bash creator.
hub/​server/​domains/​local-development/​read-local-development-configuration/​index.test.ts Updates expected creator paths.
hub/​server/​domains/​local-development/​prepare-local-development/​index.ts Locates Git for Windows Bash for example seeding.
hub/​server/​domains/​local-development/​prepare-local-development/​index.test.ts Covers Bash seeding and adjusts Windows timeouts.
hub/​docs/​development.md Documents Bash seeding prerequisites.
hub/​AGENTS.md Separates Windows seeding from Linux-only local Builds.
docs/​testing-and-review.md Defines Windows setup CI coverage and limits.
docs/​prototype-repository-setup.md Documents Bash commands, PowerShell invocation, and session handoff.
docs/​getting-started.md Adds the Windows Git Bash prerequisite.
docs/​coding-conventions.md Revises cross-platform script guidance.
CONTRIBUTING.md Documents platform-specific setup checks.
AGENTS.md Points Windows setup to Git Bash guidance.
.github/​workflows/​starter-ci.yml Adds a focused native Windows setup job.

Review effort: Balanced (adaptive)

Comment thread scripts/create-prototype-repo.sh Resolved
Keep folder permission decisions out of the user-facing setup flow. Direct agents to suggest a local alternative for known shared writable locations without changing installer behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@arniebradfo
arniebradfo marked this pull request as draft November 21, 2026 22:51
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