docs(test-evidence): what this wave's persistence and view tests are evidence of

Keyed by test name per design-principles section 7, recording for each one the
bug it reproduced, the fault injected to watch it fail, and -- where a test has
a neighbour that looks like it -- the input that separates the two.

Three entries are about that separation rather than about a bug:

- a_view_that_does_not_prune_writes_no_prune_line is the direction the default
  supplies, so a writer emitting "prune: true" unconditionally passes the real
  test and fails this one.
- an_interleaved_category_keeps_its_item_order explains why the ticket's own
  two-item reproduction cannot discriminate: with one item of each kind, both
  the right and the wrong order are a single bare run followed by a single
  grouped one.
- slash_in_hidden_name_survives_roundtrip records that improvise-nvq4 does NOT
  reproduce, and is kept as a passing control so the claim cannot be re-filed
  without someone first watching it pass.

core.md is touched for the improvise-qx1z entries, which are View-level and
belong there rather than in formula-and-io.md.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FC2jVn8Au7E9JPkw6bwXXH
This commit is contained in:
Edward Langley
2026-09-21 14:46:32 -07:00
parent 72b77566c5
commit 98be603cb9
2 changed files with 147 additions and 0 deletions
+35
View File
@@ -351,6 +351,41 @@ test flips the category back to `Page` afterwards, so it distinguishes "omits
The fixture puts a category on each of `Page`, `Filter`, `Row` and `None` so the
result separates the two questions rather than merely counting.
### on_category_removed_forgets_a_collapsed_group
improvise-qx1z arm 2. `View::on_category_removed` cleared `category_axes`,
`page_selections` and `hidden_items` — but not `collapsed_groups`. The other
three lines being right there is what makes this an omission rather than a
decision: collapse `Month/Q1`, delete the category, re-add it with `Jan[Q1]`,
and the group comes back **pre-collapsed** with nothing saying why. Reachable
from shipped keys, through the category panel.
Fault injected: delete the added line; the test fails at
`is_group_collapsed("Month", "Q1")`. The test re-adds the category after
removing it, because a view that merely *forgot the axis* would also report
`false` for a category it no longer knows — asking the question after the
re-add is what separates "cleared" from "not currently registered".
### on_item_removed_forgets_a_hidden_item
improvise-qx1z arm 1, at the `View` level. `Model::remove_item` removes the item
and its cells and **touches no view at all**, so `hidden_items["Region"]` kept
`"East"`: re-adding the item put it in the model and in the category panel while
leaving it absent from the grid, with no indication why.
The fixture hides **two** items and removes one. Without the second, a fix that
dropped the whole category entry — `hidden_items.remove(cat_name)` — would pass
while destroying unrelated state; the surviving `West` assertion is the input
that separates "forget this item" from "forget this category".
### on_item_removed_forgets_a_page_selection_naming_it
The third question improvise-qx1z asked to check while there, and the answer was
the same: a page selection naming a removed item survived it. Asserted in both
directions in one test — removing a *different* item must leave the selection
alone — because a hook that cleared the selection unconditionally would satisfy
the removal half and silently reset the user's page on every unrelated delete.
## `view/layout.rs`
### prune_axis_items_indexes_data_positions_not_visual_ones