Commit f594e70
tooling(pm): render a value-bearing CI invocation instead of falling back to a bare key (#15114)
`dispatch-gates` keyed the argv half of `(script, args)` only when the tail was
a complete run of flag-shaped tokens. Every other invocation kept a BARE path
key — and for nine scripts that bare key is an invocation CI never makes.
Measured on this tree: `node scripts/check-test-completeness.mjs` exits 3 with
`PREREQUISITE NOT MET`; `check-required-contexts` runs the static pin check
while `required-set-patrol.yml` runs `--verify-required-set`; the three
`--base` gates answer against their default base while CI pins the merge base
or the cut snapshot.
Each argv token is now classified from the workflow text as a LITERAL (verbatim
in the workflow, same on every run) or a VARIABLE (`${{ … }}`, a shell
expansion, a step output). An all-literal invocation renders in full and enters
`--commands`; one carrying a variable renders with the variable's own name in
the value position, is marked NOT RUNNABLE LOCALLY on its own labelled line
under its own heading, and is kept out of `--commands`, out of the pasted block
and out of the published harvest — the same treatment `ciOnly` already gets,
reached by a different measurement. No per-script declaration table: the split
reads off the workflow for all fifteen live invocations.
Two mechanisms make the classification possible. `joinLineContinuations`
splices a continued command into one line before any matcher runs, so the tail
is the WHOLE argv rather than the first physical line of it (comments are never
joined — a `#` runs to the newline, so its backslash is comment text).
`tailBeforeRedirection` drops a redirection's file descriptor, which `2>&1` had
been leaving on the argv side of the boundary.
Measured, before -> after over the tracked tree:
check families discovered 240 -> 249 (+9, ZERO lost)
watch-hint (gate, file) pairs 1499 -> 1528 (+29, ZERO lost)
re-attributed 0 — every surviving family keeps its exact
workflow set and hint count
Beyond the nine the card named, the same sweep at this commit finds
`scripts/pm/check-half-states.mjs` (a tenth member: `half-state-patrol.yml`
runs it `--format=markdown --provenance="$PROVENANCE"` and nowhere else), and
`check-release-section-coverage.mjs --strict` — a second invocation in
`release-coverage-patrol.yml` that had no entry of its own because a
continuation hid it.
Self-test: 1338 cases pass. Two cases that pinned the retired refusal are
rewritten on the same fixtures to the new expectation; four that named a bare
key now name the script or the keyed invocation. New cases pin one literal
kind, one variable kind, the bare-invocation control, the tokenizer, the
continuation join and the live class read from the real workflows.
`scripts/pm/bare-root-worklist.mjs` records the verdict rows this re-keying
owes, per that script's own printed remedy: three rows for the retired bare
`check-adr-0087-registration` key are deleted and six second-key twins recorded
in their place, one per workflow invocation. Verdict and spelling carried
whole; no count restated, because this pass measured none.
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
Co-authored-by: Claude <noreply@anthropic.com>1 parent 97a2263 commit f594e70
2 files changed
Lines changed: 599 additions & 117 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | 815 | | |
833 | 816 | | |
834 | 817 | | |
| |||
900 | 883 | | |
901 | 884 | | |
902 | 885 | | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
903 | 947 | | |
904 | 948 | | |
905 | 949 | | |
| |||
0 commit comments