|
Option C Tools
|
Classes | |
| class | TestOneCommitPerInvocation |
| class | TestAuditPerSubprojectResults |
| class | TestWorkspaceFilesUseWorkspaceProfile |
| class | TestSingleProjectCompat |
| class | TestEmptyBuckets |
Functions | |
| bool | _git_available () |
| _git (Path repo, *str args, bool check=True) | |
| subprocess.CompletedProcess | _run_commit (Path cwd, *str extra_args) |
| Path | _make_subproject (Path parent, str name, str profile="compact") |
| None | _write_compliant (Path target, str rel_path) |
| two_subproject_workspace (Path tmp_path) | |
| dict|None | _read_latest_audit (Path repo_root, str command_name) |
Variables | |
| str | COMPLIANT_TEMPLATE |
Purpose
-------
Integration tests for ``oct git commit`` per-subproject quality-gate
fan-out (F1.3). When a workspace contains multiple subprojects and a
single ``oct git commit`` invocation stages files across them, each
subproject's slice must run under its own profile, the result must
aggregate cleanly, and the actual ``git commit`` must produce one
commit (not one per subproject).
Responsibilities
----------------
- One ``oct git commit`` produces exactly one git commit, even when
staged files span multiple subprojects.
- A subproject's manifest profile is honoured; per-subproject octrc
also takes effect.
- Secrets in any subproject still trip the always-blocking G-D4
invariant.
- Files matching ``workspace_files[]`` are gated by
``workspace_profile``, not by any subproject's profile.
- Audit JSONL row carries ``per_subproject_results`` with the right
shape after a workspace-mode commit.
- Single-project commit (from inside a subproject) is byte-for-byte
unchanged.
Diagnostics
-----------
Domain: GIT-TESTS
Levels:
L2 -- test lifecycle
L3 -- assertion details
Contracts
---------
- All tests use subprocess invocation against ``oct.cli``.
- All tests use tmp_path fixtures so they are automatically cleaned up.
|
protected |
|
protected |
|
protected |
Build a minimal Option C subproject layout under *parent*/<name>/.
Definition at line 108 of file test_workspace_commit.py.
|
protected |
Return the newest audit-log row matching *command_name*.
Definition at line 242 of file test_workspace_commit.py.
|
protected |
|
protected |
Write a compliant Python file at *target / rel_path*.
Definition at line 135 of file test_workspace_commit.py.
| tests_git.test_workspace_commit.two_subproject_workspace | ( | Path | tmp_path | ) |
Build a workspace with two subprojects (alpha, beta) + initial commit. Returns ``(ws_root, alpha, beta)``. Both subprojects are committed in their initial state so further mutations show up cleanly in ``oct git status``.
Definition at line 156 of file test_workspace_commit.py.
| str tests_git.test_workspace_commit.COMPLIANT_TEMPLATE |
Definition at line 52 of file test_workspace_commit.py.