fix(observe): confidence bands stop flagging legible text as 'low' - #173
Merged
Conversation
…graphic punct
The confidence-band fence clamped legible UI text to 'low' at raw OCR 1.0:
a hand-curated ~370-word seed missed everyday words ('Discard', 'Download',
'Sending your ticket', 'Support will reply within 1 business day.'), and the
charset gate rejected em-dash/ellipsis/curly-apostrophe strings before the
dictionary ran. A band that flags correct reads as low-quality is one agents
learn to distrust — the exact opposite of its purpose.
- Union the host word list (/usr/share/dict/words, ~235k words) with the
curated seed; seed stays the portable fallback when no system list exists.
- Add modern app compounds web2 predates (download, login, wifi, ...).
- Widen _ALLOWED_PUNCT to accept em/en dash, ellipsis, curly quotes.
- Guard both fixes + gibberish-stays-low regression in TestSystemDictionaryFence.
Found dogfooding simdrive on the Palace triage-bot chaos QA. 224 OCR/band tests green.
**Scope:** the english-likeness confidence fence in som.py only (dictionary
source + allowed-punctuation charset). observe.py delegates to it unchanged.
**Not done:** navigation/mark-disambiguation robustness (separate finding,
tracked as an issue); no change to the OCR engine or band thresholds themselves.
**Deferred:** bundling a wordlist asset for hosts lacking /usr/share/dict/words
(the curated seed remains the fallback for now).
SyncTekLLC
force-pushed
the
fix/observe-confidence-band-dictionary
branch
from
July 22, 2026 02:43
cf6d0b8 to
63526d6
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.
Problem
Dogfooding simdrive on the Palace triage-bot chaos QA, nearly every
observemark for plainly-English UI text came backconfidence_band: "low"atraw_confidence: 1.0— "Discard", "Sending your ticket…", "Support will reply within 1 business day.", "OK — let's start fresh." A band that flags perfectly-correct reads as low-quality is one an agent learns to ignore, which defeats its purpose ("the dogfood signal engineers can trust").Two root causes in the english-likeness fence (
som.py):_ENGLISH_WORDSseed. Everyday words (discard, download, sending, ticket, reference, business, within, reply…) simply weren't in it — the same whack-a-mole that produced F#18 ('Wi-Fi', 'Bluetooth', 'General')._ALLOWED_PUNCT, so any sentence using them was rejected before the dictionary check and clamped tolow.Fix
/usr/share/dict/words, ~235k words on macOS/Linux) with the curated seed. Adding real words can never let gibberish pass the fence, so this only removes false negatives. Portable: no system list → seed-only fallback, no error, no hard dep._ALLOWED_PUNCTfor em/en dash, ellipsis, curly quotes.Tests
New
TestSystemDictionaryFenceguards: common UI words not-low, typographic-punct survives the charset gate, dictionary ⊇ seed (portability floor), and gibberish-with-em-dash still low (fence not weakened). Existing F#18 guards untouched. 224 OCR/band tests green locally.Found while dogfooding on Palace.