Skip to content

Add a conformance suite for HermitCrab, with its adequacy argument - #480

Open
johnml1135 wants to merge 42 commits into
masterfrom
integrate-conformance-framework
Open

johnml1135 wants to merge 42 commits into
masterfrom
integrate-conformance-framework

Conversation

@johnml1135

@johnml1135 johnml1135 commented Aug 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This adds a conformance suite of synthetic HermitCrab grammars, with CI gates for parse results, coverage claims, and generated ledgers. This revision adds named parser-settings variants. The runner creates a fresh morpher for each run, applies its settings from constructor defaults, and compares complete parse-identity multisets and statuses against that run's expectations. A variant supplies the same ordered words as the default, with complete expectations of its own. Diagnostics name the variant; variants add no fixture or semantic-coverage credit.

Supported settings are DelReapps, MaxRoots, MakePartialsFinal, MergeAnalyses, and explicit per-call GuessRoots. The main review risk is accidentally claiming support for a setting an adapter cannot apply, or treating incomplete output as a valid empty result. Unsupported settings, missing rows, and zero-comparison variants fail; PanGloss also rejects capped or timed-out output.

  • PROTOCOL.md, the schema, and WordsYamlLoader: closed settings and strict structure; the loader also checks name uniqueness and ordered inputs.
  • WordsYamlMorpherSettingsTests: malformed and mismatched inputs, wrong variant expectations, and variants whose guesses leave no comparable rows.
  • Five selected fixtures exercise all supported settings; each engine compares all expected identities and statuses for every run.
  • Coverage credit and manifest fixture counts remain independent of variant runs.

No parser engine changed. MaxAlternatives remains unsupported because PanGloss does not implement HC's typed overflow behavior; MergeMSAs remains unsupported because it requires the FieldWorks project loader. MergeAnalyses currently verifies output preservation only; it does not measure merge-fold counts. The new C# and PanGloss contract is documented in Machine's variant protocol.

The PR targets master; review freshly fetched origin/master at 2f70c04698e13f7cf942e4245ae20d77de19ee5a (merge base a2f80e28debaffda8a65b3b11875c80479768bc7). Head: 184bcd46622571a06f1a1fdbdff2fb155714a1c6. The companion PanGloss adapter tested at e2627c9 is on feat/conformance-settings-variants.

Validation at the pinned head: local_check.sh --agent-strict passed; Release had 0 warnings/errors; HermitCrab 634 passed, SIL.Machine 887 passed / 3 skipped, Thot 93 passed, and SentencePiece 4 passed. All 72 C# runs across 62 fixtures passed. The selected five-fixture matrix passed 15/15 runs and 81 word-run rows in both C# HC and PanGloss. PanGloss harness tests: 53 passed; pinned parser tests: 117 passed / 10 marked skipped. The all-scope pin gate passed across 130 fixtures, 1,414 default words, and 10 variants, with three existing pathological/crash exclusions. Broader Rust workspace and Foma suites were not run; production parser engines are unchanged.

Oracle observations and verification detail

C# HC observations were collected on 2026-10-22 with harness draft 1836d23ccb86f1e9da123a43feb661ea76e85d0b, atop the then-current PR #480 head 72dbd4f9bd686d1193d11cf8f908d50ffa878ba1; the HC engine was unchanged. The assembly SHA-256 was 2547068882BEC56873F0678922D11D7F81ED4D68B3B99DCDB71EBF5863714444. The five measured fixture/settings pairs are deletion reapplications (DelReapps), compounding breadth (MaxRoots), final-template partial discriminators (MakePartialsFinal), final-template merge key (MergeAnalyses), and guess-roots settings (GuessRoots). Exact witness outputs and reproduction commands are in the durable observations.

The adapter matrix used the same five fixtures, each with its default plus two variants: 15 complete runs and 81 word-run rows per engine. C# self-check included pathological fixtures. PanGloss validation also included the managed pg-conformance-fixtures and pg-parse checks (both exit 0) and the 130-fixture pin gate. The C# coverage report passed with 31/31 constructs and 15 allowed dead rules. CSharpier checked the 23 changed C# files explicitly. The variant protocol forbids capped or timed-out output from matching an expected empty result; the PanGloss tests include that negative control.

Deferred suite work and prior stack notes

Deferred until after the Hermit Crab Optimizations release. Nothing stacks on this PR any more: #534, #540, #522 and #519 were retargeted to master, and #543 was closed. Their suite-side work is held back and will be added here when this resumes, each once its own PR has merged:

The earlier body also recorded these stack descriptions:

Suite review map

Where to look

  • .github/workflows/conformance.yml -- the gate. Runs on any change under src/SIL.Machine.Morphology.HermitCrab*, src/SIL.Machine, the HermitCrab tests or conformance/: self-check of every fixture, the coverage report, and a freshness check on the generated CSVs.
  • conformance/dead-rules-allowed.tsv -- the coverage report now exits 1 on a rule no word exercises unless it is listed here with a reason, and on a listed rule that is exercised again. Today: 15 entries, all deliberate (inactive decoys, refused controls, crash pins).
  • conformance/PROTOCOL.md -- the adapter contract a second engine implements.
  • src/SIL.Machine.Morphology.HermitCrab.Conformance/Runner.cs -- self-check: fixtures run in-process against HermitCrab as the oracle.
  • global.json -- new: pins the SDK to 10.0.100 with latestFeature roll-forward, for the whole repository.

Reading order

About 25k lines are harness code (src/SIL.Machine.Morphology.HermitCrab.Conformance) and 16k are its tests. The rest is data: fixtures (conformance/edge-cases, conformance/languages, about 21k), generated ledgers and evidence cards (about 28k), and docs. Generated files are rewritten by hc-conformance --write-* and pinned by tests, so they need checking for freshness, not reading line by line.

Earlier suite revision and validation decisions
  • Rebased onto master (be5407d).
  • Dropped Trace.FailureAllomorph: an engine API change does not belong in a test-suite PR, and Trace HermitCrab failure reasons and template slot outcomes #534 adds the same fact as Trace.Allomorph. Generated CSVs regenerate byte-identical without it.
  • The coverage report could not fail; it now gates dead rules and uncovered constructs.
  • ci.yml is back to master. Its added fixture run duplicated ConformanceFixtureGateTests under dotnet test, and parity-check.py's remaining check is now enforced by the coverage report.
  • The counterfactual sweep read mutant output in the console code page, so "katibɯd" came back as "katib?d" and a mutation that changed nothing looked like evidence. It now reads UTF-8 (CounterfactualGate, plus a regression test). Regenerating the ledger demoted two surfaces that had only that false evidence: Gloss to Unobservable and HeadFeatures to RequiredByDtd. The gap ratchet moves from 25 to 26 for Gloss.
  • local_check.sh ran --semantic-coverage, which exits 1 by design while the catalog is incomplete, so it could never pass. It now runs the same gates as conformance.yml.
  • chained-output-feature-override-loss said it fails on master on purpose. It has passed since Change Add to PriorityUnion #494; checked by running it at 52d069f (red) and 7109531 (green). The header now says so.
Earlier decisions, and why
  • PCRE.NET (now on master) ships an IIncrementalGenerator. The compilation-graph loader admits it only by content hash, and a probe runs it and fails closed on any generated output.
  • An expect_crash fixture passes only if the same engine completes an ordinary fixture in the same run, so a broken adapter command cannot pass as a crash (conformance/PROTOCOL.md).
  • *.fwdata is marked binary in .gitattributes; its pinned hash depended on core.autocrlf.
  • Hand-maintained fixture totals were removed from the README and docs; the manifest is the count.
  • Four fixture grammars keep trailing whitespace: their hashes are pinned in the manifest.

🤖 Generated with Claude Code


This change is Reviewable

@johnml1135
johnml1135 requested a review from ddaspit August 19, 2026 19:27
@johnml1135
johnml1135 force-pushed the integrate-conformance-framework branch from d826869 to 8f9dcea Compare August 19, 2026 19:46
@codecov-commenter

codecov-commenter commented Aug 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.93%. Comparing base (2599204) to head (fa8d9b2).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #480      +/-   ##
==========================================
+ Coverage   74.57%   74.93%   +0.36%     
==========================================
  Files         453      556     +103     
  Lines       38314    56481   +18167     
  Branches     5280     7714    +2434     
==========================================
+ Hits        28573    42325   +13752     
- Misses       8576    12291    +3715     
- Partials     1165     1865     +700     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@johnml1135
johnml1135 force-pushed the integrate-conformance-framework branch 2 times, most recently from d0b5448 to 9dfb2f6 Compare August 20, 2026 09:10
@johnml1135
johnml1135 force-pushed the integrate-conformance-framework branch 2 times, most recently from de95458 to 4823a05 Compare September 4, 2026 00:15
johnml1135 added a commit that referenced this pull request Sep 15, 2026
Introduces an engine-agnostic conformance suite for HermitCrab-formalism
morphological parsers: a `conformance/` tree of language grammars and
edge-case micro-grammars, each an HC-XML grammar.xml paired with a
words.yaml ground truth (oracle-provenance, gloss, and per-word parse
signatures). A new SIL.Machine.Morphology.HermitCrab.Conformance project
and hc-conformance CLI tool run those fixtures against an engine adapter,
producing coverage and rules CSVs, an interface inventory, dataflow-
obligation ledgers, evidence cards, a FieldWorks-producibility table, and
a JSON manifest for external consumers. PROTOCOL.md is the adapter
contract a second engine (e.g. the in-progress Rust port) implements to
plug into the same suite.

Includes the FieldWorks-producibility classification campaign: for every
HermitCrab construct the suite covers, a verdict on whether FieldWorks'
own HC-XML export path can actually produce a grammar exercising it,
distinguishing genuine data-model limits from mere loader gaps, with five
previously-unresolved verdicts now classified and corrected write-ups for
two more cases initially misread as exporter silence.

Also lands one new edge-case fixture,
edge-cases/chained-output-feature-override-loss, isolating an analysis-
side OutputHeadFeatures retraction bug: a well-formed four-morph parse of
`zudiua` that the founding C# oracle currently loses. The fixture is
deliberately red against hc.dll today (expected, not a broken test) and
documents the mechanism, provenance, and the HC-Rust divergence that
motivated it.

The suite is deliberately stopped at this point rather than finished:
scope, known gaps, and next steps are documented in the suite's own
tracking docs rather than left implicit.

This commit squashes the full conformance-suite branch stack
(integrate-conformance-framework through conformance/fieldworks-
witnesses, 49 commits) into one commit on top of current master, for
PR #480.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@johnml1135
johnml1135 force-pushed the integrate-conformance-framework branch from 4823a05 to 3128301 Compare September 15, 2026 12:29
johnml1135 added a commit that referenced this pull request Sep 15, 2026
Records a break-attempt run of PR #494 (AnalysisAffixProcessRule fix)
against the conformance suite: 36/36 fixtures pass (including
pathological cases), and a generated-word fuzz sweep (every root x
every 0..3-subset of affix rules, up to 6 nonhead roots where the
grammar compounds) produced ~1,300 words across 35 grammars, parsed by
both master and the PR branch with 0 divergences attributable to
PR #494. The one observed diff (edge-cases/truncate-morphotactic,
words `a`/`ga`) is pre-existing oracle nondeterminism in analysis
multiplicity ordering, reproducible on master alone, unrelated to the
syntactic FS change.

This was previously recorded only at tag archive/pr494-conformance;
folding it into the conformance suite's own PR (#480) so the evidence
travels with the suite it was run against. Fixed two references to
branches deleted since the doc was written (perf/pr494-conformance,
conformance/fieldworks-witnesses) to point at their preserved
archive/* tags instead; no other content changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@johnml1135

Copy link
Copy Markdown
Collaborator Author

Added two independently justified conformance fixtures in a20bce1: final-template-partial-discriminators (10 words; #507) and template-category-sharing (6 words; #505). Fresh Release build: zero warnings/errors. Both fixtures pass with memoization on and off, zero skipped; 22 focused manifest/coverage tests pass. Four grammar counterfactuals produce the independently predicted mismatches, documented under conformance/docs. These are grammar-sensitivity controls, not proof that pruning, cache hits, or same-key feature collisions execute. No parser code changed. Generated inventory also restores previously omitted rows for the already-existing Exact-inverse fixture; its valid zudiua loss remains tracked in #504, not relabeled as correct.

@johnml1135

Copy link
Copy Markdown
Collaborator Author

Added the shared-template unconstrained-suffix conformance fixture in f150e2a. The grammar has a slot-only feature-unconstrained suffix shared by mandatory TV/IV templates, an ordinary N-to-IV verbalizer, four positive rows, and six rejection controls. The companion rationale explains complete forward derivations and loader reachability (not a FieldWorks UI round trip).

Fresh C# harness: all 10 rows pass in both template orders, memoization on/off (40 comparisons; no skips). Focused template/manifest tests: 22 passed, no skips. Regenerated manifest is current at 40 fixtures; coverage/rule reports updated. No Machine parser code changed.

PanGloss main now contains the narrow gate-only alignment (fc357daf), with this fixture mirrored unchanged until its old Machine submodule pin is upgraded. Direct state assertions provide red/green evidence; full-parse fixture checks pass both before and after the change. Issue #505 remains open for collision/correlation and broader merge-equivalence evidence.

johnml1135 added a commit that referenced this pull request Sep 26, 2026
Introduces an engine-agnostic conformance suite for HermitCrab-formalism
morphological parsers: a `conformance/` tree of language grammars and
edge-case micro-grammars, each an HC-XML grammar.xml paired with a
words.yaml ground truth (oracle-provenance, gloss, and per-word parse
signatures). A new SIL.Machine.Morphology.HermitCrab.Conformance project
and hc-conformance CLI tool run those fixtures against an engine adapter,
producing coverage and rules CSVs, an interface inventory, dataflow-
obligation ledgers, evidence cards, a FieldWorks-producibility table, and
a JSON manifest for external consumers. PROTOCOL.md is the adapter
contract a second engine (e.g. the in-progress Rust port) implements to
plug into the same suite.

Includes the FieldWorks-producibility classification campaign: for every
HermitCrab construct the suite covers, a verdict on whether FieldWorks'
own HC-XML export path can actually produce a grammar exercising it,
distinguishing genuine data-model limits from mere loader gaps, with five
previously-unresolved verdicts now classified and corrected write-ups for
two more cases initially misread as exporter silence.

Also lands one new edge-case fixture,
edge-cases/chained-output-feature-override-loss, isolating an analysis-
side OutputHeadFeatures retraction bug: a well-formed four-morph parse of
`zudiua` that the founding C# oracle currently loses. The fixture is
deliberately red against hc.dll today (expected, not a broken test) and
documents the mechanism, provenance, and the HC-Rust divergence that
motivated it.

The suite is deliberately stopped at this point rather than finished:
scope, known gaps, and next steps are documented in the suite's own
tracking docs rather than left implicit.

This commit squashes the full conformance-suite branch stack
(integrate-conformance-framework through conformance/fieldworks-
witnesses, 49 commits) into one commit on top of current master, for
PR #480.

Folds in three review fixes: AdapterEngine's contract in MaterializedRunner
now credits an expect_crash fixture only once the same engine also
completes an ordinary fixture from the same run, so a misconfigured
adapter (bad path, rejected arguments) can no longer register as
reproducing the pinned crash; GuesserSignatureTests' batch-path test is
renamed for the overload it actually calls; and .gitattributes freezes
project.fwdata as binary so its pinned SHA-256 is reproducible across
platforms and CI runners, not just this one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@johnml1135
johnml1135 force-pushed the integrate-conformance-framework branch from 93f470c to 2933fcc Compare September 26, 2026 02:55
johnml1135 added a commit that referenced this pull request Sep 26, 2026
Records a break-attempt run of PR #494 (AnalysisAffixProcessRule fix)
against the conformance suite: 36/36 fixtures pass (including
pathological cases), and a generated-word fuzz sweep (every root x
every 0..3-subset of affix rules, up to 6 nonhead roots where the
grammar compounds) produced ~1,300 words across 35 grammars, parsed by
both master and the PR branch with 0 divergences attributable to
PR #494. The one observed diff (edge-cases/truncate-morphotactic,
words `a`/`ga`) is pre-existing oracle nondeterminism in analysis
multiplicity ordering, reproducible on master alone, unrelated to the
syntactic FS change.

This was previously recorded only at tag archive/pr494-conformance;
folding it into the conformance suite's own PR (#480) so the evidence
travels with the suite it was run against. Fixed two references to
branches deleted since the doc was written (perf/pr494-conformance,
conformance/fieldworks-witnesses) to point at their preserved
archive/* tags instead; no other content changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
johnml1135 added a commit that referenced this pull request Sep 26, 2026
Introduces an engine-agnostic conformance suite for HermitCrab-formalism
morphological parsers: a `conformance/` tree of language grammars and
edge-case micro-grammars, each an HC-XML grammar.xml paired with a
words.yaml ground truth (oracle-provenance, gloss, and per-word parse
signatures). A new SIL.Machine.Morphology.HermitCrab.Conformance project
and hc-conformance CLI tool run those fixtures against an engine adapter,
producing coverage and rules CSVs, an interface inventory, dataflow-
obligation ledgers, evidence cards, a FieldWorks-producibility table, and
a JSON manifest for external consumers. PROTOCOL.md is the adapter
contract a second engine (e.g. the in-progress Rust port) implements to
plug into the same suite.

Includes the FieldWorks-producibility classification campaign: for every
HermitCrab construct the suite covers, a verdict on whether FieldWorks'
own HC-XML export path can actually produce a grammar exercising it,
distinguishing genuine data-model limits from mere loader gaps, with five
previously-unresolved verdicts now classified and corrected write-ups for
two more cases initially misread as exporter silence.

Also lands one new edge-case fixture,
edge-cases/chained-output-feature-override-loss, isolating an analysis-
side OutputHeadFeatures retraction bug: a well-formed four-morph parse of
`zudiua` that the founding C# oracle currently loses. The fixture is
deliberately red against hc.dll today (expected, not a broken test) and
documents the mechanism, provenance, and the HC-Rust divergence that
motivated it.

The suite is deliberately stopped at this point rather than finished:
scope, known gaps, and next steps are documented in the suite's own
tracking docs rather than left implicit.

This commit squashes the full conformance-suite branch stack
(integrate-conformance-framework through conformance/fieldworks-
witnesses, 49 commits) into one commit on top of current master, for
PR #480.

Folds in three review fixes: AdapterEngine's contract in MaterializedRunner
now credits an expect_crash fixture only once the same engine also
completes an ordinary fixture from the same run, so a misconfigured
adapter (bad path, rejected arguments) can no longer register as
reproducing the pinned crash; GuesserSignatureTests' batch-path test is
renamed for the overload it actually calls; and .gitattributes freezes
project.fwdata as binary so its pinned SHA-256 is reproducible across
platforms and CI runners, not just this one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
johnml1135 added a commit that referenced this pull request Sep 26, 2026
Records a break-attempt run of PR #494 (AnalysisAffixProcessRule fix)
against the conformance suite: 36/36 fixtures pass (including
pathological cases), and a generated-word fuzz sweep (every root x
every 0..3-subset of affix rules, up to 6 nonhead roots where the
grammar compounds) produced ~1,300 words across 35 grammars, parsed by
both master and the PR branch with 0 divergences attributable to
PR #494. The one observed diff (edge-cases/truncate-morphotactic,
words `a`/`ga`) is pre-existing oracle nondeterminism in analysis
multiplicity ordering, reproducible on master alone, unrelated to the
syntactic FS change.

This was previously recorded only at tag archive/pr494-conformance;
folding it into the conformance suite's own PR (#480) so the evidence
travels with the suite it was run against. Fixed two references to
branches deleted since the doc was written (perf/pr494-conformance,
conformance/fieldworks-witnesses) to point at their preserved
archive/* tags instead; no other content changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@johnml1135
johnml1135 force-pushed the integrate-conformance-framework branch from 2933fcc to f412c25 Compare September 26, 2026 04:15
johnml1135 added a commit that referenced this pull request Sep 30, 2026
Introduces an engine-agnostic conformance suite for HermitCrab-formalism
morphological parsers: a `conformance/` tree of language grammars and
edge-case micro-grammars, each an HC-XML grammar.xml paired with a
words.yaml ground truth (oracle-provenance, gloss, and per-word parse
signatures). A new SIL.Machine.Morphology.HermitCrab.Conformance project
and hc-conformance CLI tool run those fixtures against an engine adapter,
producing coverage and rules CSVs, an interface inventory, dataflow-
obligation ledgers, evidence cards, a FieldWorks-producibility table, and
a JSON manifest for external consumers. PROTOCOL.md is the adapter
contract a second engine (e.g. the in-progress Rust port) implements to
plug into the same suite.

Includes the FieldWorks-producibility classification campaign: for every
HermitCrab construct the suite covers, a verdict on whether FieldWorks'
own HC-XML export path can actually produce a grammar exercising it,
distinguishing genuine data-model limits from mere loader gaps, with five
previously-unresolved verdicts now classified and corrected write-ups for
two more cases initially misread as exporter silence.

Also lands one new edge-case fixture,
edge-cases/chained-output-feature-override-loss, isolating an analysis-
side OutputHeadFeatures retraction bug: a well-formed four-morph parse of
`zudiua` that the founding C# oracle currently loses. The fixture is
deliberately red against hc.dll today (expected, not a broken test) and
documents the mechanism, provenance, and the HC-Rust divergence that
motivated it.

The suite is deliberately stopped at this point rather than finished:
scope, known gaps, and next steps are documented in the suite's own
tracking docs rather than left implicit.

This commit squashes the full conformance-suite branch stack
(integrate-conformance-framework through conformance/fieldworks-
witnesses, 49 commits) into one commit on top of current master, for
PR #480.

Folds in three review fixes: AdapterEngine's contract in MaterializedRunner
now credits an expect_crash fixture only once the same engine also
completes an ordinary fixture from the same run, so a misconfigured
adapter (bad path, rejected arguments) can no longer register as
reproducing the pinned crash; GuesserSignatureTests' batch-path test is
renamed for the overload it actually calls; and .gitattributes freezes
project.fwdata as binary so its pinned SHA-256 is reproducible across
platforms and CI runners, not just this one.

Also folds in the follow-up PR commits: fuzz/break-attempt evidence;
admitting PCRE.NET's source generator via a vetted content-hash allowlist;
final-template and template-sharing controls; oracle-verified fixtures for
per-piece environments, simultaneous mode and iterative epenthesis;
reduplication x phonology cases; and a regenerated manifest, ledgers and
evidence cards.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@johnml1135
johnml1135 force-pushed the integrate-conformance-framework branch from f412c25 to d8ff628 Compare September 30, 2026 20:29
Comment thread local_check.sh
Comment thread src/SIL.Machine.Morphology.HermitCrab.Conformance/Runner.cs Outdated
Comment thread src/SIL.Machine.Morphology.HermitCrab.Conformance/Runner.cs Outdated
Comment thread eng/HcRoslynCompilerReferences.props
johnml1135 and others added 6 commits October 23, 2026 07:11
The control that tells a genuine crash from a broken adapter was the
first non-crash fixture in the run, chosen without checking its category
or requires. A control the engine lacks a capability for, or one excluded
as pathological, could fail and turn a genuine crash into a harness
failure. The control now has to pass the same filters as a fixture the
run executes.

Also drop FixtureManifest.Pathological and its consistency check. Nothing
assigned the field, so the check could never fire.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/pr494-conformance-check.md held draft review comments for another
pull request and pointed at deleted branches. Local review notes belong
in .review/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--start was parsed with culture-sensitive int.Parse and not range
checked: a negative value threw IndexOutOfRangeException mid-run and a
non-number threw FormatException out of the script. It now parses
invariantly without a sign and reports a bad value as an option error,
so the command returns nonzero and the script continues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
--propose wrote expect_fail for every zero-parse word, but self-check
rejects expect_fail on a word that threw InvalidShapeException, so the
proposed patch failed once applied. Runner now passes its skip flag to
ProposePatchWriter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scratch word list went beside the grammar it was evaluated with,
which for a baseline is a fixture's grammar.xml. A killed sweep skips
the finally that deletes it and leaves an untracked file in the
checkout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

This comment has been minimized.

Graduate 67 shared fixtures and add two rule-order variants, bringing the corpus to
131 fixtures and 141 exact C# runs. Map exercises to canonical shared construct tags
while preserving PanGloss-specific capability extensions. Match rule traces as multisets
keyed by exact analysis signature and sorted distinct rule IDs; retain identity
multiplicity.

Add four measured ordering counterexamples and a named baseline of 32 open coverage
gaps. Six new gaps remain unresolved.

Validation: standard local_check passed; 26 focused primary tests passed; authoritative
C# self-check passed 141/141. Historical fixture whitespace retained to preserve
source evidence.
key.RuleIds.Length == 0 ? Array.Empty<string>() : key.RuleIds.Split('\u001f')
);
details.Add(
$"parse '{key.Signature}': declared rules [{declaredRuleIds}] count {declaredCount} "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: F29. A rule set that was only traced is reported as declared rules. If a fixture declares [crLeftHead] and the engine traces [crWrongHead], the detail includes declared rules [crWrongHead] count 0 != traced count 1, which points the author at the wrong side of words.yaml. Label the key rules [...]: declared N, traced M; ConformanceHarnessTests.cs:97 pins the current wording.

$"rows={rows.Count} confirmed={confirmed} contradicted={contradicted} unmapped={unmapped}"
);

// Canonical exercise tags span all 131 fixtures, with 48 positive-parse tags across the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: F30. the silent16 is not defined anywhere in the tree, and no assertion checks the 48 positive-parse tags figure, so a reader cannot connect the 1428/799/617 pins to this comment. Name the 16 fixtures or the property they share, or drop the comment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F30 still applies at fa8d9b2: the comment was updated to "132 fixtures" but still ends "across the silent16", which nothing in the tree defines, and nothing checks the 48-tag figure against the new 1430/619 pins.

+ $"distinctInterfacesEvidenced={distinctInterfacesEverEvidenced}"
);

// 131 fixtures now yield 1191 present interface/fixture pairs, 574 more than the prior 62-fixture set.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: F31. This comment narrates the corpus delta (574 more than the prior 62-fixture set), which .claude/skills/code-comments/SKILL.md bans as history; it goes stale at the next graduation. The same pattern is at GrammarCoverageLedgerTests.cs:38, DataflowObligationLedgerTests.cs:42 and OrderingGeneratorTests.cs:12. State what the pin measures, or leave the delta to the commit message.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

F31 still applies at fa8d9b2, and the comment is now wrong: it says 1200 pairs is "574 more than the prior 62-fixture set", but 1191 - 574 = 617 at the last head, so the delta is now 583. That is the staleness this finding predicted. State what the pin measures and drop the delta.

@claude

This comment has been minimized.

johnml1135 and others added 4 commits October 23, 2026 09:39
…reshness tests

blocked_by is asserted, not verified. The coverage report now fails when a
blocked_by label is not a rule id declared in that fixture's grammar, with unit
tests (a bogus label fails) and a gate test over every checked-in fixture. The
README, the CoverageReport doc and the FailureRuleAttributor doc now say
blocked_by is asserted and point to #552 for trace verification.

The two [Explicit] ledger freshness tests gain [Category("Counterfactual")] so
counterfactual-coverage.yml runs them. The engine-gate inventory was stale
(fixtures added since it was last written) and is regenerated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

This comment has been minimized.

johnml1135 and others added 2 commits October 23, 2026 12:01
…ue a pruned final-template derivation

Issue 551 suspected that the lexical-entry half of Morpher.IsPartial protects parses
that the final-template prune (491) would reject, because a word inherits partiality
from its root and synthesis lets a non-partial rule follow a final template when the
input is partial. final-template-partial-root pins the opposite: SynthesisAffixTemplatesRule
skips every template for a partial root morpheme, so no final template ever applies to such
a word. Partial roots in a lower stratum and in the template's own stratum both have no
analysis for the final-template strings, with non-partial controls beside them.

The expected rows also pass in a scratch copy where Morpher.IsPartial ignores lexical
entries and the prune is therefore on for this grammar.

Ledgers, manifest and pinned counts regenerated. Regeneration also picks up fixtures
graduated in the previous commit whose ledger rows were stale, and records the one
resulting open gap: the simultaneous mutant of quantified-alpha-bounded-ltr-left does
not terminate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

This comment has been minimized.

@johnml1135

Copy link
Copy Markdown
Collaborator Author

Added complete a/ga derivations in a48b899: two a parses and five ga parses, with repeated signatures preserved. The grammar is unchanged. The fixture note records the exhaustive forward chains, full source identities, observed morph order, and provenance.

This revision deliberately exposes #506 and depends on #556. Normal ./local_check.sh --agent-strict ran every stage. It failed only the aggregate fixture self-check and conformance CLI on missing a/ga morph identities from the unfixed engine. Core: 890 passed / 3 existing skips; HC: 695 passed / 1 intended regression; Thot: 93 passed; SentencePiece: 4 passed. Formatting, Release build, coverage and freshness passed. This is not a green merge-ready head.

With the #480 HC/adapter and the exact corrected #556 Machine assembly (d98d12a5), the official full conformance CLI including pathological fixtures passed 142/142 runs across 132 fixtures, zero failures/skips. Complete target identity multisets also matched across ten fresh corrected-engine loads.

The unpatched counterfactual sweep produced false evidence by comparing randomly incomplete morph identities. Corrected-engine reruns over all eleven fixture words (ten fresh processes per mutation) rejected apparent effects from Gloss, empty HeadFeatures, either adjacent rule swap, and lexical/rule POS removal. Only the genuine unordered-to-linear witness was retained. Dependent ledgers and claim-count pins were refreshed; 31 focused ledger/manifest tests and 13 semantic-audit tests passed.

No parser engine code is changed in this fixture commit. #554 and #555 remain separate follow-ups.

Prepared and verified with OpenAI Codex.

exercises:
- "AffixProcessRule: subtraction/truncation"

- word: a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major: F32. The conformance gate fails at this head, and the result changes from run to run. The a/ga rows expect parses that only the unmerged #556 produces. CI Conformance suite (job 120631053352): a got [++|a | |a] and ga lost a +++|ga. Locally, EveryConformanceFixturePassesSelfCheck failed with only ga wrong (+|ga). The second Conformance suite run passed by chance. Land #556 first, or keep these rows out until it merges.

# which is C# throughout).
#
# ORACLE PROVENANCE FOR `a` AND `ga`: these complete parse multisets are independently derived by
# forward application and are not copied from the unpatched C# oracle. At this #480 head

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: F33. This comment pins a review-round commit, "At this #480 head (fa8d9b2...)". That commit is not this head, and it means nothing after merge. code-comments excludes this kind of history. Say "until #506 is fixed" and leave out the SHA.

@claude

claude Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Request changes. Follow-up on fa8d9b2. The branch moved forward by one commit, a48b899, which adds the a/ga truncation rows and regenerates the ledgers, so I reviewed fa8d9b2..a48b899.

  1. Verdict: request changes. The conformance gate fails at this head, and the result changes between runs.
  2. Most important: F32, conformance/edge-cases/truncate-morphotactic/words.yaml:157. The new rows expect parses that only the unmerged Fix directional annotation tie boundaries #556 produces. Your comment says this is deliberate, but while it stays, EveryConformanceFixturePassesSelfCheck and Conformance suite fail at random on master. Land Fix directional annotation tie boundaries #556 first, or hold these rows until it merges.
  3. Counts: 1 Critical new (F32), 1 Low new (F33), 3 Low open (F29, F30, F31).
  4. Ran: gh pr checks 480: one Conformance suite run fails (truncate-morphotactic 2/11 mismatched) and the other passes. Both Comment hygiene runs pass. Build on ubuntu-22.04, Build on windows-latest and claude-review are pending. Locally, dotnet test tests/SIL.Machine.Morphology.HermitCrab.Tests -c Release --filter ConformanceFixtureGate|ConstructClaimCorroborationTests failed 1 of 11 (ga only, with a different wrong multiset from CI). I read the delta inline and did not run /code-review on it.
  5. Could not verify: the regenerated semantic-coverage-counterfactuals.tsv row (truncate-morphotactic as an unordered witness) and the interface-witness counts come from the patched Fix directional annotation tie boundaries #556 engine, by your account. I did not check whether recomputing them on this head reproduces them. I did not run ./local_check.sh --agent-strict.

Public API, target framework, package, or sillsdev/machine.py parity: None verified.

Finding Severity Status
F1 Critical addressed (cc947db)
F2 Important addressed (bcb3d62)
F3 Important addressed (bcb3d62)
F4 Important accepted, unverified
F5 Low addressed (bcb3d62)
F6 Low addressed (067de6f)
F7 Low addressed (0a1212b)
F8 Low addressed (067de6f)
F9 Low addressed (067de6f)
F10 Important addressed (cd0c909)
F11 Low accepted, unverified
F12 Low addressed (cd0c909)
F13 Low addressed (0a1212b)
F14 Low addressed (0a1212b)
F15 Low addressed (067de6f)
F16 Low addressed (067de6f)
F17 Low addressed (0a1212b)
F18 Low addressed (0a1212b)
F19 Critical addressed (e7fe733)
F20 Low addressed (8b5d74e)
F21 Low addressed (1c5c3a5)
F22 Low addressed (a3b4c0e)
F23 Important addressed (49ba481)
F24 Important addressed (49ba481)
F25 Low addressed (9671b28)
F26 Low addressed (641f613)
F27 Low addressed (8b5d74e)
F28 Critical addressed (dd5f00f, 2cd68e8)
F29 Low open
F30 Low open
F31 Low open
F32 Critical new
F33 Low new

Reviewed at a48b899

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants