Skip to content

ci: move the risk-paths caller to core's pr-triage workflow (risk-paths v2) - #9

Merged
bketelsen merged 3 commits into
mainfrom
lucilla/pr-triage-caller
Nov 9, 2026
Merged

bketelsen merged 3 commits into
mainfrom
lucilla/pr-triage-caller

Conversation

@frostyard-machines

@frostyard-machines frostyard-machines commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Move this template to core's pr-triage workflow and to risk-paths schema version 2, so that every repository made from it starts with level labels and head-bound readiness.

  • .github/workflows/risk-paths.yml (the file keeps its name) now calls frostyard/core/.github/workflows/pr-triage.yml@c996ea3fb54bcf1a3c621113522213702a7673e2 (core main after feat: Dependabot auto-merge shadow step in pr-triage.yml frostyard/core#225), in the job pr-triage, and also runs on labeled. The workflow adds 1 level label (level:L1 to level:L4), adds risk:high at L1 and L2, removes ready-for-human when the head moves after the label or when CI is not green at the label, and writes a shadow "would auto-merge" comment on some Dependabot PRs (it never merges). Reasons: core ADR-0077, ADR-0078 (amends ADR-0068), merge-lane: feasibility replay frostyard/core#218.
  • .github/risk-paths.json is schema version 2, default_level L3. Grading by core docs/specs/risk-paths.md section H: the list, the workflows, Makefile, scripts/check-template.mjs, scripts/check-corrections.mjs and scripts/lib/** are governance, so L2. mise.toml and mise.lock (tool pins and checksums that CI installs, a supply-chain input) are L1: the rule says L1 when unsure. No glob added or dropped; every why is unchanged.
  • scripts/lib/risk-paths.mjs is copied again from core at c996ea3 (sha256 6df0af00…fa43), with its source and sha256 pins updated in scripts/check-template.mjs.
  • scripts/check-template.mjs now requires schema version 2 (a new repository starts on v2), checks rule C with levels through the vendored checkRequiredPaths (the globs that match the list and the caller must be L1 or L2), and checks that the caller pins pr-triage.yml@<40 hex> in the job pr-triage.
  • Docs: AGENTS.md, README.md, docs/new-repository.md (the 4 level labels and core's scripts/apply-triage-settings.sh), docs/design/agent-ready-repository.md, docs/org-adrs.md (ADR-0077, ADR-0078), .github/pull_request_template.md, and a dated note in ADR 0003 (its "2 manual steps" statement is no longer complete).

No CI change: ci.yml already runs verify on every pull_request and merge_group, with no path filter and no secret (frostyard/core#222, rules N1 to N5).

Risk tier

Tier 3 (risk:high). Matched paths of the base list, and why the change is safe:

  • .github/risk-paths.json: only adds schema_version 2, default_level and a level per entry; every glob stays, and each is L1 or L2, so every path that gets risk:high today still gets it.
  • .github/workflows/** (risk-paths.yml): the caller keeps pull_request_target, permissions: {} at the top, only contents: read and pull-requests: write on the job, and a full-SHA pin (core ADR-0021). It checks out nothing and runs no PR code. It is not a required check.
  • scripts/check-template.mjs: the gate only gets stricter (v2 required, caller pin and job id checked); the new negative tests below prove each rule.
  • scripts/lib/**: a byte copy of core's file at the pinned SHA; the hash check in make verify proves it.

Verification

  • make ci BASE=origin/main: pass (5 checks, 38 tests).
  • New negative tests in test/check-template.test.mjs: a v1 list, an entry with no level, no default_level, a bad default_level, a caller glob at L3, a caller that still pins risk-paths.yml, a renamed job. Each fails with the old checker.

Cross-review

Reviewer openai/gpt-6.1-sol, coder deepseek/deepseek-flash (gate fixes in the last commit by the author agent).

  • Review of 712c29a: Not ready. Finding 1 (blocking): the caller check matched the pin and the job name anywhere in the file, so a pin under another job or in a run: block passed. Finding 2 (non-blocking): the level text left out the floors and the ratchet. Fixed in 8e657aa (the gate reads the caller structure; 2 negative tests; 1 corrections line; doc text).
  • Re-review 1 of 8e657aa: Not ready. Finding 1 (blocking): a comment-only line at indent 0 to 2 ended the job, so a valid caller failed. Fixed in 39c1f41 (comment-only lines are skipped; 1 positive test; 1 corrections line).
  • Re-review 2 of 39c1f41: Ready. Blocking: none.

Revert test: with the checkCaller of 712c29a, the 2 structure tests fail; with the loop of 8e657aa, "caller with comments at indent 0 and 2 before uses exits 0" fails. make ci BASE=origin/main at 39c1f41: 41 tests pass.

…hs v2)

The risk-path list is schema version 2 with default level L3, so every glob
carries a level: the job adds 1 level label, level:L1 to level:L4, of the
strictest matched path, and risk:high only at L1 and L2, which is tier 3
(core ADR-0068, ADR-0078). The caller runs frostyard/core's pr-triage.yml
pinned to a full commit SHA in the job pr-triage; that workflow also removes
ready-for-human when the head moves after the label or when CI at the head
is not green at the label (core ADR-0077). A PR that touches the list, the
caller or CI is L2, so the repository owner reads its diff.

scripts/lib/risk-paths.mjs is copied again from core c996ea3f, which adds
the levels and rule C with levels. The gate now requires schema version 2,
checks rule C with checkRequiredPaths, and checks the caller pin and job
id, so a new repository starts on the level list. Docs, the pull request
template and ADR-0003 state the levels and the 5 labels.

References: frostyard/core#222, core ADR-0068, ADR-0077, ADR-0078.
checkCaller searched the whole caller file for the pinned uses: line and for
the job pr-triage, each on its own, so a caller passed when the pinned uses:
sat under another job, or when the same text sat inside a run: block. It now
reads the structure line by line: the job pr-triage at indent 2 under jobs:
must carry a uses: key at indent 4 whose value is
frostyard/core/.github/workflows/pr-triage.yml at a 40-character commit SHA,
and every line of a block scalar is skipped. The gate needs no YAML package.

Two negative tests cover the 2 cases: the pinned uses: in another job, and
the same text inside a run: block. The operational notes, AGENTS.md and the
pull request template now say that core takes the level from the matched
globs, the default_level and the org floors, and never lowers a level label.

1 line in .memory/corrections.jsonl records the guard.
A YAML comment does not end a mapping, so a comment at indent 0 to 2
between the job pr-triage and its uses: key must not end the job. Before,
the gate rejected such a valid caller. A positive test with comments at
indent 0 and 2 guards it.
bketelsen pushed a commit to frostyard/igloo that referenced this pull request Nov 9, 2026
…v2) (#13)

* ci: call core's pr-triage workflow and move the risk list to levels (v2)

The caller now pins frostyard/core/.github/workflows/pr-triage.yml at
c996ea3 (core#225): it adds a level label and risk:high for L1 and L2,
and removes ready-for-human when the head moves (core ADR-0077, ADR-0078).
.github/risk-paths.json moves to schema version 2 by ADR-0078's grading
rule (governance entries L2, the others L1, default L3).
scripts/lib/risk-paths.mjs is copied again from core c996ea3 with its pin,
and the template gate checks rule C through checkRequiredPaths, so a list
or caller glob at L3 or L4 fails (core docs/specs/risk-paths.md, C).

* docs: describe the PR triage caller, levels and head-bound readiness

The caller now runs core's pr-triage.yml: it adds a level label and
risk:high for L1 and L2, and removes ready-for-human when the head moves
(core ADR-0077, ADR-0078). docs/org-adrs.md lists core ADR-0076 to
ADR-0078.

* build: take the template gate from bketelsen/agentic-template#9

scripts/check-template.mjs and its test now match the template's change at
712c29a: the list must be schema version 2 and the caller must run core's
pr-triage.yml at a full SHA in the job pr-triage, besides rule C.

---------

Co-authored-by: frostyard-machines <[email protected]>
bketelsen pushed a commit to frostyard/nsl that referenced this pull request Nov 9, 2026
…v2) (#98)

* ci: call core's pr-triage workflow and move the risk list to levels (v2)

The caller now pins frostyard/core/.github/workflows/pr-triage.yml at
c996ea3 (core#225): it adds a level label and risk:high for L1 and L2,
and removes ready-for-human when the head moves (core ADR-0077, ADR-0078).
.github/risk-paths.json moves to schema version 2 by ADR-0078's grading
rule (governance entries L2, the others L1, default L3).
scripts/lib/risk-paths.mjs is copied again from core c996ea3 with its pin,
and the template gate checks rule C through checkRequiredPaths, so a list
or caller glob at L3 or L4 fails (core docs/specs/risk-paths.md, C).

* test: apply the why category rule to L1 and L2 entries only

Under risk-paths schema version 2 (core ADR-0078), rule B binds only
entries at L1 or L2; an entry with no level reads as L1. AGENTS.md and
docs/org-adrs.md describe the PR triage caller, levels and head-bound
readiness (core ADR-0076, ADR-0077, ADR-0078).

* build: take the template gate from bketelsen/agentic-template#9

scripts/check-template.mjs and its test now match the template's change at
712c29a: the list must be schema version 2 and the caller must run core's
pr-triage.yml at a full SHA in the job pr-triage, besides rule C.

* docs: say that release-config leaves the required checks by an admin step

The core#222 comment selects verify and vulncheck; an administrator
removes release-config from the ruleset later, and the job stays in CI.

---------

Co-authored-by: frostyard-machines <[email protected]>
bketelsen pushed a commit to frostyard/snowkit that referenced this pull request Nov 9, 2026
…v2) (#15)

* ci: call core's pr-triage workflow and move the risk list to levels (v2)

The caller now pins frostyard/core/.github/workflows/pr-triage.yml at
c996ea3 (core#225): it adds a level label and risk:high for L1 and L2,
and removes ready-for-human when the head moves (core ADR-0077, ADR-0078).
.github/risk-paths.json moves to schema version 2 by ADR-0078's grading
rule (governance entries L2, the others L1, default L3).
scripts/lib/risk-paths.mjs is copied again from core c996ea3 with its pin,
and the template gate checks rule C through checkRequiredPaths, so a list
or caller glob at L3 or L4 fails (core docs/specs/risk-paths.md, C).

* docs: describe the PR triage caller, levels and head-bound readiness

The caller now runs core's pr-triage.yml: it adds a level label and
risk:high for L1 and L2, and removes ready-for-human when the head moves
(core ADR-0077, ADR-0078). docs/org-adrs.md lists core ADR-0076 to
ADR-0078.

* build: take the template gate from bketelsen/agentic-template#9

scripts/check-template.mjs and its test now match the template's change at
712c29a: the list must be schema version 2 and the caller must run core's
pr-triage.yml at a full SHA in the job pr-triage, besides rule C.

---------

Co-authored-by: frostyard-machines <[email protected]>
bketelsen pushed a commit to frostyard/pilothouse that referenced this pull request Nov 9, 2026
…v2) (#252)

* ci: call core's pr-triage workflow and move the risk list to levels (v2)

The caller now pins frostyard/core/.github/workflows/pr-triage.yml at
c996ea3 (core#225): it adds a level label and risk:high for L1 and L2,
and removes ready-for-human when the head moves (core ADR-0077, ADR-0078).
.github/risk-paths.json moves to schema version 2 by ADR-0078's grading
rule (governance entries L2, the others L1, default L3).
scripts/lib/risk-paths.mjs is copied again from core c996ea3 with its pin,
and the template gate checks rule C through checkRequiredPaths, so a list
or caller glob at L3 or L4 fails (core docs/specs/risk-paths.md, C).

* docs: describe the PR triage caller, levels and head-bound readiness

The caller now runs core's pr-triage.yml: it adds a level label and
risk:high for L1 and L2, and removes ready-for-human when the head moves
(core ADR-0077, ADR-0078). docs/org-adrs.md lists core ADR-0076 to
ADR-0078.

* build: take the template gate from bketelsen/agentic-template#9

scripts/check-template.mjs and its test now match the template's change at
712c29a: the list must be schema version 2 and the caller must run core's
pr-triage.yml at a full SHA in the job pr-triage, besides rule C.

---------

Co-authored-by: frostyard-machines <[email protected]>
bketelsen pushed a commit to frostyard/chairlift that referenced this pull request Nov 9, 2026
…v2) (#281)

* ci: call core's pr-triage workflow and move the risk list to levels (v2)

The caller now pins frostyard/core/.github/workflows/pr-triage.yml at
c996ea3 (core#225): it adds a level label and risk:high for L1 and L2,
and removes ready-for-human when the head moves (core ADR-0077, ADR-0078).
.github/risk-paths.json moves to schema version 2 by ADR-0078's grading
rule (governance entries L2, the others L1, default L3).
scripts/lib/risk-paths.mjs is copied again from core c996ea3 with its pin,
and the template gate checks rule C through checkRequiredPaths, so a list
or caller glob at L3 or L4 fails (core docs/specs/risk-paths.md, C).

* docs: describe the PR triage caller, levels and head-bound readiness

The caller now runs core's pr-triage.yml: it adds a level label and
risk:high for L1 and L2, and removes ready-for-human when the head moves
(core ADR-0077, ADR-0078). docs/org-adrs.md lists core ADR-0076 to
ADR-0078.

* build: take the template gate from bketelsen/agentic-template#9

scripts/check-template.mjs and its test now match the template's change at
712c29a: the list must be schema version 2 and the caller must run core's
pr-triage.yml at a full SHA in the job pr-triage, besides rule C.

---------

Co-authored-by: frostyard-machines <[email protected]>
@bketelsen
bketelsen merged commit c90426c into main Nov 9, 2026
3 checks passed
bketelsen pushed a commit to frostyard/intuneme that referenced this pull request Nov 9, 2026
…v2) (#266)

* ci: call core's pr-triage workflow and move the risk list to levels (v2)

The caller now pins frostyard/core/.github/workflows/pr-triage.yml at
c996ea3 (core#225): it adds a level label and risk:high for L1 and L2,
and removes ready-for-human when the head moves (core ADR-0077, ADR-0078).
.github/risk-paths.json moves to schema version 2 by ADR-0078's grading
rule (governance entries L2, the others L1, default L3).
scripts/lib/risk-paths.mjs is copied again from core c996ea3 with its pin,
and the template gate checks rule C through checkRequiredPaths, so a list
or caller glob at L3 or L4 fails (core docs/specs/risk-paths.md, C).

* ci: run the Tests workflow on every pull request and level the list tests

A required status check must run on every pull request; the pull_request
path filter on ubuntu-intune/** would leave it pending (core ADR-0076). The
push filter stays. risk_paths_test.go applies the why category rule to L1
and L2 entries only (core ADR-0078). Docs describe the PR triage caller.

* build: take the template gate from bketelsen/agentic-template#9

scripts/check-template.mjs and its test now match the template's change at
712c29a: the list must be schema version 2 and the caller must run core's
pr-triage.yml at a full SHA in the job pr-triage, besides rule C.

* test: require an L1 or L2 glob for each privileged file

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). riskCovered now counts only a glob at
L1 or L2 (no level counts as L1); TestRiskCovered covers the levels.

---------

Co-authored-by: frostyard-machines <[email protected]>
@frostyard-machines
frostyard-machines deleted the lucilla/pr-triage-caller branch November 9, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human 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