test_a_name_only_documentation_mentions_is_reported_as_such

Tests › tests/test_recovery_hint.py

passed Passed in the packaged run.

What this test is for

Why it exists

MEASURED, replaying the 1.1.0 entropic cells against a rebuilt index. `dossier("entropic_free_string")` returns nothing, and that is CORRECT — that checkout declares no such function. The name appears four times in doc comments (`include/entropic/entropic.h:701`, `:812`, `src/facade/entropic.cpp:4022`, `:4099`), always as "frees with `entropic_free_string`", and nowhere as a definition.

Given

  1. db = tmp_path / "clew.db"
  2. conn = sqlite3.connect(str(db))
5 more
  1. conn.executescript( """ CREATE TABLE path (rowid INTEGER PRIMARY KEY, name TEXT); CREATE TABLE memberdef ( rowid INTEGER PRIMARY KEY, kind TEXT, name TEXT, file_id INTEGER, bodyfile_id INTEGER, bodystart INTEGER, bodyend INTEGER, definition TEXT, argsstring TEXT, briefdescription TEXT, detaileddescription TEXT, static INTEGER ); """ )
  2. conn.execute("INSERT INTO path (rowid, name) VALUES (1, 'include/entropic/entropic.h')")
  3. conn.execute( "INSERT INTO memberdef (rowid, kind, name, file_id, bodyfile_id, bodystart, bodyend, " "definition, argsstring, briefdescription, detaileddescription, static) " "VALUES (1, 'function', 'entropic_ask', 1, 1, 10, 20, 'char *entropic_ask', '()', " "'Ask the engine.', 'The caller frees with entropic_free_string.', 0)" )
  4. conn.commit()
  5. conn.close()
→

When

  1. hint = recovery_hint(db, "entropic_free_string")
→

Then

  1. ✓ hint holds
  2. ✓ hint contains "entropic_free_string"
  3. ✓ hint contains "search("

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.

Look up one name: everything the index holds about it · 11 of 226 steps

… 6 earlier steps

callercallercallercallercallerclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyother filesother filesother filesother filesother filestry (line 266)tryopt (line 296)optdossier7. _batch_miss → _kind_limitation_clause7_kind_limitation_clause8. batch_payload → recovery_hint8recovery_hint9. recovery_hint → connect9connect▶ test enters10–11. recovery_hint → _hint_from10_hint_from +1 more12. _hint_from → _indexed_path12_indexed_path13. _indexed_path → table_exists13table_exists14–15. _hint_from → bare_tail14bare_tail +1 more16. _name_exists → table_exists16table_exists17. _hint_from → _documentation_mentions17_documentation_mentions18. _documentation_mentions → table_exists18table_exists19. _documentation_mentions → has_columns19has_columns20. has_columns → table_exists20table_exists21. _hint_from → _name_exists21_name_exists22. _hint_from → _qualified_forms22_qualified_forms23. _qualified_forms → table_exists23table_exists

… 203 later steps

2 more

tests/test_recovery_hint.py:483 · its file's page

What it checks (3)

  1. assert hint, "a name the documentation mentions must not produce a bare negative" observes recovery_hint via hint
  2. assert "entropic_free_string" in hint, hint observes recovery_hint via hint
  3. assert "search(" in hint, f"the hint must name the corpus holding the mention: {hint!r}" observes recovery_hint via hint

Where the product reaches it

  • dossier → _batched_dossiers → batch_payload → recovery_hint (flow)

Call flow

test_a_name_only_documentation_mentions_is_reported_as_such→recovery_hint

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_a_name_only_documentation_mentions_is_reported_as_such · 3 checksrecovery_hintconnectREQ-DDB-QUERY-001 · measuredrecovery_hint_hint_from_indexed_pathtable_existsREQ-DDB-QUERY-003 · measuredrecovery_hintREQ-DDB-QUERY-013 · measured
Also reaches 3 requirements

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