Skip to content

Configure Spec-Driven Development + spec/plan/tasks for test-coverage ratchet (#1292)#1297

Draft
sstjean wants to merge 5 commits into
mainfrom
001-test-coverage-ratchet
Draft

Configure Spec-Driven Development + spec/plan/tasks for test-coverage ratchet (#1292)#1297
sstjean wants to merge 5 commits into
mainfrom
001-test-coverage-ratchet

Conversation

@sstjean

@sstjean sstjean commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Configures Spec-Driven Development (GitHub Spec Kit) for the repository and lands the spec, plan, and tasks for the first feature: automated test-coverage measurement with a no-regression coverage ratchet.

This is a planning + scaffolding PR (draft). No product/CI behavior changes yet — implementation of the user stories will follow as commits on this branch.

Relates to Feature #1292 (does not close it — the implementation stories remain).

What's included

Spec Kit setup + constitution (50eeb70)

  • .specify/ templates, scripts, memory, and workflow
  • .github/prompts/ slash commands and .github/agents/ agent definitions
  • Mission Landing Zone constitution v1.0.0 (.specify/memory/constitution.md), adapted to a Bicep IaC / SCCA / zero-trust landing zone. Principle IV (Validation-Driven Infrastructure) uses a ratcheting "no regression on coverage %" policy toward an eventual 100% target.

Feature 001 spec/plan/tasks (877a007) under specs/001-test-coverage-ratchet/

Notes for reviewers

  • US1 tests the PowerShell artifacts with zero edits to the production scripts (mock-and-invoke), honoring the spec's out-of-scope boundary.
  • The coverage ratchet gate is designed to be non-bypassable (required status check via branch protection — a maintainer action documented in US4).
  • src/mlz.json is not modified by this feature.

Linked issues

sstjean added 5 commits July 7, 2026 08:55
Initialize GitHub Spec Kit for Copilot: .specify templates/scripts/memory, slash-command prompts, and agent definitions. Add Mission Landing Zone constitution v1.0.0 (adapted from EP Cube Graph) with a ratcheting no-regression coverage policy in Principle IV.
Feature #1292: establish automated test-coverage measurement and a no-regression coverage ratchet. Adds spec.md (US1-US4 -> #1293-#1296), plan.md (Pester 5 + PSRule for Azure + version-controlled baseline gate), tasks.md (30 tasks), research/data-model/quickstart/contracts. US1 tests the src/artifacts PowerShell scripts with zero production edits (mock-and-invoke).
Standardize on Pester 6.0.0 for local + CI parity. v6 runs on Windows PowerShell 5.1 and PowerShell 7.4+ (covers the Windows-majority team), JaCoCo stays the default coverage format, and the config/authoring API is unchanged from v5. Fixes the loose -MinimumVersion 5.0 in the CI task (would pull 6.x unpinned) to -RequiredVersion 6.0.0 -SkipPublisherCheck. Records 5.7.1 as the documented fallback.
Add tests/Invoke-Tests.ps1 (Pester 6 + JaCoCo) and behavioral tests for the three src/artifacts scripts, invoked under mocks with ZERO edits to the production scripts. 8 tests pass; initial real line coverage = 76.81%. Adds .github/workflows/pester-coverage.yml (PR + push to main + dispatch), gitignores coverage.xml/testResults.xml. Closes the US1 slice of #1292.
Add tests/Compare-Coverage.ps1 (ratchet gate CLI per contract) + 10 contract tests, and tests/Get-CoveragePercent.ps1 (shared JaCoCo LINE parser used by both the harness and the gate so local, CI, and baseline all agree). Record tests/coverage-baseline.json at 78.1%. Wire the gate as a failing step in pester-coverage.yml and document the required-status-check requirement. Unifies the displayed coverage number on the JaCoCo LINE counter (78.1%).
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