mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 18:01:13 +00:00
[AZ-219] Scaffold onboard runtime project
Add the initial source, test, infrastructure, CI, configuration, and evidence-path scaffold so dependent implementation tasks have stable package and runtime boundaries. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
"""Black-box runner entry point.
|
||||
|
||||
Future scenarios should call only public runtime inputs and outputs: replay frames,
|
||||
telemetry, offline cache, MAVLink output, status events, and FDR artifacts.
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def main() -> int:
|
||||
reports_dir = Path("data/test-results")
|
||||
reports_dir.mkdir(parents=True, exist_ok=True)
|
||||
(reports_dir / "blackbox_smoke.txt").write_text("blackbox scaffold ready\n", encoding="utf-8")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
from importlib import import_module
|
||||
from pathlib import Path
|
||||
|
||||
COMPONENT_PACKAGES = [
|
||||
"camera_ingest_calibration",
|
||||
"basalt_vio_adapter",
|
||||
"safety_anchor_wrapper",
|
||||
"satellite_service",
|
||||
"anchor_verification",
|
||||
"tile_manager",
|
||||
"mavlink_gcs_integration",
|
||||
"fdr_observability",
|
||||
]
|
||||
|
||||
SHARED_PACKAGES = [
|
||||
"shared.contracts",
|
||||
"shared.geo_geometry",
|
||||
"shared.time_sync",
|
||||
"shared.config",
|
||||
"shared.errors",
|
||||
"shared.telemetry",
|
||||
]
|
||||
|
||||
REQUIRED_PATHS = [
|
||||
"src",
|
||||
"migrations/postgresql/0001_enable_postgis.sql",
|
||||
"migrations/seed/README.md",
|
||||
"tests/unit/test_scaffold.py",
|
||||
"tests/unit/shared/.gitkeep",
|
||||
"tests/unit/camera_ingest_calibration/.gitkeep",
|
||||
"tests/unit/basalt_vio_adapter/.gitkeep",
|
||||
"tests/unit/safety_anchor_wrapper/.gitkeep",
|
||||
"tests/unit/satellite_service/.gitkeep",
|
||||
"tests/unit/anchor_verification/.gitkeep",
|
||||
"tests/unit/tile_manager/.gitkeep",
|
||||
"tests/unit/mavlink_gcs_integration/.gitkeep",
|
||||
"tests/unit/fdr_observability/.gitkeep",
|
||||
"tests/integration/contracts/.gitkeep",
|
||||
"tests/blackbox/still_image_geolocation/.gitkeep",
|
||||
"tests/fixtures/project_60_images/.gitkeep",
|
||||
"tests/sitl/plane_gps_input/.gitkeep",
|
||||
"tests/e2e/replay/.gitkeep",
|
||||
"e2e/replay/run_replay.py",
|
||||
"e2e/reports/.gitkeep",
|
||||
"deployment/docker/Dockerfile.runtime",
|
||||
"deployment/docker/Dockerfile.replay",
|
||||
"deployment/scripts/collect_evidence.sh",
|
||||
"config/development/runtime.env",
|
||||
"config/ci/runtime.env",
|
||||
"config/jetson/runtime.env",
|
||||
"config/production/runtime.env.example",
|
||||
"docker-compose.yml",
|
||||
"docker-compose.test.yml",
|
||||
".github/workflows/ci.yml",
|
||||
".env.example",
|
||||
".dockerignore",
|
||||
]
|
||||
|
||||
|
||||
def test_runtime_component_public_modules_are_importable() -> None:
|
||||
# Act
|
||||
imported_modules = [
|
||||
import_module(module_name)
|
||||
for package_name in COMPONENT_PACKAGES
|
||||
for module_name in (package_name, f"{package_name}.interfaces", f"{package_name}.types")
|
||||
]
|
||||
|
||||
# Assert
|
||||
assert len(imported_modules) == len(COMPONENT_PACKAGES) * 3
|
||||
|
||||
|
||||
def test_shared_contract_locations_are_importable() -> None:
|
||||
# Act
|
||||
imported_modules = [import_module(package_name) for package_name in SHARED_PACKAGES]
|
||||
|
||||
# Assert
|
||||
assert len(imported_modules) == len(SHARED_PACKAGES)
|
||||
|
||||
|
||||
def test_generated_runtime_data_paths_are_gitkeep_only() -> None:
|
||||
# Arrange
|
||||
data_dirs = ["input", "expected", "cache", "fdr", "test-results"]
|
||||
|
||||
# Act
|
||||
missing = [
|
||||
directory for directory in data_dirs if not Path("data", directory, ".gitkeep").is_file()
|
||||
]
|
||||
|
||||
# Assert
|
||||
assert missing == []
|
||||
|
||||
|
||||
def test_scaffold_paths_cover_runtime_test_and_evidence_layout() -> None:
|
||||
# Act
|
||||
missing = [path for path in REQUIRED_PATHS if not Path(path).exists()]
|
||||
|
||||
# Assert
|
||||
assert missing == []
|
||||
|
||||
|
||||
def test_ignore_rules_exclude_runtime_payloads_and_secrets() -> None:
|
||||
# Arrange
|
||||
required_patterns = [
|
||||
".env",
|
||||
"*.pem",
|
||||
"*.key",
|
||||
"data/input/*",
|
||||
"data/cache/*",
|
||||
"data/fdr/*",
|
||||
"data/test-results/*",
|
||||
"*.tlog",
|
||||
"*.cbor",
|
||||
"*.mp4",
|
||||
]
|
||||
|
||||
# Act
|
||||
gitignore = Path(".gitignore").read_text(encoding="utf-8")
|
||||
dockerignore = Path(".dockerignore").read_text(encoding="utf-8")
|
||||
missing_from_gitignore = [pattern for pattern in required_patterns if pattern not in gitignore]
|
||||
missing_from_dockerignore = [
|
||||
pattern for pattern in required_patterns if pattern not in dockerignore
|
||||
]
|
||||
|
||||
# Assert
|
||||
assert missing_from_gitignore == []
|
||||
assert missing_from_dockerignore == []
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
Reference in New Issue
Block a user