Skip to content

[codex] make config reload watcher start idempotent - #344

Closed
frahlg wants to merge 1 commit into
masterfrom
codex/harden-configreload-start-20260526-175635
Closed

frahlg wants to merge 1 commit into
masterfrom
codex/harden-configreload-start-20260526-175635

Conversation

@frahlg

@frahlg frahlg commented May 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Guard Watcher.Start with sync.Once so repeated starts cannot launch duplicate loops.
  • Add regression coverage that duplicate starts still produce exactly one apply on file change.
  • Preserve the existing idempotent stop behavior.

Root cause

Watcher.Stop was idempotent, but Start was not. Any caller that accidentally called Start twice could create two fsnotify loops on the same watcher, causing duplicate reload application and potentially racing control/config updates.

Validation

  • cd go && go test ./internal/configreload
  • make test

@frahlg

frahlg commented May 27, 2026

Copy link
Copy Markdown
Member Author

Superseded — same content already merged via #337 (fix(configreload): make Start idempotent at 9056547). Confirmed identical diff.

@frahlg frahlg closed this May 27, 2026
@frahlg
frahlg deleted the codex/harden-configreload-start-20260526-175635 branch August 7, 2026 08:15
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.

1 participant