File tree Expand file tree Collapse file tree
server/preprocessing/other-scripts/test Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22#
33# These pin the Stage-1 ranking behaviour end-to-end (corpus + rank map + waterfall)
44# on frozen real data, complementing the pure-unit tests in test_ranking_select.R:
5- # G1 §15-3 guard: no candidate term drifts out of the rank map (unknown == 0).
5+ # G1 guard: no candidate term drifts out of the rank map (unknown == 0).
66# G2 de-nesting: no area label contains a term nested inside another.
77# C1 exclusivity: with rank 1 present, the label is drawn ONLY from rank 1.
88# C2 fallback: with rank 1 empty, the label falls back to rank 2 (non-empty).
9- # Runs inside the pipeline image (needs tm). See docs §6, §15.
9+ # Runs inside the pipeline image (needs tm).
1010
1111if (! exists(" mode1_cluster_breakdown" )) source(" test/replay_harness.R" )
1212if (! requireNamespace(" testthat" , quietly = TRUE )) {
@@ -40,8 +40,8 @@ if (length(fixtures) == 0) {
4040 cat(" (no fixtures in test/replay — skipping Mode-1 selection tests)\n " )
4141} else {
4242
43- # G1 — §15-3 : every pruned tf-idf term resolves to a rank (no drift).
44- test_that(" Mode 1: zero unknown-rank terms across all fixtures (§15-3 guard) " , {
43+ # G1: every pruned tf-idf term resolves to a rank (no drift).
44+ test_that(" Mode 1: zero unknown-rank terms across all fixtures" , {
4545 total <- 0
4646 for (fx in fixtures ) total <- total + breakdown(fx )$ unknown_total
4747 expect_equal(total , 0 )
You can’t perform that action at this time.
0 commit comments