Skip to content

fix(observe): confidence bands stop flagging legible text as 'low' - #173

Merged
SyncTekLLC merged 1 commit into
mainfrom
fix/observe-confidence-band-dictionary
Jul 22, 2026
Merged

fix(observe): confidence bands stop flagging legible text as 'low'#173
SyncTekLLC merged 1 commit into
mainfrom
fix/observe-confidence-band-dictionary

Conversation

@mauricecarrier7

Copy link
Copy Markdown
Contributor

Problem

Dogfooding simdrive on the Palace triage-bot chaos QA, nearly every observe mark for plainly-English UI text came back confidence_band: "low" at raw_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):

  1. Tiny dictionary. The fence checked a hand-curated ~370-word _ENGLISH_WORDS seed. 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').
  2. Charset gate too narrow. Em-dash, ellipsis, and curly apostrophes aren't in _ALLOWED_PUNCT, so any sentence using them was rejected before the dictionary check and clamped to low.

Fix

  • Union the host word list (/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.
  • Add modern app compounds web2 predates (download, login, wifi, …).
  • Widen _ALLOWED_PUNCT for em/en dash, ellipsis, curly quotes.

Tests

New TestSystemDictionaryFence guards: 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.

…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
SyncTekLLC force-pushed the fix/observe-confidence-band-dictionary branch from cf6d0b8 to 63526d6 Compare July 22, 2026 02:43
@SyncTekLLC
SyncTekLLC merged commit 7de5277 into main Jul 22, 2026
5 of 7 checks passed
@SyncTekLLC
SyncTekLLC deleted the fix/observe-confidence-band-dictionary branch July 22, 2026 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants