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

+4
View File
@@ -189,6 +189,10 @@ docker build -t cc2-spoolman-bridge:dev . # Image
python tools/mock_env.py --host mock --printers 2 # Mock: 2 Drucker (SSH :2222/2223, CC2 :8081/8082), Spoolman
```
Einen Test-Container der Bridge gegen den Mock nur in einem Netz ohne Außenverbindung starten
(`docker network create --internal …`) und mit `SPOOLMAN_URL=http://mock:7912`. Sonst spricht er bis zum Speichern
der Einstellungen mit der voreingestellten echten Spoolman-Instanz.
Die Tests decken ab: Tag-Kodierung gegen die verifizierte Vorlage, ID-Dekodierung, Palette und Materialvorschlag,
Zuordnung bei verschwindender ID, Verbrauchs-Delta und Idempotenz (auch nach Abbruch), Dry-Run, mehrere Drucker
(Umzug, Ausfall eines Druckers, Entfernen, Umbenennen), Spoolman-Ort und Zusatzfelder inkl. Korrektur von Hand-