Skip to content

feat(risk-paths): add supply chain to the categories of rule B - #256

Merged
bketelsen merged 1 commit into
mainfrom
lucilla/risk-paths-supply-chain
Nov 14, 2026
Merged

bketelsen merged 1 commit into
mainfrom
lucilla/risk-paths-supply-chain

Conversation

@frostyard-machines

Copy link
Copy Markdown
Contributor

Summary

Rule B of the risk-paths spec (gated since #255) makes each L1 or L2 why name 1 category. Entries for tool and dependency pins, such as mise.toml, mise.lock, go.mod and go.sum, change what CI installs, but no category fits them. This PR adds the category supply chain:

  • docs/specs/risk-paths.md: a rule B bullet, and supply chain in the L1 list of rule H (grading rule).
  • scripts/lib/risk-paths.mjs: "supply chain" in WHY_CATEGORIES.
  • .github/workflows/pr-triage.yml: the embedded copy, rewritten by npm run sync:risk-paths-workflow (not by hand).
  • test/risk-paths.test.mjs: the frozen-list test has the new category. New cases: supply chain: the tool pins that CI installs passes checkWhyCategories at L1, and the gate passes a list with that entry. The cases that used supply chain as an example of a missing category now use native code and toolchain. supply chains: x is added to the cases that must fail.

No ADR fixes the category list: ADR-0068 and ADR-0078 give examples only, and the spec owns the list.

Risk tier

Risk tier: 3 — risk:high: the PR touches 2 risk paths at L2 (.github/risk-paths.json):

  • scripts/lib/risk-paths.mjs (quality-gates: the risk-paths validator, matcher and levels). The change adds 1 string to the frozen WHY_CATEGORIES array. No function changes. The exports validateRiskPaths, matchGlob, parseStrictJson and matchFiles and their results are unchanged. The only effect: checkWhyCategories accepts a why that starts with supply chain (alone or with a colon) when the repository has no protected boundaries. Matching stays exact and case-sensitive, so supply chains: x still fails. A vendored copy with a sha256 pin keeps working until its owner refreshes it.
  • .github/workflows/pr-triage.yml (workflow-and-permissions: ...). The diff is 1 line in the embedded copy of the library, written by npm run sync:risk-paths-workflow. No step, permission, action pin or trigger changes. pr-triage does not call checkWhyCategories, so labels and levels do not change. npm run check:risk-paths checks that the copy matches.

Docs housekeeping

  • Spec changed alongside its implementing code; no new doc, no new link.

Verification

  • make ci green locally (944 tests, 0 fail).
  • Revert test: in a scratch worktree at the PR head, with only scripts/lib/risk-paths.mjs reverted, node --test test/risk-paths.test.mjs fails the categories of rule B are frozen, checkWhyCategories: supply chain passes at L1 for the tool pins that CI installs and check-risk-paths passes an L1 supply chain why on assertions (plus the copy-drift tests, as expected).
  • Workflows changed only by the sync script: no action, permission or trigger change.

Entries for tool and dependency pins, such as mise.toml, mise.lock,
go.mod and go.sum, change what CI installs. They need an L1 category
that fits them; rule B had none. Add 'supply chain' to the spec (rule B
and the L1 list of rule H), to WHY_CATEGORIES, and to the embedded copy
in pr-triage.yml (npm run sync:risk-paths-workflow).
@github-actions github-actions Bot added level:L2 Read the diff risk:high Touches a path in .github/risk-paths.json labels Nov 14, 2026
@frostyard-machines

Copy link
Copy Markdown
Contributor Author

Cross-review: Ready, Blocking: none (0 findings).

  • Reviewer: openai/gpt-6.1-sol; coder: anthropic/claude-opus-5-5
  • Base 17ea42dde5615dce7fb8d1846fb024ef96fbdd07, head 35be957c8a8c373b84e0ef1c035698a7cedb6179
  • Scope: all 4 changed paths, risk paths first (scripts/lib/risk-paths.mjs, .github/workflows/pr-triage.yml), with nearby validator, generator and test context.
  • Checked: 1 string added to the frozen WHY_CATEGORIES, no function or export change; the embedded copy matches its source; rule B, rule H, the library and the frozen-list test agree; no stale exhaustive category list elsewhere (ADR-0068 and ADR-0078 give examples only).
  • Budget: 1 initial review, no re-review used.

@frostyard-machines frostyard-machines added the ready-for-human Reviewed, CI green: ready for Brian to review and merge label Nov 14, 2026
@bketelsen
bketelsen merged commit 8489cca into main Nov 14, 2026
5 checks passed
@bketelsen
bketelsen deleted the lucilla/risk-paths-supply-chain branch November 14, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:L2 Read the diff ready-for-human Reviewed, CI green: ready for Brian to review and merge risk:high Touches a path in .github/risk-paths.json

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants