VSN-2116 : Fetching initial validated prepared passengers markers.
Merge Request Description
Title
VSN-2116: Importation Flow Rectification, Circuit Initialization Improvements, and Map Generation Stabilization
Overview
This merge request focuses on stabilizing and rectifying the importation workflow, while also improving circuit initialization, map generation, and overall robustness of the preparation logic.
It combines feature completion, controller/service corrections, and multiple refactors aimed at safety, clarity, and long-term maintainability.
The work spans both backend and shared logic layers, ensuring that returned data is consistent, safe to consume, and aligned with the expected domain behavior.
Key Objectives
- Rectify inconsistencies in the importation controller and return types
- Improve initial circuits generation and mapping logic
- Strengthen map-related DTOs, POJOs, and color attribution
- Remove unsupported or unsafe collection methods
- Isolate and clarify passenger-related logic
- Add defensive checks and null-safety mechanisms
- Clean up legacy or unstable implementation details
Detailed Changes
1. Importation Flow Rectification
-
Feature (
1a3c04a6)- Rectified the return type and structure of the importation process to ensure consistency with consumer expectations.
-
Refactor (
52a8c85e)- Cleaned and corrected the importation controller, aligning exposed endpoints with the updated service logic.
-
Refactor (
410cdb46)- Improved mass importation logic to prevent invalid or conflicting state creation during batch processing.
2. Circuit Initialization & Default State Handling
-
Refactor (
6f8c5689)- Defined a safe default circuit state to avoid null or partially initialized circuit objects.
-
Feature (
59f95201,427c3c17)- Added and finalized the initial circuits generation path and implementation, enabling reliable bootstrap of circuits for display and processing.
3. Mapping, DTOs & POJOs Improvements
-
Feature (
dbf5a501)- Introduced and refined:
CircuitMapDTO- Supporting POJOs used for progressive map construction
- Introduced and refined:
-
Feature (
ea3e34d6)- Added a new mapping method to transform domain entities into map-ready structures.
-
Refactor (
d335449d)- Configured DTOs to ignore null fields, ensuring cleaner API responses and reduced payload noise.
4. Map Visualization & Color Logic
-
Feature (
ca1a4417)- Implemented color attribution logic to dynamically assign map colors, improving readability and visual differentiation.
-
Refactor (
28c18baf)- Isolated passenger-related logic to avoid coupling map generation with unrelated concerns.
5. Repository, Service & API Exposure
-
Feature (
19394801)- Added repository method to fetch circuits with non-empty passenger associations.
-
Feature (
ec9f44ee,a372c4fe)- Defined clear service method signatures for circuit and map-related operations.
-
Feature (
452608b2,3baa6552,ffdb77af,c468580c)- Added and exposed new endpoints via controllers, completing the feature lifecycle from repository to API.
6. Safety, Stability & Cleanup
-
Refactor (
cb23edb2)- Added lightweight safety checks to guard against edge cases.
-
Refactor (
79454978)- Removed unsupported collection methods (
addFirst,addLast,getFirst,getLast) to ensure compatibility and predictable behavior.
- Removed unsupported collection methods (
-
Refactor (
0d94eff7)- Applied multiple general fixes improving code readability and correctness.
-
Feature (
92c55bdd)- Introduced a new exception code related to invalid passenger state during mass importation.
7. Documentation
-
Docs (
29d023c1)- Updated the changelog to accurately reflect all functional and structural changes introduced by this MR.
Benefits
- More reliable and predictable importation process
- Safer circuit initialization with clear default states
- Cleaner, null-safe API responses
- Improved map rendering with dynamic color logic
- Better separation of concerns across passengers, circuits, and mapping logic
- Reduced technical debt by removing unsupported and legacy methods
Impact & Compatibility
- Changes are backward-compatible at the API level
- New endpoints and mappings are additive
- Refactors focus on internal robustness without altering business behavior
- Improved stability reduces future regression risk
Conclusion
This MR significantly strengthens the importation and circuit generation pipeline, improves map-related data structures, and enhances overall code safety and clarity.
It represents a solid consolidation step, preparing the system for future extensions while reducing fragility in critical preparation and visualization workflows.
Closes VSN-2116