Repository navigation
Commit 8807206
fix(scripts): the objectui changeset digest reads a (breaking …) parenthetical inside a bold lead label (#23131)
Fixes #23118
Clause-②: no
## What changed
One file, `scripts/objectui-changeset-digest.mjs`:
- **`BREAKING_LEAD_LABEL`**, a new rule beside `BREAKING_BLOCK_OPENER`,
which stays byte-identical. A line reads breaking when all three hold:
- it opens with `**`, after optional indentation and an optional bullet
(`-`, `*`, `+`), so the label is the line's first token;
- the `(` sits inside that first bold span: nothing before it closes the
span, and the span closes on the same line;
- `breaking` is the parenthetical's first word, in any case.
- **`hasBreakingAnnotation`** tests the new rule on every line, not only
at a block start. A bullet opens a line without opening a block: `-
**Strict authoring face.** …` followed by `- **Tolerant face (breaking
for invalid documents).** …` is a real objectui shape.
- **`markBreaking` / `OPENS_WITH_BREAKING_LABEL`: unchanged, by
measurement.** See *Assumption 3* below.
- **Self-test:** a new battery, `#23118: a bold LEAD LABEL holding a
(breaking …) parenthetical`, with 16 cases and a floor of 16. The roster
floor goes from 17 to 18.
The rule follows triage's grade on the card: a bold span opening the
line, holding a parenthetical whose first word is `breaking`. A
`(breaking …)` anywhere else is prose, and so is a bold span that is not
the line's first token. The line-start opener rule from PR #23117 is
unchanged.
## Corpus reading
**Tree:** a blobless bare clone of `objectstack-ai/objectui`, with every
head (1143 refs) and every pull-request head (7169 refs); objectui
`main` at `45ae6b89e845`. Every blob ever written under
`.changeset/*.md` (README excluded) was read from each distinct
`.changeset` tree object and fetched in full: **6449 blobs over 4825
paths**. The heads-only subset is 5683 blobs; the earlier reading on the
decoration card had 5678 at `main` `5595aabca30b`. Each body was parsed
with the digest's own `parseChangeset` and judged with
`hasBreakingAnnotation`: the base at `f931e765b` (blob `afaae0663b1a`)
against this branch.
**Assumption 1 (reproduced on current `main`):** at `f931e765b`,
`hasBreakingAnnotation(parseChangeset(text).body)` returns `false` for
objectui `8a55f0ccd`'s `.changeset/12059-sidebar-no-reorder.md` (blob
`873e53f906`). The positive control, objectui#12242's changeset at
`1fb1ced36243`, returns `true`.
**Assumption 2, the split of the `(` blobs by position.** On the heads
corpus, "breaking" right after `(` occurs in 39 blobs / 23 paths. That
matches the earlier reading's 39 / 23 exactly, so it is the same set.
| position | heads | all refs |
|:--|--:|--:|
| inside a bold lead label that opens the line (**flips**) | 33 blobs /
18 paths | 39 blobs / 18 paths |
| anywhere else (prose, **no flip**) | 6 blobs / 5 paths | 6 blobs / 5
paths |
| **total** | **39 / 23** | **45 / 23** |
The 6 prose blobs are four shapes, and the rule leaves each of them
unflagged:
- a label that has already closed before the parenthetical: `**Behaviour
change on the console record page** (breaking in the objectui sense,`
(`5896-feeditem-single-constructor.md`, 2 blobs);
- an unbolded plain-text label: `Narrowed (breaking for an author who
wrote them, …` (`11168-element-family-inputs.md`,
`11168-action-family-published-inputs.md`, 1 blob each);
- an unbolded code-span label: `` `@object-ui/i18n` (BREAKING; `minor`
under this repository's release model …): ``
(`11674-shortcuts-dialog-wired-only.md`, 1 blob);
- mid-sentence prose: `This narrows the accepted documents (breaking for
a document of either shape).`
(`11717-dashboard-widget-chart-measure-arity.md`, 1 blob).
Two blobs of `6152-unmirrored-round4.md` carry both a lead label and a
wrapped prose line that opens with `(breaking for invalid documents).`.
They flip because of the label. The prose line on its own does not read
breaking: self-test case 4 pins that line.
**Flips (blobs whose verdict moves from not-breaking to breaking):**
- **39 blobs / 18 paths** over all refs; 33 / 18 on heads; 33 / 18
reachable from `main`.
- **Flips outside a lead label: 0.** Every flipped blob carries a line
the lead-label rule matches. The other two rules are byte-identical, so
no flip can come from them. Across the 39 blobs there are 41 matching
lines with 18 distinct texts, and each is a lead label. Examples:
``**`@object-ui/layout` (breaking, declared `minor` per the version
policy).**``, `**Narrowed (breaking).**`, ``**Retired (breaking),
`@object-ui/types`.**``, `**Accept-set change (breaking semantics,
released as minor by the version-alignment rule):**`.
- **Lost readings** (blobs the base reads as breaking and this branch
does not): **0** of 6449.
- **Shapes the corpus never uses, so the rule does not admit them:** a
lead label behind `__`, a heading mark, an ordered-list mark or a
pictograph; a lead-label span that crosses a line; a bold span holding
`(breaking` that is not the line's first token. Each has 0 occurrences.
**Assumption 3 (`markBreaking`), measured on the 39 flipped blobs:**
none of them opens its summary (the first paragraph) with the lead
label. So the `**BREAKING** — ` stamp lands on an ordinary summary in
every real case. No rendered artifact below has a stamp followed by
another bold label. `OPENS_WITH_BREAKING_LABEL` therefore stays as it
is, and it is not widened for the hypothetical case either. A lead label
names a package or a topic, not the class, so it is not one of the
"breaking labels" the renderer keeps verbatim. The count note says "Each
is marked **BREAKING** in the list above", and that is only true if such
an entry is stamped. The self-test pins the decision (cases 10 and 14).
## Real hops: the count line before and after
The digest ran over the last 11 console pin hops, `0abd4f9f8769` → … →
`1fb1ced36243`, plus the prospective next hop
`1fb1ced36243..45ae6b89e845`, with the base and with this branch at
`b7b8bf6d7`.
- **The current pin's hop, `7578323a544e..1fb1ced36243`, is
byte-identical:** `→ 10 releasing changeset(s), 2 breaking (0 declared
major, 2 annotated), …` before and after. No entry changes, because no
lead-label changeset falls in this range. The prospective next hop is
also byte-identical (1 breaking).
- **Two of the 11 hops change, and nothing else changes in them:**
`47b1f0bb7174..20c6d351ad74`, before:
```text
→ 33 releasing changeset(s), 6 breaking (0 declared major, 6 annotated), 0 release-nothing, 1 commit(s) without a changeset
1 parent 1ca7a80 commit 8807206
1 file changed
Lines changed: 242 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
| 240 | + | |
240 | 241 | | |
241 | 242 | | |
242 | 243 | | |
| |||
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
258 | | - | |
| 259 | + | |
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
| |||
482 | 483 | | |
483 | 484 | | |
484 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
485 | 528 | | |
486 | 529 | | |
487 | 530 | | |
488 | 531 | | |
489 | 532 | | |
490 | 533 | | |
491 | | - | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
492 | 537 | | |
493 | 538 | | |
494 | 539 | | |
| |||
522 | 567 | | |
523 | 568 | | |
524 | 569 | | |
| 570 | + | |
| 571 | + | |
525 | 572 | | |
526 | 573 | | |
527 | 574 | | |
| |||
1933 | 1980 | | |
1934 | 1981 | | |
1935 | 1982 | | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
| 2029 | + | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
| 2039 | + | |
| 2040 | + | |
| 2041 | + | |
| 2042 | + | |
| 2043 | + | |
| 2044 | + | |
| 2045 | + | |
| 2046 | + | |
| 2047 | + | |
| 2048 | + | |
| 2049 | + | |
| 2050 | + | |
| 2051 | + | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
| 2108 | + | |
| 2109 | + | |
| 2110 | + | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
| 2116 | + | |
| 2117 | + | |
| 2118 | + | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
| 2168 | + | |
| 2169 | + | |
| 2170 | + | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
1936 | 2176 | | |
1937 | 2177 | | |
1938 | 2178 | | |
| |||
0 commit comments