R19
What to build¶
Markdown and HTML present the same labels and numeric evidence in corresponding columns.
Source and evidence¶
Repository scientific/architectural review, snapshot 86c8517, item R19.
Classification: confirmed defect; medium severity.
The intermediate presentation stores Markdown table lines. _text() escapes
literal pipes with a backslash, but the HTML renderer's _table_cells() splits
on every pipe without recognizing those escapes. A valid Measurement label
containing a pipe becomes two cells and shifts its numeric evidence into the
wrong columns. This changes the presentation of a valid report, not the stored
numeric values or HTML script safety.
The retained HTML column probe evaluates the public label
quality|name with score 1 and unit ms. HTML contains six headers but seven
data cells: quality\\, name, 1, ms, [1, 1], 1, percentile_bootstrap.
The Score column receives name; Unit receives 1; Interval receives ms.
The existing HTML contract uses exactly this pipe-containing label but only
checks that generic units, intervals and escaping occur somewhere in the output.
It does not verify label preservation or column correspondence.
Acceptance criteria¶
- [ ] The quality|name fixture has equal header/data cell counts and preserves the complete label in its name cell.
- [ ] Score, unit, interval, count and method remain in their exact intended columns.
- [ ] Backslashes, multiple pipes, hostile HTML and Unicode labels retain safe text rendering.
- [ ] Both renderers share presentation semantics without introducing scripts, remote assets or automatic links.
- [ ] Preserve Consumer-owned meaning, payload-free evidence, disabled optional-import isolation, safe diagnostics and the non-relaxable Safety Floor.
- [ ] Run the narrowest observable contract, then applicable committed Make gates. Record every command and outcome; update specifications/compatibility evidence for changed public or wire contracts. Run native Collector verification for changed Collector assets and build for packaging changes.
Design guidance¶
Prefer typed rows/cells rendered independently to Markdown and HTML. If retaining the intermediate parser, correctly distinguish escaped delimiters; a general Markdown framework is unnecessary.
Keep prefactoring narrow and verifiable in this slice. Reuse established owners and structural interfaces; introduce a pattern only when it clarifies a real responsibility or variation point. Do not add consumer vocabulary or private payloads to platform code or evidence. Mocked/local results must not claim hosted, production, accelerator or release qualification.
Blocked by¶
None (can start immediately). Shared-area coordination is useful, but no other review fix is a genuine prerequisite for this slice.
Verification scope¶
Convert the described counterexample or investigation oracle into an observable test at the lowest suitable public boundary. Prefer bounded operation-count or deterministic interleaving evidence to flaky timing assertions; timing guarantees need a declared tolerance and independently owned cleanup. This ticket authorizes remediation/research, not publication or deployment.