Repository navigation
Conversation
check_run_syntax ran bash -n on each run: script, and its own docstring
said what that misses: a `docker run ... bash -c '...'` script is one
string to the outer shell, so an error inside it was not seen unless it
broke the outer quoting. (The apostrophe that broke run 37253683063 did
break the outer quoting, and main's gate already reports it; an unclosed
`if` or a stray `fi` inside the string it does not.)
Once the outer script parses, each single-quoted `bash -c '...'` and
`sh -c '...'` argument is now read out the way the outer shell reads it
-- '\'' is a quote, a splice of an outer value ('"$PART"', '$X') is one
word -- and parsed with bash -n / sh -n. A closing quote glued to
anything else, and a quote that never closes, are "cannot tell" (exit
2), not clean. Double-quoted bash -c "..." is not read: the outer shell
expands it first.
Measured on main's 122 workflows: 24 such scripts, 8 of them with
'"$VAR"' splices, all 24 parse. The self-test plants 12 new cases
(75 of 75 pass); main's gate run against the new cases fails the 7 that
expect a non-zero exit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… gate check_run_syntax.py read .github/workflows/*.yml only, so a run step inside a composite action (.github/actions/**/action.yml, as #852 adds) could fail to parse and the gate would pass. Closes #854. - Composite actions are read like workflows: bash -n per shell, and the single-quoted bash -c scripts inside a step, via a shared check_run(). - A composite run step must name its shell; one that does not is cannot tell (rc 2), as GitHub itself rejects it. - The runner is the caller's: every job that uses the action, directly or through other local actions (cycles end). A macOS-possible caller under a gate whose bash is not 3.x is cannot tell, as for workflow steps. - An action no workflow calls is still parsed. Node and Docker actions have no run steps and are skipped. Self-test 98 of 98 (23 new cases); 17 of 18 mutants of the new code are killed, the survivor is equivalent. On #852's tree the gate reads 1 of 1 actions and catches an unclosed quote planted in its last step, which the gate at 54020cd passes. .github/actions/** is not added to the gate's paths: here: no tracked file matches it on main yet, and the workflow-path gate rejects that entry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The note said .github/actions/ is not watched by this workflow's paths: until a tracked file exists there. #852 creates the directory and is the PR that adds the entry, so the note would be wrong on whichever of the two merges second. The reason stays in #894's description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The note said .github/actions/ is not watched by this workflow's paths: until a tracked file exists there. #852 creates the directory and is the PR that adds the entry, so the note would be wrong on whichever of the two merges second. The reason stays in #894's description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The openxc7-chipdb action is called by 46 workflows, and every one of them filters push on its own design files only, with no pull_request trigger. A change to .github/actions/openxc7-chipdb/ alone therefore ran nothing, on the PR or on main. Measured on this branch with a paths-coverage script: 46 of 46 triggers did not cover the action. - ax7203-led-onehot.yml (the smallest design, one seed) now runs on a PR that touches the action, and on a push to main that does, so main also warms the cache for a new key. - run-syntax-gate.yml watches .github/actions/**, which this PR creates; the gate reads composite actions once #894 lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
X Brain Health CheckScore: 100.0/100 X Brain is above merge threshold |
🧪 Brain Stress Test ResultsScore: not measured (no stress test prints a Score: line) X Stress test passed |
ef19f75 to
b335f27
Compare
The openxc7-chipdb action is called by 46 workflows, and every one of them filters push on its own design files only, with no pull_request trigger. A change to .github/actions/openxc7-chipdb/ alone therefore ran nothing, on the PR or on main. Measured on this branch with a paths-coverage script: 46 of 46 triggers did not cover the action. - ax7203-led-onehot.yml (the smallest design, one seed) now runs on a PR that touches the action, and on a push to main that does, so main also warms the cache for a new key. - run-syntax-gate.yml watches .github/actions/**, which this PR creates; the gate reads composite actions once #894 lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary by t27-beesThe PR extends the run-syntax gate to also parse Worth a look
Read: 3 files, +326 -12, the whole diff. Head |
Closes #854. Stacked on #893 — merge #893 first; until then this diff also shows #893's commit (54020cd).
What was wrong
tools/check_run_syntax.pyglobbed.github/workflows/*.yml|yamland nothing else. #852 adds the repo's first composite action (.github/actions/openxc7-chipdb/action.yml), called by 53 jobs, and a run step in it that does not parse would have passed the gate.What changes
.github/actions/**(action.ymloraction.yaml, any depth) are read like workflows:bash -nper shell, plus the single-quotedbash -c '...'scripts inside each step, through onecheck_run()shared with workflow steps.run:step must nameshell:(GitHub requires it there; there are no job or workflow defaults in an action). One that does not is cannot tell, rc 2.uses:the action directly or through other local actions; a cycle of actions ends. A macOS-possible caller under a gate whose bash is not 3.x is cannot tell, the same rule as for workflow steps.run:steps and are skipped.workflows read: X of Y; actions read: A of B (U with no caller here); ....Measured
has_actions = Trueis equivalent (rglobof a missing directory is empty)"planted in the action's last stepopenxc7-chipdbon #852's treeubuntu-22.04/ubuntu-latest, 0 macOS-possibleMutants killed: no action glob · one-level glob ·
action.ymlonly · no macOS caller check · macOS callers never found · no transitive callers · no cycle guard (RecursionError) · no shell requirement · uncalled actions skipped · trailing/kept inuses:· every action treated as composite · four cannot-tell returns turned into skips · action findings dropped · action cannot-tells dropped.The laptop's bash is 3.2, so the macOS-caller cases in the one-tree list expect rc 1 there and rc 2 on CI (bash 5); four direct cases pin the bash 5 answer on any machine.
Not changed here
.github/actions/**is not added to this gate'spaths:: no tracked file matches it on main yet, and the workflow-path gate rejects that entry (measured:audit_workflow_paths.pyrc 1 with it, rc 0 without). It is added in fix(ci): key the chipdb cache on the openXC7 image so it can hit #852 (0c5f415), which creates the directory. The same commit makesax7203-led-onehot.ymlrun when the action changes: none of the action's 46 calling workflows watched.github/actions/, so an action-only change ran nothing.doc-refs,orphan-artefacts, andgates-can-fail(which cannot test those two while they already fail on a clean tree). fix(gates): green doc-refs and orphan-artefacts on main after #510 #872 fixes the first two.Not measured
tools/check_tee_pipefail.py) still reads workflows only. In a composite actionshell: bashalready carries-o pipefail, so the gap isshell: shor a custombash {0}with| tee; no action in any tree here has one. Not fixed in this PR.🤖 Generated with Claude Code