release: do not print repoint failed when the relay to root runs
A cold wake in the sandboxed agent hits EROFS on the live swap and relays it to the root pass. The "repoint failed" line was noise there. Skip it only when the relay is about to run and no caps were converged; every other failure still prints.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
internal/release/adopt.go+10 −2internal/release/stage_blocked_test.go+70 −0
Intent
<task-notification> <task-id>a17b099a61041ff5d</task-id> <tool-use-id>toolu_01ChA5RTEWbbuvbKWraEFCBy</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/2b517942-2259-467d-a8d0-994fd28c9e84/tasks/a17b099a61041ff5d.output</output-file> <status>completed</status> <summary>Agent "Implement #1061 Task 3" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE (fix round 2) Commits: c4ae2184 (kick), ba048801 (r1: one kick per fleet at a time, bounded lock wait), d9c2a53b console: kick copies placement by the admitted fleet, no DB read (#1061 r2) Tests: the four kick tests and the placement and claim SQL census tests pass; `-run 'Replica|Copies|Placement|FleetRelabel'` passes (217 s); I did not run the full console package, CI covers it. New P2 fixed: the copies handler now takes the fleet it already resolves while checking the new count and passes it out through the request context. After unlock it kicks placement by that fleet alone, with no database or bucket read on the request goroutine. A test holds the database's only connection and the kick still returns at once. Path without a fleet: lowering to 1. The handler never reads the placement for a count of 1, so that write starts no kick, and the 5-minute pass retires the extra copies. Lowering to 2 or more is still kicked. Optional minor done: a test fires a second kick after a run has cleared its pending flag; the same run then goes round a second time. Concerns: the "would have hung" claim for the old code is reasoning only, because the function signature changed and the old version can't be run against the new test. Shutdown still does not cancel kicks; each run is capped at 2 minutes. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/sr-followups/.superpowers/sdd/plan-1061/task-3-report.md</result> <usage><subagent_tokens>142953</subagent_tokens><tool_uses>8</tool_uses><duration_ms>398142</duration_ms></usage> </task-notification>
<task-notification> <task-id>b9d15a4s2</task-id> <tool-use-id>toolu_01AyCdJYn1kV9UDGbDHxTBJf</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/2b517942-2259-467d-a8d0-994fd28c9e84/tasks/b9d15a4s2.output</output-file> <status>completed</status> <summary>Background command "S=/home/paulca/.paseo/zerosub/homes/claude-37fe90ef3f56/plugins/cache/claude-plugins-official/superpowers/7.0.2/skills/subagent-driven-development; bash $S/scripts/review-package $PWD/.superpowers/sdd/2026-11-14-sr-followups/plan-1061.md ba048801 HEAD && P=.superpowers/sdd/plan-1061 && cat > $P/task-3-astra-rereview-2.md <<'EOF' Scoped re-review (round 3, final), read-only (do not modify files, index or branches). Go, CARLOS platform. Prior reviews: .superpowers/sdd/plan-1061 ... [767 characters truncated] ... the fix diff only. Minors separately. Concise. EOF timeout 1800 codex exec -m gpt-6-astra -c model_reasoning_effort=high -s read-only "Read .superpowers/sdd/plan-1061/task-3-astra-rereview-2.md and do what it says." </dev/null > $P/task-3-astra-rereview-2.txt 2>&1; echo done" completed (exit code 0)</summary> </task-notification>
Attributed to this commit: 12.3 g CO₂e (1,537,847 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on sr-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/release/adopt.go b/internal/release/adopt.go| index 824fdee3a..9cbd718d5 100644 |
| --- a/internal/release/adopt.go |
| +++ b/internal/release/adopt.go |
| @@ -1875,11 +1875,19 @@ func adoptHost(ctx context.Context, work hostwrite.Work, reg *registry.Registry, |
| rolled = " — restored the capability drop-ins the symlink still names" |
| } |
| } |
| - fmt.Printf(" %s: repoint failed: %v%s\n", rt.Host, err, rolled) |
| + // When the relay below is about to run, the refusal is being handled, |
| + // not failing: the agent's read-only /opt is the expected reason it |
| + // asks the root pass, and that request logs its own line (or, if the |
| + // authority guard trips, the "release authority changed" line). Every |
| + // other failure, including a rolled-back caps converge, still prints. |
| + relay := cfg.stageBlocked != nil && stageBlocked(err) |
| + if !(relay && !converged) { |
| + fmt.Printf(" %s: repoint failed: %v%s\n", rt.Host, err, rolled) |
| + } |
| // A release staged by an earlier root pass can still need root to |
| // swap its live symlink. Relay that write refusal too, or the fast |
| // loop never requests another pass once the artifact exists. |
| - if cfg.stageBlocked != nil && stageBlocked(err) { |
| + if relay { |
| if guardErr := withReleaseWork(ctx, work, id, func() error { return nil }); guardErr != nil { |
| fmt.Printf(" %s: release authority changed before privileged staging relay: %v\n", rt.Host, guardErr) |
| } else { |
diff --git a/internal/release/stage_blocked_test.go b/internal/release/stage_blocked_test.go| index 1446fd8aa..82ea43f9c 100644 |
| --- a/internal/release/stage_blocked_test.go |
| +++ b/internal/release/stage_blocked_test.go |
| @@ -4,10 +4,12 @@ import ( |
| "context" |
| "errors" |
| "fmt" |
| + "io" |
| "io/fs" |
| "os" |
| "path/filepath" |
| "runtime" |
| + "strings" |
| "syscall" |
| "testing" |
| ) |
| @@ -130,3 +132,71 @@ func TestOnStageBlockedUnsetByDefault(t *testing.T) { |
| t.Error("hook not invoked") |
| } |
| } |
| + |
| +// A pass that is about to relay a blocked live swap to the root pass must not |
| +// also print "repoint failed": the relay is the handling, not a failure. The |
| +// same refusal with no relay hook still prints it. |
| +func TestRelayedRepointDoesNotPrintFailure(t *testing.T) { |
| + if os.Geteuid() == 0 || runtime.GOOS == "windows" { |
| + t.Skip("requires Unix directory permissions enforced for a non-root user") |
| + } |
| + ctx := context.Background() |
| + const host = "quiet.example.com" |
| + run := func(opts ...PassOption) (out string, live string) { |
| + s := NewDirStore(t.TempDir()) |
| + priv, pub := testKeys(t) |
| + opt := t.TempDir() |
| + reg := testRegistry(t) |
| + t.Cleanup(func() { reg.Close() }) |
| + for _, ver := range []string{"v1", "v2"} { |
| + shipRelease(t, s, "bab", "myapp", ver, adoptPlatform, []byte(ver)) |
| + } |
| + if err := Promote(ctx, s, priv, "bab", "myapp", "canary/x", "v1"); err != nil { |
| + t.Fatal(err) |
| + } |
| + addRoute(t, reg, host, "myapp", "canary/x", false) |
| + if err := Pass(ctx, reg, s, pub, opt, nil); err != nil { |
| + t.Fatal(err) |
| + } |
| + if _, err := ensureStaged(ctx, s, opt, "bab", "myapp", "v2", host); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := Promote(ctx, s, priv, "bab", "myapp", "canary/x", "v2"); err != nil { |
| + t.Fatal(err) |
| + } |
| + live = filepath.Dir(LiveLink(opt, host)) |
| + t.Cleanup(func() { os.Chmod(live, 0o755) }) |
| + if err := os.Chmod(live, 0o555); err != nil { |
| + t.Fatal(err) |
| + } |
| + r, w, err := os.Pipe() |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + old := os.Stdout |
| + os.Stdout = w |
| + perr := Pass(ctx, reg, s, pub, opt, func(string) error { return nil }, opts...) |
| + os.Stdout = old |
| + w.Close() |
| + b, _ := io.ReadAll(r) |
| + r.Close() |
| + if perr != nil { |
| + t.Fatal(perr) |
| + } |
| + return string(b), live |
| + } |
| + |
| + var relayed int |
| + out, _ := run(OnStageBlocked(func(string, string, error) { relayed++ })) |
| + if relayed != 1 { |
| + t.Fatalf("relays = %d, want 1", relayed) |
| + } |
| + if strings.Contains(out, "repoint failed") { |
| + t.Errorf("relayed refusal still printed a repoint failure:\n%s", out) |
| + } |
| + |
| + out, _ = run() |
| + if !strings.Contains(out, "repoint failed") { |
| + t.Errorf("an unrelayed refusal must still print a repoint failure:\n%s", out) |
| + } |
| +} |