Skip to content

Commit ad32da9

Browse files
fix(ci): repair dogfood-gate.yml — the workflow has never run (#48)
This workflow is **invalid YAML**, so GitHub refuses it at parse time. It produces **no run, no check-run, no annotation and no log** — not a red X, an **absence**. Nothing on a dashboard distinguishes *"this gate passed"* from *"this gate does not exist"*. The tell: the Actions API reports the workflow's `name` as its **file path** instead of its `name:` — GitHub registers a file it cannot parse under its path. ``` name = ".github/workflows/dogfood-gate.yml" path = ".github/workflows/dogfood-gate.yml" <- name == path ``` ## Cause The embedded `python3 -c "` body starts at **column 0**: ```yaml run: | python3 -c " import tomllib, sys # <- column 0 ends the block scalar ``` A `run: |` literal block ends at the first non-empty line indented *less* than the block. The Python terminates it, and YAML then tries to parse `import tomllib, sys` as a mapping key — *"could not find expected `:`"*. ## Fix Indent the embedded body and its closing quote to the block indent. **YAML strips that indent again when parsing**, so the shell and the interpreter still receive the code at column 0. The content is unchanged; only the YAML framing differs. ## Verified, not assumed - the file parses and yields a `jobs:` mapping - `bash -n` passes on the reconstructed run block - the resulting `run:` value is **byte-identical** to the same workflow in repos where it already parses (e.g. `bofig`) — this reproduces the known-good form rather than inventing one - **exactly one file changed** ## Scope Measured estate-wide: **211 invalid workflow files across 116 repos**, confirmed by the Actions API. `dogfood-gate.yml` accounts for **71** of them. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 457d1f7 commit ad32da9

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

.github/workflows/dogfood-gate.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -258,26 +258,26 @@ jobs:
258258
259259
# Validate TOML structure using Python 3.11+ tomllib
260260
python3 -c "
261-
import tomllib, sys
262-
with open('eclexiaiser.toml', 'rb') as f:
263-
data = tomllib.load(f)
264-
project = data.get('project', {})
265-
if not project.get('name', '').strip():
266-
print('ERROR: project.name is required', file=sys.stderr)
267-
sys.exit(1)
268-
functions = data.get('functions', [])
269-
if not functions:
270-
print('ERROR: at least one [[functions]] entry is required', file=sys.stderr)
271-
sys.exit(1)
272-
for fn in functions:
273-
if not fn.get('name', '').strip():
274-
print('ERROR: function name cannot be empty', file=sys.stderr)
275-
sys.exit(1)
276-
if not fn.get('source', '').strip():
277-
print(f'ERROR: function {fn[\"name\"]} has no source path', file=sys.stderr)
278-
sys.exit(1)
279-
print(f'Valid: {project[\"name\"]} ({len(functions)} function(s))')
280-
" || {
261+
import tomllib, sys
262+
with open('eclexiaiser.toml', 'rb') as f:
263+
data = tomllib.load(f)
264+
project = data.get('project', {})
265+
if not project.get('name', '').strip():
266+
print('ERROR: project.name is required', file=sys.stderr)
267+
sys.exit(1)
268+
functions = data.get('functions', [])
269+
if not functions:
270+
print('ERROR: at least one [[functions]] entry is required', file=sys.stderr)
271+
sys.exit(1)
272+
for fn in functions:
273+
if not fn.get('name', '').strip():
274+
print('ERROR: function name cannot be empty', file=sys.stderr)
275+
sys.exit(1)
276+
if not fn.get('source', '').strip():
277+
print(f'ERROR: function {fn[\"name\"]} has no source path', file=sys.stderr)
278+
sys.exit(1)
279+
print(f'Valid: {project[\"name\"]} ({len(functions)} function(s))')
280+
" || {
281281
echo "::error file=eclexiaiser.toml::Invalid eclexiaiser.toml — see step output for details"
282282
exit 1
283283
}

0 commit comments

Comments
 (0)