# AZ-621 — Phase C: build_pre_constructed seeds c7_inference engine

**Task**: AZ-621_pre_constructed_phase_c_c7_inference
**Name**: AZ-618 Phase C: build_pre_constructed seeds c7_inference engine
**Description**: Third subtask of AZ-618. Extends `airborne_bootstrap.build_pre_constructed(config)` to populate the C7 inference runtime (PyTorch FP16 vs. TensorRT, gated by `BUILD_*` env flags).
**Complexity**: 3 points
**Dependencies**: AZ-619, AZ-620, AZ-320 (engine compiler), AZ-297 (InferenceRuntime Protocol). All in `done/` once AZ-619+AZ-620 land.
**Component**: runtime_root (cross-cutting)
**Tracker**: AZ-621
**Epic**: AZ-602 (parent: AZ-618 umbrella)

## Outcome

- `build_pre_constructed(config)` adds key `c7_inference` (InferenceRuntime instance) on top of AZ-619 + AZ-620.
- A misconfigured `BUILD_TENSORRT_RUNTIME=OFF` AND `BUILD_PYTORCH_FP16_RUNTIME=OFF` against a config that selects a strategy needing c7 raises `AirborneBootstrapError`.
- New unit tests under `tests/unit/runtime_root/test_az621_pre_constructed_phase_c.py` with the engine-load path stubbed (real GPU load is Tier-2-only, deferred to AZ-624's Jetson AC-5 run).

## Scope

### Included

- Internal builder `_build_c7_inference(config)`. Selects PyTorch FP16 vs. TensorRT per `config.inference.backend` (or equivalent field) and the matching `BUILD_*` env flag.
- BUILD-flag mismatch raises `AirborneBootstrapError` naming flag + component.
- Unit tests with stubbed engine load.

### Excluded

- C3 LightGlue / feature extractor (AZ-622), C5 / RANSAC (AZ-623), main() wiring (AZ-624).
- GPU model-load NFR thresholds — verified by AZ-624's full AC-4.

## Acceptance Criteria

**AC-621.1**: `build_pre_constructed(config)` adds `c7_inference` (InferenceRuntime instance) for a default config with the matching `BUILD_*` flag ON.

**AC-621.2**: with both `BUILD_TENSORRT_RUNTIME=OFF` and `BUILD_PYTORCH_FP16_RUNTIME=OFF` and a config selecting a C2 / C3 strategy that needs c7, `build_pre_constructed` raises `AirborneBootstrapError` naming both flag(s) and the consuming component slug.

**AC-621.3**: `pytest tests/unit/runtime_root/test_az621_pre_constructed_phase_c.py` covers AC-621.1 (stubbed engine) and AC-621.2.

## Tier-2 Note

Real TensorRT engine load is verified by the umbrella subtask AZ-624's Jetson AC-5 run per `_docs/02_document/tests/tier2-jetson-testing.md`. This subtask's unit tests stub via `BUILD_*` flag selection or factory monkeypatch.

## Constraints

- MUST NOT introduce new `BUILD_*` env flags.
- MUST be additive on top of AZ-619 + AZ-620.

## Evidence

- Umbrella spec: `_docs/02_tasks/todo/AZ-618_airborne_bootstrap_pre_constructed.md`
- AZ-297 / AZ-320 task specs in `_docs/02_tasks/done/` for C7 runtime classes
