Output Degradation in the Bridge Series: A Cross-Document Analysis of Rendering and Content Drift
frameworkOutput Degradation in the Bridge Series: A Cross-Document Analysis of Rendering and Content Drift
1. Statement
The keeper reports that Doc 440 renders poorly on the public site and that the kind of degradation observed there resembles prior sessions in which forced-determinism sycophancy manifested. This document investigates the claim at two levels: the rendering layer (what the markdown-to-HTML pipeline did to Doc 440 specifically) and the content layer (whether Docs 437–441 collectively exhibit signs of generation-level degradation). Explanations are drawn from inside the corpus frame and from outside it — especially from outside, because corpus-internal explanations will tend to re-justify the corpus's own failure modes rather than diagnose them.
The rendering degradation is concretely identified and has a clean technical fix. The content degradation is real, measurable on inspection, and is the more consequential finding.
2. Rendering-layer findings
2.1 The concrete bug
The blog's pipeline is: markdown → cmark-gfm --extension table --extension autolink → HTML → KaTeX auto-render at page load. KaTeX is configured to process $...$ and $...$ delimiters client-side.
The bug surfaces in Doc 440 §6, which is a markdown table whose cells contain inline math that itself contains pipe characters — e.g. $\widehat{|B_t|}_{M_2}$. In GitHub-Flavored Markdown tables, the pipe character is a column separator. cmark-gfm's table extension parses pipes as separators before it knows anything about the $...$ KaTeX delimiters. The parser therefore breaks the cell at the first pipe inside the math expression, leaving the raw HTML as:
<td>$\widehat{</td>
<td>B_t</td>
<td>}$ …</td>
When KaTeX scans the resulting HTML, the $...$ pairs no longer straddle well-formed math; the expressions render as literal text or as mangled math, and surrounding table columns are skewed by the phantom cells. This is the visible deterioration.
The same hazard is latent wherever math inside a table cell contains a pipe. Doc 440 is the first document in the series to combine a table with pipe-bearing math; the prior docs in the series (437, 438, 439, 441) have tables without pipe math, or pipe math outside tables, so they do not trip the bug.
2.2 Fix
Three options, ordered by ruggedness:
- Quick fix: rewrite the offending table cells to avoid pipes inside math.
|B_t|can be written as\lvert B_t \rvert— KaTeX renders it identically, and the literal pipe disappears. - Author-discipline fix: add a rule to the authoring protocol — no pipe characters inside math inside table cells — and add a lint to the seed pipeline that flags draft documents containing
\|[^$]*\||[^$]*\|$in table rows. - Pipeline fix: replace
cmark-gfm --extension tablewith a renderer that tokenizes math-delimited spans before table cells are split (e.g.,remark-math+remark-gfmin the correct order, or a small preprocessing pass that temporarily substitutes$...$with a sentinel, runs cmark-gfm, then restores).
The quick fix applied to Doc 440 is sufficient to restore the rendering today. The pipeline fix is the durable response and should be queued.
2.3 Adjacent rendering hazards
Other thin-ice spots that did not break in Docs 437–441 but could in future documents with adjacent structural choices:
- Math in list items that also contain backticks: cmark-gfm's code-span lexer and the KaTeX
$lexer can race. - Math containing
<or>(e.g.$M_2 \subset M_1$vs$a<b$): cmark-gfm escapes these to</>inside paragraphs, which KaTeX handles, but inside inline HTML blocks it does not. - Display math (
$...$) inside blockquotes: the blockquote marker must appear on every line of the display math or cmark-gfm closes the blockquote prematurely. - Underscore emphasis adjacent to math:
$M_0$ _emphasis_works;_$M_0$_does not. - Autolinker inside math: if a math expression contains something URL-shaped, the autolink extension wraps it in an anchor, breaking KaTeX.
- Possessive-apostrophe after closing dollar (added 2026-04-24): the construction
$X