From afbe7e7d1fe926a642749cf82aa35848b1481aee Mon Sep 17 00:00:00 2001 From: Edward Langley Date: Tue, 22 Sep 2026 01:15:47 -0700 Subject: [PATCH] docs: record the measured generator coverage of the new kind_line rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit context/code/formula-and-io.md already says a new grammar production needs generator coverage or the proptests quietly stop describing the format. `kind_line` is an alternative of `category_entry`, so the grammar walk reaches it with no generator change — but that is precisely the claim the section exists to say must be checked rather than assumed. Probed over 500 files from generator::improv_file(): 14 carried a `kind: label` line and all 14 parsed to a CategoryKind::Label, so each 256-case proptest run exercises the production about seven times. The probe is not kept. Its rate depends on proptest's internal RNG, so as a standing assertion it would fail on a dependency bump for a reason that has nothing to do with the format — the measurement belongs in the argument, where it can be re-run and corrected. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01FC2jVn8Au7E9JPkw6bwXXH --- context/code/formula-and-io.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/context/code/formula-and-io.md b/context/code/formula-and-io.md index dad4cb72..00f0835b 100644 --- a/context/code/formula-and-io.md +++ b/context/code/formula-and-io.md @@ -207,6 +207,17 @@ One case the format already allowed and this had to answer: two merged in pass 1. Absence is not a claim, so the merge keeps a stated kind rather than letting a later kindless section erase it. +**The generator coverage this section demands was measured, not assumed.** +`kind_line` is an alternative of `category_entry`, which the grammar walk +reaches generically, so nothing in the generator needed changing — but that is +the kind of claim this section exists to say must be checked. Probed with a +throwaway test over 500 files from `generator::improv_file()`: **14 carried a +`kind: label` line and all 14 parsed to a `CategoryKind::Label`**, so at the +default 256 cases each proptest run exercises the new production about seven +times. The probe was removed rather than kept: its rate depends on proptest's +internal RNG, so as a permanent assertion it would fail on a dependency bump +for a reason unrelated to the format. + ### The tree walkers are infallible by construction Every `build_*` in `parser.rs` operates on a `Pair` pest has already