test_the_thread_split_buckets_every_row

Tests › tests/test_roster_origin_split.py

passed Passed in the packaged run.

What this test is for

Why it exists

One thread per bucket, including a spawn site whose path rowid resolves to NOTHING — that lands in UNRESOLVED rather than first party, because "we do not know whose this is" is not "it is ours". Folding it into first_party is how a count comes to look healthier than its evidence.

Given

  1. —
→

When

  1. inv = q.thread_roster( _thread_db( tmp_path, [ (1, "poll_loop", 1, 1, 12), (2, "llama_worker", None, 2, 40), ## A spawn path rowid with no `path` row — an index whose file table lost it. (3, "ghost", None, 99, 7), ], _THREAD_FILES, ) )
  2. o = inv.origin
→

Then

  1. ✓ (o.total, o.first_party, o.external, o.unresolved) equals (3, 1, 1, 1)
  2. ✓ o.first_party + o.external + o.unresolved equals o.total
  3. ✓ o.external_roots equals ("extern/llama.cpp",)

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.

clew — `main` (clew/cli.py) · 15 of 400 steps

… 215 earlier steps

command-line usercommand-line usercommand-line usercommand-line userclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyloop (line 1576)loopmain216. _memberdef_corpora → _expansion_sql216_expansion_sql217. _expansion_sql → has_columns217has_columns218. has_columns → table_exists218table_exists219. _memberdef_corpora → _memberdef_candidates219_memberdef_candidates220. _memberdef_candidates → table_exists220table_exists

… 141 steps between

command-line usercommand-line usercommand-line usercommand-line usercommand-line userclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesother filesloop ×3 (line 942)loop ×3main362. corpus_payload → one362one363. corpus_payload → thread_roster363thread_roster364. thread_roster → connect364connect▶ test enters365. thread_roster → table_exists365table_exists366. thread_roster → has_columns366has_columns367. thread_roster → _thread_columns367_thread_columns368–370. _thread_columns → has_columns368has_columns ×3371. thread_roster → _build_thread371_build_thread372. _build_thread → name_of372name_of373. _build_thread → table_exists373table_exists374. _build_thread → _spawn_attribution374_spawn_attribution375. _spawn_attribution → has_columns375has_columns376–377. thread_roster → _thread_origins376_thread_origins +1 more378–379. corpus_payload → _config_found_on_the_wire378_config_found_on_the_wire +1 more

… 21 later steps

2 more

tests/test_roster_origin_split.py:442 · its file's page

What it checks (3)

  1. assert (o.total, o.first_party, o.external, o.unresolved) == (3, 1, 1, 1) not attributed
  2. assert o.first_party + o.external + o.unresolved == o.total not attributed
  3. assert o.external_roots == ("extern/llama.cpp",) not attributed

Where the product reaches it

  • main → query_main → _payload → export_search → corpus_payload → thread_roster (flow)

Call flow

test_the_thread_split_buckets_every_row→thread_roster→_thread_db

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_thread_split_buckets_every_row · 3 checksthread_rosterREQ-DDB-QUERY-001 · measuredthread_rostertable_existsREQ-DDB-QUERY-003 · measuredthread_rosterREQ-DDB-QUERY-011 · measured
Also reaches 3 requirements

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