Skip to content

Fix flaky watcher warning coverage - #15

Merged
oubiwann merged 1 commit into
mainfrom
codex/watcher-warning-determinism
Oct 28, 2026
Merged

oubiwann merged 1 commit into
mainfrom
codex/watcher-warning-determinism

Conversation

@oubiwann

Copy link
Copy Markdown
Contributor

The macOS watcher test assumed five invalid save-file replacements would produce five failed parse attempts. Filesystem notification coalescing or delays can break that assumption, leaving no warning even when the recovery assertions pass.

Move consecutive-failure tracking into a private helper used by the real watcher. Deterministic tests cover the fifth-failure boundary, suppression after warning, successful-parse reset and independent streaks. The native integration test retains its invalid-input, no-publication, unchanged-file and exact recovery assertions without counting warnings from filesystem events. The existing warning message and successful-parse reset point are preserved.

Validation, independently reproduced by CDC:

  • Formatting and workspace Clippy passed.
  • Three deterministic failure-streak tests passed.
  • Native watcher suite: 40 unit tests, 4 integration tests and 7 doctests passed.
  • All-features workspace: 1,278 tests passed, zero failed or ignored.
  • Scope and whitespace checks passed; only the two watcher files changed.

The original CI event was not reproduced exactly; the fix removes the test's unsupported event-count assumption. Hosted cross-platform checks will run on this PR.

Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Billo AI <ai-engineering@billo.systems>
@oubiwann
oubiwann merged commit 8ff160b into main Oct 28, 2026
12 checks passed
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