Skip to content

Fix stale adoption of glossary-sensitive untracked outputs - #33

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-62d2
Draft

cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-62d2

Conversation

@cursor

@cursor cursor Bot commented Jun 26, 2026

Copy link
Copy Markdown

Bug and impact

Untracked existing output_chunk*.md files were record-only by default, even when the current glossary selected terms for that chunk. After a glossary edit or legacy adoption, stale translations could be recorded under the new glossary state and then skipped forever, silently shipping incorrect terminology.

Root cause

scripts/run_state.py plan() classified missing run_state.json records as record before running glossary selection/hash checks. glossary.term_hash() also omitted aliases even though aliases are part of the prompt table.

Fix

  • Re-translate untracked outputs that would receive current glossary terms; keep glossary-free untracked outputs record-only for resumability.
  • Include sorted aliases in term hashes when aliases are present.
  • Update SKILL and README docs for the safer default behavior.

Validation

  • Pre-fix repro showed chunk0001 with Tai incorrectly planned as record_only; post-fix repro plans it for translation and keeps only glossary-free chunk0002 record-only.
  • python3 -m unittest tests.test_run_state tests.test_glossary -v (69 tests)
  • python3 -m unittest discover -s tests -p 'test_*.py' -v (210 tests, 3 skipped)
  • python3 -m compileall scripts tests
  • Standard Alice mock full-pipeline generated HTML/DOCX/PDF; EPUB failed only due the documented Ubuntu Calibre 7.6.0 packaging bug.
Open in Web View Automation 

Co-authored-by: Rainman <deusyu@users.noreply.github.com>
@cursor
cursor Bot deleted the cursor/critical-bug-investigation-62d2 branch July 2, 2026 08:22
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