Skip to content

Commit 93863dd

Browse files
kyle-sextonclaude
andcommitted
ci: give every reusable-workflow job a Title Case display name
Each job in the 12 reusable workflows now has a display name that is the Title Case of its job id (`Sync (${{ matrix.repo }})` for the matrix job), and pr-run-checks' `Validate against JSON schema` step is sentence case, so naming-lint reports no job-name or step-name finding. No job id changes. The check names every @main caller sees change with it, for example `PR Review / review-status` becomes `PR Review / Status` and `PR Review / claude-review-status` becomes `PR Review / Claude`. The hold step finds a cost decision's decided head in its own status job's earlier runs by name. It now takes STATUS_JOB_LEGACY beside STATUS_JOB, so runs finished under `review-status` still carry a decision after the rename. The tests and present-tense docs that named the old checks are updated. Refs: melodic-software/standards#985 Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 459c965 commit 93863dd

19 files changed

Lines changed: 130 additions & 89 deletions

‎.github/actions/apply-review-hold/hold.cjs‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// pr-review-cli's hold step. No model runs here. It reads, from env:
22
// HOLD_LABEL, LANE_ID, STATUS_JOB (the name of the status job this step runs
3-
// in, whose earlier runs' notices give a cost decision's decided head),
3+
// in, whose earlier runs' notices give a cost decision's decided head) and
4+
// STATUS_JOB_LEGACY (optional, a former name of that job, read the same way),
45
// PR_NUMBER, HEAD_SHA, BASE_REF (the pull request's base branch), PUBLISH_GATE, TRUSTED_AUTHOR_IDS (the people whose cost decision
56
// counts), and the legs' KEY_* and SUB_* outputs that publish-review's judge
67
// reads. It only adds: the label and one marker comment. Every write goes
@@ -307,8 +308,9 @@ function unranHead(activity, ran, decided, cutoff) {
307308
// head branch of this repository started before the decision; vets each
308309
// run's head (compare base...head lists under 300 files and does not change
309310
// this workflow's file, which a pull_request run takes from the head and so
310-
// could write the notice); takes, from each run's STATUS_JOB done before the
311-
// decision, the `claude-lane-hold lane=<LANE_ID>` cost notices naming that
311+
// could write the notice); takes, from each run's STATUS_JOB (or
312+
// STATUS_JOB_LEGACY) done before the decision, the
313+
// `claude-lane-hold lane=<LANE_ID>` cost notices naming that
312314
// run's own head; and keeps the newest (decidedHead) while the branch's push
313315
// history shows no run missing since it (unranHead). The decision carries
314316
// when the head is that sha, or when the pull request's net diff against its
@@ -324,8 +326,10 @@ async function carryDecision(github, owner, repo, env, runId, decision) {
324326
if (!Number.isFinite(cutoff)) return { carry: false, why: "the decision has no time" };
325327
const base = String(env.BASE_REF ?? "");
326328
if (!BRANCH.test(base)) return { carry: false, why: "the base branch name is not usable" };
327-
const statusJob = String(env.STATUS_JOB ?? "");
328-
if (!/^[A-Za-z0-9._ -]{1,100}$/u.test(statusJob))
329+
const statusJobs = [String(env.STATUS_JOB ?? "")];
330+
const legacy = String(env.STATUS_JOB_LEGACY ?? "");
331+
if (legacy !== "") statusJobs.push(legacy);
332+
if (!statusJobs.every((n) => /^[A-Za-z0-9._ -]{1,100}$/u.test(n)))
329333
return { carry: false, why: "the status job name is not usable" };
330334
const self = `${owner}/${repo}`.toLowerCase();
331335
const current = (await github.rest.actions.getWorkflowRun({ owner, repo, run_id: runId })).data;
@@ -392,7 +396,7 @@ async function carryDecision(github, owner, repo, env, runId, decision) {
392396
});
393397
for (const job of jobs) {
394398
const name = String(job?.name ?? "");
395-
if (name !== statusJob && !name.endsWith(` / ${statusJob}`)) continue;
399+
if (!statusJobs.some((s) => name === s || name.endsWith(` / ${s}`))) continue;
396400
if (!(Date.parse(job.completed_at) < cutoff)) continue;
397401
const annotations = await github.paginate(github.rest.checks.listAnnotations, {
398402
owner,

‎.github/scripts/apply-review-hold.test.cjs‎

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ const TRUST_PATHS = [
4747
// pushed at 10:45.
4848
const RUN_ID = 99;
4949
const RUN_PATH = ".github/workflows/pr-review-hosted.yml";
50-
const STATUS_JOB = "review-status";
50+
const STATUS_JOB = "Status";
51+
const STATUS_JOB_LEGACY = "review-status";
5152
const laneRun = ({
5253
id = 11,
5354
sha = "a".repeat(40),
@@ -61,7 +62,7 @@ const laneRun = ({
6162
});
6263
const statusJob = ({
6364
id = 111,
64-
name = `pr-review / ${STATUS_JOB}`,
65+
name = `PR Review / ${STATUS_JOB}`,
6566
completedAt = "2026-10-23T11:00:00Z",
6667
} = {}) => ({ id, name, completed_at: completedAt });
6768
const notice = ({
@@ -322,6 +323,7 @@ const baseEnv = (extra = {}) => ({
322323
HOLD_PATHS: TRUST_PATHS,
323324
LANE_ID: "claude-review",
324325
STATUS_JOB,
326+
STATUS_JOB_LEGACY,
325327
PR_NUMBER: "7",
326328
HEAD_SHA: HEAD,
327329
BASE_REF: "main",
@@ -1131,7 +1133,7 @@ test("the notice fixture carries, and each one-field change to it keeps the cost
11311133
],
11321134
[
11331135
"a job of another name",
1134-
laneOf({ jobs: { 11: [statusJob({ name: "pr-review / review-key" })] } }),
1136+
laneOf({ jobs: { 11: [statusJob({ name: "PR Review / Review Key" })] } }),
11351137
none,
11361138
],
11371139
[
@@ -1467,6 +1469,36 @@ test("an empty STATUS_JOB reads no run and keeps the cost hold", async () => {
14671469
assert.ok(!github.calls.some(([name]) => name === "listWorkflowRuns"));
14681470
});
14691471

1472+
// A decision made against a run whose status job carries the former name
1473+
// carries through STATUS_JOB_LEGACY, one against a run under the current
1474+
// name through STATUS_JOB, and a job that only shares a word with either is
1475+
// never read.
1476+
test("the cost decision carries from the status job under its current or its former name", async () => {
1477+
for (const [label, name, env, hold] of [
1478+
["a run after the rename", `PR Review / ${STATUS_JOB}`, {}, "false"],
1479+
["a run before the rename", `PR Review / ${STATUS_JOB_LEGACY}`, {}, "false"],
1480+
["a run before the caller jobs were named", `pr-review / ${STATUS_JOB_LEGACY}`, {}, "false"],
1481+
["a run before the rename, legacy name unset", `PR Review / ${STATUS_JOB_LEGACY}`, { STATUS_JOB_LEGACY: "" }, "true"],
1482+
["the CI Status job", "CI Status", {}, "true"],
1483+
["a job whose name ends in Status without the separator", "PR Review / Review Status", {}, "true"],
1484+
]) {
1485+
const { core } = await apply(costEnv(["cost"], env), {
1486+
comments: [decision()],
1487+
lane: laneOf({ jobs: { 11: [statusJob({ name })] } }),
1488+
});
1489+
assert.equal(core.outputs.hold, hold, label);
1490+
}
1491+
});
1492+
1493+
test("an unusable STATUS_JOB_LEGACY reads no run and keeps the cost hold", async () => {
1494+
const { core, github } = await apply(
1495+
costEnv(["cost"], { STATUS_JOB_LEGACY: "review-status\n" }),
1496+
{ comments: [decision()] },
1497+
);
1498+
assert.equal(core.outputs.hold, "true");
1499+
assert.ok(!github.calls.some(([name]) => name === "listWorkflowRuns"));
1500+
});
1501+
14701502
test("the hold comment carries the run's binding above its footer and the run's record lists it; a re-run lists its run's earlier one", async () => {
14711503
const fs = require("node:fs");
14721504
const path = require("node:path");

‎.github/scripts/claude-lane-status-check.test.cjs‎

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"use strict";
22

33
// Each Claude lane is one job that reviews and reports. The job carries the
4-
// check name consumers read (`<caller job> / claude-review-status`, and
5-
// `security-review / security-review`), and its last step goes red whenever
4+
// check name consumers read (`<caller job name> / Claude` in both lanes), and
5+
// its last step goes red whenever
66
// no review happened and names the cause, so a green check always means a
77
// review ran or was not needed. These tests pin the wiring (values reach the
88
// script through env) and run the step's own script for every cause.
@@ -19,12 +19,8 @@ const { parseWorkflow } = require("./workflow-yaml.cjs");
1919
const workflowsRoot = path.join(__dirname, "..", "workflows");
2020

2121
const lanes = [
22-
{ file: "pr-review.yml", job: "claude", name: "claude-review-status" },
23-
{
24-
file: "pr-review-security.yml",
25-
job: "claude",
26-
name: "security-review",
27-
},
22+
{ file: "pr-review.yml", job: "claude", name: "Claude" },
23+
{ file: "pr-review-security.yml", job: "claude", name: "Claude" },
2824
];
2925

3026
function load(file) {

‎.github/scripts/intake-triage-gate.test.cjs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ test("the issue comes from the API by a validated number", () => {
261261

262262
test("a gated-out opened issue runs the skipped job, which may apply a label", () => {
263263
const skipped = workflow.jobs.skipped;
264-
assert.equal(skipped.name, "claude-intake-triage-skipped");
264+
assert.equal(skipped.name, "Skipped");
265265
assert.equal(skipped.needs, "check-key-credit");
266266
assert.equal(gateJob.needs, undefined);
267267
// Only the gate job's own if can skip it, so skipped means gated out.

‎.github/scripts/intake-triage-legs.test.cjs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ test("every model job tells its launcher whether the fallback token is set, neve
118118
});
119119

120120
test("the fallback job runs on a fixed GitHub-hosted label only after the subscription job hands off or finds its token empty with the fallback token set", () => {
121-
assert.equal(fallback.name, "claude-intake-triage-fallback");
121+
assert.equal(fallback.name, "Fallback");
122122
assert.equal(fallback["runs-on"], "ubuntu-24.04");
123123
assert.deepEqual(fallback.needs, ["claude", "subscription"]);
124124
// The subscription job's outputs, as its last step leaves them.
@@ -291,7 +291,7 @@ test("every model job's leg uploads its sealed transcript under a job id unique
291291
test("the subscription job runs on a fixed GitHub-hosted label, after the claude job", () => {
292292
assert.equal(subscription["runs-on"], "ubuntu-24.04");
293293
assert.deepEqual(subscription.needs, ["check-key-credit", "claude"]);
294-
assert.equal(subscription.name, "claude-intake-triage-subscription");
294+
assert.equal(subscription.name, "Subscription");
295295
});
296296

297297
test("the subscription job starts only on an exact handoff or an empty key", () => {
@@ -567,7 +567,7 @@ function report(env) {
567567
}
568568

569569
test("the status job reads the subscription job when it ran, else the claude job", () => {
570-
assert.equal(status.name, "claude-intake-triage-status");
570+
assert.equal(status.name, "Status");
571571
assert.deepEqual(status.needs, [
572572
"claude",
573573
"subscription",
@@ -866,7 +866,7 @@ test("the model jobs are read-only, cache-less, and give the model no GitHub tok
866866
});
867867

868868
test("exactly one job, with no model, writes the triage", () => {
869-
assert.equal(apply.name, "claude-intake-triage-apply");
869+
assert.equal(apply.name, "Apply");
870870
assert.deepEqual(apply.needs, ["claude", "subscription", "fallback"]);
871871
assert.deepEqual(apply.permissions, { issues: "write" });
872872
assert.equal(apply["runs-on"], "ubuntu-24.04");

‎.github/scripts/pr-review-cli.test.cjs‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,27 +139,28 @@ test("every model job tells its launcher whether the fallback token is set, neve
139139

140140
// A skipped job shows its `name:` unevaluated, so an expression there would
141141
// show as the check name (ci-workflows#866). The caller job tells the lanes
142-
// apart: `pr-review / review-status`, `pr-review-security / review-status`.
142+
// apart: `PR Review / Status`, `PR Review Security / Status`.
143143
test("every job carries a literal name, the same in both lanes", () => {
144144
const names = Object.fromEntries(
145145
Object.entries(workflow.jobs).map(([id, job]) => [id, job.name]),
146146
);
147147
assert.deepEqual(names, {
148148
...names,
149-
"resolve-pull-request": "resolve-pull-request",
150-
"check-key-credit": "key-credit",
151-
"review-key": "key",
152-
"review-subscription": "subscription",
153-
"review-fallback": "fallback",
154-
status: "review-status",
149+
"resolve-pull-request": "Resolve Pull Request",
150+
"check-key-credit": "Check Key Credit",
151+
"review-key": "Review Key",
152+
"review-subscription": "Review Subscription",
153+
"review-fallback": "Review Fallback",
154+
status: "Status",
155155
});
156156
for (const [id, name] of Object.entries(names)) {
157157
assert.doesNotMatch(String(name ?? id), /\$\{\{/u, id);
158158
}
159-
assert.equal(
160-
status.steps.find((s) => s.env?.STATUS_JOB)?.env.STATUS_JOB,
161-
"review-status",
162-
);
159+
// The hold step reads its own job's earlier runs by name: the current name,
160+
// and the name runs finished before the rename carry.
161+
const hold = status.steps.find((s) => s.env?.STATUS_JOB);
162+
assert.equal(hold?.env.STATUS_JOB, "Status");
163+
assert.equal(hold?.env.STATUS_JOB_LEGACY, "review-status");
163164
});
164165

165166
test("the fallback job starts only after the subscription job succeeded and handed off exactly", () => {

‎.github/workflows/intake-label-needs-triage.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ permissions: {}
9292

9393
jobs:
9494
apply-label:
95-
name: Apply floor label when no priority tier is present
95+
name: Apply Label
9696
runs-on: ${{ inputs.runner }}
9797
timeout-minutes: 15
9898
permissions:

‎.github/workflows/intake-triage.yml‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ name: Intake Triage
5858
# are set by run-claude-cli after it restores the step files, so the
5959
# model cannot set them; a forged handoff would cost only subscription
6060
# usage. Either secret may be empty, not both.
61-
# - The fallback token runs only in the claude-intake-triage-fallback job,
61+
# - The fallback token runs only in the Fallback job,
6262
# the same way after the subscription job's handoff (a limit stop, a
6363
# credit stop, or a 401 or 402), which it sets only when that secret is
6464
# set. The other model jobs read only whether it is set. It may be
@@ -98,7 +98,7 @@ name: Intake Triage
9898
# run to the job outputs: the result subtype, the error flag and the
9999
# denial count, and the structured fields (labels, type, comment,
100100
# needs_human) checked against the job's allowlist and enums.
101-
# - Only the claude-intake-triage-apply job writes, and it runs no model.
101+
# - Only the Apply job writes, and it runs no model.
102102
# It takes the fallback job's outputs when that job ran, else the
103103
# subscription job's, else the claude job's, so a handoff applies once. It takes the issue from
104104
# the event or the issue-number input, never from a job output, and
@@ -144,7 +144,7 @@ name: Intake Triage
144144
# number and node id from the API, never from other dispatch text, and
145145
# refuses a pull request or a malformed number.
146146
# - An opened issue or a dispatch the gate turns away is not a silent green run: the
147-
# claude-intake-triage-skipped job names the reason in the run summary
147+
# Skipped job names the reason in the run summary
148148
# and a notice, and applies skipped-label when the caller sets one.
149149
#
150150
# CLI VERSION: run-claude-cli installs the Claude Code CLI at run time.
@@ -160,16 +160,16 @@ name: Intake Triage
160160
# legs' outputs in that run hold, so a rerun of it alone reapplies the same
161161
# triage, editing the lane's earlier comment.
162162
#
163-
# `claude-intake-triage` triages on the API key; after it hands off (a credit
164-
# stop, or the key refused with API status 401 or 402) or with no
165-
# key, or in its place when `claude-intake-triage-key-credit` finds the key's
166-
# last credit stop inside the window, `claude-intake-triage-subscription`
167-
# triages on the subscription token instead; after that job hands off, `claude-intake-triage-fallback` triages
168-
# on the fallback token. `claude-intake-triage-apply` applies the triage of
169-
# the job that triaged, and `claude-intake-triage-status` reads them all and goes red
170-
# when the triage or its write failed. Never make that check required.
171-
# `claude-intake-triage-skipped` runs only when the author gate skipped the
172-
# key-credit job, and with it every leg.
163+
# `Claude` triages on the API key; after it hands off (a credit stop, or the
164+
# key refused with API status 401 or 402) or with no key, or in its place
165+
# when `Check Key Credit` finds the key's last credit stop inside the window,
166+
# `Subscription` triages on the subscription token instead; after that job
167+
# hands off, `Fallback` triages on the fallback token. `Apply` applies the
168+
# triage of the job that triaged, and `Status` reads them all and goes red
169+
# when the triage or its write failed; its check is
170+
# `<caller job name> / Status`. Never make that check required. `Skipped`
171+
# runs only when the author gate skipped the key-credit job, and with it
172+
# every leg.
173173

174174
on:
175175
workflow_call:
@@ -340,7 +340,7 @@ on:
340340
FALLBACK_CLAUDE_CODE_OAUTH_TOKEN:
341341
description: >-
342342
The central fallback subscription's OAuth token, the org secret of
343-
that name, used only by the claude-intake-triage-fallback job after
343+
that name, used only by the Fallback job after
344344
the subscription job hands off (a limit stop, a credit stop, or a
345345
401 or 402). Empty, the lane runs as with two legs.
346346
required: false
@@ -363,7 +363,7 @@ jobs:
363363
# actor's id is listed the same way. Any other event passes so the leg
364364
# job's first step can reject it loudly.
365365
check-key-credit:
366-
name: claude-intake-triage-key-credit
366+
name: Check Key Credit
367367
if: >-
368368
${{ (github.event_name != 'issues' && github.event_name != 'workflow_dispatch')
369369
|| (github.event_name == 'workflow_dispatch'
@@ -434,7 +434,7 @@ jobs:
434434
tokens: github-token
435435

436436
claude:
437-
name: claude-intake-triage
437+
name: Claude
438438
needs: check-key-credit
439439
runs-on: ${{ inputs.runner }}
440440
# The triage step (12 minutes, CLI install included) and runner isolation
@@ -1217,7 +1217,7 @@ jobs:
12171217
# or cancelled claude job never starts it. It does not use
12181218
# inputs.runner: a caller's runner could keep state between jobs.
12191219
subscription:
1220-
name: claude-intake-triage-subscription
1220+
name: Subscription
12211221
needs: [check-key-credit, claude]
12221222
if: >-
12231223
${{ !cancelled()
@@ -1959,7 +1959,7 @@ jobs:
19591959
# left to success(): a claude job the key-credit gate skipped would skip
19601960
# this one too.
19611961
fallback:
1962-
name: claude-intake-triage-fallback
1962+
name: Fallback
19631963
needs: [claude, subscription]
19641964
if: >-
19651965
${{ !cancelled() && needs.subscription.result == 'success'
@@ -2701,7 +2701,7 @@ jobs:
27012701
# It runs once a leg ran: the claude job, or the subscription job when the
27022702
# key-credit gate skipped the claude job.
27032703
apply:
2704-
name: claude-intake-triage-apply
2704+
name: Apply
27052705
needs: [claude, subscription, fallback]
27062706
if: always() && (needs.claude.result != 'skipped' || needs.subscription.result != 'skipped')
27072707
runs-on: ubuntu-24.04
@@ -3178,7 +3178,7 @@ jobs:
31783178
# through env and is checked against a closed set before it is printed or
31793179
# written.
31803180
status:
3181-
name: claude-intake-triage-status
3181+
name: Status
31823182
needs: [claude, subscription, fallback, apply]
31833183
if: always() && (needs.claude.result != 'skipped' || needs.subscription.result != 'skipped')
31843184
runs-on: ${{ inputs.runner }}
@@ -3266,7 +3266,7 @@ jobs:
32663266
# The check-key-credit job's if is the author gate, so on an opened issue
32673267
# or a dispatch it is skipped exactly when the gate turned the run away.
32683268
skipped:
3269-
name: claude-intake-triage-skipped
3269+
name: Skipped
32703270
needs: check-key-credit
32713271
if: >-
32723272
${{ always() && needs.check-key-credit.result == 'skipped'

‎.github/workflows/maintenance-check-links-online.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ permissions: {}
8585

8686
jobs:
8787
check-links:
88-
name: check-links
88+
name: Check Links
8989
runs-on: ${{ inputs.runner }}
9090
timeout-minutes: ${{ inputs.timeout-minutes }}
9191
permissions:

‎.github/workflows/maintenance-sync-standards.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ concurrency:
6060

6161
jobs:
6262
plan:
63+
name: Plan
6364
runs-on: ${{ inputs.runner }}
6465
timeout-minutes: 15
6566
permissions:
@@ -147,6 +148,7 @@ jobs:
147148
--targets "$TARGETS"
148149
149150
attest:
151+
name: Attest
150152
needs: plan
151153
if: ${{ !inputs.dry-run }}
152154
environment:
@@ -389,6 +391,7 @@ jobs:
389391
core.info(`Attested ${expectedSet.size - missing.length} of ${expectedSet.size} manifest targets for ${expectedSlug} (${excess.length} over-granted).`);
390392
391393
sync:
394+
name: Sync (${{ matrix.repo }})
392395
needs: [plan, attest]
393396
if: ${{ !inputs.dry-run }}
394397
environment:

0 commit comments

Comments
 (0)