homelabby/internal/inventory
Mikkel Georgsen 1f9621fcaa feat(01-04): quality gate state machine, tag sync, catalog updater
- CatalogStatus type with forward-only state machine (draft→indexed→…→complete)
- Transition() enforces valid transitions, returns error with 'invalid transition' message
- ParseCatalogStatus() validates known status strings
- HardwareRecord domain type composing netbox.Device with quality gate state
- CatalogUpdater.UpdateCatalogStatus() validates transition then PatchCustomFields
- SyncTags() normalizes tags (slug form) and ensures they exist in NetBox
- normalizeTags deduplicates across case/whitespace/space-vs-hyphen variants
- ensureTag uses go-netbox v4 NewTagRequest(name, slug) / ExtrasTagsCreate
- All 12 state machine table-driven tests pass
2026-04-10 05:22:22 +00:00
..
catalog_updater.go feat(01-04): quality gate state machine, tag sync, catalog updater 2026-04-10 05:22:22 +00:00
quality_gate.go feat(01-04): quality gate state machine, tag sync, catalog updater 2026-04-10 05:22:22 +00:00
quality_gate_test.go feat(01-04): quality gate state machine, tag sync, catalog updater 2026-04-10 05:22:22 +00:00
types.go feat(01-04): quality gate state machine, tag sync, catalog updater 2026-04-10 05:22:22 +00:00