Commit 53fc81f
tooling(pm): key the gate derivation on (script, args) and name the artifact-roster silences (#15081)
* wip: dispatch-gates derivation key (script, args)
* tooling(pm): derive one gate entry per workflow invocation, not per script path
`dispatch-gates` keyed a discovered family on the script PATH, so CI's two
invocations of one script collapsed into a single entry — and the entry kept
was the plain one, because the direct matcher captured the path and dropped the
argument tail. Measured on PR #14958: `lint.yml` runs
`node scripts/check-tenant-audit-census.mjs --self-test` beside the plain run,
the red was carried entirely by the `--self-test` invocation, and the derived
list named only the invocation that was already green. A dev following the list
verbatim could not see the failure mode at all.
The key is now (script, args). The argv half is admitted only when this tool can
render the invocation runnably — a complete run of flag-shaped tokens; a tail
carrying a value, or continued onto the next line, keeps the bare path key it
has today rather than being truncated into a command that cannot run.
Read from this tree's workflow text: 28 scripts in `lint.yml` are invoked more
than once under different argv, 41 across all workflow files, and every one of
them carried a `check-` basename and so collapsed. 204 discovered families
become 242; three `check-` scripts CI never invokes plainly lose a bare key
that named a command nobody runs.
Also: a `--self-test` invocation is never CI-measured-only. The payload-access
read that classification rests on is taken from the gate's work body, which a
self-test run does not execute, so suppressing it from `--commands` would hide
a command a dev can run.
And the usage line printed on the derivation-failure path moves `--residue`
inside the alternation, so it no longer advertises the `--tier --residue` pair
the CLI has refused since #14753.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
* tooling(pm): name the artifact-roster silences in their own block, beside the derivation
A family whose declared literals all name tracked FILES declares a roster — a
baseline, an allowlist of the members it already has — and never a population.
A list of the files that already exist can never contain one added tomorrow, so
this derivation scores those families `silent` for every card in the tree, and
no path a caller passes can move them. Two measured CI reds were carried by
exactly that shape: `check:optional-error-sink` on PR #14866 and
`check:error-code-provenance` on PR #14930, both invisible to a `--commands`
harvest by construction, for every card.
`artifactOnlyNote` already said all of this — per family, but only inside the
silent listing, which is behind a flag no dispatch brief tells anyone to pass.
The block says it where the default run shows it, and where `--commands` puts
every other accounting: on stderr, so the stream a consumer executes still
carries commands and nothing else.
Measured before building it, over the SILENT bucket for the diff of PR #14866:
32 of 120 silent families declare only tracked artifacts, 5 of them with the
roster sitting in a directory one of that card's paths is in. A minority, so
the block enumerates rather than only counting, and marks the correlated subset.
The block is never counted among the derived families and never merged into the
runnable list. That is structural, not a filter: rosters are `silent`, and
`commandsFor` reads only the matched, convention and always-runs rows.
It deliberately does NOT call these gates repo-wide scanners. Whether a roster
is a baseline sitting in a directory or a census taken of that directory is
intent, and intent is not in the tree — the two live side by side here. The
block states what is true of every member instead, and points at the
producer-side remedy the residue already carries: declare the scan surface
beside the roster.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
* tooling(pm): record the bare-root verdicts the second derivation key owes
The (script, args) split gives a gate CI invokes both plainly and with
`--self-test` two family keys, and `bare-root-worklist`'s rows are keyed on
`family constant word` — so nine rows landed FRESH in one edit without any gate
changing. Its self-test says so and names the remedy for a FRESH row: record a
verdict.
Recorded, one per new key, in a labelled section of their own. Each is the
twin of a row already carrying a decision about the identical literal, in the
identical file, under the identical constant, so the verdict and (where the
verdict requires one) the spelling transfer whole. No count is restated: the
map's own docblock bans carrying a sibling's numbers into a new row because two
rows are normally two populations measured at two times, and here they are one
population read through two keys — restating a figure would mint a reading this
pass never took.
The section also records the structural alternative and why it was not taken
here: keying the sweep's dedupe on the gate SOURCE FILE rather than on the
family would fold the twins, but it re-decides which family a surviving row is
attributed to and would strand the existing row as STALE — a redesign of this
file's keying, which is not what the FRESH remedy names.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019RfFHiRCSs3JXLK4cwcfox
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent e38da2b commit 53fc81f
2 files changed
Lines changed: 627 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 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 | + | |
850 | 939 | | |
851 | 940 | | |
852 | 941 | | |
| |||
0 commit comments