Option C Tools
Loading...
Searching...
No Matches
tests_git.test_profile_matrix_optional Namespace Reference

Functions

SimpleNamespace _gate_result (**overrides)
 test_compact_tests_optional_does_not_block_exit ()
 test_strict_tests_blocking_still_exits_four ()
 test_profile_matrix_docstring_documents_three_tiers ()

Detailed Description

Purpose
-------
OI-531 regression coverage — the ``"optional"`` tier in
:data:`oct.git.policy.PROFILE_MATRIX` must be truly non-blocking:
the check runs and its failures are reported, but the CLI exit code
stays at 0 for that tier alone.

Before OI-531 the policy layer treated ``"optional"`` identically to
``"blocking"`` at [oct/oct/git/policy.py:381](oct/oct/git/policy.py#L381),
which meant ``oct git commit`` under the compact profile would exit 4
on any test failure. The user confirmed the intended semantics: compact
should flag test failures but let the commit through.

Responsibilities
----------------
- ``compact`` profile + test failures → exit code 0.
- ``strict`` profile + test failures → exit code 4 (still blocking).
- :data:`PROFILE_MATRIX` docstring documents all three tier values.

Diagnostics
-----------
Domain: GIT-TESTS
Levels:
    L2 — test lifecycle
    L3 — assertion details
    L4 — deep tracing

Contracts
---------
- Tests use in-memory mock objects; no subprocess or filesystem writes.

Function Documentation

◆ _gate_result()

SimpleNamespace tests_git.test_profile_matrix_optional._gate_result ( ** overrides)
protected

Definition at line 46 of file test_profile_matrix_optional.py.

Here is the caller graph for this function:

◆ test_compact_tests_optional_does_not_block_exit()

tests_git.test_profile_matrix_optional.test_compact_tests_optional_does_not_block_exit ( )

Definition at line 57 of file test_profile_matrix_optional.py.

Here is the call graph for this function:

◆ test_profile_matrix_docstring_documents_three_tiers()

tests_git.test_profile_matrix_optional.test_profile_matrix_docstring_documents_three_tiers ( )

Definition at line 71 of file test_profile_matrix_optional.py.

◆ test_strict_tests_blocking_still_exits_four()

tests_git.test_profile_matrix_optional.test_strict_tests_blocking_still_exits_four ( )

Definition at line 64 of file test_profile_matrix_optional.py.

Here is the call graph for this function: