Skip to content

test: require an L1 or L2 glob for each covered file - #14

Merged
bketelsen merged 2 commits into
mainfrom
duncan/risk-coverage-levels
Nov 9, 2026
Merged

bketelsen merged 2 commits into
mainfrom
duncan/risk-coverage-levels

Conversation

@frostyard-machines

Copy link
Copy Markdown
Contributor

Summary

test/repository.test.mjs checks that .github/risk-paths.json covers the release workflow, the manifest and the code that runs outside the Flatpak sandbox or removes machines. Since #13 the list is schema version 2, where a glob can be L3 or L4; a change under such a glob gets a level label but no risk:high (core ADR-0078). The check still accepted a glob at any level.

  • The new helper riskHighCoverage() counts only a matching glob at L1 or L2. Only an entry without a level key is L1 (a version 1 list); an explicit null or an unknown level fails closed. The strictest match wins. The real-list check and the publication check use it.
  • The test "the coverage helper requires an L1 or L2 glob" covers L3 only, L4 only, L1, L2, no level, null, "L5", overlapping L3 and L1, and no match.
  • .memory/corrections.jsonl gets 2 lines: the level gap (also found in the review of ci: call core's pr-triage workflow and move the risk list to levels (v2) intuneme#266) and the ?? null default found in this change's review.

The current list has every required file at L1 or L2, so no list change is needed.

Risk tier

Risk tier: 1 — tests and the corrections file only. No path of .github/risk-paths.json changes.

Verification

In risk-paths schema version 2 a glob can be L3 or L4, and a change under
it gets no risk:high (core ADR-0078). The coverage test now counts only a
glob at L1 or L2 (no level counts as L1).
`level ?? "L1"` also turned an explicit null into L1; only an absent
level key now reads as L1, so null and unknown levels fail coverage.
@frostyard-machines

Copy link
Copy Markdown
Contributor Author

Cross-review: openai/gpt-6.1-sol (read-only). Coder: deepseek-flash. The diff of this PR at 26fb4b5d0e57ee6624971ed26a420b8a2813369a is byte-identical to the diff reviewed on the branch of the earlier PR (0e6c114..4da4ec2), and the base and head trees match the reviewed ones. Final pass at this head: Ready, blocking: none. Revert tests: see the body.

@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 9, 2026
@bketelsen
bketelsen merged commit 37d7518 into main Nov 9, 2026
6 checks passed
@frostyard-machines
frostyard-machines deleted the duncan/risk-coverage-levels branch November 9, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Reviewed, CI green: ready for Brian to review and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants