fix(infra): align pre-push gate with actual MyBlog project structure#12
Conversation
- 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>
SummarySummary
CoverageAppHost - 0%
Domain - 93.4%
ServiceDefaults - 0%
Web - 68.9%
|
There was a problem hiding this comment.
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.shto install apre-pushhook that runsdotnet build+dotnet testin Release and blocks pushes on failure. - Adds a new root-level
CONTRIBUTING.mddocumenting 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. |
- 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>
- 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>
- 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>
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>
|
| | **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) | |
There was a problem hiding this comment.
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.
| ``` | ||
|
|
||
| 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. |
There was a problem hiding this comment.
The text “Testcontainers (MongoDb)” uses the wrong product capitalization; elsewhere the repo uses “MongoDB”. Update this to avoid inconsistent terminology.
| These use Testcontainers (MongoDb) and Aspire DCP. Docker daemon MUST be running. | |
| These use Testcontainers (MongoDB) and Aspire DCP. Docker daemon MUST be running. |
| # 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 |
There was a problem hiding this comment.
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.
| set -e | |
| set -euo pipefail |
…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>
## 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>
- 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>
…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>
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
.github/hooks/pre-pushIssueTrackerApp.slnx→MyBlog.slnx; Gate 3: 6 wrong → 2 actual projects; Gate 4: 4 wrong → 1 actual projectscripts/install-hooks.sh.github/hooks/pre-push; backs up existing hook; usesgit rev-parse --git-path hooksCONTRIBUTING.md.copilot/skills/pre-push-test-gate/SKILL.md.github/pull_request_template.mdGates (all verified on push)
main/dev.razor/.csfilesdotnet build MyBlog.slnx -c ReleaseArchitecture.Tests,Unit.TestsIntegration.Tests(Testcontainers + Aspire, Docker required)Developer action required after merge