i18n (Go seam): backup stages and failures — internal/backup #2126

Closed
opened 2026-11-03 18:54:48 +00:00 by matou-build-agent · 4 comments

What

Backup stage lines and failure messages (internal/backup, ~34 sentences) render in English. Key them + params so the backup progress and any failure read in the active locale.

How (already decided — ADR 0232 decision 5, DDR 0234)

Go emits a message key + params alongside (not instead of) the English prose; the screen resolves the key in the active locale and falls back to the prose when the key is missing. The pattern is already live for the founding seam — see StandupEvent.Key/Args, logEventKeyed, and the *Key/*Args struct fields in internal/founding/standup.go; the catalogues app/src/i18n/founding/g8.seam.* and g9.standup.*; and useSeamTranslator / resolveSeamText in app/src/lib/i18n.ts. Extend that pattern, don't invent a second one.

Acceptance (scoped to this area)

  • This area emits keys + params for every operator- or member-facing sentence; the English prose stays as the fallback (decision 6).
  • The keys exist in all five catalogues (en authoritative; es/nl/fr/pt machine drafts, marked draft) and pass the parity guard.
  • Each surface that shows the text renders it through the seam translator; a live en → es flip re-renders it (one test per surface, the shape of app/tests/unit/foundingAccessI18n.test.ts).
  • Logs, audit records and anything machine-read stay English — only person-facing text is keyed (DDR 0234 bucket 3: text relayed verbatim from another seam stays prose-only).

Parent: #2121. Independent of the other #2121 children — can run in parallel.

## What Backup stage lines and failure messages (`internal/backup`, ~34 sentences) render in English. Key them + params so the backup progress and any failure read in the active locale. ## How (already decided — ADR 0232 decision 5, DDR 0234) Go emits a **message key + params** alongside (not instead of) the English prose; the screen resolves the key in the active locale and falls back to the prose when the key is missing. The pattern is already live for the founding seam — see `StandupEvent.Key`/`Args`, `logEventKeyed`, and the `*Key`/`*Args` struct fields in `internal/founding/standup.go`; the catalogues `app/src/i18n/founding/g8.seam.*` and `g9.standup.*`; and `useSeamTranslator` / `resolveSeamText` in `app/src/lib/i18n.ts`. **Extend that pattern, don't invent a second one.** ## Acceptance (scoped to this area) - [ ] This area emits keys + params for every operator- or member-facing sentence; the English prose stays as the fallback (decision 6). - [ ] The keys exist in all five catalogues (en authoritative; es/nl/fr/pt machine drafts, marked draft) and pass the parity guard. - [ ] Each surface that shows the text renders it through the seam translator; a live `en → es` flip re-renders it (one test per surface, the shape of `app/tests/unit/foundingAccessI18n.test.ts`). - [ ] Logs, audit records and anything machine-read stay English — only person-facing text is keyed (DDR 0234 bucket 3: text relayed verbatim from another seam stays prose-only). Parent: #2121. Independent of the other #2121 children — can run in parallel.
Author
Member

⏩ independent reviewer for #2126 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #2126 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>
Author
Member

close-report for #2126 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261103-191413-cdbc9e (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 2126,
  "status": "success",
  "commits": [
    "00fcb767df7bb034f872ea943f08dee3a07905c0"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/src/components/backups/BackupExportScreen.vue",
    "dashboard/src/components/backups/BackupRestoreReplacesScreen.vue",
    "dashboard/src/components/backups/BackupRestoreScreen.vue",
    "dashboard/src/i18n/operations/backupsSeam/en.ts",
    "dashboard/src/i18n/operations/backupsSeam/es.ts",
    "dashboard/src/i18n/operations/backupsSeam/fr.ts",
    "dashboard/src/i18n/operations/backupsSeam/nl.ts",
    "dashboard/src/i18n/operations/backupsSeam/pt.ts",
    "dashboard/src/i18n/operations/en.ts",
    "dashboard/src/i18n/operations/es.ts",
    "dashboard/src/i18n/operations/fr.ts",
    "dashboard/src/i18n/operations/nl.ts",
    "dashboard/src/i18n/operations/pt.ts",
    "dashboard/src/lib/backups.ts",
    "dashboard/src/lib/i18n.ts",
    "dashboard/src/lib/seam.ts",
    "dashboard/tests/unit/backupSeamI18n.test.ts",
    "internal/backup/export.go",
    "internal/backup/i18n.go",
    "internal/backup/i18n_test.go",
    "internal/backup/restore.go",
    "internal/backup/restore_inplace.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/backup/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go vet ./internal/backup/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command golangci-lint run ./internal/backup/",
      "exit_code": 0
    },
    {
      "command": "dashboard: npx vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "dashboard: npx eslint <changed dashboard files>",
      "exit_code": 0
    },
    {
      "command": "dashboard: npx vitest run tests/unit/backupSeamI18n.test.ts tests/unit/i18n.test.ts tests/unit/backup*",
      "exit_code": 0
    }
  ],
  "criteria": {
    "This area emits keys + params for every operator- or member-facing sentence (scoped to backup STAGES and FAILURES — the title/What); English prose stays the decision-6 fallback": "internal/backup/i18n.go (keys) + restore.go/export.go/restore_inplace.go populate *Key/*Args beside the retained prose; internal/backup/i18n_test.go asserts key emission; the runs/coverage/policy/matrix/gone-target remainder of #2121's area filed as sibling #2135",
    "The keys exist in all five catalogues (en authoritative; es/nl/fr/pt machine drafts, marked draft) and pass the parity guard": "dashboard/src/i18n/operations/backupsSeam/{en,es,nl,fr,pt}.ts (es/nl/fr/pt carry `export const draft = true`); wired into operations/{en,es,nl,fr,pt}.ts; parity proven by tests/unit/i18n.test.ts (passes)",
    "Each surface renders through the seam translator; a live en -> es flip re-renders it (one test per surface)": "dashboard/src/lib/seam.ts + useSeamTranslator in lib/i18n.ts; BackupExportScreen/BackupRestoreScreen/BackupRestoreReplacesScreen resolve via resolveSeamText/seamLabel/seamDetail; dashboard/tests/unit/backupSeamI18n.test.ts has one live en->es flip `it` per surface (3 pass)",
    "Logs, audit records and anything machine-read stay English — only person-facing text is keyed (DDR 0234 bucket 3)": "audit-detail funcs and `backup:` errors untouched; stage details/failures relaying a port err.Error() and headroom lines carrying the port `need` carry NO key (prose-only), proven by TestSeam_HeadroomKeysOnlyWhenNoRelayedNeed and the bucket-3 assertion in backupSeamI18n.test.ts"
  },
  "summary": "Keyed the backup restore/export stages, the REPLACES confirm and the headroom line (ADR 0232 d.5, DDR 0234); the three P7 screens render them through a new control-panel seam translator with a live en->es flip.",
  "blockers": []
}
**close-report** for #2126 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261103-191413-cdbc9e` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 2126, "status": "success", "commits": [ "00fcb767df7bb034f872ea943f08dee3a07905c0" ], "changed_files": [ "STATUS.md", "dashboard/src/components/backups/BackupExportScreen.vue", "dashboard/src/components/backups/BackupRestoreReplacesScreen.vue", "dashboard/src/components/backups/BackupRestoreScreen.vue", "dashboard/src/i18n/operations/backupsSeam/en.ts", "dashboard/src/i18n/operations/backupsSeam/es.ts", "dashboard/src/i18n/operations/backupsSeam/fr.ts", "dashboard/src/i18n/operations/backupsSeam/nl.ts", "dashboard/src/i18n/operations/backupsSeam/pt.ts", "dashboard/src/i18n/operations/en.ts", "dashboard/src/i18n/operations/es.ts", "dashboard/src/i18n/operations/fr.ts", "dashboard/src/i18n/operations/nl.ts", "dashboard/src/i18n/operations/pt.ts", "dashboard/src/lib/backups.ts", "dashboard/src/lib/i18n.ts", "dashboard/src/lib/seam.ts", "dashboard/tests/unit/backupSeamI18n.test.ts", "internal/backup/export.go", "internal/backup/i18n.go", "internal/backup/i18n_test.go", "internal/backup/restore.go", "internal/backup/restore_inplace.go" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/backup/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go vet ./internal/backup/", "exit_code": 0 }, { "command": "nix develop .#go-ci --command golangci-lint run ./internal/backup/", "exit_code": 0 }, { "command": "dashboard: npx vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 }, { "command": "dashboard: npx eslint <changed dashboard files>", "exit_code": 0 }, { "command": "dashboard: npx vitest run tests/unit/backupSeamI18n.test.ts tests/unit/i18n.test.ts tests/unit/backup*", "exit_code": 0 } ], "criteria": { "This area emits keys + params for every operator- or member-facing sentence (scoped to backup STAGES and FAILURES — the title/What); English prose stays the decision-6 fallback": "internal/backup/i18n.go (keys) + restore.go/export.go/restore_inplace.go populate *Key/*Args beside the retained prose; internal/backup/i18n_test.go asserts key emission; the runs/coverage/policy/matrix/gone-target remainder of #2121's area filed as sibling #2135", "The keys exist in all five catalogues (en authoritative; es/nl/fr/pt machine drafts, marked draft) and pass the parity guard": "dashboard/src/i18n/operations/backupsSeam/{en,es,nl,fr,pt}.ts (es/nl/fr/pt carry `export const draft = true`); wired into operations/{en,es,nl,fr,pt}.ts; parity proven by tests/unit/i18n.test.ts (passes)", "Each surface renders through the seam translator; a live en -> es flip re-renders it (one test per surface)": "dashboard/src/lib/seam.ts + useSeamTranslator in lib/i18n.ts; BackupExportScreen/BackupRestoreScreen/BackupRestoreReplacesScreen resolve via resolveSeamText/seamLabel/seamDetail; dashboard/tests/unit/backupSeamI18n.test.ts has one live en->es flip `it` per surface (3 pass)", "Logs, audit records and anything machine-read stay English — only person-facing text is keyed (DDR 0234 bucket 3)": "audit-detail funcs and `backup:` errors untouched; stage details/failures relaying a port err.Error() and headroom lines carrying the port `need` carry NO key (prose-only), proven by TestSeam_HeadroomKeysOnlyWhenNoRelayedNeed and the bucket-3 assertion in backupSeamI18n.test.ts" }, "summary": "Keyed the backup restore/export stages, the REPLACES confirm and the headroom line (ADR 0232 d.5, DDR 0234); the three P7 screens render them through a new control-panel seam translator with a live en->es flip.", "blockers": [] } ``` </details>
Author
Member

🚨 Reopened — a push-mode close did NOT land on main (#283). close-report closed this issue against the pushed worker branch, but the host's post-run verify rolled the land back (the promote did not advance main (a no-op push to main)), so origin/main never carried the commits (00fcb767df7bb034f872ea943f08dee3a07905c0). The gates-passed comment above is therefore NOT true of main. Reopening and relabelling ready-for-session so the work is redone where it can land; the commits are parked on a rescue branch for triage (see this run's alarm).

:rotating_light: **Reopened — a push-mode close did NOT land on `main` (#283).** close-report closed this issue against the pushed worker branch, but the host's post-run verify rolled the land back (`the promote did not advance main (a no-op push to main)`), so `origin/main` never carried the commits (`00fcb767df7bb034f872ea943f08dee3a07905c0`). The gates-passed comment above is therefore NOT true of `main`. Reopening and relabelling `ready-for-session` so the work is redone where it can land; the commits are parked on a rescue branch for triage (see this run's alarm).
Author
Member

Close report — landed on main (push mode), commit a71cee68.

The backup Go seam (internal/backup) now emits a message key + params beside every operator-facing stage line and failure message it authors; the control panel resolves the key in the active locale and falls back to the retained English prose (ADR 0232 decision 5, DDR 0234 — extends the founding/monitor pattern, not a second one).

What landed (~34 authored sentences keyed):

  • run.go — RunRow.Summary/Detail for the four P7-S3 run outcomes (target names / kept-of-total counts on slots).
  • restore.go — RestoreStage.Label/Detail for the P7-S5 alternate-device stages.
  • restore_inplace.go — the P7-S4x RestoreConfirmView lines, RestoreHeadroom.Message (enough/tight), and the in-place P7-S5/S5x stages. Fail-stage labels keyed; their details relay a port/err %v verbatim and stay prose (DDR 0234 bucket 3). The tight-headroom need clause rides its own relayed slot.
  • New control-panel area dashboard/src/i18n/backup/{en,es,nl,fr,pt}.ts (en authoritative/byte-identical to the Go prose; es/nl/fr/pt machine drafts, marked draft — native-reviewer accept owed), wired into dashboard/src/i18n/index.ts. BackupRunsScreen/BackupRestoreScreen/BackupRestoreReplacesScreen resolve through useSeamText.

Acceptance:

  • Keys + params for every operator-facing sentence in this area; English prose stays the fallback (d.6).
  • Keys exist in all five catalogues and pass the parity guard (en authoritative; es/nl/fr/pt drafts).
  • Each surface renders through the seam translator; a live en→es flip re-renders it (one test per surface: dashboard/tests/unit/backupsSeamI18n.test.ts). Backups is a control-panel-only surface — no operator-app render, so no app test.
  • Logs / audit records (runAuditDetail/restoreAuditDetail/inPlaceAuditDetail, oplog) stay English; relayed-from-another-seam text stays prose (bucket 3).

Proof: internal/backup/i18nseam_test.go (8 tests) + dashboard/tests/unit/backupsSeamI18n.test.ts (4, one en→es flip per surface). go test ./internal/backup/ + go vet + golangci-lint (0 issues) + gofmt clean; go build ./... clean; dashboard vue-tsc + eslint clean; dashboard parity guard + existing backup component suites green. Push gate (gofmt + eslint) passed.

Known (pre-existing, flagged): the keyed *_key/*_args fields flow through the generic camelize wire-mapping at runtime but are not yet declared in the OpenAPI spec / generated.ts (same as the #2125 monitor seam) — additive/omitempty, so the untyped passthrough is harmless; a transport-type follow-up. OWED: native-reviewer accept for the four drafts.

Advances #2121. Ruled by agent under ADR 0174 — veto anytime (additive fields + prose fallback, revertible per commit; proven by the suites).

**Close report — landed on `main` (push mode), commit `a71cee68`.** The `backup` Go seam (`internal/backup`) now emits a **message key + params** beside every operator-facing stage line and failure message it authors; the control panel resolves the key in the active locale and falls back to the retained English prose (ADR 0232 decision 5, DDR 0234 — extends the founding/monitor pattern, not a second one). **What landed (~34 authored sentences keyed):** - `run.go` — `RunRow.Summary/Detail` for the four P7-S3 run outcomes (target names / kept-of-total counts on slots). - `restore.go` — `RestoreStage.Label/Detail` for the P7-S5 alternate-device stages. - `restore_inplace.go` — the P7-S4x `RestoreConfirmView` lines, `RestoreHeadroom.Message` (enough/tight), and the in-place P7-S5/S5x stages. Fail-stage **labels** keyed; their details relay a port/`err` `%v` verbatim and stay prose (DDR 0234 bucket 3). The tight-headroom `need` clause rides its own relayed slot. - New control-panel area `dashboard/src/i18n/backup/{en,es,nl,fr,pt}.ts` (en authoritative/byte-identical to the Go prose; es/nl/fr/pt machine drafts, **marked draft** — native-reviewer accept owed), wired into `dashboard/src/i18n/index.ts`. `BackupRunsScreen`/`BackupRestoreScreen`/`BackupRestoreReplacesScreen` resolve through `useSeamText`. **Acceptance:** - [x] Keys + params for every operator-facing sentence in this area; English prose stays the fallback (d.6). - [x] Keys exist in all five catalogues and pass the parity guard (en authoritative; es/nl/fr/pt drafts). - [x] Each surface renders through the seam translator; a live `en→es` flip re-renders it (one test per surface: `dashboard/tests/unit/backupsSeamI18n.test.ts`). Backups is a **control-panel-only** surface — no operator-app render, so no app test. - [x] Logs / audit records (`runAuditDetail`/`restoreAuditDetail`/`inPlaceAuditDetail`, oplog) stay English; relayed-from-another-seam text stays prose (bucket 3). **Proof:** `internal/backup/i18nseam_test.go` (8 tests) + `dashboard/tests/unit/backupsSeamI18n.test.ts` (4, one en→es flip per surface). `go test ./internal/backup/` + `go vet` + golangci-lint (0 issues) + gofmt clean; `go build ./...` clean; dashboard `vue-tsc` + eslint clean; dashboard parity guard + existing backup component suites green. Push gate (gofmt + eslint) passed. **Known (pre-existing, flagged):** the keyed `*_key`/`*_args` fields flow through the generic `camelize` wire-mapping at runtime but are not yet declared in the OpenAPI spec / `generated.ts` (same as the #2125 monitor seam) — additive/omitempty, so the untyped passthrough is harmless; a transport-type follow-up. **OWED:** native-reviewer accept for the four drafts. Advances #2121. Ruled by agent under ADR 0174 — veto anytime (additive fields + prose fallback, revertible per commit; proven by the suites).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#2126
No description provided.