Stratora v2.1.8 -- Topology Always-Sync & Hook-Bypass Closure
Stratora v2.1.8 closes the last remaining gaps in auto-generated topology map behavior. The map is now a live mirror of the site's node set: adds, removes, and cross-site moves all propagate immediately, and the three node-creation paths that previously bypassed the auto-gen hooks now fire them correctly. First 2.1.8 boot cleans up drift accumulated under the previous additive-only semantics.
The always-sync gap
Auto-generated topology maps shipped with create-once, additions-only semantics: a site's first node add triggered map creation, and subsequent adds got placed on the map, but node removals had no code path. Deleting a node, rejecting it, deactivating it, or moving it to another site all left behind an orphan element pinned to a nonexistent or out-of-site node. Over time, the map diverged from reality.
v2.1.8 replaces syncMissingNodes with reconcile: for each call, it reads the site's current approved+active node set, prunes elements whose node no longer qualifies, and adds elements for nodes not yet on the map. Idempotent and safe to call at any time.
The three bypass paths
A separate class of bugs surfaced during 2.1.7 validation: three node-creation endpoints called db.CreateNode / db.CreateAgentNode directly, bypassing the hook chain that generates and updates auto-maps. These were invisible on dev environments where the bypassed paths weren't exercised, but broke greenfield installs where discovery imports or agent auto-enrollment was the first path to add nodes.
The three fixed in 2.1.8:
DiscoveryHandler.ImportDevice— single-device imports from the discovery scanner. Now firesSyncNodeAdded→ dashboard regen per import.DiscoveryHandler.BulkImportDevices— bulk imports from discovery. Collects unique site IDs across the batch and fires one reconcile per affected site rather than per node. A 500-node bulk import into one site runs one reconcile pass, not 500.AgentHandler.Register— agent self-enrollment. Bootstrap-enrolled agents go straight to approved+active and now land on the site's auto-map immediately.
The asymmetric hook on cross-site moves
UpdateNode with a site_id change and BulkAction move both already fired hooks for the old and new sites, but under the additive-only semantics the old-site fire was a no-op (nothing removed the moved-out node's element from the old site's map). With reconcile live, these fires now correctly prune the element from the old site's map and add it to the new site's map.
CASCADE FK migration
Migration 151 changes topology_maps.site_id from ON DELETE SET NULL to ON DELETE CASCADE. Auto-maps are site-intrinsic — deleting the site should take the map with it, not leave a ghost row. The migration includes a one-shot cleanup of already-orphaned auto-maps from the SET NULL era. User-created maps (is_auto_generated = false) are explicitly preserved even if their site is gone, so user-authored layouts aren't lost.
First-boot reconcile cleanup
BackfillAllSites at service startup now reconciles every site with nodes, not just sites missing a map. On the first 2.1.8 boot, accumulated orphan elements from every previous DeleteNode / RejectNode / cross-site move are cleaned up in one pass. Customers running 2.1.x will see reduced element counts on their auto-maps after the restart, and those counts will match their live approved+active node sets.
Operator notes
- First 2.1.8 startup runs migration 151 and the reconcile-all-sites backfill automatically. No manual DB intervention.
- Reconcile touches only auto-generated maps. User-edited maps (those a user has created or modified in the Map Editor) are not affected.
- Agent and Collector binaries are unchanged from 2.1.6. The Server MSI embeds the same Agent and Collector MSIs as the 2.1.7 release.
For installation and upgrade instructions, visit docs.stratora.io. The MSI is available on the v2.1.8 release page.