i18n (Go seam): device-removal plans — internal/provision, internal/clan #2127

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

What

Device-removal plans (the removal-plan and device-facing prose in internal/provision and internal/clan) cross the seam as English sentences. Key the operator-facing removal-plan text + params. Scope to the removal-plan / device-facing prose only — the rest of internal/clan (104 sentences total) belongs to its own follow-ups; key only what this area's surfaces render.

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 Device-removal plans (the removal-plan and device-facing prose in `internal/provision` and `internal/clan`) cross the seam as English sentences. Key the operator-facing removal-plan text + params. Scope to the removal-plan / device-facing prose only — the rest of `internal/clan` (104 sentences total) belongs to its own follow-ups; key only what this area's surfaces render. ## 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

swarm-claim host=elitebook-distributed-server-03 run=58977
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=58977 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

⏩ independent reviewer for #2127 — verdict unauthenticated

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

close-report for #2127 — status success

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

envelope
{
  "issue": 2127,
  "status": "success",
  "commits": [
    "52bec85bc0521d6e633ada93ef7053e2d5b2cd74"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/provision/removal.go",
    "internal/provision/removal_test.go",
    "dashboard/src/lib/seam.ts",
    "dashboard/src/lib/provision.ts",
    "dashboard/src/lib/api/provisionClient.ts",
    "dashboard/src/components/catalogue/SelectDeviceDialog.vue",
    "dashboard/src/i18n/provisioning/parts/catalogue/en.ts",
    "dashboard/src/i18n/provisioning/parts/catalogue/es.ts",
    "dashboard/src/i18n/provisioning/parts/catalogue/nl.ts",
    "dashboard/src/i18n/provisioning/parts/catalogue/fr.ts",
    "dashboard/src/i18n/provisioning/parts/catalogue/pt.ts",
    "dashboard/tests/fakes/provision.ts",
    "dashboard/tests/unit/catalogueRemovalI18n.test.ts"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./internal/provision/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go test ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "npx vitest run (dashboard, 172 files)",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc -p tsconfig.json --noEmit (dashboard)",
      "exit_code": 0
    },
    {
      "command": "npx eslint (changed dashboard files)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "This area emits keys + params for every operator- or member-facing sentence; the English prose stays as the fallback (decision 6)": "The removal plan's one operator-facing sentence (DeviceRemoval.Freed) now emits FreedKey + FreedArgs beside the retained Freed prose (internal/provision/removal.go); Loses stays prose-only (DDR 0234 bucket 3 — relayed from the impact seam), and internal/clan's removal strings are commit messages / infra errors (machine-read). resolveSeamText falls back to prose when the key is absent (dashboard/src/lib/seam.ts).",
    "The keys exist in all five catalogues (en authoritative; es/nl/fr/pt machine drafts, marked draft) and pass the parity guard": "panel.provisioning.catalogue.removalSeam.freed added to en/es/nl/fr/pt under dashboard/src/i18n/provisioning/parts/catalogue/*.ts (es/nl/fr/pt files already carry `export const draft = true`); the decision-9 parity guard in dashboard/tests/unit/i18n.test.ts passes (full suite green).",
    "Each surface that shows the text renders it through the seam translator; a live en to es flip re-renders it (one test per surface)": "SelectDeviceDialog.vue resolves the freed footprint via useSeamTranslator/resolveSeamText; dashboard/tests/unit/catalogueRemovalI18n.test.ts mounts the Uninstall dialog, asserts en, flips the shared i18n locale to es live (no remount) and asserts the Spanish re-render — the shape of app/tests/unit/foundingAccessI18n.test.ts.",
    "Logs, audit records and anything machine-read stay English — only person-facing text is keyed": "Only DeviceRemoval.Freed (the dialog's rendered sentence) is keyed; the error strings, clan commit messages and infra faults are untouched and stay English (DDR 0234 bucket 3)."
  },
  "summary": "The device removal plan's freed sentence crosses the Go seam as key + params; the control panel gains its own seam renderer and the Uninstall dialog re-renders it live on a locale flip.",
  "blockers": [],
  "unproven_by_seam": "The dashboard tests drive a fake removal read and the Go test drives a fake fleet; a live control panel resolving a real gateway's removal read in Spanish is not exercised in-sandbox (no go/chromium e2e here) — it runs in CI and against a real community."
}
**close-report** for #2127 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261103-191635-2eea3a` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 2127, "status": "success", "commits": [ "52bec85bc0521d6e633ada93ef7053e2d5b2cd74" ], "changed_files": [ "STATUS.md", "internal/provision/removal.go", "internal/provision/removal_test.go", "dashboard/src/lib/seam.ts", "dashboard/src/lib/provision.ts", "dashboard/src/lib/api/provisionClient.ts", "dashboard/src/components/catalogue/SelectDeviceDialog.vue", "dashboard/src/i18n/provisioning/parts/catalogue/en.ts", "dashboard/src/i18n/provisioning/parts/catalogue/es.ts", "dashboard/src/i18n/provisioning/parts/catalogue/nl.ts", "dashboard/src/i18n/provisioning/parts/catalogue/fr.ts", "dashboard/src/i18n/provisioning/parts/catalogue/pt.ts", "dashboard/tests/fakes/provision.ts", "dashboard/tests/unit/catalogueRemovalI18n.test.ts" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./internal/provision/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go test ./internal/controlapi/", "exit_code": 0 }, { "command": "npx vitest run (dashboard, 172 files)", "exit_code": 0 }, { "command": "npx vue-tsc -p tsconfig.json --noEmit (dashboard)", "exit_code": 0 }, { "command": "npx eslint (changed dashboard files)", "exit_code": 0 } ], "criteria": { "This area emits keys + params for every operator- or member-facing sentence; the English prose stays as the fallback (decision 6)": "The removal plan's one operator-facing sentence (DeviceRemoval.Freed) now emits FreedKey + FreedArgs beside the retained Freed prose (internal/provision/removal.go); Loses stays prose-only (DDR 0234 bucket 3 — relayed from the impact seam), and internal/clan's removal strings are commit messages / infra errors (machine-read). resolveSeamText falls back to prose when the key is absent (dashboard/src/lib/seam.ts).", "The keys exist in all five catalogues (en authoritative; es/nl/fr/pt machine drafts, marked draft) and pass the parity guard": "panel.provisioning.catalogue.removalSeam.freed added to en/es/nl/fr/pt under dashboard/src/i18n/provisioning/parts/catalogue/*.ts (es/nl/fr/pt files already carry `export const draft = true`); the decision-9 parity guard in dashboard/tests/unit/i18n.test.ts passes (full suite green).", "Each surface that shows the text renders it through the seam translator; a live en to es flip re-renders it (one test per surface)": "SelectDeviceDialog.vue resolves the freed footprint via useSeamTranslator/resolveSeamText; dashboard/tests/unit/catalogueRemovalI18n.test.ts mounts the Uninstall dialog, asserts en, flips the shared i18n locale to es live (no remount) and asserts the Spanish re-render — the shape of app/tests/unit/foundingAccessI18n.test.ts.", "Logs, audit records and anything machine-read stay English — only person-facing text is keyed": "Only DeviceRemoval.Freed (the dialog's rendered sentence) is keyed; the error strings, clan commit messages and infra faults are untouched and stay English (DDR 0234 bucket 3)." }, "summary": "The device removal plan's freed sentence crosses the Go seam as key + params; the control panel gains its own seam renderer and the Uninstall dialog re-renders it live on a locale flip.", "blockers": [], "unproven_by_seam": "The dashboard tests drive a fake removal read and the Go test drives a fake fleet; a live control panel resolving a real gateway's removal read in Spanish is not exercised in-sandbox (no go/chromium e2e here) — it runs in CI and against a real community." } ``` </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 (push-failed-nothing-to-land), so origin/main never carried the commits (52bec85bc0521d6e633ada93ef7053e2d5b2cd74). 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 (`push-failed-nothing-to-land`), so `origin/main` never carried the commits (`52bec85bc0521d6e633ada93ef7053e2d5b2cd74`). 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), ADR 0174.

Device-removal plans now cross the Go seam as a message key + params beside the retained English, and the catalogue UNINSTALL dialog resolves the key in the active locale, falling back to the prose when a key is missing (ADR 0232 decision 5/6, DDR 0234). Extends the live founding/monitor/backup/update pattern — not a second one.

What landed (commit d6578ff7):

  • Go seam — 3 authored sentences keyed under provision.removal.*:
    • internal/provision/removal.go — DeviceRemoval.Freed → FreedKey/FreedArgs (the GB figure on {gb}); RemovalFor passes the keyed LOSES structure onto DeviceRemoval.LosesKeys/LosesArgs.
    • internal/provision/impact.go — the two ⚠ LOSES forms (last-live-copy, last-backup) keyed via a new Impact.loseKeyed helper that keeps Loses/LosesKeys/LosesArgs index-aligned (dataset + device names on slots). Byte-identical to the impact's own keyed rows the change journey shares (DDR 0155 §3 — one estimate).
  • Catalogue (all five locales): new dashboard/src/i18n/provision/{en,es,nl,fr,pt}.ts, wired into dashboard/src/i18n/index.ts. en byte-identical to the Go prose; es/nl/fr/pt machine drafts, marked draft (native-reviewer accept owed). Passes the decision-9 parity guard.
  • Surface: SelectDeviceDialog.vue (mode="uninstall") resolves the freed line + each LOSES row through useSeamText — the only surface that renders this prose (control-panel only; no operator-app render).

Acceptance (scoped to this area):

  • Keys + params for every operator-facing sentence this area renders; English prose stays the fallback (d.6).
  • Keys exist in all five catalogues (en authoritative; es/nl/fr/pt machine drafts) and pass the parity guard.
  • The surface renders through the seam translator; a live en→es flip re-renders it (one test for the surface).
  • Logs/audit/machine-read stay English — the provision:-prefixed error refusals are bucket 3 (machine-read), left prose. No internal/clan prose is rendered by this surface (the removal read imports only fleetstate/catalogue/enroll); the rest of internal/clan is its own follow-ups.

Proof (red→green): internal/provision/i18nseam_test.go (4 tests — freed keyed, both LOSES forms keyed with the right slots, byte-identity with ReviewImpact) + dashboard/tests/unit/provisionRemovalSeamI18n.test.ts (2 — a live en→es flip re-renders the freed line and the LOSES row with the dataset/device names riding the slots verbatim; and the prose fallback on a missing key). go test ./internal/provision/ ./internal/controlapi/ green; go vet + golangci-lint (0 issues) + gofmt clean; dashboard vue-tsc + eslint clean; dashboard parity guard + the existing catalogueUninstall/removal component suites green (58 pass).

Known (pre-existing): 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 #2125/#2126) — a transport-type follow-up; the fields are additive/omitempty, so the untyped passthrough is harmless.

Two-way door throughout: additive fields + prose fallback, revertible per commit, proven by the two suites. Ruled by agent under ADR 0174 — veto anytime. Advances #2121.

STATUS.md updated in the same commit.

**Close-report — landed on `main` (push mode), ADR 0174.** Device-removal plans now cross the Go seam as a **message key + params** beside the retained English, and the catalogue UNINSTALL dialog resolves the key in the active locale, falling back to the prose when a key is missing (ADR 0232 decision 5/6, DDR 0234). Extends the live founding/monitor/backup/update pattern — not a second one. **What landed (commit `d6578ff7`):** - **Go seam — 3 authored sentences keyed under `provision.removal.*`:** - `internal/provision/removal.go` — `DeviceRemoval.Freed` → `FreedKey`/`FreedArgs` (the GB figure on `{gb}`); `RemovalFor` passes the keyed LOSES structure onto `DeviceRemoval.LosesKeys`/`LosesArgs`. - `internal/provision/impact.go` — the two ⚠ LOSES forms (last-live-copy, last-backup) keyed via a new `Impact.loseKeyed` helper that keeps `Loses`/`LosesKeys`/`LosesArgs` index-aligned (dataset + device names on slots). Byte-identical to the impact's own keyed rows the change journey shares (DDR 0155 §3 — one estimate). - **Catalogue (all five locales):** new `dashboard/src/i18n/provision/{en,es,nl,fr,pt}.ts`, wired into `dashboard/src/i18n/index.ts`. `en` byte-identical to the Go prose; es/nl/fr/pt machine drafts, marked `draft` (native-reviewer accept owed). Passes the decision-9 parity guard. - **Surface:** `SelectDeviceDialog.vue` (mode="uninstall") resolves the freed line + each LOSES row through `useSeamText` — the only surface that renders this prose (control-panel only; no operator-app render). **Acceptance (scoped to this area):** - [x] Keys + params for every operator-facing sentence this area renders; English prose stays the fallback (d.6). - [x] Keys exist in all five catalogues (en authoritative; es/nl/fr/pt machine drafts) and pass the parity guard. - [x] The surface renders through the seam translator; a live `en→es` flip re-renders it (one test for the surface). - [x] Logs/audit/machine-read stay English — the `provision:`-prefixed error refusals are bucket 3 (machine-read), left prose. **No `internal/clan` prose is rendered by this surface** (the removal read imports only `fleetstate`/`catalogue`/`enroll`); the rest of `internal/clan` is its own follow-ups. **Proof (red→green):** `internal/provision/i18nseam_test.go` (4 tests — freed keyed, both LOSES forms keyed with the right slots, byte-identity with ReviewImpact) + `dashboard/tests/unit/provisionRemovalSeamI18n.test.ts` (2 — a live `en→es` flip re-renders the freed line and the LOSES row with the dataset/device names riding the slots verbatim; and the prose fallback on a missing key). `go test ./internal/provision/ ./internal/controlapi/` green; `go vet` + golangci-lint (0 issues) + gofmt clean; dashboard `vue-tsc` + eslint clean; dashboard parity guard + the existing `catalogueUninstall`/`removal` component suites green (58 pass). **Known (pre-existing):** 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 #2125/#2126) — a transport-type follow-up; the fields are additive/omitempty, so the untyped passthrough is harmless. Two-way door throughout: additive fields + prose fallback, revertible per commit, proven by the two suites. **Ruled by agent under ADR 0174 — veto anytime.** Advances #2121. STATUS.md updated in the same commit.
matou-build-agent 2026-11-04 00:30:43 +00:00
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.

Dependencies

No dependencies set.

Reference
Matou/idss#2127
No description provided.