mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-21 21:41:12 +00:00
680ba29ae6
Third subtask of AZ-618. Extends airborne_bootstrap.build_pre_constructed additively with c7_inference (GPU InferenceRuntime). Wraps the existing inference_factory.build_inference_runtime so a BUILD_TENSORRT_RUNTIME / BUILD_PYTORCH_FP16_RUNTIME mismatch surfaces a clear operator-facing AirborneBootstrapError naming BOTH airborne C7 flags plus the consuming component slug, rather than bubbling up RuntimeNotAvailableError with no context. New public const C7_AIRBORNE_BUILD_FLAGS pairs each airborne runtime with its gating env flag (onnx_trt_ep deliberately omitted — research only). Tests stub at the factory boundary; real GPU/TensorRT load remains Tier-2 only (consolidated at AZ-624). AZ-619 and AZ-620 test files extended with a _stub_c7_inference_builder autouse fixture mirroring the AZ-620 pattern for _build_c6_*. 18/18 runtime_root unit tests pass. Co-authored-by: Cursor <cursoragent@cursor.com>
2.9 KiB
2.9 KiB
Code Review Report — Batch 92 (AZ-621 Phase C: c7_inference)
Batch: 92 Tasks: AZ-621 (3 cp) — AZ-618 Phase C Date: 2026-05-19 Verdict: PASS
Findings
None.
Phase Notes
- Phase 1 (Context): Loaded
_docs/02_tasks/todo/AZ-621_pre_constructed_phase_c_c7_inference.mdand the AZ-618 umbrella spec. Mapped batch changes to AZ-621 exclusively. - Phase 2 (Spec Compliance):
- AC-621.1:
_build_c7_inferenceis called frombuild_pre_constructed;test_ac_621_1_adds_c7_inferenceasserts the key and identity to the factory return. - AC-621.2:
_build_c7_inferencewrapsRuntimeNotAvailableErrorintoAirborneBootstrapErrorwhose message includes bothBUILD_TENSORRT_RUNTIMEandBUILD_PYTORCH_FP16_RUNTIME(sourced from the newC7_AIRBORNE_BUILD_FLAGSconst) plus the configured consumer slug. Defence-in-depth test covers the no-consumer-configured path. - AC-621.3:
tests/unit/runtime_root/test_az621_pre_constructed_phase_c.pyexists and contains the AC-621.1 / AC-621.2 cases. - Constraints: no new
BUILD_*env flag introduced (only a Python-leveltuplelisting already-existing flag names). Implementation is strictly additive — AZ-619 and AZ-620 keys still populated; AZ-619/620 test suites green after stubbing the new_build_c7_inferencesymbol via the same autouse-fixture pattern AZ-620 introduced for_build_c6_*.
- AC-621.1:
- Phase 3 (Code Quality):
_build_c7_inferenceis ~25 lines, single responsibility (wrap factory + translate error), preserves cause chain viaraise ... from exc, mirrors the established_build_c6_descriptor_indexpattern verbatim. Tests use AAA, monkeypatch at the bootstrap module boundary (no real GPU/TensorRT load), assert message content per AC-621.2's explicit naming requirement. - Phase 4 (Security): no external inputs, no subprocess/eval/exec, no secrets. The new error message includes operator-facing flag names and component slugs only.
- Phase 5 (Performance): composition-time only; one factory call per
build_pre_constructedinvocation. No hot-path change. - Phase 6 (Cross-Task Consistency): single-task batch — N/A.
- Phase 7 (Architecture Compliance):
runtime_root.airborne_bootstrap(Layer 5) importsruntime_root.inference_factory(Layer 5 sibling). Per the Allowed Dependencies table, Layer 5 may import from Layers 1–4 plus its own sibling composition modules. No layer violation.- The imported symbol
build_inference_runtimeis part ofinference_factory.__all__— Public API respected. - No new module-level cycle introduced (graph remains
airborne_bootstrap → inference_factory → errors, no back-edge). - No duplicate symbol introduced across components.
- No cross-cutting concern locally re-implemented — error translation is bootstrap-specific (mirrors c6 path) and not a candidate for
shared/.
Counts
- Critical: 0
- High: 0
- Medium: 0
- Low: 0