Never touch spools of printers this bridge never ran

A fresh instance (empty data volume, no printers configured yet) treated
every spool whose "drucker" field named a printer as stale and moved it to
storage. Now only spools at our slot locations or naming a printer this
bridge runs or has written are corrected; written printer names are kept
in the state (seeded from the applied locations on update).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014GcEk5tkfFSYD6NTF66NkC
This commit is contained in:
Jonas MenzelandClaude Opus 5.5 committed 2026-10-25 20:32:51 +01:00
1 parent 60d583e66e
commit c04964066f
4 files changed
+35 -2

No files matched your search

+2
View File
@@ -267,4 +267,6 @@ def migrate_state(data: dict, first_printer: str) -> dict:
data["version"] = 2
data.setdefault("applied", {})
data.setdefault("written_locations", [])
if "written_printers" not in data:
data["written_printers"] = sorted({a["printer"] for a in data["applied"].values() if a.get("printer")})
return data