Pin the column toggle's cursor-follow; a group lookup stops at its row (improvise-pb30, improvise-0r01)
pb30: gz puts the cursor on the collapsed group through landing and place_cursor, and their column arms were untested. Three rivals passed all 1948 tests: the arm swapped, landing returning None for columns, and landing reading col_tuple(0). A new test uses two column levels (Region over Month) with the cursor at (1, 7), South/May. It requires the cursor to land on South's Q2 at (1, 5). Each rival fails it and nothing else. The col_tuple(0) rival needs the two column levels, since with one level the prefix is empty everywhere. 0r01 (Codex's P2 on #263): innermost_group built open_runs for the whole axis, cloning a level stack per row, to answer for one row on every z. open_runs is now a lazy iterator, still the one reader, and the lookup takes .nth(idx). a_lookup_does_not_read_past_its_row gives it an unreadable header after row 0 (level usize::MAX). The eager rival panics with capacity overflow. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VdfEGXA7aJ6ftMsCc9PJze
This commit is contained in:
@@ -302,7 +302,10 @@ previous survivor, pruned against unpruned. It runs over five fixtures,
|
||||
including a non-contiguous group, a level with no groups, and two adjacent
|
||||
outer groups. Without the non-contiguous fixture, a pruner that keyed runs by
|
||||
name instead of header position passed every test. `open_runs` is the one
|
||||
reading of the markers: `innermost_group` and the tests both use it.
|
||||
reading of the markers: `innermost_group` and the tests both use it. It is a
|
||||
lazy iterator, so a single lookup (`z`, which asks about one row) walks the axis
|
||||
only up to that row, rather than building and cloning a stack for every row of
|
||||
it (improvise-0r01).
|
||||
|
||||
A header's level also names its category (`cats[level]`) on the wire, where
|
||||
`FrameGroup` carries `level` and not the category (improvise-7xyx removed that
|
||||
|
||||
Reference in New Issue
Block a user