Skip to content

Fix watch folder startup race#20

Closed
brianmeyer wants to merge 2 commits intomasterfrom
codex/watch-folder-ci-stability
Closed

Fix watch folder startup race#20
brianmeyer wants to merge 2 commits intomasterfrom
codex/watch-folder-ci-stability

Conversation

@brianmeyer
Copy link
Copy Markdown
Owner

@brianmeyer brianmeyer commented Mar 22, 2026

Summary

  • capture the initial watch snapshot synchronously in start_watch before the scanner thread begins
  • have the scanner loop reuse that baseline instead of rebuilding it later
  • replace fixed sleeps in the watch-folder media tests with bounded polling so CI checks behavior instead of scheduler timing

Why

Files created immediately after start_watch could be absorbed into the scanner's initial baseline instead of emitting a created event. That meant document/image ingest could be skipped even though the later delete was observed.

Testing

  • pytest -q tests/test_watch_folder.py -q
  • pytest -q tests/test_search_batch.py tests/test_storage.py -q

@brianmeyer brianmeyer changed the title Stabilize watch folder CI timing Fix watch folder startup race Mar 22, 2026
@brianmeyer
Copy link
Copy Markdown
Owner Author

Superseded by #21, which carries the watch-folder startup race fix and passed CI before merge.

@brianmeyer brianmeyer closed this Mar 22, 2026
@brianmeyer brianmeyer deleted the codex/watch-folder-ci-stability branch March 22, 2026 19:20
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