Skip to content

fix(video-grabber): a bare apostrophe is not an invented word - #341

Merged
robbiebyrd merged 1 commit into
mainfrom
fix/summarize-apostrophe-token
Aug 1, 2026
Merged

fix(video-grabber): a bare apostrophe is not an invented word#341
robbiebyrd merged 1 commit into
mainfrom
fix/summarize-apostrophe-token

Conversation

@robbiebyrd

Copy link
Copy Markdown
Collaborator

Found while verifying 1,500 production summaries against their own source transcripts: exactly one was reported as containing a word absent from its source, and the "word" was a lone apostrophe.

_WORD was "[a-z0-9']+", which matches a standalone "'" as a token. _variants strips it to the empty string, so it can never match anything in the source and is always reported as invented. Requiring a token to START with an alphanumeric keeps contractions and possessives ("don't", "city's") while dropping the bare punctuation.

Harmless in tier 1, where the line is rebuilt from source indices and the validator is only an assertion. It matters in tier 2, where every false rejection discards a real summary and falls back.

Found while verifying 1,500 production summaries against their own source
transcripts: exactly one was reported as containing a word absent from its
source, and the "word" was a lone apostrophe.

_WORD was "[a-z0-9']+", which matches a standalone "'" as a token. _variants
strips it to the empty string, so it can never match anything in the source and
is always reported as invented. Requiring a token to START with an alphanumeric
keeps contractions and possessives ("don't", "city's") while dropping the bare
punctuation.

Harmless in tier 1, where the line is rebuilt from source indices and the
validator is only an assertion. It matters in tier 2, where every false
rejection discards a real summary and falls back.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@robbiebyrd
robbiebyrd marked this pull request as ready for review August 1, 2026 03:03
@robbiebyrd
robbiebyrd enabled auto-merge (squash) August 1, 2026 03:03
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-08-01 03:08 UTC

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Playwright E2E — 9 passed · 0 failed · 0 flaky · 0 skipped

Full report

@robbiebyrd
robbiebyrd merged commit e516d50 into main Aug 1, 2026
17 checks passed
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