Commit 3d18877
fix(pm): the dispatch-gates exclusion vocabulary recognises DEFERRED, so a deferred table stops deriving as a scan surface (#19308)
Fixes #19260
Clause-②: no
`EXCLUSION_DECL_NAME` in `scripts/pm/dispatch-gates.mjs` listed no
`DEFERRED`, while
`scripts/check-issue-citations.mjs` declares its exclusion table under
exactly that word —
`DEFERRED_SURFACES` / `DEFERRED_GLOBS` — and applies it as an exclusion:
`surfaceFor` opens by
returning `null` for every deferred glob. So the derivation read an
**exclusion** table as a
**scan** surface, and a `.changeset/**` path was told it triggers a gate
that looks at nothing
there. That derivation is the one PR #19259 (card #18224) trips on, and
the assertion it reds —
「a changeset path alone reaches NO value-bearing family any more」 — is
correct and is untouched
here.
One `DEFERRED` branch in the predicate; the measured census in the
docblock above it re-measured
and rewritten in the same stroke; one self-test case beside the existing
named-spelling cases.
⛔ Nothing is renamed in `check-issue-citations.mjs` —
`DEFERRED_SURFACES` and `DEFERRED_GLOBS`
are exported and pinned by that gate's own self-test, and this docblock
says the fix belongs on
the derivation side: 「an author's next spelling should be met by this
predicate rather than by a
rediscovery of this card」.
## Acceptance notes
### Firing pair, both directions, on PR #19259's head
The script derives from the tree it LIVES in — `ROOT` comes from
`import.meta.url`, and
`trackedFiles()` reads that root — so a `cwd` does **not** redirect it
at another tree. The fixed
file was therefore copied into a detached worktree of PR #19259's head
(`6d1272b3850e5c0e756745dc6486d20aa330653d`, blob `5d78406d6` before,
`8216826a5` while mutated)
and run from there; the probe was restored with `git checkout HEAD --
scripts/pm/dispatch-gates.mjs`
back to blob `5d78406d6`, `git diff HEAD` empty.
`.changeset/test-abc.md` did not need to exist.
| probe tree `6d1272b385` | `--commands` lines | `pnpm
check:issue-citations` rows |
|---|---|---|
| subject `.changeset/test-abc.md`, before | 19 | **1** |
| subject `.changeset/test-abc.md`, after | 18 | **0** |
| control `packages/types/src/index.ts`, before | 44 | **1** |
| control `packages/types/src/index.ts`, after | 44 | **1** |
The subject's two command lists differ on exactly one line — `diff`
reports hunk `13d12`, deleting
the `pnpm check:issue-citations` line and nothing else —
the control's two lists are byte-identical. Command: `node
scripts/pm/dispatch-gates.mjs --commands
--repo objectstack-ai/objectstack PATH`, exit 0 on all four runs.
### The census: the method it never stated, and what it now reads
The block named its method only in prose and named no command, so the
method is now spelled out in
the block itself: enumerate `topLevelDecls` over every tracked JS/TS
file under `scripts/`, keep the
non-callable declarations, test each name against the predicate, and
price the arm by diffing
`extractWatchHints` against a build of this module whose predicate
matches nothing. Attribution is
the regex engine's own — leftmost position first, then alternation order
(the old text said
"first-match attribution" without saying which of the two, and they
disagree on a multi-word name
such as `EXCLUDED_SKIP`).
Measured over the objectstack-ai/objectstack tree at `e6a03e6491`, with
the export-visibility of
six internal bindings as the only difference from the shipped file (a
throwaway copy, never
committed):
| reading | docblock before | re-measured, no `DEFERRED` | re-measured,
with `DEFERRED` |
|---|---|---|---|
| tracked JS/TS files under `scripts/` | 230 | 287 | 287 |
| top-level VALUE declarations | 3,513 | 4,697 | 4,697 |
| identifiers matching the predicate | 64 | 73 | **75** |
| of those, carrying a string literal | 58 | 65 | **66** |
| hints the set moves | 14 | 16 | **24** |
| files it moves them on | 6 | 7 | **8** |
| change no derivation / really leave one | 8 / 6 | — | **13 / 11** |
Per-word tally, same ordering as the block: `SKIP 54, EXCLUDED 10,
EXCLUSION 4, NOISE 2, SKIPPED 2,
DEFERRED 2, EXCLUSIONS 1, and EXCLUDE / EXCLUDES / IGNORE / IGNORED 0` —
four zero-scoring arms now,
not three, because `EXCLUDES` went 1 → 0 on its own. 1 parent 84a7e9e commit 3d18877
1 file changed
Lines changed: 64 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5886 | 5886 | | |
5887 | 5887 | | |
5888 | 5888 | | |
5889 | | - | |
5890 | | - | |
5891 | | - | |
5892 | | - | |
5893 | | - | |
| 5889 | + | |
| 5890 | + | |
| 5891 | + | |
| 5892 | + | |
| 5893 | + | |
| 5894 | + | |
| 5895 | + | |
| 5896 | + | |
| 5897 | + | |
| 5898 | + | |
| 5899 | + | |
| 5900 | + | |
| 5901 | + | |
| 5902 | + | |
5894 | 5903 | | |
5895 | 5904 | | |
5896 | | - | |
5897 | | - | |
| 5905 | + | |
| 5906 | + | |
| 5907 | + | |
5898 | 5908 | | |
5899 | | - | |
| 5909 | + | |
| 5910 | + | |
5900 | 5911 | | |
5901 | 5912 | | |
5902 | 5913 | | |
5903 | 5914 | | |
5904 | 5915 | | |
5905 | | - | |
5906 | | - | |
5907 | | - | |
5908 | | - | |
5909 | | - | |
5910 | | - | |
5911 | | - | |
5912 | | - | |
5913 | | - | |
5914 | | - | |
5915 | | - | |
5916 | | - | |
5917 | | - | |
5918 | | - | |
5919 | | - | |
5920 | | - | |
| 5916 | + | |
| 5917 | + | |
| 5918 | + | |
| 5919 | + | |
| 5920 | + | |
| 5921 | + | |
| 5922 | + | |
| 5923 | + | |
| 5924 | + | |
| 5925 | + | |
| 5926 | + | |
| 5927 | + | |
| 5928 | + | |
| 5929 | + | |
| 5930 | + | |
| 5931 | + | |
| 5932 | + | |
| 5933 | + | |
| 5934 | + | |
5921 | 5935 | | |
5922 | | - | |
| 5936 | + | |
5923 | 5937 | | |
5924 | | - | |
5925 | | - | |
5926 | | - | |
| 5938 | + | |
| 5939 | + | |
| 5940 | + | |
| 5941 | + | |
| 5942 | + | |
| 5943 | + | |
5927 | 5944 | | |
5928 | 5945 | | |
5929 | | - | |
| 5946 | + | |
| 5947 | + | |
| 5948 | + | |
| 5949 | + | |
| 5950 | + | |
5930 | 5951 | | |
5931 | 5952 | | |
5932 | 5953 | | |
5933 | 5954 | | |
5934 | 5955 | | |
5935 | 5956 | | |
5936 | | - | |
5937 | | - | |
5938 | | - | |
5939 | | - | |
| 5957 | + | |
| 5958 | + | |
| 5959 | + | |
| 5960 | + | |
| 5961 | + | |
| 5962 | + | |
| 5963 | + | |
5940 | 5964 | | |
5941 | 5965 | | |
5942 | 5966 | | |
| |||
5959 | 5983 | | |
5960 | 5984 | | |
5961 | 5985 | | |
5962 | | - | |
5963 | | - | |
5964 | | - | |
| 5986 | + | |
| 5987 | + | |
| 5988 | + | |
| 5989 | + | |
| 5990 | + | |
5965 | 5991 | | |
5966 | 5992 | | |
5967 | 5993 | | |
5968 | 5994 | | |
5969 | | - | |
| 5995 | + | |
5970 | 5996 | | |
5971 | 5997 | | |
5972 | 5998 | | |
| |||
17145 | 17171 | | |
17146 | 17172 | | |
17147 | 17173 | | |
17148 | | - | |
| 17174 | + | |
17149 | 17175 | | |
17150 | 17176 | | |
17151 | 17177 | | |
| |||
0 commit comments