Skip to content

feat(#1502): health-report.ts — one script prints the fundamentals baseline, --check fails a raised metric, advisory CI job, release-checklist line - #1548

Merged
admarble merged 2 commits into
mainfrom
feature/1502-feat-qa-health-report-ts-one-script-prints-the-fun
Oct 19, 2026
Merged

admarble merged 2 commits into
mainfrom
feature/1502-feat-qa-health-report-ts-one-script-prints-the-fun

Conversation

@admarble

@admarble admarble commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

scripts/qa/health-report.ts prints the fundamentals baseline: function length, empty catches, child_process mock files, gh calls outside the provider, prose gates, the 28-day test ratio, deprecations, harness size and ADR actors. With --check it fails when any gated metric rises above scripts/qa/health-baseline.json. With --write-baseline it regenerates that file. The new health-advisory CI job runs --check with continue-on-error: true, so it cannot block a merge. docs/internal/release-checklist.md now reads the report, and npm run lint:health runs it. W0 of graph-2026-10-fundamentals (#1501). There are no edits under plugin/, .claude/skills/ or templates/skills/.

Acceptance criteria — re-run by the runner on 8058510 (worktree, 2026-10-19)

AC Evidence command (verbatim from the issue) Result
AC-1 health-report.ts --json | jq -e '…every key… >= 0' ok
AC-2 diff of the script's output against the committed baseline (minus generatedAt, commit, harness.memoryFiles, testRatio28d) same
AC-3 npx vitest run scripts/qa/health-report.test.ts 7 passed, 0 failed
AC-4 grep -A14 '^ health-advisory:' ci.yml | grep -c 'continue-on-error: true' 1
AC-5 grep -c 'health-report' docs/internal/release-checklist.md 1
AC-6 /usr/bin/time -p … --json fast (3.73 s)

The health-advisory check on this PR's head finished with success.

Mutation record (AC-3 is a gate test)

Mutation-verified: AC-3 — deleted the raised-metric branch in compare (the cur[key] > base[key] push into raised), keeping the lowered branch so it still type-checks; scripts/qa/health-report.test.ts > health-report --check ratchet > exits 1 and names the key when a metric rose failed; restored.

The same mutation also fails --write-baseline rewrites the file and a following --check exits 0. Result: 2 failed and 5 passed out of 7. After the restore, git status was clean.

Decisions to review

  • emptyCatch.byFile.* is reported but not gated. QA flagged this as going beyond the issue's two stated exclusions (testRatio28d.*, harness.memoryFiles). The spec's plan chose it deliberately (step 4: "for emptyCatch.byFile … compare only scalars (total) — report byFile diff informationally"). With byFile ungated, moving a catch from one file to another does not fail --check, but any rise in emptyCatch.total still does. Owner ruling needed: keep it as is, or gate per file too.
  • Founding-doc drift. At 96990da the script measures emptyCatch.total = 120 (the plan's table says 119) and proseGate.lines = 30,179 (the table says 30,461). The runner re-ran the script against a detached checkout of that commit. Every other planning value reproduces: functions 4 and 12, childProcessMockFiles 31, ghCallFilesOutsideProvider 3, proseGate.files 76, deprecations 18, ADRs 11. The baseline commits what the script measures, so the ratchet is self-consistent. The two table values came from a different counting method at planning time.

Not run

  • The full suite (affected-tests rule). Only the targeted test file was run.

Fixes #1502


🤖 Generated with Claude Code

…ck ratchets it

Entire-Checkpoint: abfb614a34fb
Entire-Checkpoint: b978c5c1123c
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.

feat(qa): health-report.ts — one script prints the fundamentals baseline, --check fails a raised metric, advisory CI job, release-checklist line

1 participant