test_disagreeing_profiles_leave_the_default_undecided

Tests › tests/test_config_defaults.py

passed Passed in the packaged run.

What this test is for

Why it exists

EMPTY MEANS UNDECIDED, NEVER OFF. With two profiles disagreeing and no declared header to settle it, naming either as "the default" is the confident wrong answer this whole layer exists to remove — rebuilt one level up, which is exactly how it would come back.

Given

  1. conn = _gate_db( tmp_path, "a.db", [ ("FEATURE_X", "off", "", "configs/a_config.h", 1, "", "heuristic"), ("FEATURE_X", "on", "", "configs/b_config.h", 1, "", "heuristic"), ], )
→

When

  1. gates, _ = gates_covering(conn, "src/platform.h", 20)
  2. conn.close()
→

Then

  1. ✓ gates[0].default_state equals ""

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

… 17 earlier steps

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pydossier18. _documentation_mentions → table_exists18table_exists19. _documentation_mentions → has_columns19has_columns20. has_columns → table_exists20table_exists21–22. _hint_from → _name_exists21_name_exists +1 more

… 38 steps between

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesloop (line 660)looploop ×2 (line 288)loop ×2dossier61–62. macro_definitions_conn → _macro_def61_macro_def +1 more63. gates_covering → table_exists63table_exists▶ test enters64. gates_covering → has_columns64has_columns65. gates_covering → _gate_columns65_gate_columns66–67. _gate_columns → has_columns66has_columns ×268. gates_covering → _with_defaults68_with_defaults69. _with_defaults → table_exists69table_exists70. _with_defaults → _defaults_for_macros70_defaults_for_macros71. _with_defaults → decided_default71decided_default72. decided_default → is_shipped_config72is_shipped_config73. _with_defaults → _in_default_build73_in_default_build74. _macro_def → _macro_params74_macro_params

… 152 later steps

2 more

tests/test_config_defaults.py:364 · its file's page

What it checks (1)

  1. assert gates[0].default_state == "", "two guesses that disagree must not pick a winner" not attributed

Where the product reaches it

  • dossier → subject_payload → _flatten_subject → _gate_definitions → macro_definitions → macro_definitions_conn → _macro_def → gates_covering (flow)

Call flow

test_disagreeing_profiles_leave_the_default_undecided→_gate_db→gates_covering

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_disagreeing_profiles_leave_the_default_undecided · 1 checks_gate_dbensure_config_defaults_tableREQ-DDB-PIPE-015 · measuredgates_coveringtable_existsREQ-DDB-QUERY-003 · measuredgates_covering_with_defaults_in_default_buildREQ-DDB-QUERY-004 · inferredgates_coveringREQ-DDB-QUERY-006 · measuredgates_covering_with_defaultsdecided_defaultREQ-DDB-QUERY-013 · measured
Also reaches 6 requirements

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