Drop bare-repo requirement; vanilla clones are first-class - #511
Merged
Conversation
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
force-pushed
the
feat/drop-bare-repo-requirement
branch
from
May 22, 2026 13:59
963b378 to
d7f4b37
Compare
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Drop the bare-repo requirement from
polyphony state preflightand the SDLC launcher. Vanillagit cloneand 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 thebare_repoadvisory check from bothPreflightandPreflightLite.CheckBareRepoAsync(~101 lines) deleted.IGitClient.cs:IsBareRepositoryAsyncdoc-comment downgraded to "diagnostic helper" — no longer wired into preflight, retained for potential future use bypolyphony worktree listetc.Launcher (
scripts/Invoke-PolyphonySdlc.ps1)-SkipLayoutCheckescape hatch (no longer needed — there is no gate to skip).source repo (bare or vanilla)instead of asserting bare.Deprecation banners on bare-repo helpers
Bootstrap-BareRepo.ps1,Migrate-ToBareRepo.ps1,Sync-BareRepo.ps1retained 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 ofStubBareRepo*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 thatbare_repopreflight was removed; probe semantics retained as reference for bare-repo operators.polyphony-bootstrapskill: § 2 + § 2.a/2.b updated.polyphony-runtimeskill:-SkipLayoutCheckreference removed.Bundled separately (proposed, no implementation)
docs/decisions/run-epoch-and-reset.md— ADR for run-epoch tag + first-classpolyphony resetverb family. Status: Proposed. Calls out overlap with the projection-basedreset apexrewrite that shipped onarchitecture/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— cleandotnet test tests/Polyphony.Tests/Polyphony.Tests.csproj -c Release— 3851 / 3851 greenInvoke-Pester scripts/Invoke-PolyphonySdlc.Tests.ps1 -CI— 52 / 52 greenBreaking change?
For operators: no. The
bare_repocheck 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.IsBareRepositoryAsyncifpolyphony worktree *doesn't grow a caller.Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com