mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-21 10:51:14 +00:00
288aae881d
AZ-964 SHIPPED — AZ-840 orchestrator test moves past FAISS gate. Changes: * tests/e2e/replay/_faiss_seed.py — extracts the empty HNSW32 seeding logic from scripts/mk_test_faiss_fixture.py into a reusable test-infra module: seed_empty_faiss_index(root_dir, *, descriptor_dim=512, backbone_label="ultra_vpr") -> Path. * scripts/mk_test_faiss_fixture.py rewritten as a thin CLI shim importing the same helper. compose `tile-init` contract is preserved. * tests/e2e/replay/conftest.py::_build_operator_pre_flight_cache now calls seed_empty_faiss_index(cache_root) immediately before build_descriptor_index(config), so the factory's _load() finds a valid .index + .sha256 + .meta.json triplet at the fixture's override root_dir. populate_c6_from_route later in the fixture rebuilds the real index once route tiles are downloaded. * docker-compose.test.jetson.yml: BUILD_PYTORCH_FP16_RUNTIME: "ON" added to e2e-runner.environment. Scope creep documented honestly in the spec — Tier-2 surfaced this third config gap on the same fixture chain while validating AZ-964 (RuntimeNotAvailableError: ... the flag is OFF). One-line wiring; the dustynv/l4t-pytorch base image bakes the Tegra-tuned PyTorch wheel and pytorch_fp16_runtime.py exists, so flag flip is sufficient. Tier-2 verdict (4F / 48P / 3S / 1XF / 1XP in 86.07s, 0 errors — was 2 errors before this commit): AZ-840 orchestrator test moves from ERROR at FAISS gate to SKIP at empty-backbones gate — exactly the AZ-965 gate AZ-964 AC-3 promised. test_operator_pre_flight_ integration SKIPs cleanly too. The 4 derkachi_1min ESKF-divergence FAILs are constant across all three runs today (AZ-963 path, independent of orchestrator chain). Three Tier-2 runs today on the orchestrator chain: i. pre-AZ-962: SKIP at env-var gate ii. post-AZ-962: ERROR at FAISS gate iii. post-AZ-964: SKIP at backbones gate (AZ-965) Cycle-4 e2e gate still NOT GREEN. Orchestrator chain remaining = AZ-965 (NetVLAD backbone provisioning); 60s smoke chain remaining = AZ-963 (ESKF divergence). OKVIS2 deferral directive unchanged. Pre-existing yamllint false positive on docker-compose.test.jetson .yml:185 (sibling `volumes:` keys flagged as duplicates without respecting parent-key scope) — PyYAML parses cleanly with no duplicates and docker-compose accepts the file at runtime. Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
1.5 KiB
Python
43 lines
1.5 KiB
Python
#!/usr/bin/env python3
|
|
"""Create a minimal valid FAISS HNSW32 + IndexIDMap2 fixture for the test harness.
|
|
|
|
Used by the `tile-init` init service in docker-compose.test.jetson.yml.
|
|
Writes three files to /var/lib/gps-denied/tiles/ via the shared
|
|
`tests.e2e.replay._faiss_seed.seed_empty_faiss_index` helper (AZ-964):
|
|
|
|
descriptor.index — empty HNSW32 dim=512 binary
|
|
descriptor.index.sha256 — sha256 sidecar (matches FaissDescriptorIndex._load)
|
|
descriptor.index.meta.json — metadata (descriptor_dim, hnsw_params.metric, ...)
|
|
|
|
Running this twice is idempotent (overwrites the previous fixture).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# Make the repo root importable so `tests.e2e.replay._faiss_seed` resolves
|
|
# when this script runs in the `tile-init` compose service (which mounts
|
|
# the repo at /opt/project but doesn't add it to PYTHONPATH).
|
|
_REPO_ROOT = Path(__file__).resolve().parent.parent
|
|
if str(_REPO_ROOT) not in sys.path:
|
|
sys.path.insert(0, str(_REPO_ROOT))
|
|
|
|
from tests.e2e.replay._faiss_seed import seed_empty_faiss_index # noqa: E402
|
|
|
|
|
|
def main() -> int:
|
|
idx_path = seed_empty_faiss_index(Path("/var/lib/gps-denied/tiles"))
|
|
sha256_path = idx_path.parent / (idx_path.name + ".sha256")
|
|
sha256 = sha256_path.read_text(encoding="ascii").strip()
|
|
print(
|
|
f"[tile-init] OK: empty HNSW32 index at {idx_path} "
|
|
f"sha256={sha256[:16]}..."
|
|
)
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|