Skip to content

Commit de70f6c

Browse files
committed
fix(ci): quote a workflow step name that YAML truncates at " #", add a guard
`.github/workflows/lint.yml` carried one `- name:` step name as an unquoted plain scalar containing ` #13419` -- YAML reads a space + hash inside an unquoted plain scalar as the start of a comment, so the step's real parsed name was the three-letter string `The`, not the text an author wrote. Quote the scalar so the full text stays part of the value. Add `check:workflow-step-name-quoting` (scripts/check-workflow-step-name-quoting.mjs), a grep-level guard wired as the last step of the `lint` job: an unquoted `- name:` value containing ` #` is a violation, using the criterion triage priced and the PM ruling confirmed (#15149) -- look only at the first non-blank character after `- name:`, and never judge "quoted" by stripping quote characters, which false-positives on a legal unquoted name carrying an embedded `"` (check-links.yml's real specimen, pinned as the guard's negative control). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GKcPZbMoGq7WPzKLfRBTU
1 parent cca1dc0 commit de70f6c

3 files changed

Lines changed: 504 additions & 1 deletion

File tree

‎.github/workflows/lint.yml‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ jobs:
743743
# production zero could equally be a scanner that stopped matching.
744744
# Invoked as `node` rather than `pnpm check:*`: see the GATE INVOCATION
745745
# IDIOM note at the top of this file. ~1s, no spawns.
746-
- name: The #13419 name-fold fixture has no non-test loader
746+
- name: 'The #13419 name-fold fixture has no non-test loader'
747747
run: |
748748
node scripts/check-position-name-fold-loaders.mjs --self-test
749749
node scripts/check-position-name-fold-loaders.mjs
@@ -4396,6 +4396,21 @@ jobs:
43964396
- name: Duration-shaped spec keys carry their unit in the key name
43974397
run: pnpm --filter @objectstack/spec check:duration-unit-keys
43984398

4399+
# #15149. Grep-level guard for the defect this very repo just shipped: an
4400+
# unquoted `- name:` step name containing ` #` is silently truncated by
4401+
# YAML at that point (a space + hash starts a comment inside a plain
4402+
# scalar), so the step's real parsed name is not the text an author
4403+
# wrote -- the CI log names the step something else entirely, and
4404+
# anything that resolves a step by its name text (scripts/pm/ci-failure.mjs)
4405+
# cannot find it. This repo names issue numbers in step names as a
4406+
# matter of style, so the shape is likely to recur. Deliberately NOT a
4407+
# YAML-parser-level name comparison -- see the header of
4408+
# scripts/check-workflow-step-name-quoting.mjs for why grep-level is
4409+
# sufficient (triage ruling, #15149). Reads .github/workflows/*.yml as
4410+
# plain text; no build, sub-second.
4411+
- name: 'Unquoted workflow step names do not silently truncate at " #" (#15149)'
4412+
run: pnpm check:workflow-step-name-quoting
4413+
43994414
# Lane 1 of 4 behind the required `TypeScript Type Check` context. The
44004415
# aggregator job at the bottom of this file explains the split, holds the
44014416
# contract, and is the thing the merge queue actually requires — read it

‎package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@
141141
"check:node-version": "node scripts/check-node-version.mjs",
142142
"check:pnpm-acquisition": "node scripts/check-pnpm-acquisition.mjs --self-test && node scripts/check-pnpm-acquisition.mjs",
143143
"check:workflow-status-functions": "node scripts/check-workflow-status-functions.mjs --self-test && node scripts/check-workflow-status-functions.mjs",
144+
"check:workflow-step-name-quoting": "node scripts/check-workflow-step-name-quoting.mjs --self-test && node scripts/check-workflow-step-name-quoting.mjs",
144145
"check:select-shard-packages": "bash scripts/ci/select-shard-packages.selftest.sh",
145146
"check:select-gate-families": "bash scripts/ci/select-gate-families.selftest.sh",
146147
"check:shard-attestation": "node scripts/check-shard-attestation.mjs --self-test && node scripts/check-shard-attestation.mjs",

0 commit comments

Comments
 (0)