Skip to content

Drop bare-repo requirement; vanilla clones are first-class - #511

Merged
PolyphonyRequiem merged 3 commits into
mainfrom
feat/drop-bare-repo-requirement
May 22, 2026
Merged

Drop bare-repo requirement; vanilla clones are first-class#511
PolyphonyRequiem merged 3 commits into
mainfrom
feat/drop-bare-repo-requirement

Conversation

@PolyphonyRequiem

Copy link
Copy Markdown
Owner

Summary

Drop the bare-repo requirement from polyphony state preflight and the SDLC launcher. Vanilla git clone and bare-repo layouts are now both first-class. The per-apex worktree contract is unchanged — the operator's main worktree is never a dispatch target, and each apex run still lands under <runs_root>/apex-{N}/.

What changed

Runtime (src/Polyphony/)

  • StateCommands.cs: removed the bare_repo advisory check from both Preflight and PreflightLite. CheckBareRepoAsync (~101 lines) deleted.
  • IGitClient.cs: IsBareRepositoryAsync doc-comment downgraded to "diagnostic helper" — no longer wired into preflight, retained for potential future use by polyphony worktree list etc.

Launcher (scripts/Invoke-PolyphonySdlc.ps1)

  • Dropped the Phase 2 bare-repo gate and the -SkipLayoutCheck escape hatch (no longer needed — there is no gate to skip).
  • Error messages and PARAMETER block updated to refer to source repo (bare or vanilla) instead of asserting bare.

Deprecation banners on bare-repo helpers

  • Bootstrap-BareRepo.ps1, Migrate-ToBareRepo.ps1, Sync-BareRepo.ps1 retained as fully-functional helpers for operators who explicitly want the bare-repo layout, but each now prints a deprecation banner explaining the bare layout is optional.

Tests

  • Invoke-PolyphonySdlc.Tests.ps1: three bare-repo refusal tests replaced with a single "vanilla clone is accepted" test.
  • StateCommandsPreflightTests.cs: ~150 lines of StubBareRepo* scaffolding removed; existing check-count assertions updated.

Docs

  • docs/onboarding-guide.md § 2: title + status banner clarify vanilla is first-class.
  • docs/per-run-worktree-layout.md: top banner + Detection section note that bare_repo preflight was removed; probe semantics retained as reference for bare-repo operators.
  • polyphony-bootstrap skill: § 2 + § 2.a/2.b updated.
  • polyphony-runtime skill: -SkipLayoutCheck reference removed.

Bundled separately (proposed, no implementation)

  • docs/decisions/run-epoch-and-reset.md — ADR for run-epoch tag + first-class polyphony reset verb family. Status: Proposed. Calls out overlap with the projection-based reset apex rewrite that shipped on architecture/rationalization (AB#3270); the two designs can converge in implementation. Author signoff sought before any implementation PR lands.

Validation

  • dotnet build src/Polyphony/Polyphony.csproj -c Release — clean
  • dotnet test tests/Polyphony.Tests/Polyphony.Tests.csproj -c Release3851 / 3851 green
  • Invoke-Pester scripts/Invoke-PolyphonySdlc.Tests.ps1 -CI52 / 52 green

Breaking change?

For operators: no. The bare_repo check was advisory (the AB#3085 stack never flipped it to required because the migration tooling story was incomplete). Operators already on bare-repo continue to work unchanged. Operators on vanilla clones no longer see the advisory warning.

For workflow authors: no. The per-apex worktree contract is unchanged.

Follow-ups (not blocking)

  • docs/onboarding-guide.md § 2.5 / Target on-disk layout / fresh-clone sections still describe bare-repo as the default flow. Factually still correct as a description of an optional layout, but a broader rewrite would tighten the message. Not addressed here to keep this PR narrow.
  • Eventually retire IsBareRepositoryAsync if polyphony worktree * doesn't grow a caller.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Daniel Green and others added 3 commits May 22, 2026 06:59
Vanilla (non-bare) git clones are now first-class. The per-apex worktree
contract still applies — the operator's main worktree is never a dispatch
target, and each apex run lands under <runs_root>/apex-{N}/ — but the
launcher and `polyphony state preflight` no longer gate on whether the
source repo is bare.

Changes:
- StateCommands.cs: remove `bare_repo` preflight check from both
  `Preflight` and `PreflightLite`. `CheckBareRepoAsync` deleted.
- Invoke-PolyphonySdlc.ps1: drop Phase 2 bare-repo gate and the
  `-SkipLayoutCheck` escape hatch. Error messages updated to refer to
  `source repo (bare or vanilla)` instead of asserting bare.
- IGitClient.cs: `IsBareRepositoryAsync` doc-comment downgraded to
  `diagnostic helper` (no longer wired into preflight).
- Bootstrap-BareRepo.ps1 / Migrate-ToBareRepo.ps1 / Sync-BareRepo.ps1:
  deprecation banners added. Scripts remain functional for operators
  who explicitly want the bare-repo layout.
- Invoke-PolyphonySdlc.Tests.ps1: bare-repo refusal tests replaced with
  a vanilla-clone-is-accepted test.
- StateCommandsPreflightTests.cs: stale `bare_repo` test scaffolding
  removed (~150 lines); existing assertions updated to match the new
  check count.

Validation:
- `dotnet build src/Polyphony/Polyphony.csproj -c Release` clean.
- `dotnet test tests/Polyphony.Tests/Polyphony.Tests.csproj -c Release` →
  3851/3851 green.
- `Invoke-Pester scripts/Invoke-PolyphonySdlc.Tests.ps1 -CI` →
  52/52 green.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Update operator-facing docs to match the runtime change in the prior
commit. Bare-repo layout is no longer required; vanilla clones are
first-class.

- docs/onboarding-guide.md § 2: title and status banner updated;
  `bare_repo` preflight reference qualified as historical.
- docs/per-run-worktree-layout.md: top banner + Detection section
  updated to reflect that bare_repo preflight was removed. Probe
  semantics retained as reference for bare-repo operators.
- .github/skills/polyphony-bootstrap/SKILL.md: vanilla clone added
  as the recommended default in § 2; checklist § 2.a/2.b updated.
- .github/skills/polyphony-runtime/SKILL.md: removed
  `-SkipLayoutCheck` reference (flag no longer exists).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Proposes a per-apex run-epoch tag (`polyphony:run-epoch=N`) threaded
through every BranchNameBuilder call site plus a `polyphony reset` verb
family + `reset-apex.yaml` workflow + `-Intent reset` launcher mode,
so an apex can be re-dispatched cleanly after a botched run.

Status: Proposed. Author signoff (Daniel) sought before the first
implementation PR lands. Companion to branch-model.md Rev 4 and the
polyphony-dogfood-recovery skill (which this ADR plans to retire).

Note: AB#3270 (journal Phase 5) shipped a projection-based `reset apex`
rewrite on architecture/rationalization that overlaps with this ADR's
reset verb family but does NOT address the satisfaction-flip problem
(the run-epoch threading is the only mechanism that flips PR-record-based
observations). The two designs can converge in implementation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@PolyphonyRequiem
PolyphonyRequiem force-pushed the feat/drop-bare-repo-requirement branch from 963b378 to d7f4b37 Compare May 22, 2026 13:59
@PolyphonyRequiem
PolyphonyRequiem merged commit 69417e6 into main May 22, 2026
1 check passed
@PolyphonyRequiem
PolyphonyRequiem deleted the feat/drop-bare-repo-requirement branch May 22, 2026 14:07
PolyphonyRequiem pushed a commit that referenced this pull request May 22, 2026
…rop)

Reconciles the bare-repo requirement drop (PR #511) with the journal
Phase 1-6a architecture rationalization work. Where the two branches
edited the same files (preflight + launcher + bare-repo helpers), main's
bare-repo-drop version wins because it reflects the current contract.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

# Conflicts:
#	docs/onboarding-guide.md
#	docs/per-run-worktree-layout.md
#	scripts/Invoke-PolyphonySdlc.Tests.ps1
#	scripts/Invoke-PolyphonySdlc.ps1
#	src/Polyphony/Commands/ResetCommands.Branches.cs
#	src/Polyphony/Commands/ResetCommands.Prs.cs
#	src/Polyphony/Commands/ResetCommands.Worktrees.cs
#	src/Polyphony/Commands/ResetCommands.cs
#	src/Polyphony/Commands/StateCommands.cs
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.

1 participant