Skip to content

tests: app-tier route tests for #857-#861 (released cards at exact rest, deep shelves, Home and Recommended Detail return) - #864

Merged
GLinnik21 merged 4 commits into
mainfrom
crx-routes2-tests
Oct 20, 2026
Merged

GLinnik21 merged 4 commits into
mainfrom
crx-routes2-tests

Conversation

@GLinnik21

@GLinnik21 GLinnik21 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

App-tier route tests for the routes #857–#861 changed. They run in the World rig, the real screens behind the real dispatch. Every red line below comes from a stub of the production behaviour the test guards. Each stub was applied to the committed tree, run once and restored, and none was committed.

The tests, and how each goes red

  • A released card is at exact rest on Home and Recommended (card_rest_route_tests). A held Right walks 8 cards along a 12-card shelf, then every card the walk left must read scale 1.0, not one ulp above.
    • Stub: Spring::land returns false.
    • Red: Recommended, after 8 cards of a held walk: only the focused card is off rest, got [(0, 0, 1.0000001), … (0, 7, 1.0000001), (0, 8, 1.0899999)] left: 9 right: 1 (Home identical).
  • The same rule as a shared conformance case, released_card_lands_at_rest, case eight of the card suite. Tier 1 runs it on FixtureHost, and Tier 2 runs it on every real screen. With the same stub:
    • Tier 1 shelf: released_card_lands_at_rest Fail("100 rests at 1.0000001; 101 rests at 1.0000001; …").
    • Tier 2: eight shelf screens fail, e.g. home released_card_lands_at_rest: FAILS and is not listed: 4096 rests at 1.0000001; …. The eight are person, search, library_shelves, home, detail_shelves, detail_collection, detail_extras and detail_cast.
    • The grid components stay Pass by construction. GridPop holds one pop and one shrink spring, and every other cell is exactly 1.0 (poster_grid.rs:269-273). Their let-go is covered separately, on its own branch.
  • A publication that adds a shelf leaves focus on its card, and the new shelf is reachable (deep_shelves_route_tests).
    • Stub: sync ignores later publications. Red: the seventh shelf the publication added is reachable by Down: … region=shelf row=5 ….
    • Stub: a full rebuild that mints fresh card identities. Red: the publication did not move focus off its card left: Some(FocusKey { entry: EntryId(3), elem: 570425366 }) right: Some(… elem: 570425348 }).
    • The focus clause guards key stability across a publication. KeyRegistry::register returns the existing key for a known identity, so a rebuild that keeps identities keeps focus.
  • A held Down through a deep Home reaches every row in order, each on a card that has landed.
    • Stub: the hold band's reach set to 0, so it hugs the view.
    • Red: the card Down 1 lands on has landed: a placeholder behind the key is a band that hugged the view.
  • A deep Recommended page returns from Detail onto the same card, with its shelves published. The card's ratingKey is checked as published (neither rk= nor rk=-) before and after.
    • Stub: the Enter::Restored arm in ui/src/dispatch.rs passes no remembered focus.
    • Red: BACK lands on the card it left … left: ["row=-1", "col=-1", "sid=-", "rk=-"] right: ["row=24", "col=1", "sid=65535", "rk=movierow241"].
    • Stub: a latched hold band. Red: its premise fails (the held band moved past the first sixteen shelves: (0, 15)). The "rows in view are published" clauses are live through this premise. The reach stub cannot break them, because those rows are always inside a band that follows the view.
  • Home → Detail → BACK lands on the card it left (row 2, col 4 of a 5×8 grid), at rest.
    • Path: OK on the card is performed by the World pump through the loop's own path. That is home_requests' guards, then input::activate_deck_card → activate_card → open_detail → nav_push_with_return.
    • Stub: the Enter::Restored arm drops the focus. Red: BACK lands on the card it left left: (None, Some("1")) right: (Some((2, 4)), Some("5")).
    • Stub: activate_card hands open_detail a return state without focus. Red: the same line.
    • Not covered: content::home_requests' match arm and activate_home_item themselves, because they take the whole App, which the rig does not build. Dropping the return state entirely is behaviourally identical in the rig: nav_push(None) reads the same state off the engine.

What it touches outside the tests

Test-support accessors only, each #[cfg(any(test, feature = "test-support"))]:

  • HomeScreen::probe_card_pops and RecommendedScreen::probe_card_pops: every card's pop as the draw paints it;
  • BrowseStore::released_rows_for_test;
  • the World helpers in bridge_test_support.rs, including the pump's Home Detail arm.

There are no production path changes, and no crate, Cargo, Makefile, build.rs or workflow changes.

Verification

  • Gates on the committed tree (861e175, git status --short empty before and after):
    • make check: 103 steps — all ok, 29 test result: ok blocks, none failed;
    • make test-hostsim: test result: ok. 938 passed; 0 failed;
    • make check-nodef: clean;
    • make check-replay: 3 fixtures, 6 replays, 0 failures.
  • Review and simplify: one review, no blockers. Its should (red evidence for every test) and its nits are fixed here: the strict published-card check, the module doc, a dead assertion, get in the probe, and Home Detail through the pump. A simplify pass ran before the review.
  • CodeQL: five rust/cleartext-logging alerts on assert messages in deep_shelves_route_tests.rs print the rig's fixture probe text. They were dismissed as used in tests.

🤖 Generated with Claude Code

GLinnik21 and others added 3 commits October 20, 2026 11:35
…t, held Down, deep Detail return)

Route tests on the one World rig for the behaviour the last five changes added:
- #861: a Home shelf and a Recommended shelf walked with a held key leave every released card at
  exact rest (card_rest_route_tests); the shared conformance case released_card_lands_at_rest walks
  every other card screen (Search, Detail shelves/collection/extras/cast, Person, Library) at the
  screens tier.
- #860: a publication that adds a shelf keeps the seat; a deep Recommended page returns from Detail
  onto the same card with its shelves published (deep_shelves_route_tests).
- #858: a held Down through a 48-row Home reaches every row on a landed card.
Test-only reads: HomeScreen/RecommendedScreen::probe_card_pops, BrowseStore::released_rows_for_test,
World::{home_grid, card_pops}. Each test was observed red against a deliberately broken build.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…+ #861)

Home -> OK on a deep card -> Detail -> BACK on the World rig: same row, column and
ratingKey, only the focused card off rest. World::cards_off_rest is shared with the
card-rest tests.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…me mount, probe_card_pops through shelf_position

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…p, a wide Recommended walk, strict published-card checks

- Home's Detail request is performed by the World pump (home_requests' guards, the loop's own
  activate_deck_card), so the Home return test no longer calls open_detail itself.
- The Recommended rest walk uses 12-card shelves and walks 8 cards, leaving several released
  cards behind as Home's does.
- The deep Recommended return checks the card is published before and after (rk= and rk=- both refused).
- Drop the unasserted clause from the deep-shelves module doc and the dead pop_factor loop from
  sole_card_off_rest.
- HomeScreen::probe_card_pops reads its shelf with get.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@GLinnik21
GLinnik21 merged commit 1236b92 into main Oct 20, 2026
19 checks passed
@GLinnik21
GLinnik21 deleted the crx-routes2-tests branch October 20, 2026 10:27
GLinnik21 added a commit that referenced this pull request Oct 20, 2026
#866 per-card grid let-gos) into crx-grid-reveal

Both sides' behaviour is kept in every conflict:

- ui/poster_grid.rs: the branch's title-handover test next to main's GridBands canon test
  and the `at` helper (#866).
- ui/cards/grid.rs: #866's `self.pop.reset()` where the branch's side built a fresh
  GridPop, with the branch's band comment.
- ui/cards/tests.rs: the branch's title_only/details_only Cards fields beside #866's
  elem_calls counter.
- screens home/recommended `probe_card_pops`: main's (#864) versions; the branch's copies
  came from an earlier draft.
- app/bridge_test_support.rs: main's sole_card_off_rest / home_focused_item / home_card
  next to the branch's `poster_cell`, and `card_pops` stays `pub(super)` because the
  Under posters shelf route test reads it.

The semantic join: `Grid::rise_below` (the drawn top of the tile below a caption line) reads
that tile through `drawn_rect`, which now takes the pass's `LetGoCards` and goes through
`pop_in`, the one resolution the draw paints with after #866. A released card still shrinking
below a caption (a let-go) is therefore drawn above its rest top in the caption's rule too, by
element when the source moved since the last tick, and `card_paint` / `rise_below` /
`drawn_rect` share the pass's single `let_go_cards` answer (the frame's hash budget,
`grid_draw_hashes_no_drawn_card_while_cards_let_go`, is unchanged).

New test `no_caption_line_is_drawn_where_a_tile_letting_go_below_it_is`: a held Down then a
held Up (a press every three frames), every caption line against the live drawn top of the
tile directly below it, with a check that the walk really leaves a let-go under a line. Watched
red with `rise_below` reading the tile below with the let-gos left out (worst overlap 7.8 px),
green on the join.

Replay fixtures: main's are the base (the three anchors as #866 re-recorded them) and the
README keeps both sides' paragraphs in order. The anchors are re-anchored on this merged
tree in the next commit.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
GLinnik21 added a commit that referenced this pull request Oct 20, 2026
…rn once on the merged tree

The merge of origin/main (#863, #864, #866) into crx-grid-reveal kept main's fixtures as the base.
On the merged tree `make check-replay` found 6-settings-family SAME (frames=1321, diverged=0, every
counter zero, Targets and Resolve) and two anchors that no longer match, with the shape unchanged
(state_fp 2896094977091175041, so `rerecord` refuses):

- 12-filmography-detail-return: DIVERGED in both modes, diverged=884 of 923, present/input/result/
  land/effect/focus/hit diffs all 0 (a pure state-hash divergence, no visible counter). Attributed by
  replaying the committed anchor against the merged tree with only person.rs put back to
  origin/main's (filmography labels through the one caption policy, the air under a shelf as
  StackPage::shelf_foot instead of Sec::Gap(kind)): SAME, diverged=0, every counter 0, Targets and
  Resolve. The fresh recording holds the same 136 metrics (text measurement) queries as the old one.
- 1-boot-home-chip-grid: diverged from frame 296, then REFUSED (replay measurement table miss) in
  both modes, because main's recording predates the Under posters captions this branch carries.
  Attributed from the measurements themselves: the metrics records of the fresh recording differ
  from the committed one by exactly one gained Width query (Home's focused poster caption
  "1992 . 1h 40m", 24 px) and three lost (the year alone and the two synthetic title names).

The owner approved re-anchoring for intended UI changes (README 2026-09-29/30 entries; the standing
instruction not to stall on it). Both anchors were recorded afresh on this merged, committed-source
tree (tests/focusfp.sh --rec --only 1,12), passed `plxnative-rec check` (synthetic) against the
unchanged alphabet, and only rec-0000.jsonl was replaced; the manifests (anchor flag included) are
byte for byte the committed ones and equal the new recorder's header. README paragraph added.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants