- Fix SimulateCSIData to accept []*Walker instead of []*SimWalker
- Remove unused imports (path/filepath, time) from virtual_state_test.go
- Fix assignment mismatch for CreateVirtualNode error handling
- Fix deadlock in VirtualNodeStore by using saveLocked() when mutex is held
- Refactor CreateAPNode to avoid race condition with state modification
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove duplicate type declarations from session.go (Space, Wall,
wallAttenuationDB, Vector3, Walker, WalkerType) — space.go and
walker.go contain the newer, more complete versions
- Update session.go to use new type names: WalkerTypeRandomWalk,
WalkerTypePathFollow, WalkerTypeNodeToNode; use Space.Bounds()
instead of .Width/.Depth; use Point instead of Vector3
- Merge ShoppingList structs: remove duplicate from gdop.go, add
OptimalPositions []Point to the canonical struct in accuracy.go
- Fix unused variables: minZ/maxZ (accuracy.go), z (accuracy.go),
nodeType (node.go), maxZ (walker.go), noise (propagation.go),
lastHealthTime and angle (cmd/sim/main.go), id (virtual_state.go)
- Fix BoundingBox field capitalization in virtual_state.go
- Fix virtualMAC to hash string nodeID to uint32 before bit-shifting
- Fix mrand alias usage in propagation.go (rand -> mrand)
- Fix PhaseAtSubcarrier capitalization in physics.go
- Fix WalkerTypePath/WalkerTypeRandom references in engine.go/handler.go
- Rename Walker to SimWalker in cmd/sim/walker.go to avoid conflict
with main.go's local Walker type
- Remove 3 duplicate OUI map keys (0x0001C8, 0x080030 ×2)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Close() function was incorrectly setting s.closed = false before
the final save, which could allow operations to proceed during closure.
Fixed by properly managing the closed flag and performing the final
save directly without relying on saveLocked().
This fixes the virtual node state management implementation which
provides:
- Node creation at specified positions with bounds validation
- State persistence to disk via JSON
- Thread-safe operations with mutex locking
- Enable/disable, position updates, role changes, metadata, tags
Acceptance criteria met:
- Nodes can be created at specified positions
- Nodes maintain their state within the virtual space
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement virtual nodes within the virtual space with the following features:
- VirtualNodeStore: Persistent store for virtual nodes with JSON file storage
- Create nodes at specified positions with validation against space bounds
- State management: position, role, enable/disable, metadata, tags
- FleetRegistryBridge: Integration with fleet registry for coverage planning
- Comprehensive tests: 25+ test cases covering all functionality
Acceptance criteria met:
- Nodes can be created at specified positions
- Nodes maintain their state within the virtual space
- State persists across store restarts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>