Skip to content

[Sprint 3] Fix pre-push Gate 0 to allow sprint/* branches - #62

Merged
mpaulosky merged 1 commit into
sprint/3-mongodb-persistencefrom
squad/61-fix-pre-push-gate-sprint-branches
Apr 20, 2026
Merged

[Sprint 3] Fix pre-push Gate 0 to allow sprint/* branches#62
mpaulosky merged 1 commit into
sprint/3-mongodb-persistencefrom
squad/61-fix-pre-push-gate-sprint-branches

Conversation

@mpaulosky

Copy link
Copy Markdown
Owner

Summary

Closes #61

Fixes .github/hooks/pre-push Gate 0 to accept sprint/{N}-{slug} branches in addition to squad/{issue}-{slug} branches.

Sprint branches are merge targets — squad PRs land here before dev. They shouldn't run feature gates (build/tests).

Merge hierarchy

squad/{issue}-{slug} → sprint/{N}-{slug} → dev → main (release only)

Changes

  • .github/hooks/pre-push — Gate 0 updated: sprint branches early-exit after naming check; squad branches run all gates as before

Acceptance Criteria

  • git push origin sprint/* passes without --no-verify
  • Squad branches still run full gates
  • Updated error messages list both valid formats

…nt 3]

Sprint branches are merge targets in the workflow hierarchy:
  squad/{issue}-{slug} → sprint/{N}-{slug} → dev → main (release only)

Gate 0 now accepts both patterns:
- squad/{issue}-{slug} → runs full gates (build + tests)
- sprint/{N}-{slug}   → early-exit, skips feature gates

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 19, 2026 20:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the local pre-push hook’s Gate 0 so that sprint/{N}-{slug} branches are accepted and skip the remaining (feature) gates, while squad/{issue}-{slug} branches continue to run the full pre-push gate suite.

Changes:

  • Expand Gate 0 branch naming rules to accept both squad/... and sprint/... formats.
  • Early-exit the hook for valid sprint/... branches to avoid running build/tests gates.
  • Update user-facing hook messages to document both valid branch formats.

@mpaulosky

Copy link
Copy Markdown
Owner Author

🏛️ Aragorn — Architecture Review

Verdict: ✅ APPROVE (conditional — see CI gap note)


Gate Checklist

Gate Status Notes
Branch naming squad/* squad/61-fix-pre-push-gate-sprint-branches
Closes #N link Closes #61
Conventional commit format fix(#61): allow sprint/* branches through Gate 0
CI green ⚠️ Only Copilot-agent checks ran; squad-test.yml triggers on main, dev, squad/**not sprint/**. No build/test validation occurred.
No merge conflicts mergeable_state: clean
Tests authored N/A Shell script change; no C# code, no test requirement

Code Quality

The diff is clean and surgically correct:

  • sprint/* early-exit block placed correctly — after main/dev direct-push guard, before the squad naming assertion
  • Regex ^sprint/[0-9]+-[a-z0-9-]+$ is consistent with the squad pattern ^squad/[0-9]+-[a-z0-9-]+$
  • Updated error messages now list both valid formats — good UX
  • Merge hierarchy comment accurately documents the intended flow

No security concerns. No architecture impact.


⚠️ Systemic Finding — CI does not cover sprint/* PRs

squad-test.yml currently triggers on PRs targeting main, dev, or squad/** branches. All three open Sprint 3 PRs (#60, #62, #63) target sprint/3-mongodb-persistence and therefore received zero build/test CI validation. This is a process gap that should be tracked (a follow-up issue to add sprint/** to the CI trigger list).


Action: Ready to merge once mpaulosky acknowledges the CI gap is acceptable for this sprint-branch workflow. No code changes required on this PR.

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

@mpaulosky
mpaulosky merged commit 1c439e0 into sprint/3-mongodb-persistence Apr 20, 2026
4 checks passed
@mpaulosky
mpaulosky deleted the squad/61-fix-pre-push-gate-sprint-branches branch April 20, 2026 15:03
mpaulosky added a commit that referenced this pull request Apr 20, 2026
Gate: Aragorn ✅ APPROVE (pre-push hook fix ready to merge)## Summary

<!-- Describe what this PR does and why. Link the issue it closes. -->

Closes #<!-- issue number -->

## Type of Change

<!-- Check all that apply -->

- [ ] 🐛 Bug fix (non-breaking change that fixes an issue)
- [ ] ✨ Feature (non-breaking change that adds functionality)
- [ ] ♻️ Refactor (no behavior change, code cleanup/restructure)
- [ ] 🧪 Tests (new or updated tests only)
- [ ] 📝 Docs (README, XML docs, comments)
- [ ] ⚙️ Infra/CI (GitHub Actions, Aspire, NuGet, deployment)
- [ ] 🔒 Security (auth, permissions, secrets, headers)
- [ ] 💥 Breaking change (existing behavior changes)

## Domain Affected

<!-- Check all that apply — this determines which reviewers are required
-->

- [ ] 🏗️ Architecture / domain logic / CQRS → **Aragorn required**
- [ ] 🔧 Backend (handlers, repositories, API endpoints, MediatR) → **Sam
required**
- [ ] ⚛️ Frontend (Blazor components, Razor pages, CSS, JS) → **Legolas
required**
- [ ] 🧪 Unit / bUnit / integration tests → **Gimli required**
- [ ] 🧪 E2E / Playwright / Aspire integration tests → **Pippin
required**
- [ ] ⚙️ CI/CD / GitHub Actions / NuGet / Aspire AppHost → **Boromir
required**
- [ ] 🔒 Auth0 / authorization / security-relevant changes → **Gandalf
required**
- [ ] 📝 Docs / README / XML docs → **Frodo required**

## Self-Review Checklist

<!-- Complete before requesting review — incomplete PRs will be returned
-->

### Code Quality
- [ ] I ran `dotnet build MyBlog.slnx --configuration Release` — 0
errors, 0 warnings
- [ ] I ran `dotnet test MyBlog.slnx --configuration Release --no-build`
— all pass
- [ ] No TODO/FIXME left unless tracked in a follow-up issue (link it)
- [ ] No secrets, API keys, or credentials committed

### Architecture
- [ ] New handlers follow the `Command`/`Query`/`Handler`/`Validator`
naming conventions
- [ ] New handlers are `sealed`
- [ ] Domain layer has no references to `Web` or `Persistence.*`
projects
- [ ] `Result<T>` / `ResultErrorCode` used for expected failures (no
exception-driven control flow)
- [ ] DTOs are records in `Domain.DTOs`; Models are in `Domain.Models`
- [ ] No DTO types embedded in Model classes

### Tests
- [ ] New code has corresponding unit tests
- [ ] Integration tests use domain-specific collections
(`[Collection("XxxIntegration")]`)
- [ ] No test compares two `IssueDto.Empty` / `CommentDto.Empty`
instances directly

### Security (check if security-relevant)
- [ ] New endpoints have appropriate `RequireAuthorization` / policy
applied
- [ ] No `MarkupString` used with user-supplied content
- [ ] No user input reflected in MongoDB queries without sanitization

### Merge Readiness
- [ ] Branch is up to date with `main` (no merge conflicts)
- [ ] CI checks are green (do not request review while checks are
pending/failing)
- [ ] PR description is complete — reviewers should not have to ask what
this does

## Screenshots / Evidence

<!-- For UI changes: before/after screenshots. For fixes: evidence the
bug is resolved. -->

## Notes for Reviewers

<!-- Anything you want reviewers to pay special attention to, or context
they need. -->

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mpaulosky added a commit that referenced this pull request Apr 20, 2026
…* branches (#78)

Update pre-push Gate 0 documentation to reflect sprint/* branch support (already implemented in PR #62)

Closes #61
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