v0.306.0: R-570 — the off-site note decides on its kind only; the pre-0.251.0 text fallback is deleted
gates / gates (push) Successful in 1m14s

Fleet condition read on each box's settings.json 2026-10-10 (offbox.last_success ~02:16Z on 0.304.0).
Red-proof: the new no-kind row of TestR553_StaleNoteDecisionSurvivesWordingChange failed against the fallback.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
2026-10-10 15:08:42 +02:00
parent c255195e37
commit 9e5b88146e
9 changed files with 41 additions and 69 deletions
+5 -17
View File
@@ -1055,13 +1055,7 @@ func (s *Server) backupsOffboxData(data map[string]interface{}, lang string) {
}
}
// offboxStaleWarningMarker is the substring the zero-toggled offbox run wrote into LastWarning before
// v0.251.0, when the run started recording a KIND beside it (R-553). It is kept ONLY to read boxes
// upgraded with that older text already persisted — see offboxWarningDisplay.
const (
offboxStaleWarningMarker = "nincs mentésre jelölt alkalmazás"
offboxSelectionChangedKey = "offbox.selection_changed"
)
const offboxSelectionChangedKey = "offbox.selection_changed"
// offboxWarningDisplay picks what the Távoli mentés page shows for the persisted
// Offbox.LastWarning. A zero-toggled run records "Sikeres — nincs mentésre jelölt
@@ -1069,13 +1063,10 @@ const (
// replace it with the honest "selection changed, the next run covers it" note.
// Pure display logic: the persisted LastWarning is never touched, and every other
// warning (quota, partial failure) passes through verbatim.
// R-553 — the decision is made on the KIND the run recorded, not on the words of the sentence.
// The one text test that remains runs ONLY when there is no kind, i.e. on a box whose last off-site
// run happened before v0.251.0 and whose persisted warning therefore predates kinds.
//
// R-553 legacy: remove after every fleet box has completed one off-site run on ≥ 0.251.0 (row R-570).
// Localisation slice 2 (R-557) must not translate the producer at backup/offbox.go until that row is
// closed — translating it while this fallback is still needed would strand exactly those boxes.
// R-553 — the decision is made on the KIND the run recorded, never on the words of the sentence.
// R-570 (2026-10-10): the legacy text test for pre-0.251.0 warnings is removed — every fleet box has
// completed an off-site run on ≥ 0.251.0, so every persisted warning carries its kind. Pinned by
// TestR553_StaleNoteDecisionSurvivesWordingChange (no kind → verbatim).
func (s *Server) offboxWarningDisplay(lastWarning, kind string, toggledCount int, lang string) string {
if toggledCount < 1 {
return lastWarning
@@ -1083,9 +1074,6 @@ func (s *Server) offboxWarningDisplay(lastWarning, kind string, toggledCount int
if kind == backup.OffboxWarnNoAppsSelected {
return s.msgLang(lang, offboxSelectionChangedKey)
}
if kind == "" && strings.Contains(lastWarning, offboxStaleWarningMarker) {
return s.msgLang(lang, offboxSelectionChangedKey)
}
return lastWarning
}