Repository navigation
docs(layout): correct #503's boundary documentation across four rounds - #526
Merged
Merged
Conversation
Tim81
force-pushed
the
docs/correct-layout-boundaries
branch
2 times, most recently
from
September 13, 2026 12:55
488fcf4 to
aa45c83
Compare
Three reviewers audited the layout boundary-documentation sweep (#503) and found real problems: CONTRIBUTING.md's rule described a bold/"Do not pass" pattern the tree never used, several XML-doc and CHANGELOG claims were false or unmeasured, two ISO 32000-2 citations overstated what the clause says, and thirteen reachable exceptions had no tag. No behaviour or logic changes; every claim here was checked against the built assembly with a scratch probe, or against the code path that throws. RunningBand.Height's own false refusal claim is left alone, since it is a separate code defect (#520) and correcting the prose now would need doing again once that lands.
Three reviewers audited round one (4e80571) and found it had introduced new false claims while fixing the originals. This round corrects those, verified against the built assembly with a fresh scratch probe printing Assembly.Location, plus qpdf --qdf inspection of rendered content streams for the geometry claims. No behaviour or logic change. Cell.ColSpan: round one deleted a true sentence (a span is clamped when an earlier row's RowSpan occupies its leading columns) while replacing a false one (widening always happens). Measured both a 5-column and a 3-column span clamped to one column, ending exactly at the table's right edge, when a prior RowSpan already took the rest. Both mechanisms are now documented. TextStyle.FontSize: the RunningBand exception doc flattened a genuine six-way split (footer/header x Height set/unset x NaN/+inf/-inf) into one sentence. Measured all six; only the fixed-Height case names the band and size for every non-finite value. Also corrected the claim that a heading names itself — Heading delegates to ParagraphRenderer and reports as "A paragraph run", confirmed by direct measurement. Cell.Padding: "400 across both sides puts the text at x = 220" does not reproduce under either reading (EdgeInsets(4,400,4,400) gives 420, same as Left=400 alone; EdgeInsets(400) throws too-tall with no text at all). Splitting the same 400 evenly (Left=200, Right=200) is what gives 220, confirmed via the Tm operator in the rendered content stream. Exception-tag count: recounted <exception> tags across the eleven files round one touched at 486622d, 6db9ef4 and HEAD by scanning each file's XML-doc comments for the tag immediately preceding a public member declaration (tolerating attributes, #pragma and // comments in between, which is what SaveAsync's RS0026 suppression needed). Twenty members carry a tag at HEAD, not eighteen; nineteen are new, not seventeen. CHANGELOG numbers corrected to match. Document.Save(string), SaveAsync(string, CancellationToken) and SaveAsync(Stream, CancellationToken): added UnauthorizedAccessException (directory path, or a read-only existing file), IOException (path held open elsewhere, over-long or invalid name), and TaskCanceledException (pre-cancelled token), all reproduced directly. The local notes file named TextStyle.Leading as a second exemplar of the boundary pattern; it satisfies two of the four rule bullets and carries two untagged reachable exceptions. Dropped it from the exemplar list so The local notes file and CONTRIBUTING.md name the same member. RunningBand.Height's non-finite-value paragraph is given the same #520 caveat the neighbouring refusal sentence already carries, since a footer at negative infinity produces a valid file rather than refusing. Attention triage ran backwards on two of three removals: restored the LayoutImage.Height distortion warning and PieChart.Diameter's "smaller than set, nothing reports it" warning, both silent-output traps. Six markers that were mechanisms, not traps, are removed: TextStyle.Leading, both Save(Stream)-family "calling this twice throws" paragraphs, LayoutImage.Width's token-check note, RunningBand.Alignment, and the second RunningBand.Height marker. Voice: bolded the marker word itself on all 22 Attention/NOTE instances across the package rather than the whole sentence, and added five NOTE markers for facts that had none (the two wrong-cause messages plus resolution and zoom claims separated, Cell.RowSpan's pronoun agreement, PieChart.Diameter's redundant colon, Document.Margins names why the two non-finite forms can't be caught together, Heading's NOTE 2 de-hedged, Document.PageSize's replacement now carries a consequence instead of restating its opening sentence, and Cell.ColSpan's "simply" removed. The #503 CHANGELOG entry had landed inside the released [2.3.2] section because its branch predated the release commit. Moved to [Unreleased] with both rounds' corrections, since a released section must not document work that shipped after it.
Three Opus reviewers on disjoint lenses found RunningBand.Height making
five disagreeing statements about the same case, four more members
stating a rule then a case that broke it, and several tags narrower
than the code. All measured against this branch's built assembly via
a scratch probe (ProjectReference into src/VellumPdf.Layout, assembly
path printed on every run) plus qpdf/pdftotext on the fixtures it
wrote, not assumed from the review brief.
RunningBand.Height: `Footer.Height = double.NegativeInfinity` does not
throw (probe: Save writes a 1550-byte file; `qpdf --check` exits 0;
`pdftotext` reports "Syntax Error: Unknown operator 'NaN'" and drops
the footer). qpdf --qdf on the fixture shows the content stream itself:
`1 0 0 1 72 NaN Tm (P {0}) Tj`. The member's opening refusal sentence,
its "produces a valid file" hedge and its exception tag naming
InvalidOperationException for "NaN or negative infinity" disagreed
with this and each other; now say the same thing, in the well-formed/
non-conforming vocabulary TableGridResolver.cs already uses.
CONTRIBUTING.md told a reader to bold one word for a warning paragraph;
grepped, all 23 markers in the package bold two (the marker word and
the negation), including TextStyle.cs's own named exemplar. Rule text
now matches the tree.
TextStyle.Leading: probe on a footer/header with Height null across
Leading 400..1e9 shows 400-670 no throw, 680-692 InvalidOperationException
(content area 13.9pt down to 1.9pt), 694+ ArgumentException, identical
on both bands. Magnitude decides, not the band, contrary to an uncommitted
local note; both throws are now tagged.
TextStyle.FontSize: probe on a footer at FontSize=NegativeInfinity gives
a byte-identical InvalidOperationException message with Height null and
Height=20, so "changes every case" is false for that one pair. The NaN
message probed is `... (header 0.0pt, footer NaNpt) ...`, which does
name both bands, contra "naming neither the band". Document.Save(string)/
SaveAsync(string,ct): probed Save("CON")/("NUL")/("CON.pdf") no throw,
Save("AUX") UnauthorizedAccessException, Save("PRN")/("LPT1")
FileNotFoundException; none IOException, so the "naming a device" clause
is dropped (2 copies).
Cell.ColSpan, LineSeparator, Document.PageSize, and the string save
overloads' "writes nothing" claim each stated a rule and a contradicting
case without reconciling them; softened/corrected/pointed at the actual
mechanism (#508) instead of restating a guarantee that does not hold
once a file already exists at the path.
Cell.Padding and TextStyle.FontSize exception tags were narrower than
measured: probe shows EdgeInsets(400) (finite) throws the generic
too-tall InvalidOperationException, and footer font sizes 570-576 throw
InvalidOperationException while 580/600/1e6 already throw
ArgumentException, well short of positive infinity. Both tags widened.
Document's four save overloads were missing ObjectDisposedException
(probed on all four post-Dispose) and Save(Stream)/SaveAsync(Stream)
were missing ArgumentNullException for a null destination. While
probing, a non-writable stream gave ArgumentException from Save(Stream)
("Stream must be writable") but NotSupportedException from
SaveAsync(Stream,ct) ("Stream does not support writing"); both tags now
name their two causes.
Marker density: five NOTE markers added since #503 point at a live
issue number rather than history or a version; folded into plain
sentences, cutting the package from 23 to 18 (grepped before and after).
LOW: LayoutImage.Width's summary admitted negative infinity, which
probe confirms is refused (only +Inf is accepted); ListElement's roman
marker claim was checked against qpdf --qdf on a 25-item list, where
items 19-21 revert to the plain indent rather than continuing to widen;
CHANGELOG's own #503 entry gains "evenly" to match Cell.cs.
Deviated from the brief on one LOW item: literally copying
LayoutImage.Height's summary to Width would itself be false, since
Width (unlike Height) accepts positive infinity; adjusted instead of
copied.
The local notes file is untracked and left alone per the brief; its Leading/band
sentence is superseded by TextStyle.Leading's own corrected remarks.
Round four on #503: three Opus reviewers plus a fourth pass on top, adjudicated. Item 1 (CHANGELOG diary) is structural and removed most of the smaller findings by construction; everything below is a correction verified against a scratch probe (ProjectReference into src/VellumPdf.Layout, assembly path printed each run) or gh api, never trusted from the brief without reproduction. Bold-marker rule corrected. My round-three instruction said every marker paragraph bolds two words; grepped <b>(Attention|NOTE)</b> across src/VellumPdf.Layout: 18 marker paragraphs, of which counting <b>not</b> or <b>nor</b> co-occurring gives exactly 8 bolding both and 10 bolding the marker alone. CONTRIBUTING.md's rule now says bold the marker always, the negation only where the paragraph turns on one. CHANGELOG #503 block rewritten. Collapsed three rounds worth of "round N found X was wrong" narration into one account of the final state, fixing the specific contradictions named in the brief: the RunningBand.Height "left alone" bullet reversed by round three, the "five paragraphs now carry NOTE" claim (all five were later removed), the abandoned "bold only one word" rule text, the unqualified Document.PageSize wording, the "every one of 23 bolds two" claim (8 of 18 do, see above), the miscounted save-overload exception tags, the "five markers folded" count (four folded, one kept its own paragraph), and both citations of #493 as an open tracker. TextStyle.cs mechanism fix (brief item 2). The "leading inflates the band past the page while the content area is still positive" tag described an impossible state. Probe on a footer, Height null, A4, default margins, TextStyle.Leading: 680: InvalidOperationException, content area 13.9pt 693: InvalidOperationException, content area 0.9pt 694: ArgumentException, content area -0.1pt Content area shrinks toward zero but never goes negative before the ArgumentException case; reworded to "shrinks the content area to a small positive remainder" instead of "past the page". Numeric boundaries corrected (brief item 3), same probe: Leading: last no-throw 679; IOE 680-693; ArgumentException 694+ FontSize: last no-throw 566; IOE 567-578; ArgumentException 579+ matching the brief's 679/680-693/694 and 566/567-578/579 exactly, against the previously documented 670/680-692/694 and 570-576/580. On a 300x300pt page with 10pt margins: Leading 261 no-throw, 262 throws IOE, confirming the figures are page-dependent (both TextStyle tags and the CHANGELOG now state the measurement page). Leading = double.PositiveInfinity: no throw (falls through to auto-leading, since EffectiveLeading requires IsFinite); the CHANGELOG's old "694 upward throws ArgumentException" is now qualified to exclude it. Cell.ColSpan hedge removed (brief item 4). TableGridResolver.cs lines 59-68 read: ColCount = 0; foreach row: rowCols = sum of ColSpan; if greater, ColCount = rowCols. Unconditional, no branch producing anything else. "Normally"/"usually" on the column-count rule itself dropped; "usually widens the grid" kept on the separate claim about whether a given span contributes, which does have the documented RowSpan exception. #493 corrected (brief item 5). gh api repos//issues/493 --jq {number, state, pull_request} printed number 493, pull_request true, state closed. Removed from Cell.cs (RowSpan remarks) and both CHANGELOG mentions. RunningBand.Height wording (brief item 6) plus Addition 2. Probe, footer and header, various Height values: footer 680: no throw footer 684: IOE, content area 13.9pt footer 697.5: IOE footer 697.9: ArgumentException header 697.5: IOE header 698: ArgumentException A finite height was previously untagged for InvalidOperationException; both the IOE tag and remarks now cover it, and "each with its own exception type" (false once IOE covers NaN, header-only negative infinity, and now a finite value) is replaced with "one exception type covers three causes". The double-colon sentence and the unbridged negative-infinity-to-NaN-token jump are rewritten to state the actual arithmetic: with Height at negative infinity, bandY (page height minus margin minus Height) becomes positive infinity, and bandY plus Height computes infinity plus negative infinity, which is NaN under IEEE 754, the token qpdf --qdf shows in the Tm operator (read from DocumentRenderer.cs lines 340 and 404; the byte pattern itself was already established by round three's own qpdf --qdf run, not repeated this round). Cell.cs lines 100-102 wording (brief item 7). "An inset names the row" and "raises the message" corrected to "a message names" and "throws the exception". The Top/Bottom=400 tag reference is left untouched per the brief's refutation note (another reviewer measured EdgeInsets(400, 6, 400, 6) throws while Left alone at 400 does not). Addition 1 (TextStyle.Leading/FontSize scoped too narrowly to a band). Probe with no header or footer anywhere in the document: Paragraph Leading=697: no throw Paragraph Leading=698: InvalidOperationException Heading Leading=1e6: InvalidOperationException Paragraph FontSize=600: InvalidOperationException Both InvalidOperationException tags no longer scope the throw to a RunningBand style whose Height is left null; the ArgumentException tags stay band-scoped, since a plain page's margins do not move as FontSize or Leading grows (DocumentRenderer's content area is margins-and-bands-only, independent of any single run's style), and probing up to 1e6 with no band never reached it. Addition 2: covered under RunningBand.Height above. Addition 3 (PageSize resize byte-identical claim). Same-process back-to-back builds: 0 differing bytes (random ID collided). Builds 2 seconds apart: 8 diff ranges, all inside XMP CreateDate, XMP ModifyDate, and the trailer ID array (both hex halves). "Bar the random ID" corrected to "except the random ID and the XMP CreateDate/ModifyDate timestamps" in both Document.cs and CHANGELOG. Addition 4 (Save(Stream) ArgumentException param name). Probe with a read-only FileStream and a non-writable MemoryStream both printed ArgumentException, ParamName=stream, Message "Stream must be writable. (Parameter 'stream')". The public parameter is destination; the tag now says the exception carries the internal name stream, not destination. AUX conflict: dropped rather than settled, per the coordinator's explicit instruction not to re-run Save("AUX"). CHANGELOG now says its behaviour was not reproducible across runs instead of asserting UnauthorizedAccessException. Deferred per the brief, unchanged this round: bold-run word-count uniformity, Attention density, four mid-sentence rewrap artifacts, "Tracked as #476" stamps, duplicated "unrelated conditions share this type" phrasing, and CONTRIBUTING.md bullet ordering. One untracked local notes file is also stale, which is a maintainer decision and reaches no clone. Not independently re-verified this round, carried forward unchanged from prior rounds and not flagged by any reviewer: the twenty-six members / twenty exception tags count (a crude re-scan of doc-comment blocks containing an exception tag found 21, one more than stated, most likely a private or internal member the original count excluded); the ListElement roman-marker item 17/19-21/22-25 figures; the Document.Margins non-finite routing; the LayoutImage clamp and refusal figures; the pie chart and table-border claims. None of these were named in the brief's findings or the coordinator's four additions. Gates: dotnet build -m:2 (0 warnings, 0 errors), dotnet test (7023 total, 0 failed, 326 skipped, unchanged from before this change), dotnet test -c Release (same), dotnet format --verify-no-changes (exit 0), eng/clean-room-check.ps1 (passed). Dash check: python3, decoding the diff as UTF-8, over every added line: 0 em dashes, 0 en dashes; the only double-hyphen occurrences are the literal qpdf --qdf and qpdf --check command-line flags.
A prose review of the previous round found six statements that are false against the code they describe. Four could change what a caller writes. Save(Stream) and SaveAsync(Stream, ct) documented ArgumentException as "two unrelated conditions" and told the reader the parameter name cannot distinguish them. There are eleven throw sites in this package, all reachable from a save, and PieChart's own tags on this same branch say four of them arrive that way. Both tags now say the type has many causes, that the parameter name is not a reliable discriminator, and that the per-property boundary documentation says which input each one refuses. TextStyle.Leading said a plain paragraph "shrinks the page's own content area as the leading grows". It does not: measured at 700, 1000 and 100000 on A4 with 72pt margins and no band, the content area stays 451.3x697.9 and the generic too-tall message fires because the element outgrows a fixed box. Only a band shrinks the box, since EffectiveLeading feeds the band height, so a band reaches the throw from both directions. The CHANGELOG said the string save overloads "already had" ArgumentNullException for path. No save overload carried any exception tag in 2.3.2; git show 486622d finds two tags in the whole file, both on Encrypt. That sentence was true only against an intermediate commit on this branch, and is a piece of the round-by-round narration round four was meant to collapse. The CHANGELOG also said what is conditional is "whether a given cell's own span contributes to that sum". TableGridResolver sums every cell's ColSpan unconditionally with no RowSpan term; the clamp is on the drawn width in TableRenderer, which is what Cell.cs says correctly. Two smaller ones: RunningBand named 697.5 as the top of a range when the computed crossing is 697.89, and TextStyle called the band-detailed message "generic" where Cell.cs uses that word for the message naming neither. 7,023 tests pass, Debug and Release, with every reported assembly path inside this worktree. Format and clean-room clean.
A review of the previous commit found three of its own replacement sentences false. Two were universals, one of which falsified a neighbour in the same doc comment, which is the shape the previous commit was written to fix. Save(Stream) said "every element that validates its own input reports that property's name". Of the two elements that validate their own input, a pie chart does and an image does not: LayoutImageRenderer throws with nameof(_img), a private field of the renderer, which is verbatim the #481 symptom PieChartRenderer records as fixed for the chart alone. The second half pointed the reader at per-property boundary documentation, and LayoutImage has no ArgumentException tag to read. Both halves now say what the two elements actually do and name the gap. RunningBand said "every height below 697.89 throws" InvalidOperationException. Zero and every negative value are below 697.89, and twelve lines above in the same remarks block this member says zero and negative are not refused at all. The range now runs from 684 to 697.88, which is what was measured. TextStyle documented "694 upward throws ArgumentException" while the paragraph above it says a non-finite leading is not refused, and the CHANGELOG entry says that carve-out was already applied. It was applied to the CHANGELOG only. The doc now carries it too. The full-solution run intermittently fails one qpdf oracle test in VellumPdf.Reader.Tests on a five-second timeout, a different case each time. The Reader project alone passes 1,869 of 1,869 on this branch, and this branch touches no Reader file, so the cause is parallel load rather than anything here. Format and clean-room clean.
…raphrased A review found four medium and three low faults in the previous round. PageSize's new InvalidOperationException tag said the throw fires when the content area is too small for the document to fit on one page. It fires when a single element is too tall. A document longer than one page is the ordinary case and never reaches it, and three sibling members on this branch describe the same throw correctly. The CHANGELOG announced that LineSeparator had under-quoted 8.4.3.2 and that the normative wording was restored. The comment carried neither "shall" nor "should not be used", so the condition reported as fixed was still there. It also attributed a hedge to the clause, saying the result "can be" nearly invisible where the clause states it flatly, and said the clause "defines" the width where it says shall denote. The comment now quotes both normative verbs. The marker count "from 23 to 18" used a figure that exists only at one mid-branch commit. Against the branch base it is 26 and against 2.3.2 it is zero, so a reader could reconstruct neither. Both visible baselines are now given. Both async save overloads documented TaskCanceledException for a cancellation "during the final write". The layout pass does raise that derived type, but the write is the destination stream's, which need not raise the same one, and a catch written to the derived type misses the base. The kernel's own test asserts the base type for this reason. Both tags now name OperationCanceledException and say which half raises what. Three smaller ones: the tag count mixed two populations, so the member that already had a tag in 2.3.2 is now named rather than folded into the twenty-six; Margins lacked the large-finite case that PageSize gained in the same round, while computing the same content area; and a citation to "its NOTE 2" is now scoped to the row it belongs to, since that table carries two notes with that number. 7,023 tests pass, Debug and Release, every reported assembly path inside this worktree. Format and clean-room clean.
A second review found three medium faults, all three from the previous round, and an audit of my own replacements found a fourth. Cell.ColSpan closed with "whether a span widens the grid or is clamped depends on what the rows above already occupy". That contradicts the first sentence of the same block, and TableGridResolver sums every cell's ColSpan with no RowSpan term and no branch. Both outcomes happen at once: the span counts towards the total and the cell is drawn narrow. Four sentences in that block carried the error, including an opening hedge calling the paragraph below an exception to the count rule when it is about drawn width, so all four are rewritten rather than the one the review quoted. The marker sentence gave three correct endpoints and a cause that cannot produce them. The branch base had three NOTE markers, so five cannot have been folded out of 26. Eight were removed, six Attention and two NOTE, and 26 minus 8 is 18. PageSize said a document longer than one page "never" reaches that exception. It reaches it by the other route, the page-continuation cap, and how many continuations an element needs is a function of the page size, so the universal pointed the reader away from the case the tag does not cover. The fourth was mine and no reviewer saw it. Rewriting the clamp sentence I wrote "even though its span has already widened the grid", which is false whenever the column count was set by a different row: a cell can be clamped without widening anything. It now says the span still counts towards its row's total, which holds in every case. 7,023 tests pass, Debug and Release, every reported assembly path inside this worktree. Format and clean-room clean.
Two reviews of this branch returned twelve medium findings against the documentation it added. The one that costs a caller is the save contract: all four overloads said "calling this twice throws", which describes only a save that succeeded. A save that threw leaves the document in one of three states. Geometry refused before the layout starts leaves it clean; reaching the writer leaves it dead; a throw from the layout itself leaves it alive and wrong, where a retry gave 4 pages and 2,487 bytes against a fresh document's 1 page and 1,534 bytes with nothing reporting the difference (#530). The rest of the factual round. PageSize's byte-for-byte determinism claim is bounded to a document no save has been attempted on, and regains the plain answer to whether setting it after Add applies to what is already added. Save's InvalidOperationException list gains PDF/A conformance combined with Encrypt, which ISO 19005-2 6.1.3 prohibits and which neither property documents, and all four overloads gain the OverflowException and OutOfMemoryException that Cell.ColSpan already documented against them. ListElement.Indent gains the three inputs it never covered, one of which writes a NaN token into a Tm operator. RunningBand.Template and LineSeparator.Margins gain the refusals they reach. Voice. Figures carry the emphasis instead of the negations, the longest sentences are split so the tail matches the house rate, Cell.ColSpan states the count rule and the width rule once each rather than four times between them, three unreflowed patch seams are re-wrapped, the eight identical exception bodies on the string overloads each say what distinguishes them, and issue citations take one shape throughout. Documentation only. No behaviour change.
…l template The re-review of both lenses left six medium findings. Three were factual and three were about the writing. Two byte figures did not survive re-measurement. PageSize cited 2,928 bytes for a 12-paragraph document resized from 600x800 to 200x120, but the sentence named no margins, so the recipe as written throws: at the default 72pt insets the vertical margins exceed a 120pt page. A sweep of 8,100 saves over margins, text lengths and font sizes produced 4-page files from 2,651 to 2,776 bytes and never 2,928. The save-reuse paragraph's 1,645 bytes has no fixture either, in the doc or in #530. Both are gone. What replaces them is the part a reader can check without a fixture: the two files match once /ID and the two XMP timestamps are normalised, and every /MediaBox carries the new size. The layout-throw figures stay, because #530 carries the fixture that reproduces them exactly. "Nothing throws on that route" was a universal from measured cases. It now says no retry measured raised an exception, and the paragraph leads with why the route matters: the pages laid out before the throw stay, and the retry appends. NullReferenceException is reachable from all four save overloads through a null running-band template and was tagged on none of them, which is the asymmetry this branch removed for Cell.ColSpan and then recreated. Tagged on all four. The underlying defect is the wrong exception type raised far from the constructor that accepted the null, now filed as #531 and cited from both ends. ListElement.Indent said a negative indent places text at 76.2pt, next to paragraphs whose other figures are indent magnitudes. 76.2 is a page coordinate: the 72pt left margin plus a 4.2pt gutter. The marker's own width is 4.2pt, and that is what the sentence now gives. Killing the eight duplicate exception bodies also cut the string overloads' route to a fact the stream overloads still state, that ObjectDisposedException derives from InvalidOperationException. Restored on both. SaveAsync(string)'s ArgumentException had been shortened into a verbless fragment. LineSeparator.LineWidth's replacement sentence was wrong twice over. It attributed a claim about zoom to ISO 32000-2 8.4.3.2, which is about device resolution, and it said the rule grows heavier when it stays one device pixel and only reads proportionally heavier. Both corrected. LineSeparator.Margins quoted half of its message, which would not match a caller comparing against it. The marker count in the changelog said 18; it is 17. One sentence over 40 words was reported as pre-existing and was added by this branch, so it is split here.
Width's summary read "Accepts any real number of at least 5e-6 points in magnitude, and positive infinity." That is true of the throw behaviour, and it is the first line a caller sees in IntelliSense, so it read as an invitation to pass the negative width the same member's remarks go on to forbid. Height, whose rule differs only in refusing positive infinity, said "Must be finite and at least 5e-6 points in magnitude" — one rule stated with two opposite verbs. Both now say "Must be". The sign question stays where it belongs, in the paragraph that says not to pass a negative width and names the major that will reject it, and the one real difference between the two properties is stated rather than implied.
Round three found seven items across both lenses. Two were corrections to corrections, which is the pattern this branch keeps producing. The 2,928-byte PageSize figure was deleted last round on a review's report that a sweep could not reproduce it. It reproduces exactly: 12 paragraphs at 10pt margins, resized from 600x800 to 200x120, gives 2,928 bytes and 4 pages both resized and built fresh, byte-identical once /ID and the two XMP timestamps are normalised, with all four /MediaBox entries reading 0 0 200 120. What was actually wrong is that the recipe named no margin, and at this property's own default 72pt insets it cannot run at all, since 144pt of vertical margin does not fit a 120pt page. The margin is now named and the CHANGELOG no longer asserts a failed reproduction. The marker count went from 18 to 17 last round on a count of Attention alone. The sentence is about markers and enumerates both families: 17 Attention plus one NOTE is 18, which is also what its own arithmetic gives. Restored. "No exception was raised on any retry measured" was still a quantifier past its evidence. Measured, two retries on that route do throw: retrying without changing the geometry raises the too-tall exception again, and saving once more after a retry that succeeded reports the document as already written. Only the retry that succeeds is quiet, and the text now says so. The same universal survived on SaveAsync(Stream) and is swept. The NullReferenceException tag named SetHeader and SetFooter. Header and Footer are public settable properties and reach the same throw; measured on all three routes, and the tag now covers them. ListElement.Indent gave 4.2pt as "the default style" two paragraphs below a sentence where that phrase means the text style with roman numerals. 4.2pt is the bullet; an ordered list falls back further. Scoped to the default text style with the default bullet marker. LayoutImage.Width's summary stated a necessary but not sufficient rule: negative infinity has magnitude above 5e-6 and is still refused. Measured 5e-6 accepted, 4.9e-6 refused, positive infinity accepted, NaN and negative infinity refused. Now "finite or positive infinity, and at least 5e-6 points in magnitude". Its negative-width paragraph said the image is mirrored horizontally; with Height left null the derived height takes the sign too and the cm operator reads -10 0 0 -10, a 180 degree rotation. Only an explicit height gives -10 0 0 5. Also rewrapped four exception bodies left on one line at 165, 156 and 153 characters, and the seams those edits opened.
Round four found six items across both lenses, all of them in text written in round three, and all of them where I wrote from a report or from reasoning rather than from a measurement. ListElement.Indent said none of its three odd inputs throws. That is true only of a flat list. A list with nested children is refused at exactly the content width: measured on three geometries, 279.99 saves and 280 throws at 10pt margins on a 300pt page, 199.99 and 200 at 50pt margins, and positive infinity throws the same way. The exception is InvalidOperationException about an element too tall to fit, naming neither the property nor the list. NaN and negative infinity do not throw on either shape. The member now says so and carries the tag it lacked. "An ordered list falls back further" had the direction backwards. The gutter is the larger of the indent and the marker, so a wider marker pushes the text right, not left. Measured at the default text style: the bullet is 4.2pt, "1." is 10.008pt and "i." is 6pt, so an ordered list falls back less far than an unordered one. "Grows with the number" was also wrong, and the same remarks block already said the opposite two paragraphs earlier: decimal markers hold one width from 1. to 9., and alphabetic and roman ones both narrow again at some items. "It is the only quiet one" was false. Correcting the geometry after a refusal and retrying is quiet too, and measured it gives 1,525 bytes and one page, identical to a fresh document. What is true is narrower: silence does not separate the correct retry from the wrong one. The condensed copy on SaveAsync had it right and the long form was the one that drifted. The multi-failure figure is measured rather than inherited. A review reported 5 pages for two failed saves before the retry; it is 6, and three failures give 8. Each failed attempt adds two. SetHeader and SetFooter were named as a throw route by four exception tags while carrying no documentation of their own. SetHeader takes the string, so it is the member that accepts the null, and the standing rule puts the tag on the member the caller calls. LayoutImage.Width's summary gave 5e-6 as a floor on the value. The floor is on the drawn extents, so a legal width is still refused when the height derived from it falls under it, which the remarks already disclosed and the summary did not.
Tim81
force-pushed
the
docs/correct-layout-boundaries
branch
from
September 13, 2026 15:58
9f869e1 to
adfb462
Compare
Five review rounds have found the same class of defect and this round changes approach rather than adding another correction on top. Every claim that has failed a review on this branch was a quantitative generalisation: 2,928 bytes with unstated margins, 1,645 bytes with no fixture, 76.2pt read as a marker width, "10pt" that is really 10.008, "grows with the number", and now "each further failed attempt adds two more". Every claim that has survived untouched states a mechanism: the gutter is the larger of the indent and the marker, the pages laid out before a throw stay, the width is validated before the height. So the numbers come out and the mechanisms stay. "Adds two more" was one document's increment. Measured, it is however many pages the failed attempt had committed before it threw: with no content ahead of the failing element the sequence runs 1, 4, 6, 8, with two paragraphs ahead 2, 5, 8, 11, and with five 2, 9, 15, 21. The member now says the file grows by whatever the attempt had laid out, and quotes no figure. #530 gains the paragraph text its own table depended on and never named. LayoutImage.Width's summary and its exception tag contradicted each other. The summary had dropped the 5e-6 floor while the tag still refused a magnitude under it, and a width of 1e-9 does throw. Both are true and both are now stated. The tag gained two reachable causes it omitted: a derived height under the floor, measured refused at width 0.0049 on a 1000 by 1 source, where the message names the height rather than the width; and a positive-infinity width, which is not refused as non-finite but is clamped to the content box, after which a source taller than it is wide drives the derived height past the page and reaches the ordinary too-tall refusal. ListElement.Indent had grown to 457 words, the longest remarks block in the assembly, stating the flat-versus-nested boundary five times and covering marker width in two separate paragraphs. It is 340 words with one subject per paragraph, the boundary stated once in prose and once in the tag that is its home, and negative infinity named where the enumeration had skipped it. The failed-save Attention marker went, rather than a nineteenth being added to SetHeader and SetFooter. The same hazard was marked on the synchronous overload and unmarked on the asynchronous one, and the softer markers elsewhere in the package make severity a poor reason to keep it. That leaves 16 Attention and one NOTE. The CHANGELOG carried four claims the members no longer make, including one saying none of the indent's inputs throws, which this branch's own previous commit had already disproved.
Round six found nine mediums across both lenses and every one was damage from round five's rewrite rather than a pre-existing fault. The lesson from round five was wrong in its second half. Removing figures did stop the fixture-dependent claims, and it broke four adjacent facts instead. What correlates with damage is not adding or subtracting but rewriting whole paragraphs, so this round edits only the clauses named and leaves every untouched sentence alone. Corrected, each measured: SaveAsync said "the last two both retry quietly". The last two are dead and alive and wrong, and the dead route is the one that throws. The quiet pair is the first and third, which is what the synchronous overload says two hundred lines above. The pre-round text had this right and the rewrite inverted it. "The file grows by that many pages on every attempt" does not hold. Growth over a fresh document equals the retained pages in one fixture of four; what does hold, and what was measured, is that each further failed attempt adds the same number again. The claim is narrowed to that. The subtraction deleted a true fact a caller needs: retrying without correcting the geometry throws the same too-tall exception and leaves another set of pages behind. With it gone, "the retry raises nothing" stood unqualified and implied the opposite. Restored, and the surviving sentence scoped to the corrected- geometry retry. The byte-count clause no longer contradicts the sentence above it: the file is larger, the caller just has no baseline to see it against. "On a source taller than it is wide" is not the boundary for an infinite width. The threshold is the content box's own proportions, measured at 1.43 on A4 with 10pt margins, where a 100x142 source saves and 100x143 throws. A 100x101 source throws on a square page and saves on A4. "Negative infinity behaves as any negative value does" is true on a flat list and false on a nested one, where the child takes the indent directly and the stream gets the literal token -Infinity. That is a code defect of the same class as the NaN case two sentences earlier, filed as #532 and now documented. "The text starts one marker width after the left margin" was unconditional and has two counterexamples, both putting content off the page: a nested child, and a flat item whose longest word will not fit beside the marker. Both named. "None of the three is reported" lost its flat-list scope in the cut, which the exception tag eight lines below already contradicted. "With the exception below" pointed at nothing. The nullable clause on SetHeader and SetFooter missed the third route in, a nullable-typed expression the compiler only warns about. Also: the ordered-marker universal gets its proof back in one figure rather than two samples, since the narrowest glyph any scheme emits plus a period is 6pt against the bullet's 4.2pt. Two ragged wraps in PieChart, and two dangling words the CHANGELOG edits left. #530's second measurement named no fixture and did not reproduce, so it is gone rather than pinned.
Seven rounds, and the same defect every time. The strategy changes rather than the wording. Every finding across all seven rounds has been a claim that holds in one configuration and fails in another: flat list against nested, short word against long, decimal against roman, the source's aspect against the page's. The documentation was enumerating a combinatorial space in prose, and an enumeration is never complete, so each correction added one more case and created a new incomplete enumeration. That is why adding less, then subtracting, then editing single clauses all failed. Each was an edit to the enumeration. What has never been found wrong is the other kind of sentence: the gutter is the larger of the two, the width is validated before the height, the pages committed before a throw stay. Those describe the mechanism, so no fixture falsifies them. ListElement.Indent held four of round seven's five contract findings and has been the epicentre since round five. Its remarks now open with the two rules that generate everything else, that the gutter is the larger of the indent and the item's own marker, and that the gutter reverts to the indent where the longest word would not fit beside the marker. Gone with the enumeration: which item number first exceeds a 20-point indent, the glyph-floor derivation of 6pt, the comparison of how far an ordered list falls back against an unordered one, and the claim that markers do not widen with the number. Four findings went with them, including the direction error two rounds swapped back and forth on. 457 words two rounds ago, 340 last round, 259 now. The flat-list exemption for negative infinity was false and #532 said so first. The override passes the indent through untouched, so a flat item whose longest word does not fit writes -Infinity into the text matrix exactly as a nested child does. Measured on four geometries. The issue's Scope section is corrected too, since the documentation was reading from it. Also: Save(Stream) stated its "a quiet retry proves nothing" point three times across two paragraphs and now states it once; the nullable clause on SetHeader and SetFooter was a closed list of three routes that omitted a bare null literal, which only warns, so it names the warning rather than listing routes; and LayoutImage.Width no longer denies the source's shape in one clause and makes it the criterion in the next, and says content box throughout where it had said page.
Round eight found twelve findings, the worst since round one, and both lenses
agreed on why: the strategy is right and the rule set was incomplete.
ListRenderer computes the gutter twice, once per level. The top level takes the
larger of the indent and the item's marker width, reverting to the indent where
the widened gutter would leave less room than the longest word. A nested child
takes the larger of twice the indent and the indent plus the marker's width,
reverting to twice the indent, because its marker starts at the indent rather
than at zero, so what has to clear it is a position and not a width. The
renderer's own comment says exactly that. Last round documented the first pair
and called it "those two rules decide everything below", which is false for
every nested list at every geometry.
All four rules are stated now, and each derived case names its level and which
side of the override it is on. Every one is measured:
flat, -50, roomy text at 30.008 on a 20pt margin, one marker width
right of it, which last round's cut had replaced
with "off the page"
flat, -50, long word -30, the override passing the indent through
nested, -50 marker -30, content -19.992, the indent plus the
marker's width
flat, NaN NaN on every geometry, including a 120pt page
nested, NaN NaN
flat, -inf, roomy 30.008, no token: it loses the larger-of
flat, -inf, long word -Infinity, once the override fires
nested, -inf -Infinity, it wins the larger-of when nested
flat, +inf marker drawn, no text-showing operator
nested, +inf throws
NaN and negative infinity had been merged into one sentence under one mechanism.
They take opposite routes: NaN wins every comparison so it survives the max and
the override cannot fire against it, while negative infinity loses the max and
needs the override. One is reachable everywhere and the other is conditional.
The Attention paragraph moves first, ahead of the mechanism, which is the order
CONTRIBUTING's own exemplar uses: what is refused, then why.
Also corrected. LayoutImage.Width read "is proportionally is" after a word moved.
SaveAsync stated unconditionally what Save(Stream) had just conditioned, so the
class is swept rather than the instance. The nullable clause grouped three routes
under "the compiler warns" when null! and a disabled context draw nothing at all,
and this repository turns the two that do warn into errors. The CHANGELOG kept
the unconditional form of the falls-back claim the member had already dropped.
The PieChart cref no longer splits across a line, so grep finds it.
Round nine was the first with no regression: every earlier finding stayed fixed,
and the count fell from twelve to five. The contract lens confirmed the rule set
is correct against BuildItems at both levels and complete for every case the old
enumeration covered, and that no third level exists for a fifth rule to describe.
Both lenses then found the same remaining defect, and it is the oldest shape in
this repository: one measurement at indent -50 written as "any". Measured, the
boundaries are neither constant nor properties of the value.
top level, override firing text sits at margin + indent, so it leaves the
page below minus the left margin: at 20pt margins
-19.999 gives x 0.001 and -20.001 gives -0.001
nested child the marker sits at margin + indent, left of the
margin at any negative value, while the text sits
one marker width further right
nested, OrderedDecimal text crosses the margin at -10.008 and the page
edge at -30.008
nested, Unordered the same crossings at -6.672 and -26.672
So the crossing depends on the page's left margin and on that item's marker
width. The member now says that rather than naming figures, which is what
TextStyle.FontSize already does for the same problem: a property of the page,
not of the value.
Three more from the same paragraph. NaN was grouped with negative infinity as
"the two negative non-finite values", in the one paragraph whose job is to keep
them apart; a caller reading that writes a sign test and catches neither.
"Positive infinity is decided by neither rule" was false and its own next clause
said so, since both branches yield it and agree; what is true is that they do not
separate it. And the sentence round eight removed for narrating the document's
own shape came back as "the rest follows", so it is gone again along with "the
two cases the rules leave open".
The silence of a finite negative indent had no home after the compression and now
has one. SaveAsync attached the corrected-cause caveat to the third route alone,
implying an asymmetry that does not exist: route one needs its cause corrected
too, and an uncorrected retry raises the same exception on both. The nullable
sentence spoke about this repository's build inside shipped IntelliSense, where a
consumer has no notion of it, and now speaks about warnings-as-errors instead.
The CHANGELOG's "goes off the page only where" read as a sufficient condition and
was wrong for a nested child near zero.
Round ten found five, three from the voice lens and two from the contract lens, and both agreed on the same sentence. Last round replaced a false universal with a false classification. "How far left is a property of the page and the marker, not of the value" names the wrong subject. The content moves left by the value's own magnitude in every reachable case: the gutter is the indent at the top level under the override, the indent plus the marker width when nested, twice the indent when nested under the override, and the indent again for the nested marker. The marker width does not appear in three of the four. What the margin and the marker decide is where the content crosses, not how far it travels, and the colon promised a distance then delivered thresholds. Worse, the sentence covered three of the four branches. Nested with the override firing was missing, and the boundary given for "a nested child" is wrong there. Measured, that case puts the text at the margin plus twice the indent, so it crosses at minus half the margin and the marker width drops out: x is 0.002 at -9.999 and -0.002 at -10.001 on a 20pt margin, and 0.002 at -17.999 against -0.002 at -18.001 on a 36pt one. On A4 the member claimed safe until -82.008 where the text is off the page at -36. The paragraph now takes the shape the reference uses for branching conditions, one clause per branch with the condition repeated, and states the distance and the crossings as separate things. Dropped with it: "a nested marker sits left of the margin at any negative value". PdfCanvas formats to five decimals, so at -1e-9, -1e-7 and -4.9e-6 the marker writes x 20 on a 20pt margin, the margin exactly and indistinguishable from an indent of zero; -5.1e-6 is the first to write 19.99999. That is the same written-token floor already documented on LayoutImage.Width, and it was the one quantifier in the paragraph with no measurement at its boundary. Also: "most builds do not" was an unmeasured claim about every C# build, put there last round while fixing a sentence that named this repository inside shipped IntelliSense; it is "one without does not" now. The override sentence stranded its trigger fourteen words behind the consequence. SaveAsync had three ands and a garden path where a semicolon does the work. The CHANGELOG carried the same wrong subject as the member.
Round eleven found one medium and both lenses found the same one, which has not
happened before. Ten and eleven together diagnose it: the sentence framing the
four negative-indent branches has a slot for a governing quantity, and the four
branches do not share one, so the frame over-generalises whichever way it is
written.
Round ten said the page and the marker govern; that was wrong because the value
decides the distance. Round ten's fix said the value governs; that is wrong too.
Measured coefficients on the distance the content moves:
top level, override quiet 0x x is 24.2 at indent 0, -1, -30, -60, -300,
-1e6, -1e9, -1e300 and -double.MaxValue
top level, override firing 1x margin + value
nested, override quiet 1x margin + value + marker width
nested, override firing 2x margin + twice the value
Three different coefficients, and the 0x case is the default configuration. The
marker width enters a crossing threshold in one branch of four. The frame is
gone rather than rewritten a third time; the four clauses stand on their own,
which is what the reference does with its own branching enumerations.
Two things the branches were getting wrong on their own. The nested marker's
position is branch-independent, sitting at the margin plus the value whether the
override fires or not, because the override rewrites the gutter and never the
marker's own inset; it was filed under the quiet branch as though it belonged to
it. And one of the four labels said "once the override fires there" while the
other three named both level and override state, so the two-by-two did not close.
Also: "before reaching that" reached two clauses back for its antecedent, and was
listed as fixed in round ten when git shows it untouched since 46200a6. SaveAsync
named three routes and then accounted for two, leaving the reader to work out
that the dead one raises either way. The CHANGELOG carried both of the medium's
halves.
Round twelve returned one medium from each lens, both on the same clause, and between them they finished a diagnosis three rounds in the making. The voice lens named the recurring function rather than the grammar. Round ten deleted "how far left is a property of the page and the marker". Round eleven deleted "what the left margin and the marker width decide is where it crosses". Round twelve was offered "lands differently in each of the four cases". Three grammars, one job: a sentence before an enumeration whose purpose is to characterise the enumeration. The reference frames an enumeration only where the reader has to choose between the cases; nobody chooses between these four, since nesting and the override decide them, so the announcement has nothing to announce. Measured against it, "in each of the four" appears 0 times in 1,422 sentences. The contract lens then measured the clause false. The four landings are margin + top marker width, margin + value, margin + value + nested marker width, and margin + twice the value, and the two marker widths are different quantities: markerWidth comes from the item's own style and childMarkerWidth from child.Style ?? itemStyle. With a 10pt top style, a 20pt nested style and an indent of -8.34 on a 50pt margin, the top-level and nested-quiet cases both land at x 58.34. A second route exists at a zero-size child style, where the override-firing and nested-quiet cases meet. So the opener is gone and what replaces it is an invariant rather than a frame: the override rewrites a gutter and never a marker's own inset, so no marker moves with it. That also fixes the half I had kept, which said only a nested marker holds still; the top-level marker is equally fixed, at EdgeInsets.Zero, and singling out the nested one invited the reader to infer the other moves. Three smaller corrections, each measured. "Before the text can be dropped" had the order backwards: ParagraphRenderer returns Nothing inside the layout pass, so the drop precedes the refusal and what the refusal precedes is the file. SaveAsync's "which is why it is not one of the two" audited its own list rather than saying anything about the API. And the CHANGELOG carried the false quantifier, claimed three cases cross the margin when the nested one crosses only past minus its marker's width, and named a landing relative to a marker whose position it never gave.
Round thirteen found one medium from each lens plus a second from the contract side, and the first of them is a regression this branch caused last round. Deleting "A negative value therefore lands differently in each of the four cases" removed the frame, and the frame was carrying the only scope word in the paragraph. The four clauses were left unconditional and are false for a positive indent: measured at the default 20 the text sits at x 70, not the margin plus the marker width the first clause predicts, and the boundary is the marker's own width, 4.2 holding and 4.201 not. The scope is back in the clause that needed it and nowhere else, since the other three state formulas that hold at any value and crossings that only a negative one reaches. "The text is what differs" is gone, and with it the slot. Both lenses reached that independently, from opposite directions. The voice lens showed the enumeration reading wins on three counts: the sentence sits in the announcement position, the nearest comparison-set noun is "branches" two clauses closer than "marker", and a contrastive cleft exists to pick one member out of a set already under discussion. The contract lens showed that reading is false, measuring two cases onto the same x. Under the reading intended it added nothing, because "no marker moves with it" already discharges the contrast. Four grammars have now filled that slot; the slot was the defect. The CHANGELOG's reason for the collision was wrong. It said the markers are measured from different styles; measured with one style and no per-item style at all, the bullet at 4.2pt and the nested open bullet at 6.672pt collide at an indent of -2.472. The cause is that the two markers are different glyphs, and a style difference only widens the gap. Also: every position in that paragraph is measured from the list's own left edge rather than the page margin, and ListElement.Margins moves it along with every crossing threshold, which nothing said. Save(Stream)'s account of a quiet retry was a cleft that garden-paths, and SaveAsync points the reader at it for the detail, so the clear statement was sending the caller to the unclear one. And the CHANGELOG said "the nested one" where two of the three routes are nested, true of one and false of the other.
…code makes Round fourteen went from three findings to seven, and the cause is one mistake repeated in every scope word this branch has written: the condition was taken to be the sign of the value when the code compares it against a marker width. Measured, roman numerals, 27 items, at the default positive indent of 20 on a 72pt margin: items 1 to 16 land at 92, where the caller asked, while item 17 lands at 92.664 and item 27 at 98.664, because those markers are wider than 20 and win the larger-of. Eight of 27 items lose it at a positive default indent. ListRenderer's own comment cites that case as the defect the widening exists for (#476). The nested clause failed the same way and worse, being false at the default outright: the nested gutter is the larger of twice the value and the value plus the marker width, so above that width the text sits twice the value right of the margin, not one marker width right of its marker. Rather than add a second sign-based scope to the clause that lacked one, the branch positions are gone. The rule paragraph above already gives both formulas for every value at both levels, so restating their outcome for one regime was what made them false. What the rule cannot give is where content leaves the page, and that is all these clauses now carry: with the override firing, the page edge at minus the margin at the top level and minus half of it when nested; with it quiet, a top-level item cannot cross at all because the larger-of never returns less than the marker's width, and a nested one crosses the margin at minus its own marker's width and the page edge at minus that and the margin together. Each bracketed either side. "Every position below is measured from the list's own left edge" is gone. It was the fifth sentence to fill that slot and the first measurably false against the paragraph it headed, since the page edge is a position named below and is not measured from the list's edge. The origin fact it carried now sits on the marker clause that needs it anyway, and it is corrected: the left inset does not only shift the figures. It also narrows the width the override measures against, so a wide enough one flips the branch. Measured on a 120pt page at a 10pt margin with an indent of -15, a left inset of 23.7 puts the text at 37.9 and 23.8 puts it at 18.8, the marker moving right while the text jumps left. Also: Save(Stream) gave a Document the verb that belongs to the save and said "before the layout returns" where the paragraph above says "starts". And the short SaveAsync line reported fixed in each of the last two rounds is fixed now. It was never touched, because the phrase my scripts searched for spans two lines and matched nothing; this time the result was checked rather than assumed.
Round fifteen found four, down from seven, and both mediums were sentences carried over unchanged when the branch positions were deleted last round rather than anything newly written. "That inset shifts every figure below with it" was true of the positions. Those are gone and four figures stand in their place, and one of them does not move: the nested override-quiet crossing of the margin sits at minus the marker's width, measured identical at insets 0, 30 and 100. Three move, one does not, and the sentence now says so. "A top-level item cannot cross at all" holds over every indent -- a sweep of four styles by four list kinds by nine indents put the minimum x exactly at the margin -- but the sentence before it defines the margin as the page's plus the left inset, and a negative inset is accepted unvalidated. At a left inset of -80 the text lands at -3.8, off the page. What the larger-of proves is that a top-level item never crosses the margin, which is what it now claims. The same correction reached the opener, which said a negative value carries content off the page. With the margin itself off the page that is false, and it is false for a positive indent too once the inset is negative enough. It is margin-relative now, and the announcement clause that followed it is gone. That clause was the sixth occupant of the slot this branch keeps refilling, and the first small enough that deleting five words closed it. Also corrected: the gutter lost its stated origin when the positions went, so the rule paragraph names it again; the right inset narrows the override's width exactly as the left one does, which the paragraph attributed to the left alone; and Save(Stream) had a save returning quietly when a refused save throws, the subject being the retry that the previous sentence supplies. Each new claim was measured before it was written, and the measurement caught two errors in the drafts: a reason that was true only below the marker width, and an off-page claim that a negative inset falsifies.
Round sixteen found three, and the first is the deepest miss of the branch. Six rounds have asserted that a top-level item with the override quiet never crosses the margin, on the grounds that the larger-of cannot return less than the marker's width. The reason is sound and the conclusion needs one thing the reason does not supply: a marker width that is not itself negative. TextStyle.FontSize documents a negative size as accepted today, two files away, and MeasureString passes it straight through. Measured on a 72pt margin: size -0.001 with indent -1 puts the text at 71.99965, size -10 with indent -1000 puts it at 68.5, and that is the quiet branch, since firing would give -928. The boundary is strictly below zero; at size 0 the text sits on the margin. So all four branches can carry content left of the margin, "three of the four" was wrong, and the CHANGELOG carried the same count. The restored origin clause was wrong for half the cases it covered. It said the gutter is measured from the margin the marker sits at, and a nested marker sits at the margin plus this value, so a reader applying it to a nested item computes from an origin 20pt out at the default indent. The origin is the list's own left edge for both levels, which is what the next paragraph already defines. "Either horizontal inset does more than that" gave both insets a property only one has. The left inset moves the margin and narrows the override's width; the right inset narrows it and moves nothing, so it does not do more than moving, it does something instead of it. The count and the ordinal are gone from the inset sentence. Both lenses reached it from opposite sides: one measured the tally right and the sentence sound, the other showed "the fourth" has no antecedent, resolves to the third figure rather than the fourth, and adds nothing that "given relative to the margin" does not already select. Selecting by the property satisfies both and drops "in terms of" with it, which was this branch's first vocabulary hit since round seven. Also: the retry sentence had nested temporal prepositions, so a pre-layout refusal is now named as one.
Round seventeen measured the caveat added last round and found it attached to the wrong clause. "That last holds only while the marker's width is itself non-negative" hung the exception on the top-level figure, and the nearer antecedent was the reason rather than the claim, so the sentence read as qualifying something a negative marker does not falsify. Scoping one clause was the wrong repair anyway, because the paragraph's other two figures fail harder. A font size of zero or less makes every word measure zero or less, and WidestWord starts its accumulator at zero and only takes a strictly greater candidate, so it returns zero; the override's test then reduces to a non-positive content width, which is where the text is dropped rather than placed. The two override-firing figures therefore describe a route that cannot be reached at all below a positive size, and the nested override-quiet threshold is twice the indent rather than minus the marker's width, so it is wrong in both directions instead of merely conservative. So the four figures carry the scope they always needed, and the excluded range gets the mechanism instead of a fifth figure: the override cannot fire, both gutters reduce to the larger-of, and a marker of zero or negative width is the only input that has changed. The gutter rules are stated above and have survived every round; a caller can apply them. Enumerating what they produce is what has failed seventeen times. Measured on this worktree, page 400x400, document margin 72, Helvetica, probe resolving VellumPdf.Layout.dll under scratchpad/probe18. At size 10 all four hold exactly: top level reaches the page edge at indent -72 (x 0.00000), nested at -36 (x 0.00000), nested crosses the margin at -5.56000 (x 72.00000, with -5.55900 and -5.56100 either side) and reaches the page edge at -77.56000 (x 0.00000). At size -10 the first two give 68.50000 and 30.44000 instead of the edge, and a top-level item sits at 71.00000, left of the margin the figure promises. An earlier draft of this commit claimed a size of zero or less retires all four; at exactly zero two of them still hold, so the text states the scope and does not count. Three smaller corrections from the same round. The right inset does move content below the item, by re-wrapping the parent, so "without moving anything" is now "without moving the margin". A dropped relative pronoun is restored. A see reference no longer straddles a comment-line boundary. The CHANGELOG carried the same misreading and said a negative font size makes a fourth route cross. It changes which routes exist rather than adding one: the override never fires, the two override-quiet routes are what remain, and both of those cross. 0 warnings, format clean, clean-room clean, 7,099 tests passing in Release.
Round eighteen cleared the change round seventeen made. All four crossing figures hold at every positive font size probed, from 0.0001 to 200, each flipping within the 5e-6 the canvas can write; the override cannot change a gutter below a positive size; and a 5000-character word, which forces the override at any positive size, moves nothing at a negative one. So the scope word is right and the pointer back to the gutter rules is sound. What the round found instead was in the paragraph next to it, unchanged for eighteen rounds. The refusal was documented against the page's content width. It is the list's own area width, which is that content width narrowed by Margins. On a 400 by 400 page at 72pt document margins a nested list throws at 256 with no inset and at 200 with a 56pt inset on either side, so a caller who set an inset gets the exception at an indent both the tag and the Attention paragraph call safe. A flat list discards its item text at those same two figures. And nesting has a second boundary at half of that, which nothing recorded. The nested content gutter is twice the indent, which the paragraph below already states as a rule, so a child's own width reaches zero at half the area: 128, 100 and 78 measured for areas of 256, 200 and 156, exactly half every time. The child marker is inset by the indent alone, so it still fits and is still drawn. Between half the area width and the whole of it a nested list loses its child text as quietly as a flat one, which is the failure the Attention paragraph exists to warn about and which the word "instead" denied. Bisecting this needed a predicate that asks whether any child glyph survives: an earlier attempt asked whether the whole child word survived and measured the point where the text starts hard-breaking per character, 14.44pt lower, which is a different behaviour. Three smaller ones. "The override can never fire" is one case too strong: above the area width the predicate is satisfied and the override does fire, assigning the gutter the value the larger-of had already returned, so it is a no-op rather than an impossibility. The conclusion it supported is unchanged and the sentence now states what is guaranteed. FormatMarker said it formats a top-level marker; the renderer calls it for nested ordered children too, restarting at 1 under each parent. And the changelog counted twenty-seven members with a boundary block and twenty-two with an exception tag; measured from the tree it is thirty and twenty-six, overlapping in twenty-five, with five of the thirty refusing nothing and Document.Encrypt the one tagged member without a block, which is the shape the sentence already described. The changelog also stops narrating its own drafting. Seven passages reported what an earlier version of the entry said, what an earlier pass missed, and which marker moved where; one whole bullet was an editorial log. None of it is visible to someone deciding whether to upgrade. The indent entry now points at the rules the member states rather than re-deriving the enumeration, which is the move the member itself made last round. PageSize said "this property's default 72pt insets". PageSize has no insets; the 72pt default belongs to Margins, and the same misattribution had been copied into the changelog. Both name Margins now. A zero line width was corrected on LineSeparator and left standing on TableElement, which still said the grid grows heavier as the page is scaled down; it does not grow, it stays one device pixel while the page shrinks around it. 0 warnings, format clean, clean-room clean, 7,099 tests passing in Release.
Round nineteen split cleanly. The contract lens came back green: the four crossing figures hold at every positive font size probed, the area-width boundary and the half-width nested loss are right at eight geometries, the override cannot change a gutter below a positive size across 192 cases, and the thirty, twenty-six, twenty-five, five and one in the changelog all reproduce from the compiler's own generated XML. The facts were sound. The prose carrying them was not. Three high and eleven medium findings, four of them inside sentences written in the last two rounds, and one of those was the frame correction the previous commit was for, surviving in a third place I did not sweep: "the content-width boundary above", where the paragraph four above had just finished saying the boundary is not the content width. The block had reached 792 words across eight paragraphs for one double, and used the word content for three different quantities. So it is cut rather than patched again, to 414 words across five paragraphs. What stays is what nineteen rounds never falsified: the two gutter rules, the override and the marker-inset invariant, the area-width boundary, the nested half-width loss and its mechanism, and one instruction per bad input. What goes is everything derived from those: the four page-edge and margin-crossing figures, the non-positive-font-size paragraph, and the margin and inset bookkeeping that existed only to support them. Those measurements are on #476 now, with the geometry, the eight-row table and the bisection predicate, where a fixture can be named. A doc comment cannot carry a fixture, which is why every round found a new way to read those figures wrong. One claim was dropped rather than moved. "The nested content gutter is twice this value" is the usual arm and not the rule: with a child marker wider than the indent the gutter is indent plus marker width instead, measured at 49.328 where the sentence predicts 40. What survives is the conclusion, which holds either way, because the override reverts a too-wide nested gutter to twice the indent: the nested gutter reaches the area width at half the indent a top-level one needs. Elsewhere, the same sweep failure in miniature. A zero line width reads as proportionally heavier because it stays one device pixel; that was corrected on LineSeparator, then copied to TableElement carrying LineSeparator's own noun, so a table's borders were called "the rule". A cell's padding example licensed Right at 400 and then described a case where nothing is drawn at all. A non-finite font size on a band was said to cover six band and value pairs without the six ever being laid out. An image width was clamped to the content box and then exceeded the content box, one noun for two axes. A null template was "refused at the save" where every other use of refused in this branch means a checked rejection, and this one is an unguarded dereference. The changelog loses another five passages of the kind round eighteen started on: which figure a doc comment declined to print and why, and a roman-numeral enumeration that skipped item 18 where the member now states the rule that generates all of them. 0 warnings, format clean, clean-room clean, 7,099 tests passing in Release.
Round twenty judged the cut from both sides and both agreed it holds. The truth lens: the surviving mechanism is accurate, and the replacement half-width claim is true in precisely the case that broke its predecessor, verified with a child marker 8.3 times wider than the indent, where the nested loss is still at exactly half the area width. The prose lens checked every above and below and every pronoun for a lost antecedent after the deletion and found none, and judged that nothing which left is unrecoverable from what stayed. What the round found instead was one true case promoted to a universal, in a sentence this branch added last commit. "An inset on one side brings them all in by its own size" holds for the left and right edges and for neither of the other two: EdgeInsets is Top, Right, Bottom, Left, and only the horizontal pair reaches the area width. A caller with a top inset of 30 who followed that sentence would subtract 30 from every boundary in the paragraph and be wrong about all of them; one writing EdgeInsets(30) loses 60, not 30. The load-bearing sentence of the cut undercut itself. It said where an item lands follows from the two gutter rules above, and then, one clause later, that it depends on which branch the override takes. The opening paragraph states two gutter rules and the override, which is three; the sentence excluded the third and immediately invoked it. A reader taking the first clause at face value computes the wrong position for exactly the case the override covers. The CHANGELOG carried the same undercount, found by grepping the phrase rather than by waiting for the next round to name it. Two smaller ones from the same paragraph. The child marker is said to still fit across the whole documented band; over the top six points of it the marker itself is being hard-broken by the mechanism the block warns about for content, so it is now only said to be drawn rather than refused. And the block told the caller to keep the value positive while saying nothing anywhere about zero, which is the kind of stranded word the deleted paragraph used to cover. Elsewhere, findings a reader would act on. LayoutImage.Width's summary, which is the string shown first, carried three its with three different referents in twenty-six words. Document.Margins said its two wrong-cause messages were fixed elsewhere and still open here, citing two issue numbers without saying which was which. A null template was said to crash the save, where the rest of the corpus reserves crash for nothing and uses throws. Two save overloads described calling this twice, which reads as a third call. A four-way enumeration of the caller's own nullable build settings became the rule that generates it. The changelog stops announcing counts that do not match what follows: four further boundaries covered six, three smaller corrections had a fourth paragraph under it that was not a correction and is now its own entry. 0 warnings, format clean, clean-room clean, 7,099 tests passing in Release.
Three rounds flagged the entry's sentence length and none acted on it, because shortening sentences uniformly would not have helped. The measured gap is at the other end of the distribution: a fifth of the added sentences are short against a third in the reference, so the entry states mechanism after mechanism and never lands. Round twenty named the three worst and they are the three that were carrying structure a sentence cannot carry. The roll-call of covered members was sixty-seven words of comma list. Nobody reads that as prose; they scan it for their own member, so it is a list now. The two numeric boundaries were six figures across two semicolon-joined halves, so a reader after the FontSize range had to scan the whole Leading range first; they are a table. The three post-failure states were eighty-one words with three parallel branches across two semicolons, which is three sentences and is now three sentences. Median added sentence length falls from 27 words to 25 and the count over forty from 25 to 23. The rest of the distribution is left alone: the reviewer's reading is that the length itself does not impede anyone, and inventing short sentences to move a ratio is the kind of churn that has regenerated defects here before. 0 warnings, format clean, clean-room clean, 7,099 tests passing in Release.
A line-length pass in the previous commit wrapped every long line in CHANGELOG.md, not only the lines this branch adds. It reached release sections back to 1.1.0 and changed 83 lines there. Three of those were markdown table rows. A GFM row has to occupy one line, so each split produced a row with an empty second cell followed by a bogus row holding the exception type in column one, and the tables stopped rendering: the encryption-throw table in 2.3.0 and two rows of the signing table in 2.2.0. Two more splits fell on hyphens, so "end-of-line" and "self-referential" publish with a space in them. Several 2.3.2 entries were left with a one-word continuation line mid-paragraph. And three em dashes in 1.1.0 and 1.4.0 prose were re-emitted as added lines, which any gate counting em dashes over a diff would now charge to this branch. Everything from the 2.3.2 heading down is restored byte for byte from main, so the diff against those sections is empty again. The wrapping this branch actually needed is confined to the lines it adds. The rewrap was mine and the mechanical check that prompted it was mine, which is the lesson worth keeping: a check that reports a line is too long says nothing about whether that line is yours to fix, and a fix applied by pattern needs the same scope discipline as an edit made by hand. Table rows are exempt from a wrap limit; released sections are exempt from this branch. 0 warnings, format clean, clean-room clean.
The contract lens reached the member documentation and found nothing: every sentence it could put a measurement against held, including all six figures in the new boundary table, the four gutter rules line for line against the renderer, and the thirty, twenty-six and twenty-five that the entry counts. Its three findings were all in the changelog. The prose lens found seven more in the XML. In the members. LineSeparator said the token it writes is one the specification forbids, "so it is the format's business" — where the nearest antecedent is the token, and every token is the format's business. It is refusing a negative width that belongs to the format. TextStyle announced six band and value pairs without ever laying the six out, and then called the sixth "a footer already at negative infinity", which reads as the height the same sentence has just fixed rather than the font size. Its Leading tag said a page's content area cannot follow the leading to zero "the way a band's height does", which elides into a band's height following the leading to zero; a band's height grows with it, and what reaches zero is the area. LayoutImage left two comparisons live in one sentence, width against width and height against height, and then wrote "The comparison". Cell cited a measurement of all four padding edges as evidence for a claim about the vertical pair. The Attention marker was on the wrong member twice. ListElement carried one on a paragraph that states a measurement convention, which is a mechanism and not something a caller falls into. PieChart.Alignment had lost one on the paragraph that is exactly that: justify is neither refused nor honoured, and because the default here is centre, asking for it loses the centring you already had. In the changelog. A list of four causes was attached to one exception type by the word alongside, where positive infinity raises the other type and this branch's own tag says so. An indent inset was said to move every boundary by its own size; the boundary at half the area width moves by half, which the next paragraph's own figures show nine lines later. "Still fits" was corrected in the member last round and left standing here. Two counts were announced and not met. A retry sentence rested on a quiet case that had been cut, leaving "quiet too" with nothing to point back at. And a correction quoted a before-text that never shipped: v2.3.2 reads "Must be finite and non-zero", and the sentence complained of exists only inside this branch. The roman-numeral claim was wrong in a way worth keeping: measured over thirty-two items, the revert override fires for none of them, because it needs the widened gutter to leave less room than the item's longest word and an ordinary content width never reaches that. The entry said the two rules alternate from item 17; what is true is the narrow thing it replaced, that item 17 is the first marker to exceed the indent. CONTRIBUTING gains the rule this session earned. A public member has three sets, not two: what it accepts, what it refuses, and what it neither reads nor refuses. The third is the one that hurts, because the call succeeds and hands back something else, and the rule being written entirely around refusal is what kept every lens pointed at the exception list. It is answerable mechanically: take the format's own field list and grep the implementation for each name. ListElement.Margins is made load-bearing by this branch and still has a one-line summary. It is left for #510, which documents the six element margins together. 0 warnings, format clean, clean-room clean, 7,099 tests passing in Release.
Three findings from reading the surface rather than commissioning a round. The exception tag still said the refusal fires at the area width "narrowed by Margins", where the remarks two paragraphs up had been corrected to "narrowed by the left and right edges of Margins". The tag is the imprecise one, and a tag is what someone reads while writing a catch clause. That is the third unswept sibling this session, in the commit whose own message is about unswept siblings, so the grep is now part of applying a finding rather than a step after it. The frame paragraph forward-referenced a boundary its own next paragraph had not introduced yet: "or by half of it for the one that sits at half the area width". A reader meets "the one" before there is one. It states the rule instead, that a left or right inset narrows the area and every boundary below moves in with it. And the override sentence hung a comma-list off a colon on the longest line in the file. It is two sentences. Checked while reading, both mechanically over the compiler's own generated XML: every exception type that carries a tag is also named in that member's prose, across all twenty-six tagged members, so no caller meets a type in a tag that the paragraph does not explain. And the Attention marker now sits exactly once on each of sixteen members, none twice, after moving it off the list indent, where it labelled a measurement convention, and back onto PieChart.Alignment, where asking for justify silently loses the centring the default gave you. 0 warnings, format clean, clean-room clean, 7,099 tests passing in Release.
Tim81
added a commit
that referenced
this pull request
Sep 18, 2026
The #510 entry was written in review vocabulary ("the ignore set is in", "unread insets") and described a cell as an unbreakable box. It now lists the boundaries a caller is likely to act on, each with its issue. Two sentences in the #526 entries stopped being true once the Save remarks were corrected: a refusal from the kernel's checks before writing leaves the document alive rather than dead, and Conformance and Encrypt now document the PDF/A pairing themselves. Both are in the unreleased section, and the diff against every released section is empty. The record rewrite gets a Changed entry, since it is a source change to six shipped types even though nothing a caller observes moved.
Tim81
added a commit
that referenced
this pull request
Sep 18, 2026
Round 6 found 3 high and 27 medium defects in the text af2b61a left. Each change below was reproduced against the branch's code before it was written; the probes are scratch files, not tests. No code line changes. - Unpaired surrogates: round 5 tagged the save, the bands and FontRef, but the throw also comes from TextStyle.MeasureString, FontReference.MeasureString, and the Layout methods of the paragraph, list and table renderers (each measured with a high or low surrogate in an embedded font; a standard-14 font measures such text without an exception). Every public member that takes text to be drawn now carries the tag: Paragraph, Paragraph.Add, Heading, ListItem, ListItem.AddChild, ListElement.Add(string), Cell, Row.AddCell(string), TextRun, RunningBand and its Template, and Document.Add(string). A band throws only when the surrogate falls inside the part that fits the band; a truncated band saves. - Document.Margins (text from before this PR): NaN and negative infinity do not all raise InvalidOperationException. On the left edge they save and write NaN or -Infinity into the text matrix, and negative infinity at the bottom saves every element onto one page, with 147 of 200 paragraphs below it. The remarks now give one rule per edge; the #526 CHANGELOG sentence repeating the old claim is corrected too. - LayoutResult.Full's tag named any non-finite Bottom; only negative infinity reached ArgumentException, while NaN and positive infinity moved a following heading or paragraph to a new page. Partial gains the 50,000-continuation InvalidOperationException tag. - Both Add(IRenderer) overloads, and the saves' NullReferenceException tags, now cover a renderer returning a null result or a Partial with a null renderer. - The Document constructor and Dispose listed what a save reports first, and both lists missed measured cases (a null destination, a cancelled token, a path save that truncates the file before throwing). They now defer to the save's own order. Dispose's summary no longer says it releases resources: the kernel only sets a flag. - SaveAsync: a cancellation during the layout with a null destination raises ArgumentNullException first. Render: a linearized kernel document reports a closed destination as ObjectDisposedException. - PageSize: a rectangle not at the origin moves the content by minus that corner, so a negative corner moves it up and right. - ColorRgb and ColorCmyk promised a later major would refuse out-of-range and non-finite channels (#509). #509 is a patch-release issue for non-finite channels only; the paragraph now says that. Its body misquoted ISO 32000-2 8.6.4.3 as requiring clipping and has been corrected on the issue. - TextStyle.LinkUri: on a justified line in an embedded font the link rectangle is placed where the words would be unjustified, 391 points from "LINK" in the measured case. Filed as #551. - DrawContext: a null page leaves registered structure elements without a /Pg entry (0 of 3 had one); AddUriLinkAnnotation throws from the call and now has the tag. IRenderer.Draw says calling it before Layout is unsupported, and TableRenderer.Draw tags the IndexOutOfRangeException a header table gives. - Row() no longer says a row cannot join a table (a cast of Rows adds one); TextRun.Style's null throws only for text holding a word; PieSlice.Value and its constructor tag the ArgumentException whose ParamName is Slices; TableElement.BorderWidth gains a "Do not pass" paragraph for the negative width it writes as is; LayoutImage.Margins no longer points at Width for a positive-infinity rule Width does not share. - Voice: "the too-tall exception" is spelled out as InvalidOperationException on the eight lines this PR added; the surrogate sentences make text, not the font, the subject; smaller referent and repetition fixes, and ten blank doc lines with trailing whitespace that earlier edits left are removed. The count of public members with an <exception> tag moves from 115 to 119, counted in the compiler's XML output.
Tim81
added a commit
that referenced
this pull request
Sep 18, 2026
Round 11 found 1 high and about 10 medium defects in the text c8e4760 left, down from about 19. About 6 were sentences round 10 wrote; the worst was the list line loss, which c8e4760 stated for every two-line item at 12pt after measuring one list at the top of a page. The fix diff then went through a contract and a voice review of its own, which found no high and 11 medium defects before commit. No code line changes. - ListElement: only the last item a list draws on a page can lose its last line. The draw pass lays each item out again in the height left to the bottom of the list's area, which for that item is exactly its own. Whether a line is lost depends on the font size, the line count and where the item falls: a single two-line item at 12pt at the top of an A4 page draws one line, and the same item further down draws two. c8e4760's commit message listed sizes measured at one position only. - TextStyle.LinkUri: without a link, paragraph and list-item text at a non-finite position saves; a heading at a non-finite height throws either way, from its bookmark. - Document.Margins: a finite negative inset moves that edge of the content area past the page; -1e308 overflows and writes Infinity or NaN, or throws for linked text. - DocumentRenderer.BandTruncations: a band is cut only when its measured width exceeds the content width, so a negative font size or a NaN content width is never reported. - Paragraph white space: a carriage return, a line feed, or CR LF starts a new line, and other white space is dropped at the start and end of each line. Justify says which line is last with trailing line breaks. - Cell.RowSpan: the save throws when a held group is taller than the page leaves below the repeated header rows; a header row after the first data row counts as a data row; a header-origin span's cell is drawn again on continuation pages, as tall as the header rows it covers there. - SaveAsync: each listed exception faults the returned task, except a cancellation, which ends it Canceled. - Tags: Heading.Text, ListItem.Text, Cell.Content and LayoutImage.Image gain the tags TextRun.Text carries; 18 style tags and the band remarks cite TextStyle.Leading as well as FontSize. - CHANGELOG: the #526 list-gutter sentence said the revert never fires on an ordinary page. On US Letter at 72-point margins, item 18 with an unbroken word of 68 lowercase "a" reverts, and its text starts inside the marker. Recorded for the v2.3.4 follow-up: the gutter revert that places text inside the marker needs a maintainer decision.
Tim81
added a commit
that referenced
this pull request
Sep 20, 2026
Closes #510. #503 and #526 documented the members found by searching for direct throws. This PR gives the rest of the Layout package's public surface the same contract: what each member **refuses**, what it **accepts but that must not be relied on**, and what it **silently ignores** — the third set being the one that hurts, because the call succeeds and hands back something other than what was asked for. ## What is here The package's public API files list 429 entries. Counted in the compiler's XML output on this head, **137 public members and the `TextRun` type** carry an `<exception>` tag: 82 methods, 55 properties and that one type. Every boundary was measured against a probe built from this branch, not transcribed from the issue. A sample: - `LoadTrueTypeFont` raises `FileNotFoundException` for a missing file and `DirectoryNotFoundException` for a missing directory, from that call rather than from `Save`. - Symbol and ZapfDingbats measure every one of the 63,488 non-surrogate BMP characters as zero width, at each size probed. A paragraph set wholly in either is never wrapped, and a centred line is placed at the exact centre of the content area as if it had no width — 297.64 on A4. - A nested list's indent raises the too-tall `InvalidOperationException` at its own area width exactly and inclusively: 451.2799 saves, 451.28 throws, and the boundary moves with the list's own margins. - `ColorRgb.FromHex(0x00FF0000)` and `0xAAFF0000` give the same colour; the alpha byte is ignored. - `javascript:alert(1)` on `LinkUri` and `not a tag` on `Language` both save. ## Records rewritten as explicit properties `13b1c72` rewrote six shipped positional records — `ColorRgb`, `ColorCmyk`, `EdgeInsets`, `LayoutBox`, `BandTruncationWarning` and `PieSlice` — as explicit properties, because a positional record gives its properties no place to carry remarks. That is a source change to shipped types, so it is proved rather than asserted: **ApiCompat** against the published 2.3.2 package, and `RecordShapeTests`, which pins `ToString`, equality, `with` and `Deconstruct` against the values the positional declarations produced at `574c62b`. The CHANGELOG's `### Changed` entry says so. ## Review 21 rounds. The last three ran four independent lenses each — three contract lenses that measure with probes, one voice lens for register and ambiguity — plus a pre-review of every fix diff before it was committed. Blocking findings fell from roughly 47 in round 1 to 0 HIGH and 6 MEDIUM in round 21. One HIGH has been raised since round 13, in round 18. Round 21's two contract findings were both older than the text under review: a sentence from round 6 claiming a null page leaves *each* structure element without one (`RegisterStructElemTree` never touches `Page`, so a root registered through it keeps the caller's page and the save writes `/Pg`), and round 9's tag sweep, which gave `Add(string, TextStyle)` its save-time exception tags and stopped before the six siblings that reach the same code. Both are fixed, the second across all six overloads with the type set measured per overload. A third finding corrected `Heading.Level`, which said the outline "still nests on the number you gave": the builder hangs an entry under the most recent earlier entry at exactly `Level - 1`, so after a level 0 heading both level 5 and level 500 land beside it at the top level. A pre-round sweep of the three classes behind rounds 19 and 20 found what those rounds had not. The `ArgumentException` tags on `DrawContext` blamed the caller's argument for a value the save never sees — what is written is the flipped value, so a finite `layoutY` is refused when `PageBounds`'s height is not finite or the subtraction overflows. A page from another document drops a link annotation entirely, while still writing an outline entry with a null destination. Behaviour found by probing that no document ever described is filed on #552 rather than fixed here. Defects this PR documents rather than fixes are #543-#551, milestoned v2.3.4. ## Scope Documentation only, apart from the six record rewrites above and five explicit parameterless constructors that exist to carry a doc comment. Layout tests run with `REQUIRE_ORACLES=1`, so no oracle case skips silently: **412 run, 0 skipped, 0 failed.**
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #503, which merged on CI alone before its review ran. This is that review's outcome plus
three further rounds, all documentation: no behaviour changes, no public API changes.
Why four rounds
Round one reviewed the merged #503 and found ten false statements. Each subsequent round found that its
predecessor's corrections had introduced new ones. The pattern was consistent and worth naming, because
it is the reason this is four commits rather than one:
lived in five places and one was fixed.
ten of eighteen marker paragraphs in the package. That was my instruction and it was wrong.
is what removed most of the remaining contradictions rather than patching them one at a time.
Nine Opus reviewers across three passes. Every figure below was measured on this branch.
What was actually wrong
Statements that were false, not merely unclear:
structurally valid file whose content stream carries a non-finite operand, and a text extractor
reports an unknown operator and silently drops the footer. Five statements about that one member
contradicted each other, including the exception tag a caller writes a
catchagainst.area is still positive. Across the whole range of that exception the band has passed neither.
text said everything above a threshold throws.
page the first throwing value drops from 680 to 262, which nothing said.
narrower than the code.
Exception tags added for types reachable from a save but previously undocumented, including one that
derives from a tagged base type, which is the case the contributing rule was rewritten to name.
What is deliberately left
Seven findings are recorded and not fixed: bold-run uniformity, marker density against the reference,
four rewrap artifacts, and some repeated phrasings. Four rounds have each regenerated defects while
fixing everything offered, and one pull request in this repository took eight rounds that way. The
cosmetic tail is not worth a fifth.
Verification
7,023 tests passing with none failing, Debug and Release. Format and clean-room clean. All verified on
the final commit rather than on the work in progress.
The documented member count and tag count are measured from the compiler's own generated XML rather
than by scanning source text, which is what a reviewer got wrong by 37 on an earlier pass.
🤖 Generated with Claude Code
https://claude.ai/code/session_013fvSmjcPtC5Ef3K9CWwVGU