Repository navigation
feat(risk-paths): check the category of each L1 and L2 why in the gate (rule B) - #255
Merged
Merged
Conversation
…e (rule B) Rule B of docs/specs/risk-paths.md says that each why of an entry at L1 or L2 names 1 category, or 1 protected-boundary identifier where the governance policy has boundaries. Only a review checked it, and lists with 'supply chain', 'security' and 'native code' passed every gate. Add WHY_CATEGORIES, protectedBoundaryIds and checkWhyCategories to the library, and call them from scripts/check-risk-paths.mjs with the boundaries of policies/agent-governance.json. validateRiskPaths keeps its version 1 results, and the pr-triage levels step does not call the check. Also state in docs/specs/pr-triage.md that a PR made with GITHUB_TOKEN starts no workflow.
Contributor
Author
Cross-review
|
bketelsen
approved these changes
Nov 14, 2026
This was referenced Nov 14, 2026
fix(risk-paths): name a rule B category in the why of the mise entries
bketelsen/agentic-template#13
Closed
bketelsen
pushed a commit
to frostyard/frostui
that referenced
this pull request
Nov 14, 2026
Core's risk-path spec, rule B, lists the categories that the why of an L1 or L2 entry must start with, and core's checkWhyCategories (frostyard/core#255) rejects any other word. Three entries used words that rule B does not have: - opener.go: security -> auth (what the system's handlers may open) - appid_linux.go: native code -> auth (the program identity that the desktop sees); the native-code reason stays in the text - launch_linux.go: native code -> auth (which desktop app the kit starts); the native-code reason stays in the text Every glob and every level stays the same. AGENTS.md now says that an L1 or L2 why starts with a rule B category.
This was referenced Nov 22, 2026
Merged
Merged
Merged
ci: pin core pr-triage workflow to f99acfd (retry of 5xx and network errors)
frostyard/chairlift#330
Merged
Merged
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rule B of the risk-paths spec says that each
whyof an entry at L1 or L2 (each entry of a version 1 list) names 1 category, or 1 protected-boundary identifier wherepolicies/agent-governance.jsonhas boundaries. Until now only a review checked it, so lists withsupply chain,security,native codeorfilesystempassed every gate.scripts/lib/risk-paths.mjs: new exportsWHY_CATEGORIES,protectedBoundaryIds(policy)(readsprotected_boundaries[].idandprotectedBoundaries[]) andcheckWhyCategories(list, boundaries). Awhynames a name when, trimmed, it is the name or starts with the name and a colon.validateRiskPathsis unchanged, so its version 1 results stay the same for the repositories that vendor it. Thelevelsstep does not call the new check.scripts/check-risk-paths.mjs: runs rule B with the boundaries ofpolicies/agent-governance.json(new--policy PATH), skips it when the policy does not parse, and reports the number of L1/L2 entries it checked..github/workflows/pr-triage.yml: the embedded library copy, rewritten bynpm run sync:risk-paths-workflow(no hand edit).docs/specs/risk-paths.md: rule B says which gate checks the name, and how; the derived-artifacts rows list the new exports.docs/specs/pr-triage.md: 1 line: a PR that a workflow opens or pushes withGITHUB_TOKENstarts no workflow (GitHub docs).Lists that fail the new check today
Source:
.github/risk-paths.jsonandpolicies/agent-governance.jsonat the default branch of every non-archived repository offrostyardandbketelsen(gh repo list, 333 repositories; 36 have a list, all version 2, all valid), checked withcheckWhyCategoriesfrom this branch on 2026-11-14. 3 lists fail; none of them has a governance policy with boundaries:supply chain(mise.toml,mise.lock)supply chain,security,native codesupply chain,secrets,security,filesystem,filesystem and destructive operationsThe 33 other lists pass, snosi and lab included (their names are boundaries of their own policies). This PR changes none of these repositories: their gates use a vendored copy of the library pinned by
sha256, so nothing turns red until an owner re-vendors and callscheckWhyCategories.Risk tier
Risk tier: 3 —
risk:high: the PR touches risk paths.Matched paths in core's
.github/risk-paths.jsonat the base, and why the change is safe:scripts/lib/risk-paths.mjs(L2, quality-gates): only adds exports; no existing function changes. Thelevelsand readiness steps do not call the new code, so the labels that the workflow adds do not change.scripts/check-risk-paths.mjs(L2, quality-gates): the gate gets stricter, not looser; core's own list passes it (17 of 17 entries name a boundary of core's policy)..github/workflows/pr-triage.yml(L2, workflow-and-permissions; org floor): only the embedded library text changes, written by the sync script; no step, trigger, permission or action pin changes.Docs housekeeping
Verification
make cigreen (942 tests, 0 failures), before the first pushnode scripts/check-corrections.mjs --root . --base origin/main:ok corrections: 53 records, append-only vs origin/mainnode scripts/check-risk-paths.mjs:ok risk_paths: 17 entries, 17 at L1 or L2 name a category or boundary, workflow in syncRevert test (scratch worktree from the PR head, tests kept):
scripts/check-risk-paths.mjsfromorigin/main:node --test test/risk-paths.test.mjsfails 5 tests on assertions, among themcheck-risk-paths fails on an L1 why with no category, such as supply chainandcheck-risk-paths checks the protected boundaries of the governance policy.checkWhyCategoriesthat returns[]: 10 tests fail, among themcheckWhyCategories: a v1 entry with no category fails, such as supply chainandcheckWhyCategories: the category must start the why and end or meet a colon.Corrections report (
node scripts/corrections-report.mjs --root . --ref HEAD --json): 53 records, 0 pending, so core has no record with an emptypromoted_toto fill.