Skip to content

deps: common v0.5.15; registry reconnect cannot race Stop - #471

Merged
TeoSlayer merged 2 commits into
mainfrom
deps/common-v0.5.15
Sep 24, 2026
Merged

TeoSlayer merged 2 commits into
mainfrom
deps/common-v0.5.15

Conversation

@TeoSlayer

Copy link
Copy Markdown
Collaborator
  • common v0.5.15 (feat(netproxy): refresh rotating proxy credentials (407 -> refresh -> retry once) common#51, Homebrew tap: publish pilotctl via brew #52): idempotent registry Client.Close — fixes the close of closed channel panic seen in every nightly since 07-26 (sweep item 8); pool reconnects keep their cause, log at Debug with a periodic INFO summary, jittered backoff, retry on a healthy pooled conn (sweep item 5: 113,804 "reconnected" INFO lines = 57% of one daemon.log); netproxy credential refresh (inert until wired by the Muse work).
  • daemon: forceReconnectRegistry returns errDaemonStopping once Stop began, and closes the conn it installed if Stop won the race — no leaked registry pool from a heartbeat/rx-watchdog reconnect during shutdown. Regression test TestForceReconnectRegistryAfterStopDoesNotReplaceConn.

GOWORK=off go test ./pkg/daemon/... ./cmd/... green; new/related tests green under -race -count=3.

🤖 Generated with Claude Code

common v0.5.15 (pilot-protocol/common#51, #52): idempotent registry
Client.Close (fixes the 'close of closed channel' panic in every nightly
since 07-26), pool reconnects keep their cause, log at Debug with a
periodic summary, back off with jitter and retry on a healthy conn
(113,804 'reconnected' INFO lines were 57% of one daemon.log), and the
proxy credential refresh used by the upcoming Muse support.

forceReconnectRegistry now declines once Stop has begun and closes the
conn it installed if Stop won the race, so a heartbeat or rx-watchdog
reconnect during shutdown no longer leaks a registry pool.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Comment thread pkg/daemon/daemon.go
// Stop may have closed the registry between the check above and the
// swap; if so it closed the old conn, so close the one we installed.
if d.stopping() {
newConn.Close()
@TeoSlayer
TeoSlayer enabled auto-merge (squash) September 24, 2026 02:08
@TeoSlayer
TeoSlayer merged commit 49e3e82 into main Sep 24, 2026
14 checks passed
TeoSlayer pushed a commit that referenced this pull request Sep 24, 2026
… into feat/native-https-proxy

Conflicts:
- cmd/daemon/main.go: one fileConfig for both flagSources (recorded
  before ApplyToFlags) and #464's flagExplicit; logging.Setup stays early
  (the transport/proxy resolution logs), so #464's logcap.Watch moves up
  with it; the daemon start failure keeps #464's fatalAfterPluginStart.
- cmd/daemon/shutdown.go: fatalAfterPluginStart logs at ERROR (slog), like
  the branch's fatalf, so pilotctl daemon start can report it.
- CHANGELOG.md: both Fixed lists kept.
- go.mod: tidy (golang.org/x/net indirect again, as on main, now that the
  branch-local refresh policy is gone).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants