Skip to content

fix: a glued span like "better stack" goes through the vocabulary checks - #381

Merged
znat merged 3 commits into
feat/syrinx-disfluencyfrom
feat/vocab-glued-spans
Nov 2, 2026
Merged

znat merged 3 commits into
feat/syrinx-disfluencyfrom
feat/vocab-glued-spans

Conversation

@znat

@znat znat commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

With transcription.vocabulary.clause_decider: true (default off), a heard span that glues to a term ("better stack" -> BetterStack) is no longer written before any check. The word lists ask about each word of the span. If one word is in neither list (Zorb in Zorb lix), the term is written, as for a single word. If every word is known, the slot and the clause decider read the place like any other. A correction back now counts against the term the next time. Flag off is unchanged.

On the 165 bench at 0.60, wrong writes go from 8 to 2 in chrono order (8.0 to 2.0 over 20 random orders). Right writes go from 47 to 43 (43.35 to 39.0). The cost is a cold term: the decider never writes a term with no accepted sentence, so a genuine "red crawl" is offered on first sight instead of written. Review VocabularyPass.settle first.

Stacked on #380.

Why the old behaviour was wrong: the glue wrote before the decider, and the decider could not take it back

Pipeline passed [.sound: .full, .rule: .slot]. Under .full, settle wrote every glued span with the log line "is in neither word list", which was false: no list was asked. All six glued wrong writes on the bench were sound places.

The correction back was recorded. The trace showed rows=+0/-2 ... pair_ref=1 and the decider said leave (p 0.003 to 0.11). But SentenceGate lets the decider take back a write only from a term with accepted sentences (!reading.cold). A term that is only ever corrected back stays cold, so the write stood after three corrections.

CorrectionRecording matches a two-word span. That candidate was ruled out by the same trace lines.

The fix: both sources settle as `.slot` with the flag on
  • Pipeline: flag on passes [.sound: .slot, .rule: .slot]. Flag off keeps [.sound: .full, .rule: .lists].
  • VocabularyPass.settle: under .slot, a glued span is written only when Vocabulary.unseenWord(in:) finds a word neither list knows. The log names that word. Otherwise the log says the place is asked, and the slot and the decider read it.
  • Vocabulary.unseenWord(in:): new, the first word of a span that neither list knows.
  • Ghost E does not glue to Ghostty (ghoste), so it never took this path. It is offered on both binaries with the flag on.
  • A refused glued span now goes through lowercase_refused on the sound path too. On the bench, chrono 0.60, two places that kept a capitalised "Red Rock" now read "red rock" (ids 76, 88).
  • French places with the flag on get no decider, so a French glued span is left open.
  • Docs: docs/transcription.md, tests/word-gate-cases.yaml, WordGateCommand.
Measurements: wrong writes down 6 at 0.60 and 3 at 0.85, right writes down 4 and 2

165 bench through --serve, flag on, protocol written before scoring. Base is c783d5a.

floor order arm rw ww rl wl of
0.60 chrono base 47 8 81 6 23
0.60 chrono this PR 43 2 85 8 27
0.60 random mean base 43.35 8.0 82.95 7.9 22.8
0.60 random mean this PR 39.0 2.0 86.95 9.6 27.45
0.85 chrono base 41 4 91 18 11
0.85 chrono this PR 39 1 93 19 13
0.85 random mean base 38.4 4.25 90.55 21.3 10.5
0.85 random mean this PR 36.05 1.25 93.1 21.75 12.85

Every one of the 21 orders passes at both floors. Changed places are only Redrock, Redcrawl and BetterStack. The two wrong writes left at 0.60 are single words (Supabase, Ollama).

The trial (41 dictations) and scripted (44) replays at 0.60 are unchanged: same decisions, outputs, answers and files.

Verification: the new checks fail on c783d5a and pass here; flag off is identical
  • scripts/check-clause-places.sh: three new checks. On c783d5a, two fail with BetterStack written in the output after the decider offered, then left. Here 12/12.
  • check-vocabulary-config 66/66, check-selector 21/21, check-sound-group 93/93, check-pipeline 134/134, check-serve 32/32, check-lowercase-refused 13/13, check-sound 6/6, check-word-gate, check-slot-gate, check-clause-decider-parity pass. Run with a scratch PARROTFLOW_CONFIG_DIR and home.
  • Flag off: the 32 --pipeline sentences give identical output on both binaries. The 165 bench in chrono order, flag off, both floors: 165/165 rows identical.
  • Local coderabbit review --agent: no findings.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WfxPEjc1EEGqG2rHoJcLJ2

znat and others added 2 commits October 29, 2026 16:29
…ction

With the clause decider on, a sound place whose heard span glues to the
term ("better stack" -> BetterStack) is written before the slot or the
decider can read it. After a correction back the decider says leave, and
the term is still written. These two checks fail on c783d5a.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WfxPEjc1EEGqG2rHoJcLJ2
Signed-off-by: Nathan Zylbersztejn <[email protected]>
… decider on

A sound place whose heard span glues to the term was written before the
slot or the clause decider read it. The decider read the correction back
(pair_ref 1, p 0.003) but only takes a write back from a term with
accepted sentences, so a term only ever corrected stayed written.

With the flag on, both sources now settle as `.slot`. A glued span is
written only when one of its words is in neither word list, and the log
says which word. Otherwise the slot and the decider read the place. Flag
off is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01WfxPEjc1EEGqG2rHoJcLJ2
Signed-off-by: Nathan Zylbersztejn <[email protected]>
@greptile-apps

greptile-apps Bot commented Oct 29, 2026

Copy link
Copy Markdown

Automatic reviews are disabled for this repository.

@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 330a962c-dbae-4790-9cc5-2845b2307721

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@znat

znat commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@znat

znat commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

CodeRabbit review (local CLI 0.8.0). The GitHub app is rate limited on this repository, so this review ran with coderabbit review --agent --base-commit c783d5aa (the diff against #380). 1 finding, minor, dismissed:

  1. Sources/ParrotFlow/WordGateCommand.swift:51: "document that --word-gate's glued-pair results and printed slot reflect the old routes and SlotGate, not the clause decider." Moot further up this stack. feat!: the clause decider is the only vocabulary path #386 (lands with this PR) deletes SlotGate and the old routes; --word-gate then prints only the word-list gate (auto-apply / open), and docs/cli.md describes exactly that.

Base automatically changed from feat/vocab-serve to feat/syrinx-disfluency November 2, 2026 08:00
@znat
znat merged commit 8e5b755 into feat/syrinx-disfluency Nov 2, 2026
8 checks passed
@znat
znat deleted the feat/vocab-glued-spans branch November 2, 2026 08:00
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.

1 participant