Purpose
-------
Unit tests for :mod:`oct.git.policy` — the profile resolution and
exit-code derivation layer for ``oct git check`` (Phase 4B / G-B4).
Responsibilities
----------------
- Verify profile resolution precedence: protected branch > CLI >
``.octrc.json`` > default.
- Verify the :data:`~oct.git.policy.PROFILE_MATRIX` rows against the
blueprint §5.3 / §7.1 specification, byte for byte.
- Verify the exit-code table 0..5 with every precedence permutation,
including the "secrets always blocks" invariant.
Diagnostics
-----------
Domain: GIT (pure unit tests; logging exercised only incidentally)
Levels:
L2 — test lifecycle
L3 — assertion details
L4 — deep tracing
Contracts
---------
- Every test is hermetic — no filesystem access, no subprocess, no git.
- ``QualityGateResult`` stand-ins are built from :class:`types.SimpleNamespace`
so these tests do not depend on :mod:`oct.git.quality_gate` being
implemented yet (it lands later in the same phase).