Skip to content

Fix stale glossary-sensitive output adoption - #30

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

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

Conversation

@cursor

@cursor cursor Bot commented Jun 21, 2026

Copy link
Copy Markdown

Bug and impact

Untracked output_chunk*.md files were record-only by default even when their source chunk selected current glossary terms. A stale translation could be written into run_state.json as if it used the current glossary, causing future selective runs to skip it and ship inconsistent terminology. Alias-only glossary edits for already-selected terms were also not included in term hashes.

Root cause

run_state.plan() treated all existing outputs without records as safe to adopt unless --retranslate-untracked was passed, and glossary.term_hash() ignored aliases even though aliases are injected into chunk prompts.

Fix

  • Re-translate untracked outputs whose source chunks select current glossary terms; only glossary-free untracked outputs remain record-only.
  • Include sorted aliases in term hashes when aliases exist.
  • Update SKILL/README docs and add regression coverage.

Validation

  • python3 -m unittest tests.test_run_state tests.test_glossary -v
  • python3 -m compileall scripts tests
  • python3 -m unittest discover -s tests -p 'test_*.py' -v (209 tests, 3 skipped)
  • CLI repro confirms stale glossary-sensitive output remains in translation_chunk_ids through record-only adoption, and alias-only changes trigger glossary_term_hash_changed.
  • Standard Alice mock pipeline: 38 chunks merged; DOCX/PDF generated; EPUB failed only with the documented Ubuntu Calibre 7.6.0 bytes/str issue.
Open in Web View Automation 

Co-authored-by: Rainman <deusyu@users.noreply.github.com>
@deusyu
deusyu force-pushed the cursor/critical-bug-investigation-071c branch from 5f57236 to 2611f00 Compare June 26, 2026 02:15
@cursor
cursor Bot deleted the cursor/critical-bug-investigation-071c 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