Widen the braille specs from Danish to 102 upstream specs - #22
Open
henrikottesorensen wants to merge 1 commit into
Open
Widen the braille specs from Danish to 102 upstream specs#22henrikottesorensen wants to merge 1 commit into
henrikottesorensen wants to merge 1 commit into
Conversation
Runs liblouis's own expectations for roughly 60 languages through the wrapper instead of only Danish. 102 specs, all passing. Five things the reader did not model, each found by specs failing rather than by reading the format: - a test entry can lead with a description, [label, input, expected] - a translation table can be written inline as a block scalar, not just named. nemeth.yaml failed 133 of 133 on this alone - so can a display table, for the same reason - a table can be named by file rather than by query, in which case it must not go through lou_findTable - typeform, mode, inputPos, outputPos and cursorPos change what the expected output means, so those cases are counted and dropped rather than run against the wrong expectation The counting is the point: BrailleSpec.SkippedConstructs records what was recognised but not driven, so coverage that is not happening stays visible. Anything outside that list still throws. Each spec runs on a thread with a large stack. Compiling a table can recurse deeply - ancient-languages-borger.utb needs between 640KB and 768KB, more than the test host gives a test - and a stack overflow kills the process rather than failing a test. It is compilation, not translation: once a table list is compiled, translating through it runs in 128KB. Nothing about the input matters, and liblouis caches compiled tables process wide, so without a large stack somewhere the outcome depends on which test compiled a table first. 40 specs are held back with their reasons written down in the README. 29 of them fail on table resolution and are probably one root cause rather than 29. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
henrikottesorensen
force-pushed
the
yaml-specs-all
branch
from
August 12, 2026 09:03
4642f3b to
0d605e7
Compare
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.
Runs liblouis's own expectations for roughly 60 languages through the wrapper instead of only Danish. 102 specs, all passing.
Five things the reader did not model
Every one was found by specs failing, not by reading the format:
[label, input, expected]nemeth.yamlfailed 133 of 133 on this alonelou_findTabletypeform,mode,inputPos,outputPosandcursorPoschange what the expected output means, so those cases are counted and dropped rather than run against the wrong expectationThat last one is the design point.
BrailleSpec.SkippedConstructsrecords what was recognised but not driven, so coverage that is not happening stays visible instead of quietly disappearing:inputPosoutputPostypeformTypeFormcursorPosmodeTranslationModeAnything outside that list still throws. Driving these would widen the corpus and cover wrapper surface that has no tests today — the same job twice over.
Why each spec runs on its own large-stack thread
Compiling a table can recurse deeply.
ancient-languages-borger.utbneeds between 640 KB and 768 KB, which is more than the test host gives a test, and a stack overflow kills the process rather than failing a test.It is compilation, not translation — once a table list is compiled, translating through it runs in 128 KB. Nothing about the input matters; ASCII overflows the same as non-BMP. And liblouis caches compiled tables process-wide, keyed by table-list string and never evicted, so without a large stack somewhere the outcome depends on which test happened to compile a given table first.
Worth knowing beyond the tests: the same failure is reachable in production. An ASP.NET request thread has about 1 MB. A service that compiles a table list for the first time on a request thread can overflow the same way, uncatchably. Compiling table lists at startup avoids it. Diagnosed jointly with the P/Invoke audit session, after we both drew wrong conclusions from experiments that were really measuring the compile cache.
40 specs held back
Not because they are wrong — because nobody has established yet whether the disagreement is the harness or the wrapper, and a suite that is expected to be red is worse than a smaller green one. Listed with reasons in
braille-specs/README.md:__assert-matchnames. The queries look well formed (language:bn grade:1), so the likely cause is which tables reachlou_indexTablesor which liblouis manages to analyse. Cheapest place to start.no.yaml167/868,ru.yaml39/140. The interesting group: either an unmodelled per-case option or a real difference.🤖 Generated with Claude Code
Recreated from #16 to move the head branch onto
Notalib/LibLouis.NET, which GitHub stacked PRs require (stacks cannot span forks).