Repository navigation
Align truncation morph attribution with corrected C# semantics - #9
Draft
johnml1135 wants to merge 2 commits into
Draft
johnml1135 wants to merge 2 commits into
johnml1135 wants to merge 2 commits into
Conversation
Replay copied annotation transfers before the zero-width last-node claim. Preserve current node ownership, genuine descendant grouping and repeated allomorph suppression using existing flat morph records and shared decoded ranges. Keep compound descendant transfer non-recursive, matching C#. Reuse the #480 identity, subsumption and copy-U fixtures with complete occurrence and application histories. Add the root-boundary regression and stage the existing #553 partial-root corpus with separate prune counters. References: sillsdev/machine#500, sillsdev/machine#506, sillsdev/machine#556, sillsdev/machine#480, sillsdev/machine#553.
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.
Truncation could return the correct surface with incorrect morph identities, order or ownership. This follows the combined Machine #500/#556 annotation operations using the existing Rust morph records: transfer input annotations first, then claim the last node for a rule with no new material. A shared transient layout supplies ownership and validity ranges.
Review focus: preserve empty annotations, descendant blocks, first-longest ties and repeated-allomorph suppression when later rules copy or remove material. Compounding keeps C#'s separate, non-recursive transfer behavior.
gaanalyses.aremains a passing baseline control.Draft while release-binary corpus comparisons finish. Four completed before/after language pairs have zero status/signature differences across 6,067 comparable rows; 1,028 identically skipped rows are excluded. Both Mbugwe runs remain incomplete, and historical worst-word lists were unavailable. Full reference parity is unverified. Inflectional-family coverage and inherited compound-linker/shape-only annotation gaps remain explicit in the ledgers.
Base:
14975991f65dcbd290c2a58c30ecd894247d0851; reviewed head:0080a68ce960b18395faeb4959b9963203f67a66. Production change: net +149 lines across three files; the remaining changes are shared fixtures, regression tests and evidence documentation.C# reference and shared fixture provenance
The founding reference combines Machine #556 at
d98d12a5d514ce589d7495c71d055830e061a418(the #506 directional lookup correction) with the seven-lineApplyRhsrelocation from Machine #500 at157c031ef272d07c900db41b2d4a8852b13f64b0. The isolated C# build restored its source tree exactly afterward.Measured assemblies:
SIL.Machine.dll:b265a40a44292614f51f7a65afc445ae34dde685cb40ce8c2d2de5521a0c299d.4cd980453f51fd3cf29cf38a99f342f542e631eb23be6ba87b9433aab6c3d57f.All six XML/YAML files under the three
truncate-morphotactic-*staged companions are byte-identical to the contribution in Machine #480 commit 0bbb45c8. The original empty-ID grammar and pinned submodule are unchanged. Combined C# passes 145/145 runs across 135 fixtures with no skips. The ordinary #480 branch still lacks the two fixes: its exact-head strict gate fails only the aggregate self-check and four truncation fixtures; restore, formatting, build, coverage and generated-file freshness pass. That branch is not merge-ready.The generic C# conformance runner canonicalizes rule-ID sets; it preserves the recorded ordered histories but does not gate their order. The Rust trace assertions independently compare those ordered histories together with complete allomorph/morpheme occurrence rows. Earlier #556-only observations remain historical and are superseded by the combined reference.
Regression and review evidence
truncate_morphotactic_identityreuses the #480 grammar and minimal companions, including original empty-ID allomorph owners,a/ga,ag/gag, retained-host copying suffix U, impossible controls, and an in-memory ROOT-required-right-word-boundary variant. The original baseline admits fivegaanalyses under that boundary restriction; combined C# and this candidate admit the two valid complete identities.Root temporarily restored all three production files from
14975991with final tests/fixtures retained. The managed ten-test target ran and failed seven tests whileaand the two positive/impossible controls passed. Exact byte/hash restoration with fresh mtimes was followed by ten passing tests. This public regression proof is separate from two defects caught during implementation review.Those two real-transition tests first failed with an extra compound child and an extra top-level repeated U occurrence. Narrow repairs make descendant transfer affix-specific and observe every child allomorph before its host. Removing those candidate conditions makes both tests fail; restoring them makes both pass. Independent combined-C# synthesis traces confirm both behaviors, including exact parents, ranges, node ownership, application history and repeated-allomorph multiplicity. The C# processes reproduce complete outputs across fresh runs.
The source/test review is documented in the local preflight record; its remaining wording corrections were applied before the final root gates. Verification used fresh managed processes:
Both exited 0. The full gate produced 73 successful test summaries, 2,158 passed tests and 65 ordinarily ignored tests. The follow-up harness-inventory correction reproduced the Windows CI failure locally (38 tests, one failure), then passed the focused 38 tests, all 32 PowerShell tool-test files, and a fresh managed check. It adds the two existing parser modules to the explicit filename inventory without changing test mapping rules or parser source. The first author full-scope run caught an unrecognized provenance comment; it was corrected and both author and root full-scope gates passed. The ledgers distinguish implementation, oracle observations, fixture presence, runtime checks, removal sensitivity and remaining gaps.
Release comparison limits and separate concerns
Before/after Release executables are built in separate worktrees through
pg.ps1, with frozen inputs and independent binary hashes. Comparison retains every input index, status and signature occurrence; a missing row, skipped input, cap or timeout cannot count as parity. Both lost and extra analyses require investigation. XML sidecars do not supply authoritative FieldWorks MSA GUIDs, so they cannot establish full structured projection equality.The five main reference inputs contain 8,740 rows. Completed baseline/candidate comparisons:
All four have complete ordered input-row coverage and zero status or signature-multiset differences among comparable rows. Only Indonesian establishes full TSV signature parity for its entire main list. The other three deliberately return an incomplete comparison result because skipped rows cannot establish parity. Before and after Mbugwe remain active; absent historical worst-word lists are not claimed as coverage.
The baseline executable SHA-256 is
4cfe743202ee0f079f895699201d2fcc6edcaee9efa77475040e6fc20b6a4411. The candidate executable was built from cleanc1de4cd57da1c1bbb5ba54f2af498ba60c7c602b, SHA-256c509cb77047b0392eff88cfdc9f1b003ff1b39d66d81a64c880f67f6c0459c86. The subsequent harness-inventory correction changes only a PowerShell test filename list; the three production source files are byte-identical.Existing inferred-range limitations for unowned compound linking material and shape-only phonology/metathesis were not demonstrated to be introduced by this repair and are not silently redesigned here. #553's inflectional-family substitution remains unverified. Machine #554 and #555 remain separate C# investigations.
No main merge is part of this change.