# S minus M control exploration

This is a descriptive finite-table exploration. It does not propose a mechanism, proof, or causal explanation.

## Source tables

- Waiting-hall event table: `C:\Users\yauki\Documents\Codex\2026-06-30\task-waiting-hall-interior-map-audit\outputs\waiting_hall_interior_detail.csv`
- Exit-avoidance event table: `C:\Users\yauki\Documents\Codex\2026-06-30\task-exit-avoidance-path-space-audit\outputs\exit_avoidance_path_events.csv`
- Exit-avoidance chain table: `C:\Users\yauki\Documents\Codex\2026-06-30\task-exit-avoidance-path-space-audit\outputs\exit_avoidance_chains.csv`

## Population definitions

- `M_miss`: `miss_event = 1` in the waiting-hall event table.
- `S_minus_M_control`: non-miss rows whose `residue_pair_mod32` belongs to the miss-event residue-pair support.
- All comparisons below are inside this finite event table.

## Counts

- total waiting-hall event rows: 76530
- `M_miss`: 228
- `S_minus_M_control`: 47
- control rows whose `residue_pair_mod32 + transition_k` also appears in miss support: 47 / 47
- control rows inside miss exit-distance window `3..8`: 0 / 47
- control rows inside miss observed `remaining_K_before` support: 0 / 47

## Confirmed similarities

- By construction, all controls share a miss-observed `residue_pair_mod32`; controls use 10 of the 18 miss residue-pair cells.
- Stronger than requested: all 47 controls also share a miss-observed `residue_pair_mod32 + transition_k` pair.
- The transition-size profile is close: miss median `transition_k=5.0`, controls median `transition_k=5.0`.
- The residue-before side overlaps the lower edge of the miss support: miss residue-before mod32 `3:122; 4:75; 5:19; 6:6; 8:4; 7:2`, controls `3:27; 4:12; 5:8`.

## Confirmed differences

- The position coordinate separates the groups completely.
  Miss `exit_distance`: 3:122; 4:75; 5:19; 6:6; 8:4; 7:2.
  Control `exit_distance`: 35:27; 36:12; 37:8.
- The absolute `remaining_K_before` coordinate also separates the groups completely.
  Miss `remaining_K_before`: 35:86; 36:56; 67:25; 68:17; 37:13; 131:11; 70:6; 40:3.
  Control `remaining_K_before`: 99:27; 100:10; 101:7; 164:2; 165:1.
- Band is not the same support: miss bands are `32-63:159; 64-127:53; 128-255:16`; controls are `64-127:44; 128-255:3`. Same band support? `False`.
- `wait_length` is shifted: miss `14:21; 4:20; 6:20; 5:18; 3:16; 16:16; 15:14; 7:13`; controls `31:6; 33:5; 20:4; 19:3; 18:3; 28:3; 24:2; 21:2`.
- `near_behavior` separates the selected rows at this table level: miss `miss:228`, controls `drift:47`.
- Coarse position label also shifts: miss `lower_hall:228`, controls `mid_hall:44; lower_hall:3`.
- Exit-avoidance chain depth differs: miss `3:120; 2:57; 1:51`, controls `2:47`.

## Unexpected regularities

- The controls are not a diffuse leakage cloud. They occupy exactly three exit distances: 35, 36, and 37.
- They are concentrated one band above the densest miss branch: controls are mostly in `64-127` at `remaining_K_before = 99..101`, while the largest miss branch is in `32-63` at `35..37`.
- The control shape cells form a displaced staircase relative to miss-front cells: e.g. control `3->30` at `exit_distance=35` matches miss `3->30` at `exit_distance=3`, with the same `transition_k=5`.
- All controls have `max_avoidance_depth = 2` in the joined exit-avoidance chain table; miss rows spread across depths 1, 2, and 3.
- Nearest-miss matching by residue shape confirms this is a position displacement, not a new shape family; see `s_minus_m_47_nearest_miss_by_shape.csv`.

## Failed hypotheses / things not supported

- `shape alone is miss-only`: false. The 47 controls are exactly the leakage under residue-pair shape alone.
- `shape + transition_k is miss-only`: false in this table; the same 47 controls remain after adding `transition_k`.
- `transition_k` alone separates controls from miss`: false; the medians are nearly identical and every control shape+k pair exists among misses.
- `residue pair alone tells position`: false; the same residue-pair cells occur in both the miss-front and displaced control rows.
- `all drift-like controls are immediate miss candidates`: not supported; these controls are drift-labeled, but none are in the miss exit-distance window or miss `remaining_K_before` support.

## Numeric summary

| group | feature | n | min | median | mean | max | unique |
| --- | --- | --- | --- | --- | --- | --- | --- |
| M_miss | remaining_K_before | 228 | 35.0 | 36.0 | 49.872807 | 133.0 | 14 |
| M_miss | remaining_K_after | 228 | 27.0 | 31.0 | 44.535088 | 127.0 | 12 |
| M_miss | exit_distance | 228 | 3.0 | 3.0 | 3.697368 | 8.0 | 6 |
| M_miss | transition_k | 228 | 4.0 | 5.0 | 5.337719 | 11.0 | 8 |
| M_miss | wait_length | 228 | 0.0 | 8.0 | 10.508772 | 46.0 | 29 |
| M_miss | R_drop | 228 | 4.0 | 5.0 | 5.337719 | 11.0 | 8 |
| M_miss | residue_before_mod32 | 228 | 3.0 | 3.0 | 3.697368 | 8.0 | 6 |
| M_miss | residue_after_mod32 | 228 | 27.0 | 31.0 | 30.359649 | 31.0 | 5 |
| M_miss | max_avoidance_depth | 228 | 1.0 | 3.0 | 2.302632 | 3.0 | 3 |
| M_miss | max_wait_time_before_exit_layer | 228 | 3.0 | 14.0 | 14.921053 | 45.0 | 33 |
| S_minus_M_control | remaining_K_before | 47 | 99.0 | 99.0 | 103.680851 | 165.0 | 5 |
| S_minus_M_control | remaining_K_after | 47 | 92.0 | 94.0 | 98.319149 | 159.0 | 5 |
| S_minus_M_control | exit_distance | 47 | 35.0 | 35.0 | 35.595745 | 37.0 | 3 |
| S_minus_M_control | transition_k | 47 | 4.0 | 5.0 | 5.361702 | 9.0 | 6 |
| S_minus_M_control | wait_length | 47 | 15.0 | 27.0 | 27.765957 | 77.0 | 23 |
| S_minus_M_control | R_drop | 47 | 4.0 | 5.0 | 5.361702 | 9.0 | 6 |
| S_minus_M_control | residue_before_mod32 | 47 | 3.0 | 3.0 | 3.595745 | 5.0 | 3 |
| S_minus_M_control | residue_after_mod32 | 47 | 28.0 | 30.0 | 30.234043 | 31.0 | 4 |
| S_minus_M_control | max_avoidance_depth | 47 | 2.0 | 2.0 | 2.0 | 2.0 | 1 |
| S_minus_M_control | max_wait_time_before_exit_layer | 47 | 20.0 | 26.0 | 29.021277 | 77.0 | 17 |

## Top shape-position cells

| group | residue_pair_mod32 | transition_k | exit_distance | count |
| --- | --- | --- | --- | --- |
| M_miss | 3->31 | 4 | 3 | 64 |
| M_miss | 4->31 | 5 | 4 | 47 |
| M_miss | 3->30 | 5 | 3 | 38 |
| M_miss | 4->30 | 6 | 4 | 18 |
| M_miss | 3->29 | 6 | 3 | 13 |
| M_miss | 5->31 | 6 | 5 | 13 |
| M_miss | 4->29 | 7 | 4 | 8 |
| M_miss | 6->31 | 7 | 6 | 6 |
| M_miss | 3->28 | 7 | 3 | 4 |
| M_miss | 3->27 | 8 | 3 | 3 |
| M_miss | 5->29 | 8 | 5 | 3 |
| M_miss | 8->31 | 9 | 8 | 3 |
| M_miss | 4->28 | 8 | 4 | 2 |
| M_miss | 5->28 | 9 | 5 | 2 |
| M_miss | 5->30 | 7 | 5 | 1 |
| M_miss | 7->29 | 10 | 7 | 1 |
| M_miss | 7->30 | 9 | 7 | 1 |
| M_miss | 8->29 | 11 | 8 | 1 |
| S_minus_M_control | 3->30 | 5 | 35 | 11 |
| S_minus_M_control | 3->31 | 4 | 35 | 10 |
| S_minus_M_control | 4->31 | 5 | 36 | 7 |
| S_minus_M_control | 3->29 | 6 | 35 | 5 |
| S_minus_M_control | 4->30 | 6 | 36 | 5 |
| S_minus_M_control | 5->31 | 6 | 37 | 4 |
| S_minus_M_control | 5->30 | 7 | 37 | 2 |
| S_minus_M_control | 3->28 | 7 | 35 | 1 |
| S_minus_M_control | 5->28 | 9 | 37 | 1 |
| S_minus_M_control | 5->29 | 8 | 37 | 1 |

## Output files

- `miss_and_control_event_detail.csv`
- `miss_vs_control_numeric_summary.csv`
- `shape_position_cells.csv`
- `s_minus_m_47_context_windows.csv`
- `miss_and_control_context_windows.csv`
- `s_minus_m_47_nearest_miss_by_shape.csv`
- `miss_vs_control_exit_distance_transition_k.svg`
- `miss_vs_control_R_before_after.svg`
