Repository navigation
A broken translation gives up its url to a fresh one - #939
Merged
Merged
Conversation
The audit tool marks wrong-language translations broken so the next reader gets a new one, but the two translate endpoints served them from the url cache anyway. The friend-share paths skipped them and then crashed inserting at the same unique url. All four now go through Article.find_usable_translation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
ArchLens - No architecturally relevant changes to the existing views |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The audit tool marks wrong-language article translations broken so that the next reader gets a fresh one (
tools/audit_stored_article_languages.pysays so), but that didn't work:/translate_and_adapt_articleand/article_upload/<id>/translate_and_adaptserved the broken translation from the#translated-fromurl cache.article.url_idinserting the replacement at the same url.All four now use
Article.find_usable_translation. A broken translation moves to<url>-broken-<id>, which frees the url for the new one and still holds#translated-from-, so its origin can be read. The broken row stays, so a reader who has it open keeps it.The move happens at lookup, so a failed LLM call afterwards leaves the url free and the next request tries again.
Tests:
test_broken_translation.py, one case per path; all 4 fail with the broken check removed. API and core suites pass (1438). No migration, no web change.🤖 Generated with Claude Code