fix: 6 findings from codebase audit round 3

cli.py:
- Filter id-less persons from by_name at construction (root fix for all
  bare-subscript crashes downstream — persons with a name but no id are
  excluded from duplicate detection entirely)
- Belt-and-suspenders on warning-path display: p['id'] → p.get('id')
- Extract survivor_id with .get(); skip group if survivor has no id
- Guard merge_ids: skip API call when list is empty after id filtering
- Walrus operator in merge_ids comprehension: p.get("id") called once
  per item instead of twice

executor.py:
- Add cross-reference comment at success-path reset so the for/else
  rollback pairing is explicit for future maintainers
This commit is contained in:
2026-06-17 02:09:16 +00:00
parent eab3d9fe64
commit 3fccf9c8f9
2 changed files with 12 additions and 7 deletions
+1 -2
View File
@@ -514,8 +514,7 @@ def upload_to_frigate(jobs: list[dict]) -> None:
uploaded += 1
person_uploaded += 1
effective_count += 1
min_quality_score_for_slot = None
min_quality_score_for_slot = None # for/else rollback mirrors this pair
asset_id = asset_map.get(fname)
if asset_id:
try: