Skip to content

fix(infra): align pre-push gate with actual MyBlog project structure#12

Merged
mpaulosky merged 8 commits into
devfrom
squad/prepush-gate
Apr 19, 2026
Merged

fix(infra): align pre-push gate with actual MyBlog project structure#12
mpaulosky merged 8 commits into
devfrom
squad/prepush-gate

Conversation

@mpaulosky

@mpaulosky mpaulosky commented Apr 18, 2026

Copy link
Copy Markdown
Owner

Working as Boromir (DevOps Engineer)

Problem

The pre-push hook was copied from a different project (IssueTrackerApp) without updating the solution name or test project paths. It referenced 10 non-existent test projects — meaning Gate 3 and Gate 4 never ran anything. The installer embedded an outdated stub instead of deploying the committed hook.

Changes

File What changed
.github/hooks/pre-push IssueTrackerApp.slnxMyBlog.slnx; Gate 3: 6 wrong → 2 actual projects; Gate 4: 4 wrong → 1 actual project
scripts/install-hooks.sh Rewritten: idempotent copy of .github/hooks/pre-push; backs up existing hook; uses git rev-parse --git-path hooks
CONTRIBUTING.md Replaced 2-step description with accurate 5-gate table
.copilot/skills/pre-push-test-gate/SKILL.md Corrected solution name and project lists for Gates 3 & 4
.github/pull_request_template.md Fixed solution name in build/test checklist items

Gates (all verified on push)

Gate Check Result
0 Block direct push to main/dev
1 Warn on untracked .razor/.cs files
2 dotnet build MyBlog.slnx -c Release
3 Architecture.Tests, Unit.Tests
4 Integration.Tests (Testcontainers + Aspire, Docker required) ✅ (9 tests passed)

Developer action required after merge

./scripts/install-hooks.sh

- Created scripts/install-hooks.sh to install git hooks
- Pre-push hook runs dotnet build + dotnet test before allowing push
- Created CONTRIBUTING.md with setup instructions and pre-push gate docs
- Hook skips when CI=true (CI already validates)
- Emergency bypass: git push --no-verify

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

github-actions Bot commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Summary
Generated on: 04/19/2026 - 00:05:14
Coverage date: 04/19/2026 - 00:04:45 - 04/19/2026 - 00:05:01
Parser: MultiReport (4x Cobertura)
Assemblies: 4
Classes: 35
Files: 34
Line coverage: 64.8% (461 of 711)
Covered lines: 461
Uncovered lines: 250
Coverable lines: 711
Total lines: 2025
Branch coverage: 66.1% (168 of 254)
Covered branches: 168
Total branches: 254
Method coverage: Feature is only available for sponsors
Tag: 23_24616855347

Coverage

AppHost - 0%
Name Line Branch
AppHost 0% ****
Program 0%
Domain - 93.4%
Name Line Branch
Domain 93.4% 50%
Domain.Abstractions.Result 95% 50%
Domain.Abstractions.Result`1 75% 50%
MyBlog.Domain.Entities.BlogPost 100%
ServiceDefaults - 0%
Name Line Branch
ServiceDefaults 0% 0%
Microsoft.Extensions.Hosting.Extensions 0% 0%
Web - 68.9%
Name Line Branch
Web 68.9% 71.5%
MyBlog.Web.Components.Layout.MainLayout 100%
MyBlog.Web.Components.Layout.NavMenu 82.8% 71.4%
MyBlog.Web.Components.Pages.Error 100% 75%
MyBlog.Web.Components.Routes 0% 0%
MyBlog.Web.Components.Shared.RedirectToLogin 100%
MyBlog.Web.Data.BlogDbContext 100%
MyBlog.Web.Data.BlogPostDto 100%
MyBlog.Web.Data.BlogPostMappings 100%
MyBlog.Web.Data.MongoDbBlogPostRepository 100% 100%
MyBlog.Web.Features.BlogPosts.Create.Create 75% 50%
MyBlog.Web.Features.BlogPosts.Create.CreateBlogPostCommand 100%
MyBlog.Web.Features.BlogPosts.Create.CreateBlogPostHandler 100%
MyBlog.Web.Features.BlogPosts.Delete.ConfirmDeleteDialog 100% 100%
MyBlog.Web.Features.BlogPosts.Delete.DeleteBlogPostCommand 100%
MyBlog.Web.Features.BlogPosts.Delete.DeleteBlogPostHandler 100%
MyBlog.Web.Features.BlogPosts.Edit.Edit 88% 75%
MyBlog.Web.Features.BlogPosts.Edit.EditBlogPostCommand 100%
MyBlog.Web.Features.BlogPosts.Edit.EditBlogPostHandler 84% 90%
MyBlog.Web.Features.BlogPosts.Edit.GetBlogPostByIdQuery 100%
MyBlog.Web.Features.BlogPosts.List.GetBlogPostsHandler 100% 100%
MyBlog.Web.Features.BlogPosts.List.Index 86.8% 84.6%
MyBlog.Web.Features.UserManagement.AssignRoleCommand 100%
MyBlog.Web.Features.UserManagement.ManageRoles 90.4% 75%
MyBlog.Web.Features.UserManagement.Profile 97.2% 82%
MyBlog.Web.Features.UserManagement.RemoveRoleCommand 100%
MyBlog.Web.Features.UserManagement.RoleDto 100%
MyBlog.Web.Features.UserManagement.UserManagementHandler 0% 0%
MyBlog.Web.Features.UserManagement.UserWithRolesDto 100%
MyBlog.Web.Security.RoleClaimsHelper 91.4% 90.9%
Program 0% 0%

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

Adds local developer tooling to prevent broken builds/tests from being pushed by installing a git pre-push hook and documenting the workflow for contributors.

Changes:

  • Adds scripts/install-hooks.sh to install a pre-push hook that runs dotnet build + dotnet test in Release and blocks pushes on failure.
  • Adds a new root-level CONTRIBUTING.md documenting setup and the pre-push gate behavior/bypass.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
scripts/install-hooks.sh Installs a local pre-push hook intended to gate pushes on build/test success.
CONTRIBUTING.md Documents contributor setup steps and the pre-push gate workflow.

Comment thread scripts/install-hooks.sh Outdated
Comment thread scripts/install-hooks.sh Outdated
Comment thread scripts/install-hooks.sh Outdated
Comment thread CONTRIBUTING.md Outdated
Comment thread scripts/install-hooks.sh Outdated
- Fix solution name: IssueTrackerApp.slnx → MyBlog.slnx in hook/docs/template
- Fix Gate 3 test projects: replace 6 nonexistent projects with
  tests/Architecture.Tests and tests/Unit.Tests (actual projects)
- Fix Gate 4 integration tests: replace 4 nonexistent projects with
  tests/Integration.Tests (actual project using Testcontainers + Aspire)
- Rewrite scripts/install-hooks.sh: copies .github/hooks/pre-push
  instead of embedding an outdated script; idempotent (skip if same,
  backup if different); uses git rev-parse --git-path hooks
- Update CONTRIBUTING.md: table describing all 5 gates with correct cmds
- Update .copilot/skills/pre-push-test-gate/SKILL.md: correct project lists
- Update .github/pull_request_template.md: correct solution name

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mpaulosky mpaulosky changed the title feat: add pre-push gate (build + test before push) fix(infra): align pre-push gate with actual MyBlog project structure Apr 18, 2026
- align inline hook comments with the actual Gate 3 and Gate 4 project lists
- rewrite Boromir's pre-push gate history entry to match the shipped hook and installer behavior
- record Ralph's maintenance handoff for the pre-push gate follow-up

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

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

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Comment thread .github/hooks/pre-push Outdated
Comment thread scripts/install-hooks.sh Outdated
mpaulosky and others added 2 commits April 18, 2026 16:39
- move the full contributor setup and pre-push guidance into docs/CONTRIBUTING.md
- reduce the root CONTRIBUTING.md to a GitHub-friendly pointer to the canonical doc
- point the pre-push skill at docs/CONTRIBUTING.md to avoid stale duplicate guidance

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- normalize the hooks path returned by git rev-parse --git-path hooks so installs work from outside the repo root
- create the hooks directory before copying the committed pre-push hook into place
- tighten the build retry log line so it matches the behavior actually performed

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

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Comment thread scripts/install-hooks.sh Outdated
Comment thread .copilot/skills/pre-push-test-gate/SKILL.md
Comment thread .github/hooks/pre-push
mpaulosky and others added 2 commits April 18, 2026 16:58
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- use env bash in install-hooks
- replace dead pre-push skill reference
- align Gate 4 Docker messaging

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

Copy link
Copy Markdown
Contributor

Code Coverage

Package Line Rate Branch Rate Complexity Health
Domain 0% 0% 38
Web 0% 0% 320
ServiceDefaults 0% 0% 18
Domain 0% 0% 38
Web 0% 0% 320
ServiceDefaults 0% 0% 18
AppHost 0% 100% 1
Domain 43% 0% 38
Web 6% 5% 320
ServiceDefaults 0% 0% 18
AppHost 0% 100% 1
Domain 43% 0% 38
Web 6% 5% 320
ServiceDefaults 0% 0% 18
Domain 93% 50% 38
Web 63% 64% 320
ServiceDefaults 0% 0% 18
Domain 93% 50% 38
Web 63% 64% 320
ServiceDefaults 0% 0% 18
Summary 23% (974 / 4226) 21% (336 / 1584) 2258

@mpaulosky
mpaulosky merged commit 4a73dc1 into dev Apr 19, 2026
6 checks passed
@mpaulosky
mpaulosky deleted the squad/prepush-gate branch April 19, 2026 00:05

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

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Comment on lines +25 to +27
| **2** | Release build | `dotnet build MyBlog.slnx --configuration Release` | Build fails (3 retries) |
| **3** | Unit/Arch tests | Runs 2 test projects in Release mode | Any test project fails (3 retries) |
| **4** | Integration tests | Runs 1 integration test project (Docker required) | Any test project fails (3 retries) |

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

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

Gate 3 is now documented as only Unit/Arch tests, but later in this skill the failure taxonomy still includes bUnit-specific guidance (e.g., “bUnit test failure” and RenderComponent advice). Please update/remove those bUnit references so the skill matches the current gate/project list and doesn’t mislead contributors.

Copilot uses AI. Check for mistakes.
```

These use Testcontainers (mongo:7.0, Azurite) and Aspire DCP. Docker daemon MUST be running.
These use Testcontainers (MongoDb) and Aspire DCP. Docker daemon MUST be running.

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

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

The text “Testcontainers (MongoDb)” uses the wrong product capitalization; elsewhere the repo uses “MongoDB”. Update this to avoid inconsistent terminology.

Suggested change
These use Testcontainers (MongoDb) and Aspire DCP. Docker daemon MUST be running.
These use Testcontainers (MongoDB) and Aspire DCP. Docker daemon MUST be running.

Copilot uses AI. Check for mistakes.
Comment thread scripts/install-hooks.sh
# Installs the pre-push gate hook from .github/hooks/pre-push into the local Git hooks directory.
# Safe to re-run: skips if already up-to-date, backs up any differing hook before overwriting.

set -e

Copilot AI Apr 19, 2026

Copy link

Choose a reason for hiding this comment

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

This script uses set -e but not -u/pipefail. For hook/infra scripts, using set -euo pipefail (or at least set -eu) helps catch unset variables and failures in pipelines early and makes behavior more predictable.

Suggested change
set -e
set -euo pipefail

Copilot uses AI. Check for mistakes.
mpaulosky added a commit that referenced this pull request Apr 19, 2026
…ce structures

- Merged decision inbox files into .squad/decisions/decisions.md (6 new decisions)
- Deleted inbox files after consolidation
- Created orchestration logs for Ralph, Gandalf, Legolas, Boromir
- Created session log for completed PR #11-#12 merge cycle
- Updated identity/now.md to reflect post-coordination state
- Appended final summary notes to agent history files

Decision highlights:
- dev/main branch strategy with GitVersion (SemVer) versioning
- Pre-push gate mandatory validation (build + test)
- Casting infrastructure (Phase 1) for programmatic agent lifecycle
- Auth0 secrets via user-secrets (not appsettings)
- PR #11 CSS artifact approved (Tailwind v4.2.2)
- PR #12 pre-push gate references consolidated

Decisions consolidated by Scribe per post-coordination workflow.
Board cleared: 0 open issues, 0 open squad PRs.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mpaulosky added a commit that referenced this pull request Apr 19, 2026
## Summary

Lands remaining local commits that consolidate squad governance
structures and finalize pre-push gate documentation.

## Changes included

- **Squad governance:** Consolidate decisions, update team history
- **Pre-push gate:** Final review follow-ups and documentation sync
- **Contributing guide:** Updated to reflect current squad practices
- **Hook documentation:** Aligned Skill markdown and PR template
- **Cleanup:** Untrack generated tailwind.css and ignore IDE metadata

## Context

PR #12 (fix: align pre-push gate with actual MyBlog project structure)
was merged. This PR captures the follow-up work from squad governance
consolidation that was developed in parallel.

All commits have passed pre-push gate validation:
- ✅ Build (Release mode)
- ✅ Architecture.Tests
- ✅ Unit.Tests  
- ✅ Integration.Tests

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mpaulosky added a commit that referenced this pull request Apr 19, 2026
- Merge 3 decision inbox files into decisions.md (sections 6, 7, 7.1)
  - Aragorn: Squad Skills & Playbooks Adoption Review (252 lines)
  - Boromir: DevOps Skills & Playbooks Review (470 lines)
  - Boromir: PR #12 Follow-ups — Pre-Push Gate References (22 lines)

- Create orchestration logs for background agents
  - 2026-04-19T02:14:39Z-aragorn.md
  - 2026-04-19T02:14:39Z-boromir.md

- Create session log for skills/playbooks review
  - 2026-04-19T02:14:39Z-skills-playbooks-review.md

- Append cross-agent history updates
  - Aragorn, Boromir, Gimli, Sam, Frodo, Pippin

- Delete merged inbox files (inbox now empty)

Status: decisions.md at 13KB (under 20KB threshold). No archival needed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
mpaulosky added a commit that referenced this pull request Apr 19, 2026
…asset manifest

- Merged 4 decisions from inbox into .squad/decisions.md:
  - Decision #12: Merged-Branch Guard — guidance-only, defer automation
  - Decision #13: Release Guidance Fit for MyBlog
  - Decision #14: Delete non-fit imported assets
  - (Decision #15 reflected via DELETED-ASSETS.md manifest)

- Updated agent histories with Milestone 3 coordination summary:
  - Aragorn: Release guidance finalized & asset disposition approved
  - Boromir: Merged-branch guard evidence review & secondary skills sync
  - Pippin: Deleted-assets manifest publication

- Published .squad/decisions/DELETED-ASSETS.md as canonical reference
  for future contributors (post-build-validation, static-config-pattern,
  building-protection, release-process-base, release-issuetracker)

- Confirmed asset disposition:
  - Deleted: 5 non-fit skills/playbooks
  - Retained: microsoft-code-reference (rewrite queued, backlog)
  - Active: release-process (MyBlog-specific routing)

- Removed merged inbox files (4x decision submissions)

- Milestone 3 roadmap complete; Sprint 3 cleanup ready for execution

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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