Overview
The sync engine's external-modification detection has silently never worked. It iterates
the quadlets table to decide which remote files to stat, and that table is never
written to, so every cycle inspects an empty set and reports nothing.
Details
Use Case / Steps:
- Register a server and let the sync poller run.
- Edit a Quadlet file directly on the remote host, outside QuadletManager.
- No external-modification is ever reported.
Expected vs Actual:
- Expected: A Quadlet file changed outside the app is detected and surfaced.
- Actual: Nothing is detected, for any file, on any server. The cycle completes
successfully over an empty work set, so it looks healthy.
Details:
check_quadlets (services/sync_engine.py:166-246) starts from:
SELECT id, server_id, file_path, scope, last_known_mtime FROM quadlets
and groups the results into per-server mtime fetches. With zero rows there are no
groups, no tasks, and no findings. The last_known_mtime update path
(services/sync_engine.py:229) is likewise unreachable.
This is the same root cause as the Monitor glance-bar zeros reported in
#281, but a separate user-visible symptom, and it is pre-existing
rather than introduced by the recent Monitor work. Fixing the glance bar via a live
scan in the stats poller deliberately does not fix this, because it bypasses the table
rather than filling it.
Scope:
Decide whether the quadlets table should become a real persisted inventory (populated
from services/tree_scanner.py:fetch_all_quadlets, which today discards its results at
api/routes.py:548-563), or whether modification detection should also move to a live
scan. Then make detection actually run.
Overview
The sync engine's external-modification detection has silently never worked. It iterates
the
quadletstable to decide which remote files to stat, and that table is neverwritten to, so every cycle inspects an empty set and reports nothing.
Details
Use Case / Steps:
Expected vs Actual:
successfully over an empty work set, so it looks healthy.
Details:
check_quadlets(services/sync_engine.py:166-246) starts from:and groups the results into per-server mtime fetches. With zero rows there are no
groups, no tasks, and no findings. The
last_known_mtimeupdate path(
services/sync_engine.py:229) is likewise unreachable.This is the same root cause as the Monitor glance-bar zeros reported in
#281, but a separate user-visible symptom, and it is pre-existing
rather than introduced by the recent Monitor work. Fixing the glance bar via a live
scan in the stats poller deliberately does not fix this, because it bypasses the table
rather than filling it.
Scope:
Decide whether the
quadletstable should become a real persisted inventory (populatedfrom
services/tree_scanner.py:fetch_all_quadlets, which today discards its results atapi/routes.py:548-563), or whether modification detection should also move to a livescan. Then make detection actually run.