Trace HermitCrab failure reasons and template slot outcomes - #534
Open
johnml1135 wants to merge 1 commit into
Open
johnml1135 wants to merge 1 commit into
johnml1135 wants to merge 1 commit into
Conversation
Add optional detailed trace callbacks for analysis rejections, slot branches, and completed lexical lookup counts. Retain failure operands, blocking entries, and partial-parse causes in TraceManager without replaying linguistic checks. Preserve the ITraceManager member contract and verify legacy callbacks, parallel slot outcomes, interrupted lookups, and morphological analyses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #534 +/- ##
==========================================
+ Coverage 74.34% 74.97% +0.62%
==========================================
Files 456 458 +2
Lines 38261 38470 +209
Branches 5242 5274 +32
==========================================
+ Hits 28445 28842 +397
+ Misses 8666 8505 -161
+ Partials 1150 1123 -27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Collaborator
|
@johnml1135 Did you ask Beth about this? I'm worried that this will make it harder to find a needle in a haystack because the haystack will be so much bigger. It may also slow Try A Word down. |
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.
HermitCrab computes several facts that Try A Word cannot display because they do not reach the trace or are discarded by the trace manager. This change passes the available facts through an optional
IDetailedTraceManagercapability and retains them in Machine'sTraceManager, without rerunning linguistic checks.ITraceManagerhas no new members. Existing implementations keep the original callbacks; detailed consumers opt intoIDetailedTraceManager. Enum additions preserve existing values, and morphological analyses remain unchanged in tracing-on/off and sequential/parallel tests.Validation:
./local_check.sh --agent-strictpassed on Windows (full solution build and every test project). In WSL, all 151 tests inSIL.Machine.Morphology.HermitCrab.Testspassed in a fresh WSL Release run, including 45 syntheticTraceReasonTestscovering the facts above, legacy callbacks, interrupted/interleaved lookups, and analysis equivalence. Strict comment hygiene passed and CSharpier checked 724 files. Both./local_check.shand./local_check.sh --agent-strictexited at the solution build because WSL lackscmakefor SentencePiece; the standard rerun also reported MSBuild child-node shutdown errors. The full solution test suite has not passed on this tree. These local checks do not collect CI-equivalent coverage.FieldWorks follow-up (outside this PR):
IDetailedTraceManagerinFwXmlTraceManager: add the reason-bearingMorphologicalRuleNotUnappliedoverload,TemplateSlotProcessed, andLexicalLookupCompleted. Serialize the new operands, branch outcomes, and completed counts. Keep lookup/synthesis associations correct inLexicalLookupandSynthesizeWordwhen other trace nodes are inserted.Blockedto serialize the replacement Word's root entry. ExtendCompoundingRuleNotUnappliedto handle each reason rather than only productivity restrictions.Failed, serializePartialParseFailure.Causeand its pending rule; forEnvironments, serialize each failed alternative alongside the supplied allomorph instead of passing the collection directly toXElement. ExistingNonFinalTemplateAppliedLastandApplicableTemplatesNotAppliedcallbacks already distinguish those two template completion failures.MorphologicalRuleNotApplied, fix theprefixEnv/suffixEnvbranches atFwXmlTraceManager.cs:299-302: they currently writeenvinstead of their respective values.FormatHCTrace.xsl'sShowAnyFailure(environment branch around line 597 and partial-parse branch around line 661) andShowCompoundingRuleFailure(around line 1149) to display the detailed facts. ExtendShowTracePath(around line 1237), which selects synthesis children ofLexLookupTracebut excludes the lookup node itself, to include empty lookup, slot, and blocking events; adjustDetermineIfMoreToShowfor the added nodes. Display unknown phonological causes as unknown.🤖 Generated with Claude Code
This change is