Commit Graph

3 Commits

Author SHA1 Message Date
Yuzviak f67c5f3cd0 refactor(01-01): convert hot-path schemas/*.py to hot_types re-export shims
- schemas/eskf.py: keep ConfidenceTier + ESKFConfig; re-export IMUSample
  and ESKFState from hot_types (define ConfidenceTier BEFORE the
  hot_types imports to avoid circular import — eskf_state.py imports
  ConfidenceTier from this module). Legacy alias IMUMeasurement = IMUSample.
- schemas/vo.py: re-export Features, Matches, RelativePose, Motion,
  VOEstimate from hot_types.vo_estimate.
- schemas/satellite.py: re-export TileCoords, TileBounds, SatelliteAnchor.
- schemas/metric.py: keep LiteSAMConfig; re-export AlignmentResult,
  ChunkAlignmentResult, Sim3Transform.
- schemas/rotation.py: keep HeadingHistory + RotationConfig; re-export
  RotationResult.

Auto-fixes (Rules 1 + 3) needed to keep the 216-test floor green:
- core/rotation.py: refactor try_rotation_steps to use
  dataclasses.replace instead of attribute assignment on RotationResult
  (Rule 1 — frozen dataclass forbids mutation; Pydantic silently allowed
  it). PATTERNS.md §6.1 already flagged Pose mutation but missed this site.
- hot_types/vo_estimate.py: add Optional `covariance: np.ndarray` field
  to RelativePose (Rule 3 — five test sites construct RelativePose with
  `covariance=np.eye(6)`; Pydantic v2 silently accepted the extra kwarg
  via default `extra="ignore"`. Declaring the field preserves the
  construction contract under the dataclass migration without editing
  tests).

Verification: pytest tests/ -q --ignore=tests/e2e → 216 passed, 8 skipped
(matches baseline). Accuracy bench (23 tests) passes.
2026-05-10 22:47:56 +03:00
Yuzviak dd9835c0cd fix(lint): resolve all ruff errors — trailing whitespace, E501, F401
- ruff --fix: removed trailing whitespace (W293), sorted imports (I001)
- Manual: broke long lines (E501) in eskf, rotation, vo, gpr, metric, pipeline, rotation tests
- Removed unused imports (F401) in models.py, schemas/__init__.py
- pyproject.toml: line-length 100→120, E501 ignore for abstract interfaces

ruff check: 0 errors. pytest: 195 passed / 8 skipped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 17:09:47 +03:00
Yuzviak 9ef046d623 feat: stage6 — Image Pipeline (F05) and Rotation Manager (F06) 2026-03-22 22:51:00 +02:00