Commit Graph

10 Commits

Author SHA1 Message Date
Yuzviak 7e64ef8d2b feat(stage2-phase2): structlog hot-path, pytest markers, obs package
Phase 2 deliverables not yet committed from plan execution:
- structlog wired to 10 hot-path files (orchestrator, eskf, components)
- bind_contextvars(correlation_id=frame_id) in process_frame
- obs/logging_config.py: configure_logging(env) JSON/console renderer
- pyproject.toml: structlog>=25.1, --strict-markers, 6 markers registered
- tests/conftest.py: ac(id) validator plugin + pytest_collection hooks

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 19:06:47 +03:00
Yuzviak f965ac74f9 refactor(01-06): split core/mavlink.py into components/mavlink_io
- Extract MAVLinkBridge + 3 private helpers to pymavlink_bridge.py (455 LOC)
- Extract MockMAVConnection to mock_mavlink.py (30 LOC)
- Replace core/mavlink.py with shim re-exporting all names including
  _confidence_to_fix_type, _eskf_to_gps_input, _unix_to_gps_time
- Update components/mavlink_io/__init__.py with full public surface
- 216 tests pass (regression floor maintained)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-11 08:49:51 +03:00
Yuzviak 4c65770702 refactor(01-05): migrate satellite+metric to satellite_matcher component
- Move SatelliteDataManager impl to components/satellite_matcher/local_tile_loader.py
- Move MetricRefinement impl to components/satellite_matcher/metric_refinement.py
- MetricRefinement imports IMetricRefinement from protocol.py (no ABC copy)
- Replace core/satellite.py and core/metric.py with re-export shims
- Update satellite_matcher __init__.py to export both classes + protocols
- 216/216 tests pass (regression floor maintained)
2026-05-11 08:49:32 +03:00
Yuzviak 55ef732b96 feat(01-04): move GPR impl to components/gpr/faiss_gpr.py, shim core/gpr.py
- Create components/gpr/faiss_gpr.py with 269 LOC (verbatim copy + module docstring)
- Inline numpy fallback kept as specified (Phase 4 VPR-03 owns the split)
- Update components/gpr/__init__.py: barrel-export GlobalPlaceRecognition (impl),
  IGlobalPlaceRecognition (protocol), _faiss, _FAISS_AVAILABLE
- Replace core/gpr.py with re-export shim preserving all public names
2026-05-11 08:48:11 +03:00
Yuzviak e6e1c27726 feat(01-03): move create_vo_backend factory into components/vio/factory.py
- Lift the env-aware VO backend factory verbatim from core/vo.py.
- Body and parameter defaults preserved exactly (PATTERNS.md §4.1
  mandate: 'Preserve this factory verbatim').
- Return-type annotation widened from ISequentialVisualOdometry to the
  canonical VisualOdometry Protocol from Plan 01-02; the I-prefix alias
  is still importable so legacy callers/type-checkers keep working.
- Imports route through the new components.vio.* modules; no
  cross-package edits needed because Plan 08 (composition root) is the
  only other call site planned.
- Append to the components.vio barrel.
2026-05-10 23:01:00 +03:00
Yuzviak 90b4bf900e feat(01-03): move cuVSLAM backends into components/vio/cuvslam_backend.py
- Extract CuVSLAMVisualOdometry (Inertial) + CuVSLAMMonoDepthVisualOdometry
  (Mono-Depth) from core/vo.py into a dedicated cuVSLAM-bridge module.
- Preserve the optional 'try: import cuvslam / except ImportError' pattern
  at module top with the _CUVSLAM_AVAILABLE flag — verified False on x86 dev,
  True on Jetson (PATTERNS.md §6.5, §8.1).
- Both classes embed an ORBVisualOdometry instance for transparent dev/CI
  fallback; metric scale semantics preserved (scale_ambiguous=False).
- Scaffold components/vio/native/ as Phase-1 placeholder for future native
  SDK glue (PATTERNS.md §1.4); Phase 1 is intentionally empty.
- Append both classes to the components.vio barrel.
2026-05-10 23:00:26 +03:00
Yuzviak d9895acb77 feat(01-03): move ORB + SequentialVO into components/vio/orbslam_backend.py
- Extract SequentialVisualOdometry and ORBVisualOdometry from core/vo.py
  into a dedicated pure-Python OpenCV backend module.
- Module deliberately does NOT import cuvslam — keeps optional-SDK
  isolation from the cuvslam backend (Plan 01-03 Task 1).
- Both classes inherit from the components.vio.protocol.ISequentialVisualOdometry
  Protocol alias (Plan 01-02 surface).
- Barrel-export both classes from components/vio/__init__.py.
- core/vo.py is unchanged in this commit; the shim wires up in Task 4.
2026-05-10 22:59:03 +03:00
Yuzviak e13df36c9a feat(01-02): add Phase-3/4 stub Protocols (anchor_verifier, safety_state, flight_recorder)
- anchor_verifier.protocol: AnchorVerifier + VerifierDecision dataclass
  (Phase 3 VERIFY-01..05 fills semantics)
- safety_state.protocol: SafetyAnchorStateMachine + SourceLabel enum
  (Phase 3 SAFE-01..06 fills implementation)
- flight_recorder.protocol: FlightRecorder + RecorderHealth enum +
  FdrExportResult (Phase 4 FDR-01..06 fills)
- Enum string values match REQUIREMENTS.md SAFE-01 / FDR-04
- Not registered in build_pipeline yet — Phase 1 only requires existence
2026-05-10 22:55:23 +03:00
Yuzviak 622b1a1ebe feat(01-02): add migration-target Protocols for vio/gpr/satellite_matcher/mavlink_io/coordinate_transforms (ARCH-05)
- VisualOdometry mirrors ISequentialVisualOdometry (4 methods)
- GlobalPlaceRecognition mirrors IGlobalPlaceRecognition (7 methods)
- SatelliteTileLoader mirrors SatelliteDataManager public API (11 methods)
- MetricRefiner mirrors IMetricRefinement (6 methods)
- MAVLinkBridgeProtocol mirrors MAVLinkBridge public API (8 methods)
- CoordinateTransformsProtocol mirrors CoordinateTransformer (9 methods)
- All Protocols runtime_checkable; backwards-compat I-prefixed aliases
  exposed for vio/gpr/metric (deprecated in Phase 2)
- Pure-additive: zero existing files touched
- isinstance check confirms SatelliteDataManager and CoordinateTransformer
  already satisfy the new Protocols structurally
2026-05-10 22:54:44 +03:00
Yuzviak b03567e551 feat(01-02): scaffold components/ package skeleton (ARCH-01)
- Create src/gps_denied/components/ with 8 component subpackages
- vio, satellite_matcher, gpr, mavlink_io (Phase 1 migration targets)
- anchor_verifier, safety_state, flight_recorder (Phase 3/4 stubs)
- coordinate_transforms (Protocol-only, impl stays in core/)
- All __init__.py files empty; Plans 03-07 will populate adapters
2026-05-10 22:53:37 +03:00