test_the_output_is_always_valid_json¶
Tests › tests/test_hook.py
What this test is for
Why it exists
Every input, hostile or malformed, yields parseable JSON and exit 0.
Verifies REQ-DDB-WIKI-054
tests/test_hook.py:972 · its file's page
What it checks (5)
assert result.returncode == 0, f"exit {result.returncode}"assert "Traceback" not in result.stderr, (f"a traceback reaches the model through stderr: {result.stderr[:300]}" )assert out, "the probe never reached a speaking tier"assert list(doc) == ["hookSpecificOutput"]assert doc["hookSpecificOutput"]["additionalContext"]
Where the product reaches it
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-WIKI-054 | catalog | unknown |