<!-- LEGACY_READ -->
<!--
// LEGACY TABLE WARNING:
// product_fitment is deprecated and must not be used for
// fitment evaluation, confidence scoring, or reconciliation.
// Use fitment_resolved instead.
-->
Phase 4 is the deterministic fitment resolution layer.

## Scope
- Read evidence from Phase 3 (`fitment_evidence`).
- Resolve one canonical tuple per vehicle into `fitment_resolved`.
- Apply deterministic confidence, weighting, and banding rules.
- Provide admin and ops tooling for review and audit workflows.

## Hard Constraints
- Phase 3 evidence is immutable and read-only.
- Phase 4 executes offline only (never in runtime resolution).
- Never write to `product_fitment` or `product_fitment_raw`.
- No imports from Phase 3 runtime paths or bootstraps.
- No randomness, no GPT, and no nondeterminism.

## File Rules
- Every Phase 4 PHP file must begin with:
  `⚠️ PHASE 4 — NOT RUNTIME SAFE`

## Directory layout
- `contracts/phase4_contract.md` — Phase 4 contract.
- `schema/` — Phase 4 schemas.
- `schema/fitment_resolved.sql` — Phase 4 resolution table.
- `schema/fitment_overrides.sql` — Phase 5 override schema.
- `reconcile_fitment.php` — deterministic reconciliation runner.
- `validate_reconciliation.php` — pre-write validation harness.
- `validators/phase4_static_guard.php` — static guardrails.

## Execution Order
1. `php fitment/phase4/validate_reconciliation.php`
2. If PASS, run `php fitment/phase4/reconcile_fitment.php`

## Validation
Run `php fitment/phase4/phase4_validate.php` to enforce Phase 4 constraints.
