The spec-10 §20 stand-in: the ``oct test`` compatibility subset as an
OC_Chat-side wrapper (Plan 184).
Purpose
-------
Provide ``python -m oc_chat.testing`` — a temporal bridge that behaves
like ``oct test --package oc_chat`` for the section-20 subset until
``oct test`` v1.0 ships (retirement criterion: spec-10 section 20.4).
The live v0.x ``oct test`` surface is frozen (ADR-T-14); this package is
the only §20 form available now and the first live producer of the
``oct-test/v0.4`` report contract.
Responsibilities
----------------
- ``cli`` — the §20.1 argv contract (eight flags + --per-test-timeout
+ accepted-ignored --output-tests-limit; everything else exits 4).
- ``package_walk`` — ADR-T-12 single-package fallback discovery plus
the §10 undeclared-root scan.
- ``static_scan`` — the §20.2 static AST guard (cwd_chdir,
env_mutation; advisory owned-writes pre-check).
- ``env_inventory`` — the §20.2 tracked-prefix single source of truth.
- ``report`` — schema stamp, pinned supported_features, error catalog,
§4 exit precedence.
- ``runner`` — serial in-process execution with process-level restore
checks and report assembly.
Diagnostics
-----------
Domain: OC_TESTING
Levels:
L2 — lifecycle events
L3 — semantic details
L4 — deep tracing
Contracts
---------
- The report shape is spec-10 §11/§20.3; features are deferred via
``supported_features``, never fields.
- No pytest passthrough exists on this surface (ADR-T-16 posture:
``selection.pytest_args`` is always ``[]``).
Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)
- oc_chat.testing.runner (RunResult and run_standin - re-exported as the package API)