Skip to content

fix: prevent retired human source state from history resurrection - #44

Merged
AllenXiao95 merged 8 commits into
masterfrom
fix/human-retirement-source-history
Aug 27, 2026
Merged

fix: prevent retired human source state from history resurrection#44
AllenXiao95 merged 8 commits into
masterfrom
fix/human-retirement-source-history

Conversation

@AllenXiao95

Copy link
Copy Markdown
Owner

Follow-up to #38 / PR #41.

Problem

retire_human_entries() deletes the current panel-authored human row, but an older tm_source_history row with the same (stable_identity, source_fingerprint) can still exist. After retirement, exact-history lookup can therefore resurrect the older machine/formal translation for the source state the operator explicitly retired.

Fix

  • before deleting an origin='human' current row, capture its exact source fingerprint;
  • in the same transaction, delete only the matching tm_source_history fallback for that coordinate + fingerprint;
  • preserve history for sibling source fingerprints;
  • leave normal stale-formal retirement/history archival unchanged.

Regression coverage

Covers A -> B -> human A -> explicit retire A:

  • A does not fall back to the older historical machine translation;
  • sibling B history remains reusable via coordinate_history.

Scope

No lineage model, no tombstone framework, no Adapter/TranslationUnit changes, and no change to ordinary stale-formal archival semantics.

@AllenXiao95
AllenXiao95 merged commit 4b70316 into master Aug 27, 2026
10 checks passed
@AllenXiao95
AllenXiao95 deleted the fix/human-retirement-source-history branch August 28, 2026 08:04
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