Skip to content

Fix omnidev restart loop on Linux from non-mutating file access events - #4330

Open
Leemoonsoo wants to merge 1 commit into
omnigent-ai:mainfrom
Leemoonsoo:fix/omnidev-ignore-access-events
Open

Fix omnidev restart loop on Linux from non-mutating file access events#4330
Leemoonsoo wants to merge 1 commit into
omnigent-ai:mainfrom
Leemoonsoo:fix/omnidev-ignore-access-events

Conversation

@Leemoonsoo

@Leemoonsoo Leemoonsoo commented Aug 7, 2026

Copy link
Copy Markdown

Related issue

Closes #4328

Summary

  • On Linux, omnidev's file watcher treated every filesystem event on a watched .py path as a source change — including non-mutating access/open events. Python imports at backend startup emit access events, so each freshly started backend immediately re-triggered a reload, producing a continuous restart loop (~every 2.6s) with no actual edits.
  • Fix: only reload on mutating event kinds (create / modify / remove) in dev/omnidev/src/watcher.rs, via a new is_mutating() helper; non-mutating events are skipped (and logged in debug mode).

Test Plan

  • cargo test -p omnidev (focused binary suite): 38 tests pass, including two new regression tests — mutating_events_trigger_reload and access_events_do_not_trigger_reload.
  • Manually verified on Ubuntu 24.04: after installing the patched binary, omnidev no longer restarts the backend/host on startup or on file reads; reloads still fire on real edits.

Demo

Before

omnidev-before.mov

After

omnidev-after.mov

Type of change

  • Bug fix
  • Feature
  • UI / frontend change
  • Refactor / chore
  • Docs
  • Test / CI
  • Breaking change

Test coverage

  • Unit tests added / updated
  • Integration tests added / updated
  • E2E tests added / updated
  • Manual verification completed
  • Existing tests cover this change
  • Not applicable

Coverage notes

Added unit tests covering event-kind classification (mutating vs. access). Manually verified on Ubuntu 24.04 that the restart loop is gone and that real edits still trigger a reload.

Changelog

Fix omnidev restart loop on Linux caused by non-mutating file access events

@github-actions github-actions Bot added waiting-for-review size/S Pull request size: S P2-medium Priority: bug with workaround, important feature request labels Aug 7, 2026
@github-actions
github-actions Bot requested a review from dbczumar August 7, 2026 05:20
Signed-off-by: Lee moon soo <moonsoo.lee@databricks.com>
@Leemoonsoo
Leemoonsoo force-pushed the fix/omnidev-ignore-access-events branch from 0d20c81 to f086811 Compare August 7, 2026 05:29
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

@Leemoonsoo This PR is a Bug fix, Feature, or UI / frontend change but the Demo section is missing or only contains a placeholder.

These change types require a screenshot or screen recording so reviewers can see the new behaviour without checking out the branch. Please update the Demo section with:

  • A screenshot or screen recording of the change, or
  • A link to a hosted video or GIF showing the new behaviour.

Use N/A only when the change has no user-visible effect whatsoever (e.g. a pure refactor or test-only change). If that's the case, uncheck the relevant type box and check Refactor / chore or Test / CI instead.

@github-actions github-actions Bot added the needs-demo PR needs a demo screenshot or recording label Aug 7, 2026
@Leemoonsoo

Copy link
Copy Markdown
Author

Updated Demo video before / after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-demo PR needs a demo screenshot or recording P2-medium Priority: bug with workaround, important feature request size/S Pull request size: S waiting-for-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] omnidev restarts backend continuously on Linux due to non-mutating file access events

2 participants