test_a_diff_through_the_hardened_argv_works¶
Tests › tests/test_security_surface.py
What this test is for
Why it exists
FOUND DOGFOODING (round 3, P6c): `-c diff.external=` is not "no external diff" — git runs the EMPTY STRING as the diff program and dies ("cannot run : No such file or directory"), so every `git diff` through `git_argv` failed and clew-guard's impact report was silently `[]` for every adopter. A diff-family command now carries `--no-ext-diff`, which forbids any external diff whatever the config says.
Verifies REQ-DDB-PIPE-014
Given
repo = _repo_with_change(tmp_path)
When
out = subprocess.run( git_argv("diff", "--cached", "-U0"), cwd=repo, capture_output=True, text=True )
Then
- ✓ out.returncode equals 0
- ✓ out.stdout contains "+two"
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 2 of 142 steps
… 2 earlier steps
… 134 later steps
4 more
- Build this wiki from the index · 2 of 400 steps
- Build, refresh and check the index · 2 of 153 steps
- clew — `main` (clew/cli.py) · 2 of 400 steps
- `main` (clew/guard/main.py) · 2 of 357 steps
tests/test_security_surface.py:194 · its file's page
What it checks (2)
assert out.returncode == 0, out.stderrobservesgit_argvviaoutassert "+two" in out.stdoutobservesgit_argvviaout
Where the product reaches it
build_wiki→_build_site→_commit→git_argv(flow)
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-PIPE-014 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured