fix: persist daemon watches across client disconnects - #1833
fix: persist daemon watches across client disconnects#1833LeoLan-Digital wants to merge 1 commit into
Conversation
|
Thanks for opening this — it has been seen, and it is queued. This note is automated, but it is not a brush-off: it exists so you know where your PR stands instead of having to guess from silence. Current review status: working through a backlog. What that means for this PR, concretely:
Things that will genuinely speed it up whenever review does happen:
If this fixes a bug, a reproduction we can run is worth more than a description of the symptom. Thanks for contributing, and sorry in advance for the wait. |
c3140ba to
ff916e8
Compare
Signed-off-by: LeoLan Digital <deine-email@example.com> Signed-off-by: LeoLan Digital <DEINE_ECHTE_GITHUB_EMAIL> Signed-off-by: LeoLan Digital <business@leolan.net>
ff916e8 to
5ca234c
Compare
|
Thank you for keeping the change focused on permanent-daemon watch ownership and preserving the non-permanent lifecycle. Session disconnects, watcher ownership, pruning, and background jobs form a sensitive lifecycle boundary, so we need more time to review it carefully. The queue is quite full, but we will come back with grounded feedback as soon as possible. |
|
Reviewed. The change is sound and the design question it turns on is answered well. Two lint items stand between it and merge, and the second one deserves care rather than the obvious fix. The ownership shift is the right shape. Treating the physical watch as daemon-owned rather than session-owned only in permanent mode, with non-permanent behaviour untouched, keeps the blast radius to the mode that actually wants it. And you answered the question I would have asked — if the watch outlives the session, who removes it — by leaving project pruning and daemon shutdown as the lifecycle paths that still tear it down. A watch nothing owns is a leak; a watch owned by the daemon in permanent mode is the point. The two lint failures
The flag itself is load-bearing: it is read at the The reason to be careful is that this sits inside the So the question to settle is narrow: can the loop re-reach that
You are much better placed to answer that than I am from the diff, since the loop body is mostly context here. OtherwiseYour baseline comparison is the right method — Please also rebase: |
Summary
Keep project watches alive in permanent daemon mode after the last client session disconnects.
This allows daemon-owned background file watching and indexing to continue independently of client session lifetime.
What changed
Tests
Focused daemon application suite:
Full CLI baseline comparison:
tests/test_cli.c:1748git diff --checkpasses.Behavior
Non-permanent applications retain the existing session-scoped watch lifecycle.
Permanent daemon mode now treats the physical watch as daemon-owned rather than session-owned, while project pruning and daemon shutdown still remove the watch through their existing lifecycle paths.