mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-21 15:41:12 +00:00
[AZ-270] [AZ-272] [AZ-279] [AZ-281] [AZ-283] Compose root + FDR schema + 3 Layer-1 helpers
AZ-270: composition root with strategy registry, tier-gated lookup, topo-order construction, all-or-nothing teardown, StrategyNotLinkedError payload. AZ-272: orjson-backed FdrRecord serialise/parse with forward-compat for unknown payload + top-level fields and canonical overrun-record shape. AZ-279: pyproj-backed WGS84/ECEF/ENU + OSM slippy-map tile math with WgsConversionError for shape/range/zoom guards. AZ-281: strict EngineFilenameSchema build/parse/matches_host with anchored regex + enum validation; round-trip identity by construction. AZ-283: dtype-preserving (fp16/fp32) single + batch L2 normaliser with zero-norm safety and descriptor_metric() source-of-truth. pyproject.toml pins pyproj>=3.6 and orjson>=3.9 (named-backend deps per the AZ-272 / AZ-279 contracts). New DTOs LatLonAlt + BoundingBox and EngineCacheKey + HostCapabilities land in _types/ to back the helper contracts. 203 unit tests pass (64 new). Review verdict: PASS_WITH_WARNINGS; findings are perf-NFR deferrals + dep amendment + minor docstring polish. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,7 +1,13 @@
|
||||
"""Runtime-root env-var fail-fast — AZ-263 AC-8."""
|
||||
"""Runtime-root env-var fail-fast — AZ-263 AC-8 (updated by AZ-270 to pass a Config).
|
||||
|
||||
AZ-270 swapped ``compose_root()`` to ``compose_root(config: Config)``; the
|
||||
env-var fail-fast still happens inside ``compose_root`` before any factory
|
||||
construction, so this AC-8 contract is intact.
|
||||
"""
|
||||
|
||||
import pytest
|
||||
|
||||
from gps_denied_onboard.config import Config
|
||||
from gps_denied_onboard.runtime_root import ConfigurationError, compose_root
|
||||
|
||||
|
||||
@@ -23,7 +29,7 @@ def test_compose_root_fails_fast_on_missing_required(monkeypatch: pytest.MonkeyP
|
||||
|
||||
# Act / Assert
|
||||
with pytest.raises(ConfigurationError) as excinfo:
|
||||
compose_root()
|
||||
compose_root(Config())
|
||||
assert "Missing required environment variable" in str(excinfo.value)
|
||||
|
||||
|
||||
@@ -45,7 +51,7 @@ def test_compose_root_names_the_first_missing_var(monkeypatch: pytest.MonkeyPatc
|
||||
|
||||
# Act
|
||||
with pytest.raises(ConfigurationError) as excinfo:
|
||||
compose_root()
|
||||
compose_root(Config())
|
||||
|
||||
# Assert
|
||||
msg = str(excinfo.value)
|
||||
|
||||
Reference in New Issue
Block a user