test_the_handler_itself_answers_for_what_its_closure_reaches¶
Tests › tests/test_context_conflicts.py
What this test is for
Why it exists
THE QUESTION THE FEATURE EXISTS FOR, and it was answered wrongly. A conflict is filed against the function that HOLDS the site — `spi_acquire`, four calls deep — so a dossier on the interrupt handler, which is the name a firmware engineer actually types, came back with an empty `context_conflicts` and `context_undecidable: 0`. That reads as a certificate: this handler reaches nothing that blocks, and nothing was refused.
Given
db = _context_db(tmp_path)
When
extract_context_conflicts(db)conn = sqlite3.connect(str(db))on_handler = context_conflicts_for_rowids(conn, [1])
4 more
undecidable = context_undecidable_for_rowids(conn, [1])on_helper = context_conflicts_for_rowids(conn, [2])on_task = context_conflicts_for_rowids(conn, [4])conn.close()
Then
- ✓ on_handler holds
- ✓ {c.evidence for c in on_handler} equals {c.evidence for c in on_helper}
- ✓ undecidable equals 3
- ✓ on_task equals []
tests/test_context_conflicts.py:282 · its file's page
What it checks (4)
assert on_handler, "the handler must report what its own closure reaches"observescontext_conflicts_for_rowidsviaon_handlerassert {c.evidence for c in on_handler} == {c.evidence for c in on_helper}, ( "the handler's answer is its thread's findings, not a different set" )observescontext_conflicts_for_rowidsviaon_handlerassert undecidable == 3, f"and the refusals of that thread too, got {undecidable}"observescontext_undecidable_for_rowidsviaundecidableassert on_task == [], "a function outside any interrupt path still answers for itself"observescontext_conflicts_for_rowidsviaon_task
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
test_the_handler_itself_answers_for_what_its_closure_reaches→_context_db→extract_context_conflicts→context_conflicts_for_rowids→context_undecidable_for_rowidsWhat 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.
Also reaches 5 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-011 measured
- REQ-DDB-SCHEMA-001 measured
- REQ-DDB-SCHEMA-007 measured
- REQ-DDB-SCHEMA-011 measured
- REQ-DDB-SCHEMA-012 measured