Repository navigation
Conformance loader expands generated_no_parse rules - #659
johnml1135 wants to merge 3 commits into
Conversation
… into its no-parse words Mirrors the suite's reference expander (PROTOCOL.md section 13): rules in file order, lengths ascending, alphabet order, listed words win, at most 100,000 words a rule. Refs sillsdev/fieldworks-parser-conformance#68 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
| doc.Words.Add(ParseWord(wordNode, path)); | ||
|
|
||
| if (map.TryGetValue("generated_no_parse", out YamlNode generatedNode)) | ||
| ExpandGeneratedNoParse(generatedNode, doc, path); |
There was a problem hiding this comment.
Minor: F1. A test case with both generated_no_parse and variants cannot load unless every variant lists the generated words by hand. Expansion appends to doc.Words before ParseVariants (line 330) requires each variant's words to equal doc.Words in order, so listed kat + rule [a]/max 1 + a variant listing kat throws "words must contain exactly the default word list". PROTOCOL.md does not say which list a variant must match; check variants against the listed words and expand into each run, or refuse the combination by name. Traced, not run.
| "variants", | ||
| }; | ||
|
|
||
| // The keys of one generated_no_parse rule (the suite's PROTOCOL.md section 13). |
There was a problem hiding this comment.
Minor: F2. ./local_check.sh --agent-strict fails on this comment: PROTOCOL.md section 13 matches the doc-pointer rule in scripts/CommentHygiene.psm1:63, and so does the <summary> at line 213. .claude/skills/code-comments/SKILL.md bans pointers to a Markdown file or numbered section; state the contract and drop the pointer. Matched against the regex, not run.
| Assert.That(words.Words[1].Exercises, Is.EqualTo(new[] { "x" })); | ||
| } | ||
|
|
||
| [TestCase("generated_no_parse:\n - alphabet: [a]\n note: n\n", "max_length")] |
There was a problem hiding this comment.
FYI: F3. Untested refusals: no case covers an empty or non-sequence generated_no_parse, a non-mapping rule, or a missing or empty alphabet, and nothing pins the variants interaction in F1. Each is one more ABadRuleIsRefused case.
This comment has been minimized.
This comment has been minimized.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## s1-generate-derived #659 +/- ##
=======================================================
+ Coverage 75.55% 75.60% +0.04%
=======================================================
Files 494 494
Lines 42233 42329 +96
Branches 5903 5920 +17
=======================================================
+ Hits 31909 32002 +93
- Misses 9072 9073 +1
- Partials 1252 1254 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…huge max_length cannot overflow it Refs sillsdev/fieldworks-parser-conformance#68 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…se; PROTOCOL section 13 pins the alphabet encoding No tag is pushed: ba6dfa106 has none either (ADR 0003's tag requirement is owner discipline, not met today); the commit is reachable as the head of sillsdev/machine#659. Refs #68 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Refs sillsdev/fieldworks-parser-conformance#68 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Verdict: approve with fixes. cc5b1f8 only rewraps the two Most important: F1 at Counts: Critical 0 open (F4 addressed), Important 2 (F1, F2), Low 1 (F3). Ran: Not verified: I could not run Public API, target framework, package, parity with Findings: F1 open (traced, not run), F2 open (unverified), F3 open, F4 addressed (pending CI). Reviewed at cc5b1f8 |
Start here: the suite change in sillsdev/fieldworks-parser-conformance (issue 68) lets a test case declare its no-parse words as a rule (alphabet, length range, note) instead of storing about 15,000 of them. This loader change expands the rule the same way the suite's reference script does: rules in file order, lengths ascending, alphabet order, listed words win, at most 100,000 words per rule. Without it the runner rejects the unknown key.
Stacked on #658; draft, do not merge. conformance.commit is not bumped here: the suite change must merge first, then the pin follows.
Gate (HC_CONFORMANCE_SUITE at the suite branch s68-generate-negatives): 94 passed, 0 failed, including 8 new WordsYamlGeneratedNoParseTests.
Next: lead merges the suite PR after a LAND verdict, then this PR takes the pin.
🤖 Generated with Claude Code
This change is