region HA: human text for departure permission and retained notices
The permission-fault journal line and the edges-retained journal line and page were prose-free machine codes. They now say what happened and what to do, and each journal line keeps its machine code in parentheses so a search for it still matches. The retained page's subject and body name the box and the edges file. Invariant unchanged: the permission fault is logged once until it clears; the retained departure pages at most hourly until an operator removes the edges file. Copy: one Luna pass, applied verbatim, approved by delegation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+17
−6
internal/host/hadepartures_retained_test.go+3 −3internal/host/hadepartures_scan.go+14 −3
Intent
Attributed to this commit: 25.9 g CO₂e (3,041,929 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on region-ha-followups, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/internal/host/hadepartures_retained_test.go b/internal/host/hadepartures_retained_test.go| index ae57431d5..7400bb20f 100644 |
| --- a/internal/host/hadepartures_retained_test.go |
| +++ b/internal/host/hadepartures_retained_test.go |
| @@ -173,7 +173,7 @@ func TestDepartureFixedRetainedBackoff(t *testing.T) { |
| if err := json.Unmarshal(raw, &p); err != nil { |
| t.Fatal(err) |
| } |
| - want := page{"page", "warning", "ha_departure_edges_retained", "code=ha_departure_edges_retained key=" + x.d.EdgesKey + " box=" + x.d.Box.Ref} |
| + want := page{"page", "warning", fmt.Sprintf(departureRetainedSubject, x.d.Box.Ref), fmt.Sprintf(departureRetainedBody, x.d.Box.Ref, x.d.EdgesKey)} |
| if p != want { |
| t.Errorf("retained page=%+v want=%+v", p, want) |
| } |
| @@ -183,8 +183,8 @@ func TestDepartureFixedRetainedBackoff(t *testing.T) { |
| t.Cleanup(func() { armPaging(nil) }) |
| notices := 0 |
| x.c.cfg.Logf = func(f string, args ...any) { |
| - if strings.HasPrefix(f, "ha_departure_edges_retained") { |
| - if got := fmt.Sprintf(f, args...); got != "ha_departure_edges_retained key="+x.d.EdgesKey { |
| + if strings.Contains(f, "(ha_departure_edges_retained)") { |
| + if got := fmt.Sprintf(f, args...); got != fmt.Sprintf(departureRetainedNotice, x.d.EdgesKey) { |
| t.Errorf("unexpected notice %q", got) |
| } |
| notices++ |
diff --git a/internal/host/hadepartures_scan.go b/internal/host/hadepartures_scan.go| index afb09c68c..fbdbbb08a 100644 |
| --- a/internal/host/hadepartures_scan.go |
| +++ b/internal/host/hadepartures_scan.go |
| @@ -305,6 +305,17 @@ func (c *Controller) ScanPass(ctx context.Context) (bool, error) { |
| } |
| return true, c.retryScan(ctx, d, blockers, "scan", len(blockers) > 0 || blocked) |
| } |
| + |
| +// Operator text for two departure faults (copy approved by delegation, one |
| +// Luna pass, 2026-11-03). Each journal line ends with its machine code in |
| +// parentheses, so a search for the code still finds it. |
| +const ( |
| + departurePermissionNotice = "Termination recovery could not access %s. It will retry. Check that this box's role can read and delete edges files in the deployment bucket. (ha_departure_permission_fault)" |
| + departureRetainedNotice = "The edges file %s for a terminated box is still in place. Termination recovery will finish when an operator deletes it. (ha_departure_edges_retained)" |
| + departureRetainedSubject = "Remove box %s's edges file" |
| + departureRetainedBody = "Box %s was terminated and its duties were recovered. Its edges file %s is still in place because a fixed box's edges file is never deleted automatically. Delete it after checking that no replacement box uses it. This page repeats every hour until then." |
| +) |
| + |
| func (c *Controller) retryScan(ctx context.Context, d registry.HADeparture, hosts []provision.DepartureHost, code string, page bool) error { |
| ctx, cancel := context.WithTimeout(context.WithoutCancel(ctx), 5*time.Second) |
| defer cancel() |
| @@ -316,7 +327,7 @@ func (c *Controller) retryScan(ctx context.Context, d registry.HADeparture, host |
| return err |
| } |
| if code == "permission_new" { |
| - c.logf("ha_departure_permission_fault key=%s", d.EdgesKey) |
| + c.logf(departurePermissionNotice, d.EdgesKey) |
| return nil |
| } |
| if code == "permission" { |
| @@ -324,8 +335,8 @@ func (c *Controller) retryScan(ctx context.Context, d registry.HADeparture, host |
| } |
| if code == "ha_departure_edges_retained" { |
| if claimed { |
| - c.logf("ha_departure_edges_retained key=%s", d.EdgesKey) |
| - return PageOperator(ctx, alerting.LevelWarning, code, fmt.Sprintf("code=%s key=%s box=%s", code, d.EdgesKey, d.Box.Ref)) |
| + c.logf(departureRetainedNotice, d.EdgesKey) |
| + return PageOperator(ctx, alerting.LevelWarning, fmt.Sprintf(departureRetainedSubject, d.Box.Ref), fmt.Sprintf(departureRetainedBody, d.Box.Ref, d.EdgesKey)) |
| } |
| return nil |
| } |