Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

Commit 54a2fb7

Browse files
committed
fix(types): correct two claims the filter-builder pin makes about itself
objectui#9073 items 2 and 3, both in the same file as item 1. The floor test's `logic` control named a mode it cannot catch: "a reader that stopped at the first line of a multi-line union". `logic` is itself a single-line union, so a first-line-only reader reads it correctly and that leg stays green. Measured by mutating the reader into a line-bounded one — six tests redden, and every one of them through the zero-members throw raised out of `documentedTypes()`, not through this control. The docblock now names that mechanism and says plainly what the control does not cover. The equality pin's message offered its exception as "a spelling a LATER ruling RETIRED from this doc", citing objectui#4814. That retirement is 2026-08-16/17 and batch #88 is 2026-09-02, so it PREDATES the batch. The exception never depended on the order: it now reads "ANY ruling". ⛔ No existing leg is weakened or removed, and no accept set moves. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UzHd6hDYatoDn17BuwKxnZ
1 parent 234f96b commit 54a2fb7

2 files changed

Lines changed: 32 additions & 6 deletions

File tree

‎.changeset/9073-doc-union-members-comment-order.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,12 @@ never in the surface it reads. One existing throw branch changes outcome — a u
2828
only `;` lives in a comment is now `is unterminated` (loud) rather than a silently
2929
truncated set; the throw's wording is unchanged and the two throws the floor test pins
3030
are unaffected.
31+
32+
The card's other two items land in the same file. The floor test's `logic` control
33+
claimed to catch "a reader that stopped at the first line of a multi-line union"; it
34+
cannot, because `logic` is itself single-line — measured by mutating the reader into a
35+
line-bounded one, where that leg stays green and what actually reddens is the
36+
zero-members throw out of `documentedTypes()`. The docblock now names that mechanism.
37+
And the equality pin's message offered its exception as "a LATER ruling", citing
38+
objectui#4814 (2026-08-16/17), which PREDATES batch #88 (2026-09-02); it now reads
39+
"ANY ruling", which is what the exception meant.

‎packages/types/src/__tests__/filter-builder-mirror-6939.test.ts‎

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,11 +450,17 @@ describe('objectui#6939 — the type vocabulary', () => {
450450
const documented = documentedTypes();
451451
expect(
452452
documented.filter((t) => !declared.includes(t)),
453+
// ⚠️ This message used to say "a LATER ruling", which is wrong about the
454+
// example it cites and was corrected in objectui#9073: objectui#4814
455+
// retired `owner` on 2026-08-16/17, and batch #88 is 2026-09-02 — so the
456+
// retirement PREDATES the batch it was offered as an exception to. The
457+
// exception does not depend on the order anyway: a spelling ANY ruling
458+
// has retired does not come back through the doc.
453459
`the published doc offers \`type\` members this mirror refuses. Under decision ` +
454460
`batch #88 the DOC is the authority and the MIRROR follows — widen ` +
455461
`FilterFieldSchema.type and FilterField['type'] to match, as its own reviewable ` +
456462
`change. ⛔ Do NOT narrow ${DOC} to match the mirror. The one exception to ` +
457-
`"the mirror follows": a spelling a LATER ruling RETIRED from this doc — the ` +
463+
`"the mirror follows": a spelling ANY ruling RETIRED from this doc — the ` +
458464
`way objectui#4814 retired \`owner\` — reappearing in it is a doc REGRESSION, ` +
459465
`not a widening, and the doc edit is what gets reverted.`,
460466
).toEqual([]);
@@ -484,11 +490,22 @@ describe('objectui#6939 — the type vocabulary', () => {
484490
const doc = publishedDoc();
485491
// (1) CONTROL — the same reader, the same file, a DIFFERENT block whose
486492
// answer is fixed by the ruling at exactly two members. It can fire in
487-
// the region under test: a reader that matched nothing, matched the
488-
// wrong interface, or stopped at the first line of a multi-line union
489-
// returns something that is not `['and','or']`, and this reddens. And
490-
// it is independent of the `type?:` block it vouches for, so the thing
491-
// being measured cannot be what satisfies it.
493+
// the region under test: a reader that matched nothing, or matched the
494+
// wrong interface, returns something that is not `['and','or']`, and
495+
// this reddens. And it is independent of the `type?:` block it vouches
496+
// for, so the thing being measured cannot be what satisfies it.
497+
// ⛔ One mode this control does NOT cover, corrected in objectui#9073
498+
// after it was claimed here: a reader that stops at the FIRST LINE of a
499+
// multi-line union. `logic` is itself single-line, so such a reader
500+
// reads it correctly and this leg stays green.
501+
// That mode IS covered — measured, by mutating this reader into a
502+
// line-bounded one: `type?:` then parses to zero members, the
503+
// zero-members throw fires out of `documentedTypes()`, and six tests in
504+
// this file redden, this one among them at leg (2) rather than here.
505+
// So the guard exists; it is the THROW below plus the equality pin, not
506+
// this control. ⚠️ A control that names a mode it cannot catch is the
507+
// same class of defect as the reader objectui#9073 repaired: a
508+
// confident claim that sends the next reader to the wrong place.
492509
expect(docUnionMembers(doc, 'FilterGroup', 'logic')).toEqual(['and', 'or']);
493510
// (2) The population itself is non-empty and duplicate-free — a duplicated
494511
// member would make the sorted-equality above pass on unequal sets.

0 commit comments

Comments
 (0)