Skip to content

ci: switch to core's PR triage workflow and the v2 risk-paths list - #141

Merged
bketelsen merged 1 commit into
mainfrom
ci/pr-triage-v2
Nov 9, 2026
Merged

bketelsen merged 1 commit into
mainfrom
ci/pr-triage-v2

Conversation

@frostyard-machines

Copy link
Copy Markdown
Contributor

Summary

Moves frostyard/frostnotes to frostyard/core's PR triage workflow and to version 2 of the risk-paths list, as the org wave for ADR-0076, ADR-0077 and ADR-0078 asks (merge-list triage after core#218).

  • Caller. .github/workflows/risk-paths.yml keeps its name and now calls frostyard/core/.github/workflows/pr-triage.yml@c996ea3fb54bcf1a3c621113522213702a7673e2 (core main, 2026-11-09; core has no release tags, ADR-0021). The job id is pr-triage (the readiness step leaves out check runs whose name starts with pr-triage), and the types add labeled. The workflow adds 1 of level:L1 to level:L4 and risk:high at L1 and L2 (ADR-0078), removes ready-for-human when the head moves after the label or CI is not green at the label (ADR-0077), and writes a shadow comment on qualifying Dependabot PRs (it never merges). Contract: docs/specs/pr-triage.md. It is not a required check and has no merge_group trigger.
  • List. .github/risk-paths.json is schema version 2 (docs/specs/risk-paths.md): default_level L3; of 22 globs, 17 are at L1 (a why in a risk category: publication, auth, secrets and credentials, destructive operations and the like) and 5 at L2 (governance: the list, the workflows, the gate). Every glob and why is unchanged; no L4 glob.
  • Local consumer. internal/workflowcheck reads version 2 strictly: schema_version 2, default_level and each level in L1 to L4, the category rule (rule B) only at L1 and L2, and rule C (the list and the caller each match a glob, and every such glob is at L1 or L2). The guards that need a governed path in the list now need it at L1 or L2. New or changed tests: TestLevelRank, TestRiskPathProblems, TestRiskPaths, TestStrictestLevel.
  • Docs. AGENTS.md (baseline row B6), docs/org-adrs.md (ADR-0076 to ADR-0078) and the PR template describe the levels and the new caller.
  • Required checks (ADR-0076, core#222). No CI change: the jobs that the default branch requires already run on every pull request to main with no path filter, no job if: and no secret, and they passed at the last merged and the last Dependabot PR heads. The names go to core#222.

Risk tier

Risk tier: 3 — CI and permissions: the caller and the risk list. This PR touches paths of the list at the base (version 1, so every match is L1 and risk:high):

Path Base glob Why it is listed
.github/risk-paths.json .github/risk-paths.json governance: the high-risk path list
.github/workflows/risk-paths.yml .github/workflows/** governance: CI, the risk-paths caller and token permissions
internal/workflowcheck/baseline_test.go internal/{workflowcheck,repocheck}/** governance: the tests that hold the workflows (ADR-0021), unit runs with no test-name filter, and the repository baseline files

Why the change is safe:

  • The caller keeps pull_request_target, top-level permissions: {}, and only contents: read and pull-requests: write for the job; it checks out nothing and runs no PR code. The reusable workflow is pinned to a full core commit. The new labeled trigger only lets the readiness step see a ready-for-human label; label writes stay with that pinned workflow.
  • The list only gains levels: no glob or why changes, every risk-category glob is at L1 (still risk:high), and governance globs are at L2 (also risk:high). Core reads the list at the base SHA, so this PR cannot lower its own level.
  • The test changes tighten the guards: a governed path at L3 or L4 now fails make verify.

Verification

  • make check green on the host (go test ./internal/workflowcheck/... included).
  • CI on this PR.
  • Revert test: in a scratch worktree at the PR head, git checkout origin/main -- .github/risk-paths.json .github/workflows/risk-paths.yml (the v1 list and the old caller, tests kept), then go test ./internal/workflowcheck/...: TestRiskPaths fails with schema_version = 1, want 2, the rule C errors for both governed list paths, and "want L1 or L2" for each governed path.

The caller .github/workflows/risk-paths.yml now runs
frostyard/core/.github/workflows/pr-triage.yml at core c996ea3. It adds
the level labels of core ADR-0078 with risk:high at L1 and L2, and it
removes ready-for-human when the head moves after the label or CI is not
green at the label (core ADR-0077).

.github/risk-paths.json moves to schema version 2 (core
docs/specs/risk-paths.md): default L3, 17 globs at L1 and 5 at L2 by
the grading rule of ADR-0078. internal/workflowcheck reads version 2,
checks rules B and C with levels, and needs each governed path at L1 or
L2.

Refs: frostyard/core#218, frostyard/core#222
@github-actions github-actions Bot added the risk:high Touches a path in .github/risk-paths.json label Nov 9, 2026
@frostyard-machines

Copy link
Copy Markdown
Contributor Author

Cross-review: Ready, blocking none.

  • Reviewer: openai/gpt-6.1-sol (read-only). Coder: deepseek/deepseek-flash, small edits by github-copilot/claude-opus-5.5.
  • Reviewed: base 6b46ef2f3ee2c02b819b90686c3803ad4e24956e, head 2f071e187b76d6b79aab7f8ada56a0717dabc795 (all changed files, with core's specs, ADRs and caller at c996ea3).
  • Findings: none. Checked: v2 list valid, levels by the grading rule, globs and why unchanged; caller types, permissions, job id and pin; strict parsing, rules B and C, governed paths at L1 or L2; each failing table case has 1 cause; no v1 consumer left; docs agree with core's specs.

@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 5b9c142 into main Nov 9, 2026
10 checks passed
@bketelsen
bketelsen deleted the ci/pr-triage-v2 branch November 9, 2026 14:13
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 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