fix(pipeline): reconcile camera assignment history and recovery #9

Merged
arnaud.dartois merged 3 commits from audit/pipe-profile-followup into main 2026-10-20 07:35:48 +02:00
Owner

Problem

After agent failover, assignment history and Camera.AgentId could diverge, waiting cameras needed retry when agents returned, and direct camera writes bypassed assignment history. A reconnect also needs a complete camera snapshot to clear stale assignments.

Change

Reconcile assignment history on direct camera writes, clear camera agent IDs when no replacement exists, retry waiting cameras during failover sweeps, and reject assignments to offline or cross-site agents. Persist offline status before failover. Add regression coverage for recovery, disabled-camera status reports, and full-snapshot replacement after reconnect.

Integration

PR #8 is merged. This PR is now based on main; the coordinator is validating the combined #9 + #10 result in ridley. It does not modify LocalStorageProvider; path confinement is already delivered in merged PR #2.

Validation

  • Full Heimdall.Agent.Tests on this branch: 364 passed, 0 failed, 0 skipped.
  • Combined integrated Infrastructure/Application/Web suites: running in coordinator workspace; final results pending.
  • git diff --check: passed.
## Problem After agent failover, assignment history and `Camera.AgentId` could diverge, waiting cameras needed retry when agents returned, and direct camera writes bypassed assignment history. A reconnect also needs a complete camera snapshot to clear stale assignments. ## Change Reconcile assignment history on direct camera writes, clear camera agent IDs when no replacement exists, retry waiting cameras during failover sweeps, and reject assignments to offline or cross-site agents. Persist offline status before failover. Add regression coverage for recovery, disabled-camera status reports, and full-snapshot replacement after reconnect. ## Integration PR #8 is merged. This PR is now based on `main`; the coordinator is validating the combined #9 + #10 result in ridley. It does not modify `LocalStorageProvider`; path confinement is already delivered in merged PR #2. ## Validation - Full Heimdall.Agent.Tests on this branch: 364 passed, 0 failed, 0 skipped. - Combined integrated Infrastructure/Application/Web suites: running in coordinator workspace; final results pending. - `git diff --check`: passed.
arnaud.dartois changed target branch from audit/pipe-profile to main 2026-10-20 07:33:57 +02:00
arnaud.dartois added 3 commits 2026-10-20 07:33:57 +02:00
arnaud.dartois merged commit e932290852 into main 2026-10-20 07:35:48 +02:00
arnaud.dartois added the area:analysisarea:camerapriority:P2type:bug labels 2026-11-06 13:40:05 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: arnaud.dartois/Heimdall#9