Skip to content

Improve resumability: include model+glossary+prompt hash in cache/state key #10

@Congregalis

Description

@Congregalis

Why

Resume/caching is great, but today the state key appears to be mostly URL + chunk. If the user changes important translation parameters (model, glossary, strictness, system prompt), a resume may silently reuse old chunks and produce a mixed output.

Proposal

  • Define a run fingerprint (hash) derived from:
    • model name
    • glossary contents (or file hash)
    • strict mode settings / validation parameters
    • system prompt template version
  • Store fingerprint in .transblog.state.json per URL.
  • On resume: if fingerprint changed, either:
    • require -refresh (fail with actionable message), or
    • automatically treat as a new run (new state entry).

Acceptance Criteria

  • No silent mixing of chunks produced under different settings
  • Clear UX: either deterministic reuse or explicit retranslate
  • Tests for fingerprint mismatch behavior

Notes

This is one of the highest “trust” improvements for long-running batch translations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions