|
| 1 | +# Plan: 2026-02-25-m5-1-quality-gates-and-runtime-safety |
| 2 | + |
| 3 | +## 1) Purpose |
| 4 | +- Problem: workflow/process guardrails exist, but code-level quality confidence is still weak. |
| 5 | +- Intended outcome: add automated coverage verification, stricter deployment health checks, and PII-safe logging defaults. |
| 6 | +- Non-goals: redesign business domain flows or replace deployment architecture. |
| 7 | + |
| 8 | +## 2) Scope |
| 9 | +- In scope: |
| 10 | + - add JaCoCo verification tasks and PR quality workflow |
| 11 | + - harden deployment health check condition |
| 12 | + - reduce production actuator exposure defaults |
| 13 | + - enforce username masking defaults in logging context and high-risk raw logs |
| 14 | +- Out of scope: |
| 15 | + - full migration of every plain logger call to structured logging |
| 16 | + - introducing external quality SaaS (Sonar, Codecov) |
| 17 | + |
| 18 | +## 3) Progress |
| 19 | +- [x] add M5 roadmap/playbook entries |
| 20 | +- [x] add coverage gate in Gradle and CI workflow |
| 21 | +- [x] harden deploy health check and production actuator scope |
| 22 | +- [x] apply username masking defaults and add tests |
| 23 | +- [x] run validation commands and record outcomes |
| 24 | + |
| 25 | +## 4) Design Notes |
| 26 | +- Constraints: keep the existing `build/test/integrationTest` split intact. |
| 27 | +- Tradeoffs: start with a realistic baseline coverage threshold to avoid blocking all PRs. |
| 28 | +- Open questions: final target coverage threshold after two to three weekly scorecards. |
| 29 | + |
| 30 | +## 5) Decision Log |
| 31 | +- 2026-02-25: M5 focuses on automated quality confidence, not process expansion. |
| 32 | +- 2026-02-25: set initial line coverage gate at 45% to enforce a meaningful floor while staying below current baseline. |
| 33 | + |
| 34 | +## 6) Validation Plan |
| 35 | +- Required commands: |
| 36 | + - `./gradlew test` |
| 37 | + - `./gradlew test jacocoTestCoverageVerification` |
| 38 | +- Observability checks: |
| 39 | + - verify logging contract and runtime behavior align for username masking |
| 40 | + |
| 41 | +## 7) Risks and Rollback |
| 42 | +- Risks: baseline threshold may be too strict or too lenient for current suite. |
| 43 | +- Rollback strategy: |
| 44 | + - lower only the numeric coverage threshold in `build.gradle` |
| 45 | + - disable strict deploy health check condition in `deploy.yml` if false positives occur |
| 46 | + |
| 47 | +## 8) Result Snapshot |
| 48 | +- `./gradlew build -x test` passed |
| 49 | +- `./gradlew test` passed |
| 50 | +- `./gradlew test jacocoTestReport jacocoTestCoverageVerification` passed |
| 51 | +- `./gradlew integrationTest` is environment-dependent (Docker/Testcontainers required) |
0 commit comments