# ITHZ Safety Model

P10 and later treat extraction safety as a hard gate. P14 does not relax those rules.

## Extraction Rules

Valid extraction performs a preflight over archive paths and bundle offsets before writing restored files.

Blocked cases include:

- absolute paths;
- `../` traversal;
- backslash paths in archive canonical names;
- duplicate paths;
- Windows reserved names;
- trailing dot or trailing space path components;
- too-long paths;
- invalid bundle offsets or lengths;
- corrupted header, footer, manifest, payload, or SHA.

`--verify=safe` decodes and validates path, offset, and SHA rules without writing the restored tree. `--verify=full` performs the same validation and writes the restored files.

## Golden Compatibility

P14 refreshes compatibility fixtures:

```text
golden_compact_v1.ithz
golden_p7b_bundle_v2.ithz
golden_p9_auto_mixed_v3.ithz
golden_negative_guarded.ithz
```

The reader accepts compact manifest v1, P7B bundle manifest v2, and P9 auto-mixed manifest v3. Unsupported future manifest versions must fail cleanly.

## Hash Policy

`semantic_plan_hash` identifies the deterministic logical plan.

`container_bytes_hash` identifies the physical archive bytes and may change when manifest encoding or metadata layout changes without changing the semantic plan.

