You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0d8bac2
Browse filesBrowse the repository at this point in the historyBrowse files
fix(docs-audit): withhold the check-glyph when no page names the derived anchors (#11828)
The docs-drift headline ended in a green tick whenever anchors were derived,
nothing went unanchored, and no hand-written page named any of them. That
sentence reports the NAMING RELATION, and the relation only ever lists a page
that ALREADY names a changed token -- so a PR that widens an enumerable
vocabulary is invisible to it by construction: the new members' absence from
the page is precisely the defect, and an absence names nothing.
Measured on a real PR: six new flow-expression functions derived 9 anchors,
matched 0 pages, rendered the tick -- while the flows page carried a binding
table the same PR had just made incomplete.
The verdict now states only what the run measured and leaves the clean-bill
glyph to a run that earned one. It does NOT catch that class; nothing in the
anchor model can. It stops the run from claiming it did.
check-drift-comment.mjs pins the new verdict byte-exact on that state and
pins it ABSENT on all four neighbouring states, so a notice that started
rendering everywhere would fail there.
Claude-Session: https://claude.ai/code/session_015ahemw8RcTgqtxrj15PEZx
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .github/workflows/docs-drift-check.yml
+28-1Lines changed: 28 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,13 @@ name: Docs Drift Check
25
25
# on one day (#11180, #11262). The fold was right and stays; what changed is that a run
26
26
# with an unanchored file now says so where a reviewer reads it, and withholds its ✅.
27
27
#
28
+
# Since #11356 the ✅ is withheld from the last arm that carried it: "N anchor(s) derived,
29
+
# no hand-written page names any of them". That sentence reports the NAMING RELATION, and
30
+
# a page is listed only when it already names a changed token — so a PR that widens an
31
+
# enumerable vocabulary (a function table, an allowed-value set) is structurally invisible
32
+
# to it, because the new members' absence from the page is precisely the defect. ⚠️ The
33
+
# narrowing does NOT catch that class; it stops the run from claiming it did.
34
+
#
28
35
# And since #9519 it states WHICH TREE it read. On `pull_request`, actions/checkout gives
29
36
# the MERGE of base and head, so the row set is a fact about a commit that exists on no
30
37
# branch a reader can name — while the comment's own re-derivation command sent them to
@@ -303,11 +310,31 @@ jobs:
303
310
// ⛔ The ✅ is DROPPED whenever a file went unanchored, deliberately: a green
304
311
// tick is the clean-bill glyph, and "no page names the anchors I derived" is
305
312
// not a clean bill when some of the diff derived no anchor to name.
313
+
//
314
+
// ⛔ And since #11356 the ✅ is gone from this arm ENTIRELY — including the run
315
+
// where nothing went unanchored, which is where it used to live. "No page names
316
+
// the anchors I derived" is a fact about the NAMING RELATION, not about the
317
+
// docs: a page is listed because it ALREADY names a changed token, so a change
318
+
// that WIDENS an enumerable vocabulary can never be caught here — the new
319
+
// members' absence from the page IS the defect, and an absence names nothing.
320
+
// Measured on #11347 (six new flow-expression functions): 9 anchors derived, 0
321
+
// pages named them, ✅ — while `content/docs/automation/flows.mdx` carried a
322
+
// table enumerating the available bindings that the PR had just made
323
+
// incomplete, and a reviewing seat almost passed the PR on that tick.
324
+
//
325
+
// ⚠️ This does NOT catch that class, and must not be read as doing so. Nothing
326
+
// in the anchor model can (three in-model routes were measured to fail on the
327
+
// one real instance; the authoring-mark route that would catch it is escalated
328
+
// as #11817). What it stops is the run CLAIMING it did: the verdict now says
329
+
// only what it measured — anchors were derived, no page named them — and leaves
330
+
// the clean-bill glyph to a run that earned one.
306
331
const headline = anchorList.length === 0
307
332
? (anchorless.length
308
333
? `${notCovered} Nothing else in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from **${pkgs.length}** changed package(s)).`
309
334
: `Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from **${pkgs.length}** changed package(s)), so **this run has no opinion** about the docs.`)
310
-
: `**${anchorList.length}** anchor(s) derived from **${pkgs.length}** changed package(s); no hand-written page names any of them.${anchorless.length ? ` ${notCovered}` : ' ✅'}`;
335
+
: (anchorless.length
336
+
? `**${anchorList.length}** anchor(s) derived from **${pkgs.length}** changed package(s); no hand-written page names any of them. ${notCovered}`
337
+
: `**${anchorList.length}** anchor(s) derived from **${pkgs.length}** changed package(s); no hand-written page names any of them, so this run has **nothing to list** — **not a clean bill of health**. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run.`);
311
338
// The tree identity is rendered here only when anchors WERE derived: that
312
339
// is the run with an opinion ("no page names any of them"), and a reader
313
340
// whose own tree does yield a row is owed the reason. With no anchors the
change: {'content/docs/guide.mdx': `${NAMES_NOTHING}\nOne more line.\n`},
246
275
want: {anchors: 0,anchorless: [],docs: 0},
276
+
narrowed: false,
247
277
expect: (headline)=>{
248
278
check('no-package-change','the original headline is preserved byte-for-byte',true,
249
279
headline==='Nothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from **0** changed package(s)), so **this run has no opinion** about the docs.');
@@ -275,6 +305,11 @@ try {
275
305
check(c.id,'the comment keeps its heading','### 📓 Docs Drift Check',lines[1]);
0 commit comments