Purpose
-------
Validate the B1.4 ``oct install --editable`` safety wrapper. The
heart of the command is the preflight matrix; the actual ``pip
install -e`` subprocess is mocked because we don't want test runs to
mutate the real venv's site-packages.
Responsibilities
----------------
- Cover each preflight refusal: not-an-Option-C-project, inside a
worktree, wrong venv, existing shadow install.
- Cover each override flag (--allow-worktree, --use-active-venv,
--reinstall, --allow-outside-project).
- Cover the success path (preflights green, pip mocked to exit 0,
post-install diagnostics printed).
- Cover the JSON output schema for both refusal and success.
Diagnostics
-----------
Domain: GIT-TESTS
Levels:
L2 -- test lifecycle
L3 -- assertion details
Contracts
---------
- Tests use ``CliRunner`` from Click rather than spawning a
subprocess. This lets us monkey-patch the subprocess call cleanly.
- Tests must not modify the developer's actual venv. Every
``subprocess.run`` is patched to a stub that returns
``returncode=0`` without performing any work.