mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 12:11:13 +00:00
[AZ-407] [AZ-444] [AZ-445] Batch 68: fixtures, Tier-2 harness, NFR reporter
Three blackbox-harness tasks landed together — all depend only on
AZ-406 and unblock the FT-* / NFT-* scenario tasks scheduled for
batches 69+.
AZ-407 — Static fixture builders (3pt):
* tile-cache-builder/{builder.py, Dockerfile, build.sh} produces a
deterministic tile-cache-fixture Docker volume from
_docs/00_problem/input_data/. Reproducibility primitives: sorted
iteration, frozen PIL JPEG settings, FAISS HNSW32 built single-
threaded with seeded stub descriptors.
* age-injector/{age_injector.py, inject.sh} clones the volume and
shifts capture_date by N×30.44 days; tile JPEG bytes preserved
bit-identical. Emits synth-age-7mo + synth-age-13mo volumes.
* cold-boot/cold_boot_fixture.json: frozen FC pose snapshot at
Derkachi sector centre, schema v1.
* secrets/mavlink-test-passkey.txt: 64-hex with required
`# TEST ONLY` header line per AC-5. Passkey-equality test now
compares the secret line after stripping the header.
* security/cve-2025-53644.jpg: synthetic 158-byte malformed JPEG
(truncated SOS marker). OpenCV 4.11.x rejects gracefully with
imdecode → None. AZ-439 will sharpen for ASan instrumentation.
* Top-level Makefile with `make fixtures` / `make fixtures-*` /
`make e2e-tier1*` / `make unit-tests` targets.
AZ-444 — Tier-2 Jetson harness wrapper (5pt):
* run-tier2.sh rewritten as orchestrator. Detects local
(aarch64 + TIER2_HOST=localhost) vs remote (ssh into TIER2_HOST).
New flags: -k/--selector, --build-kind production|asan,
--reflash (gated behind TIER2_REFLASH_ACK=1 two-key gate),
--dry-run.
* tier2-on-jetson.sh (new) — on-device delegate. Verifies
gps-denied-onboard{,-asan}.service health; restarts with 5s
tolerance; spawns tegrastats + jtop parallel samplers; tails
ASan unit's journal in asan mode; drives docker compose with
TIER=tier2-jetson; forwards SELECTOR to pytest -k.
* docker/run-tier1.sh (new) — selector-parity sibling.
* AC-1 (selector parity) and AC-6 (reflash gating) unit-tested via
--dry-run output assertions. AC-2/AC-3/AC-4/AC-5 are hardware-
loop ACs verified by the Tier-2 runtime smoke (no Jetson in the
unit-test layer).
AZ-445 — CSV reporter + evidence bundler refinements (2pt):
* reporting/nfr_recorder.py (new) — pytest plugin. Provides the
`nfr_recorder` fixture with record_metric(name, value, ac_id)
and partial(ac_id, reason). At session end emits:
- per-nfr/<scenario_id>.json (AC-1)
- traceability-status.json with every AC ID parsed from
traceability-matrix.md, classified Covered/PARTIAL/NOT
COVERED with source scenario IDs (AC-2)
- regression-baseline.json with all numeric metrics (AC-3)
* csv_reporter.py extended — `_outcome_to_result` consults the
aggregator; rows flip PASS → PARTIAL when an AC was marked
PARTIAL by nfr_recorder (AC-4). Graceful fallback when
aggregator isn't registered (unit-test contexts).
* conftest.py registers nfr_recorder in pytest_plugins.
* New --traceability-matrix CLI flag seeds the NOT COVERED rows.
Build / config:
* pyproject.toml dev extras: added Pillow>=10.4,<13.0 for the
tile-cache-builder unit test (broad enough to keep torchvision's
Pillow 12 pin happy; the production builder runs inside its own
Docker image with its own pin).
* Updated test_directory_layout.py to cover 10 new files + replaced
the byte-equal passkey assertion with the header-stripping
variant.
Test results:
* 157 focused tests pass (was 97 in batch 67; +60 new across this
batch). No regressions.
Module-layout / spec drift:
* AZ-407 spec text says `tests/fixtures/...`; module-layout
blackbox_tests entry (commit d7a17a8) authoritatively places the
harness under `e2e/`. Implementation followed the layout entry.
* AZ-444 spec mentions `e2e/tier2/run-tier2.sh`; AZ-406 placed it
at `e2e/jetson/run-tier2.sh`. Kept at `e2e/jetson/` for
consistency.
* Cold-boot README ownership: corrected from AZ-419 to AZ-407 per
AZ-419's own Dependencies field.
Specs archived to _docs/02_tasks/done/. Jira tickets transitioned to
In Testing on commit.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,8 +1,65 @@
|
||||
# cold-boot-fixture
|
||||
# cold-boot-fixture (AZ-407 / AZ-419)
|
||||
|
||||
Static JSON fixture loaded by FT-P-11 (cold-start init) and NFT-PERF-03
|
||||
(cold-start TTFF). Schema mirror lives in
|
||||
`e2e/fixtures/injectors/cold_boot.py` (`ColdBootFixture`).
|
||||
`cold_boot_fixture.json` is a frozen FC pose snapshot at flight-resume
|
||||
time. The file is consumed by:
|
||||
|
||||
AZ-419 produces `cold_boot_fixture.json` here. AZ-406 commits to the
|
||||
directory location only.
|
||||
* **AZ-419 (FT-P-11 cold-start init)** — secondary path
|
||||
(`origin_source == fc_ekf` per ADR-010): loaded into the SITL via
|
||||
the standard parameter-load path. The SUT cold-starts with no
|
||||
Manifest `takeoff_origin`, and the test asserts the first outbound
|
||||
estimate lands within ±50 m of the snapshot pose.
|
||||
* **NFT-PERF-03 (cold-start TTFF)** — same loading path, with
|
||||
performance instrumentation around the time-to-first-fix metric.
|
||||
|
||||
## Schema (v1)
|
||||
|
||||
```json
|
||||
{
|
||||
"_schema": "cold-boot-fixture/v1",
|
||||
"global_position_int": { "lat_e7": ..., "lon_e7": ..., "alt_mm": ..., ... },
|
||||
"attitude": { "roll_rad": ..., "pitch_rad": ..., "yaw_rad": ..., ... },
|
||||
"ardupilot_param_overrides": { ... },
|
||||
"inav_serial_rx_overrides": { ... }
|
||||
}
|
||||
```
|
||||
|
||||
The `global_position_int` block uses the canonical MAVLink
|
||||
`GLOBAL_POSITION_INT` units (lat/lon scaled by 1e7; alt in mm).
|
||||
|
||||
## Provenance
|
||||
|
||||
| Field | Source | License |
|
||||
|-------|--------|---------|
|
||||
| Lat / Lon | Derkachi sector centre (50.075° N, 36.150° E) | Synthetic — chosen from the Derkachi route bbox |
|
||||
| Alt | 100 m AGL | Synthetic placeholder; refined when D-PROJ-3 supplies the production scenario |
|
||||
| Attitude | Level flight, heading 0° (north) | Synthetic — chosen to match the parametrize matrix's default |
|
||||
|
||||
Fully synthetic; no third-party data. Re-distributable under this
|
||||
repository's license.
|
||||
|
||||
## Loading path
|
||||
|
||||
* **ArduPilot**: `mavproxy.py --master=... --cmd="param load cold_boot_fixture.json"`
|
||||
followed by a `FAKE_GPS` injection sequence (handled by the AZ-419
|
||||
fixture loader; this README only documents the file itself).
|
||||
* **iNav**: MSP2 `SET_HOME` message + `MSP2_SENSOR_GPS` injection. The
|
||||
per-FC wiring is handled by the AZ-419 fixture loader.
|
||||
|
||||
## Verification
|
||||
|
||||
The AZ-407 unit test
|
||||
`e2e/_unit_tests/fixtures/test_cold_boot_fixture.py` asserts:
|
||||
|
||||
* The file is valid JSON
|
||||
* The `_schema` field equals `cold-boot-fixture/v1`
|
||||
* All required numeric fields are present and within physically
|
||||
reasonable bounds (±90° lat, ±180° lon, > 0 alt, etc.)
|
||||
|
||||
AC-4 (SITL loads the pose within ±1 m of the lat/lon/alt fields) is
|
||||
verified by AZ-419's FT-P-11 test inside the Docker-bound runner —
|
||||
that path requires SITL, which the AZ-407 unit test layer cannot
|
||||
exercise.
|
||||
|
||||
## Owned by
|
||||
|
||||
AZ-407 (this file) + AZ-419 (the loader that consumes it).
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"_schema": "cold-boot-fixture/v1",
|
||||
"_description": "Frozen FC pose snapshot at flight-resume time. Loaded into ardupilot-plane-sitl / inav-sitl via the standard parameter-load path. Consumed by FT-P-11 (cold-start init, secondary path: origin_source == fc_ekf) per AZ-419.",
|
||||
"_provenance": "synthetic — Derkachi sector centre at 100 m AGL, heading north",
|
||||
"_license": "test-fixture (no third-party data; safe to redistribute under this repo's license)",
|
||||
"_authored_for": ["AZ-407 (AC-4)", "AZ-419 (FT-P-11 fc_ekf path)"],
|
||||
|
||||
"global_position_int": {
|
||||
"time_boot_ms": 0,
|
||||
"lat_e7": 500750000,
|
||||
"lon_e7": 361500000,
|
||||
"alt_mm": 100000,
|
||||
"relative_alt_mm": 100000,
|
||||
"vx_cm_s": 0,
|
||||
"vy_cm_s": 0,
|
||||
"vz_cm_s": 0,
|
||||
"hdg_cdeg": 0
|
||||
},
|
||||
|
||||
"attitude": {
|
||||
"roll_rad": 0.0,
|
||||
"pitch_rad": 0.0,
|
||||
"yaw_rad": 0.0,
|
||||
"rollspeed_rad_s": 0.0,
|
||||
"pitchspeed_rad_s": 0.0,
|
||||
"yawspeed_rad_s": 0.0
|
||||
},
|
||||
|
||||
"ardupilot_param_overrides": {
|
||||
"SIM_GPS_DISABLE": 0,
|
||||
"SIM_GPS_TYPE": 1,
|
||||
"_comment_lat_lon_alt_yaw": "SIM_GPS_* params do not directly set EKF origin on the parameter-load path; FT-P-11 fixture loader will use mavproxy `param load` + a follow-up SET_HOME_POSITION / FAKE_GPS injection to land the EKF at the snapshot pose."
|
||||
},
|
||||
|
||||
"inav_serial_rx_overrides": {
|
||||
"_comment": "iNav loads pose via MSP2_SENSOR_GPS injection + INAV_SET_HOME message. FT-P-11 loader uses the standard MSP2 path; this fixture only declares the target lat/lon/alt/yaw — the loader handles per-FC wiring."
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user