Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Commit 3f775ee

Browse files
claude[bot]claude
andauthored
ci: declare the action reference convention and gate the odd one out (#8546)
* ci: declare the action reference convention and gate the odd one out objectui#8465. There were 13 distinct action references in .github/workflows/. Exactly one was spelled differently from the other twelve -- a commit SHA on actions/stale -- and it was the only reference in the repository that had never resolved: 236 scheduled runs of stale.yml since 2026-01-16, 0 successes, unnoticed for eight months because nothing downstream consumes that job. The finding is the sole instance, not the pinning. SHA pinning is normally the more secure spelling. What failed was one ref written in a form nothing else in the tree used, with no convention that would have made the odd one out visible and nothing verifying it. So this writes the convention down and makes it checkable: - The default spelling is a floating major tag, owner/action@vN -- what 12 of the 13 refs already were. No reference is changed by this commit, in either direction. - An exception is marked by an entry in DECLARED_EXCEPTIONS carrying the workflow, the action, the owning issue and a real reason. That is the only form an exception takes, and it is the part that was missing. - The gate goes red three ways: an undeclared off-convention ref, an exception matching nothing, and its own census collapsing. It checks spelling, not resolvability -- resolving a SHA needs the network. The offline half is what failed: no reason attached and no second instance to compare against. stale.yml's ref is declared as an exception owned by objectui#8126 rather than edited, so this gate is green on a tree it did not break without pre-empting what that card writes there. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr * ci: classify the new Action Ref Convention check for Dependabot auto-merge `dependabot-merge-gate.test.ts` requires the three buckets to partition every check a pull request produces, so a new gate has to be classified by a human instead of quietly shrinking the set the gate waits for. Action Ref Convention is a blocking check whose workflow subscribes `pull_request` with no trigger-level path filter, which is exactly what REQUIRED_CONTEXTS holds. Listing it there also puts it inside the `merge_group` subscription floor that `merge-queue-reporting.test.ts` derives from the same list -- the workflow already subscribes. It earns the slot rather than inheriting it: this gate reads .github/workflows/**, which is what a Dependabot `github-actions` bump edits, and those are the pull requests least likely to have a human reading each edited line. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr --------- Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 83d4fda commit 3f775ee

6 files changed

Lines changed: 771 additions & 0 deletions

File tree

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Action Ref Convention
2+
3+
# ── THE CONVENTION THIS REPOSITORY USES FOR ACTION REFERENCES ────────────────
4+
#
5+
# Default spelling: a floating major tag, `owner/action@vN`. Every `uses:` in
6+
# this directory is written that way.
7+
#
8+
# An exception is marked by an entry in `DECLARED_EXCEPTIONS` in
9+
# `scripts/check-action-ref-convention.mjs`, carrying the workflow file, the
10+
# action path, the issue that owns the decision, and a real reason. That is the
11+
# only form an exception takes. A trailing `# v9.0.0`-style comment beside a ref
12+
# is a version HINT, not a reason, and the gate does not read it as one.
13+
#
14+
# ── WHY IT IS WRITTEN DOWN, WHICH IS NOT THE SAME AS WHICH SPELLING IT PICKS ──
15+
#
16+
# objectui#8465. There were 13 distinct action references in this directory.
17+
# Exactly ONE was spelled differently from the other twelve — a commit SHA on
18+
# `actions/stale` — and it was the only reference in the repository that had
19+
# never resolved: 236 scheduled runs since 2026-01-16, 0 successes, every one
20+
# failing in `Set up job`, unnoticed for eight months because nothing downstream
21+
# consumes that job. The broken reference itself is objectui#8126.
22+
#
23+
# ⛔ The finding is the SOLE INSTANCE, not the pinning. SHA pinning is normally
24+
# the MORE secure spelling and supply-chain guidance recommends it. What failed
25+
# was one ref written in a form nothing else in the tree used, with no convention
26+
# that would have made the odd one out visible and nothing verifying it. A
27+
# floating tag that stops resolving is loud on the next run of every workflow
28+
# that uses it; a lone off-convention ref that never resolved is silent for as
29+
# long as nobody happens to look.
30+
#
31+
# ⛔ Do NOT read the default as a ruling against SHA pinning, and ⛔ do not
32+
# "unify" this directory in either direction under cover of this gate. Moving the
33+
# repository's pinning posture is a supply-chain decision and belongs on its own
34+
# card (objectui#8465 triage, 2026-09-08). The value of the convention is
35+
# independent of which spelling it names: once one exists, the next odd one out
36+
# is loud instead of visible-only-if-you-look.
37+
#
38+
# ── WHY THIS IS ITS OWN WORKFLOW ─────────────────────────────────────────────
39+
#
40+
# Same reason as `control-bytes.yml`, and its header says it at length: a change
41+
# that touches only `.github/workflows/**` runs nothing expensive in `ci.yml` or
42+
# `lint.yml`, so a gate living inside one of those would be least likely to run
43+
# on exactly the pull requests it exists to read. Dependabot opens
44+
# `github-actions` update pull requests monthly here, and
45+
# `dependabot-auto-merge.yml` can merge them — action refs are a surface that
46+
# changes without a human choosing each edit.
47+
#
48+
# It needs no install and no build — a checkout plus one `node` call over
49+
# `.github/workflows/`, a few seconds. Keep it that way.
50+
#
51+
# No `paths` and no `paths-ignore`, deliberately: the population it scans is this
52+
# directory, so a pull request that edits only this directory must start it.
53+
54+
on:
55+
pull_request:
56+
branches: [main, develop]
57+
push:
58+
branches: [main, develop]
59+
# Merge queue: this gate reports on a queue build so it can be required later
60+
# without stalling the queue. See `ci.yml`'s trigger block for the full note —
61+
# a required context that does not report on a queue build does not fail the
62+
# queue, it stalls it until the ruleset's 60-minute status-check timeout.
63+
merge_group:
64+
types: [checks_requested]
65+
workflow_dispatch:
66+
67+
concurrency:
68+
group: action-ref-convention-${{ github.event.pull_request.number || github.ref }}
69+
cancel-in-progress: true
70+
71+
permissions:
72+
contents: read
73+
74+
jobs:
75+
action-ref-convention:
76+
name: Action Ref Convention
77+
runs-on: ubuntu-latest
78+
timeout-minutes: 5
79+
80+
steps:
81+
- name: Checkout code
82+
uses: actions/checkout@v7
83+
84+
- name: Setup Node.js
85+
uses: actions/setup-node@v7
86+
with:
87+
node-version: '22.x'
88+
89+
# Reads `.github/workflows/` off the checkout, so no install is required.
90+
# The gate refuses to report a verdict at all if its own census collapses:
91+
# a scan that stops finding references renders identically to a clean
92+
# repository, which is the one way a check like this lies.
93+
- name: Check action reference spelling against the declared convention
94+
run: node scripts/check-action-ref-convention.mjs

‎content/docs/guide/ci-cd-pipeline.md‎

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ one has its own section below.
2828
| `changeset-guard.yml` | Changeset Bump Policy, Changeset Overwrite Report | PR / push touching `.changeset/**` or either gate itself | **Yes** — the bump policy job only; the overwrite job is report-only |
2929
| `changeset-presence.yml` | Changeset Declaration | PR to `main`, `develop` — **no path filter**; merge-queue builds | **Yes** — when a released package's `src/` changed and no changeset was added |
3030
| `control-bytes.yml` | Control Byte Scan | Push / PR to `main`, `develop` — **no path filter**; merge-queue builds; manual | **Yes** |
31+
| `action-ref-convention.yml` | Action Ref Convention | Push / PR to `main`, `develop` — **no path filter**; merge-queue builds; manual | **Yes** — when a `uses:` ref is not spelled as a floating major tag and is not a declared exception, when a declared exception matches nothing, or when the scan's own census collapses |
3132
| `docs-links.yml` | Internal Docs Link Check | Push / PR to `main`, `develop` — **no path filter**; merge-queue builds; manual | **Yes** |
3233
| `skills-paths.yml` | Skill Guide Path Check | Push / PR to `main`, `develop` — **no path filter**; merge-queue builds; manual | **Yes** — when a path stated in a `skills/` guide does not exist |
3334
| `skill-examples.yml` | Skill Example Check | Push / PR to `main`, `develop` — **no path filter**; merge-queue builds; manual | **Yes** — when a MARKED fenced example in a `skills/` or `.claude/skills/` guide no longer compiles against the packages' built types, no longer parses as JSON, uses a bare `any`, or carries a marker that opts nothing in |
@@ -381,6 +382,63 @@ skip-list: the scan fails on an entry whose file has been cleaned or deleted, so
381382
to remove its entry is as red as a new offender. Entries carry the issue tracking their removal
382383
(objectstack#5450) and the map is expected to reach empty and stay there.
383384

385+
## Action Ref Convention (`action-ref-convention.yml`)
386+
387+
**Triggers:** Push and PR to `main`/`develop`, merge-queue builds, plus manual dispatch — with **no
388+
path filter**, for the same reason `control-bytes.yml` has none: the population this gate scans *is*
389+
`.github/workflows/`, and a change touching only that directory runs nothing expensive in `ci.yml`
390+
or `lint.yml`. It appears in the checks list as **Action Ref Convention**.
391+
392+
Runs `scripts/check-action-ref-convention.mjs` — a checkout and one `node` call, no install.
393+
394+
### The convention
395+
396+
**Every `uses:` in `.github/workflows/**` is written as a floating major tag, `owner/action@vN`.**
397+
398+
**An exception is marked by an entry in `DECLARED_EXCEPTIONS`** in that script, carrying the
399+
workflow file, the action path, the issue that owns the decision, and a real reason. That is the
400+
only form an exception takes. A trailing `# v9.0.0`-style comment beside a ref is a version *hint*,
401+
not a reason, and the gate does not read it as one.
402+
403+
### Why it exists — the finding is the sole instance, not the pinning
404+
405+
[objectui#8465](https://github.com/objectstack-ai/objectui/issues/8465). There were 13 distinct
406+
action references in this directory. Exactly **one** was spelled differently from the other twelve —
407+
a commit SHA on `actions/stale` — and it was the only reference in the repository that had **never
408+
resolved**: 236 scheduled runs of `stale.yml` since 2026-01-16, **0 successes**, every one failing
409+
in `Set up job`, unnoticed for eight months because nothing downstream consumes that job. The broken
410+
reference itself is [objectui#8126](https://github.com/objectstack-ai/objectui/issues/8126).
411+
412+
This is **not** an argument that SHA pinning is wrong — it is normally the *more* secure spelling and
413+
supply-chain guidance recommends it. The failure was the *shape*: one ref written in a form nothing
414+
else in the tree used, with no convention that would have made the odd one out visible and nothing
415+
verifying it. A floating tag that stops resolving is loud on the next run of every workflow that uses
416+
it; a lone off-convention ref that never resolved is silent for as long as nobody happens to look.
417+
418+
So the default is the floating major tag because that is what the tree already was — 12 of 13, and
419+
the repository's one deliberately reasoned per-ref pin, `changesets/action@v1`, is itself a tag (held
420+
there by `scripts/__tests__/changeset-release-action-ref-pin.test.ts`). Declaring it moved no
421+
reference and closed no door. **Do not read it as a ruling against SHA pinning, and do not "unify"
422+
this directory in either direction under cover of this gate** — changing the repository's pinning
423+
posture is a supply-chain decision and belongs on its own card.
424+
425+
### What it does not do
426+
427+
It checks **spelling, not resolvability**. A SHA that points at no commit and one that points at a
428+
real commit are indistinguishable without the network. That is deliberate: what failed in #8465 was
429+
that the odd ref had no reason attached and no second instance to compare against, and both of those
430+
are checkable offline.
431+
432+
### The three ways it goes red
433+
434+
1. An off-convention ref with no entry in `DECLARED_EXCEPTIONS`.
435+
2. An entry in `DECLARED_EXCEPTIONS` that matches nothing any more — the same staleness check
436+
`KNOWN_OFFENDERS` and `DOCUMENTATION_EXEMPT` carry elsewhere in this repository, because an escape
437+
hatch nobody removes is how a baseline turns into a permanent skip-list.
438+
3. Its own census collapsing. A scan that stops finding references reports an empty offender list,
439+
which renders exactly like a clean repository, so the floors and a positive control
440+
(`actions/checkout` must be found) are asserted in the same run as the counts.
441+
384442
## Performance Budget (`performance-budget.yml`)
385443

386444
**Triggers:** Push and PR when changes touch `packages/`, `apps/console/`, or `pnpm-lock.yaml`.

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"check:node-esm-load": "node scripts/check-node-esm-load.mjs",
5353
"census:body-dialect": "node scripts/body-dialect-census.mjs",
5454
"check:control-bytes": "node scripts/check-control-bytes.mjs",
55+
"check:action-ref-convention": "node scripts/check-action-ref-convention.mjs",
5556
"check:published-dist": "node scripts/check-published-dist-tooling.mjs",
5657
"check:published-tsconfig-exclude": "node scripts/check-published-tsconfig-tooling-exclude.mjs",
5758
"check:spec-floors": "node scripts/check-spec-range-floors.mjs",

0 commit comments

Comments
 (0)