activator: the instance-key refusals name the host once, through their callers (task 3 review minor)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+6
−3
internal/activator/instancekey.go+6 −3
diff --git a/internal/activator/instancekey.go b/internal/activator/instancekey.go| index 29589cd9d..4a640502c 100644 |
| --- a/internal/activator/instancekey.go |
| +++ b/internal/activator/instancekey.go |
| @@ -182,14 +182,15 @@ func EnsureInstanceKeyBeneath(dir, name string) (InstanceKeyOutcome, error) { |
| // migration starting mid-wake) makes p fenced, with the flat directory as |
| // its dataDir, and minting there would write to a half-migrated host |
| // (isolated-exec design §8.2). The refusal is decided on p, the paths the |
| -// mint would use. |
| +// mint would use. Every caller names the host around the error ("instance |
| +// key for <host>: ..."), so the refusal does not. |
| func (b *ExecBackend) ensureInstanceKeyFor(rt registry.Route, p instancePaths) (InstanceKeyOutcome, error) { |
| if rt.Replica { |
| return InstanceKeyReplica, nil |
| } |
| switch p.layout { |
| case LayoutFenced, LayoutConflict: |
| - return InstanceKeyPresent, fmt.Errorf("%s: not minted: %s", rt.Host, p.reason) |
| + return InstanceKeyPresent, fmt.Errorf("not minted: %s", p.reason) |
| } |
| if p.layout == LayoutNested { |
| return EnsureInstanceKeyBeneath(p.dataDir, rt.Host+".env") |
| @@ -203,6 +204,8 @@ func (b *ExecBackend) ensureInstanceKeyFor(rt registry.Route, p instancePaths) ( |
| // creating a file here could also occupy the path a move's install expects |
| // to be empty (moveslandinstall.go placeStaged). A row this backend would |
| // refuse to start (fenced, conflict) is an error and nothing is written. |
| +// The agent's backfill names the host when it logs the error, so the |
| +// refusal does not. |
| func (b *ExecBackend) BackfillInstanceKey(rt registry.Route) (InstanceKeyOutcome, error) { |
| if rt.Replica { |
| return InstanceKeyReplica, nil |
| @@ -212,7 +215,7 @@ func (b *ExecBackend) BackfillInstanceKey(rt registry.Route) (InstanceKeyOutcome |
| case LayoutNested: |
| return ensureInstanceKey(p.dataDir, rt.Host+".env", true, false) |
| case LayoutFenced, LayoutConflict: |
| - return InstanceKeyPresent, fmt.Errorf("%s: not backfilled: %s", rt.Host, p.reason) |
| + return InstanceKeyPresent, fmt.Errorf("not backfilled: %s", p.reason) |
| } |
| return ensureInstanceKey(p.dataDir, rt.Host+".env", false, false) |
| } |