fix(recovery): scope incident verification to relevant devices
Full-network browsing expanded persisted recovery gates to unrelated devices, while full fifteen-day reference reads exhausted the row budget. Rebuild legacy cached scopes from report devices and project monitoring roles, and query only the nearest post-feedback frame and its historical phase. Regression tests fail before the fix for both new and cached scopes and verify automatic Agent requeue after recovery.
This commit is contained in:
@@ -186,7 +186,9 @@ def test_recovery_read_selects_first_raw_frame_strictly_after_feedback_and_bound
|
||||
assert result == rows
|
||||
query, parameters = conn.cursor_instance.calls[0]
|
||||
assert "min(time)" in query and "time>%s AND time<=%s" in query
|
||||
assert "time>=%s AND time<%s" in query and "JOIN next_frame" in query
|
||||
assert "m.time>=%s AND m.time<%s" in query and "JOIN next_frame" in query
|
||||
assert "mod(extract(epoch FROM m.time)::bigint,86400)=" in query
|
||||
assert "mod(extract(epoch FROM f.time)::bigint,86400)" in query
|
||||
assert parameters == (["P1"], feedback, through, ["P1"], incident - timedelta(days=15), incident, 100_001, ["P1"])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user