Skip to content

fix: eliminate activation confirmation race#385

Open
davidvornholt wants to merge 1 commit into
serokell:masterfrom
davidvornholt:fix/confirmation-watcher-race
Open

fix: eliminate activation confirmation race#385
davidvornholt wants to merge 1 commit into
serokell:masterfrom
davidvornholt:fix/confirmation-watcher-race

Conversation

@davidvornholt

Copy link
Copy Markdown

What changed

  • Register the activation confirmation watcher on the temporary directory before creating the canary.
  • Filter removal events to the expected canary path.
  • Add a regression test covering immediate canary removal after watcher setup.

Why

The activation process previously created the canary before registering its watcher. A fast controller could observe and delete the canary during that gap, leaving the activation process waiting until confirm_timeout and then rolling back a deployment that had already been confirmed.

Watching the parent directory before exposing the canary removes that gap. It also avoids trying to register a watcher on a file that may already have been deleted.

Validation

  • cargo test --all-targets
  • cargo clippy --all-targets -- --deny warnings
  • cargo fmt --check
  • nix flake check --show-trace

@davidvornholt
davidvornholt marked this pull request as ready for review July 11, 2026 11:52
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