test_the_handler_itself_answers_for_what_its_closure_reaches

Tests › tests/test_context_conflicts.py

passed Passed in the packaged run.

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

  1. db = _context_db(tmp_path)
→

When

  1. extract_context_conflicts(db)
  2. conn = sqlite3.connect(str(db))
  3. on_handler = context_conflicts_for_rowids(conn, [1])
4 more
  1. undecidable = context_undecidable_for_rowids(conn, [1])
  2. on_helper = context_conflicts_for_rowids(conn, [2])
  3. on_task = context_conflicts_for_rowids(conn, [4])
  4. conn.close()
→

Then

  1. ✓ on_handler holds
  2. ✓ {c.evidence for c in on_handler} equals {c.evidence for c in on_helper}
  3. ✓ undecidable equals 3
  4. ✓ on_task equals []

tests/test_context_conflicts.py:282 · its file's page

What it checks (4)

  1. assert on_handler, "the handler must report what its own closure reaches" observes context_conflicts_for_rowids via on_handler
  2. assert {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" ) observes context_conflicts_for_rowids via on_handler
  3. assert undecidable == 3, f"and the refusals of that thread too, got {undecidable}" observes context_undecidable_for_rowids via undecidable
  4. assert on_task == [], "a function outside any interrupt path still answers for itself" observes context_conflicts_for_rowids via on_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_rowids

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.

test_the_handler_itself_answers_for_what_its_closure_reaches · 4 checks_context_db_ensure_threads_tablesREQ-DDB-QUERY-011 · measured_context_db_ensure_threads_tablesREQ-DDB-SCHEMA-001 · measured_context_db_ensure_threads_tablesREQ-DDB-SCHEMA-007 · measuredextract_context_conflictsREQ-DDB-SCHEMA-011 · measured
Also reaches 5 requirements

Its run touches their code; that is reach, not proof.