Fix the README HTML coverage collapse; de-flake the generative gate#37
Merged
Conversation
…proof
Three faults, one incident. The README's HTML parser-agree row published 1.2%
(from 95.3%) after the auto-regen:
1. The HTML coverage harness duplicated the element-tree normalizer from
html-conformance.ts ("VERBATIM from" — and then it drifted): the copy kept
reading the CST `text` field the span-only contract deleted, so every tag
compared as '' and tree equality collapsed. The normalizer now lives ONCE in
test/html-tree.ts (side-effect-free, source-slicing); both the gate and the
metric import it. Metric verified back at 95.35%.
2. The metric is not in the local gate chain, so the collapse shipped silently
through two README regens. coverage-table now refuses to WRITE a parser-agree
value that fell more than 20 points below the committed table — a collapse is
a broken harness, not a result, and the auto-regen workflow must fail loudly
instead of publishing it.
3. Found while validating the fix: the generative gate flaked under machine
load — grammar-gen carried a 9s WALL-CLOCK budget (despite its own "ALL
DETERMINISTIC" header), and on a saturated machine the yaml depth strategies
were cut mid-walk, the #23/#24 witness shapes vanished from the corpus, and
mustCover failed with no code change anywhere (it also made bisecting the
README incident actively misleading). Every strategy is already bounded by
deterministic work caps — the whole 7-grammar sweep is ~5s — so the timer is
gone and generation is a pure function of the grammar again
(opts.timeBudgetMs stays as a documented no-op, like opts.seed).
29/29 gates; html-conformance and src-coverage-html share one tree definition.
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.
The HTML parser-agree row published 1.2% because the metric's duplicated tree-normalizer kept reading the deleted CST
textfield — deduped intotest/html-tree.ts(metric back at 95.35%), plus a coverage-table tripwire that refuses to publish a >20-point parser-agree collapse (broken harness ≠ result). While validating, found and removed the generative gate's 9s wall-clock budget: under machine load it cut the yaml depth strategies mid-walk and the #23/#24 witnesses silently vanished — generation is now a pure function of the grammar (all strategies were already work-capped; the 7-grammar sweep is ~5s). 29/29 gates.