Repository navigation
test(find): assert the unchanged viewport independently of history growth - #1098
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 16 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Root cause
The stale-navigation test equates complete bottom-relative scroll snapshots after a substring output receipt. The receipt can precede remaining cat/terminal-echo output, so history can grow while the viewport stays anchored. Main CI run 38559049536 expected max/offset 462/308 and received 463/309: both have absolute top row 154 and viewport_rows 40. paneFind rejects a stale previous revision before copy_search or pane.scroll. The test was treating history growth as viewport movement.
Fix
Compare the exact absolute viewport top (max_offset_from_bottom - offset_from_bottom) and viewport height in both navigation directions. Preserve the positive scrolled-offset precondition, HTTP 409, and stale_content assertions. A one-row viewport move still fails. No timeout increase, retry, sleep, or production change.
Evidence
gh run view 38559049536 --log-failed; the failure is atserver/find.contract.test.ts:174. Both snapshots describe top row 154, not a viewport move. The copy-revision guard inserver/herdr/client.ts:511rejects this request before search or scroll.HERDR_TEST_MODE=unit bun run test:unitpassed; the load also exited 0. No local reproduction claimed: the CI log and scroll-coordinate contract prove the cause.Validation
CHECK_WAIT_SECONDS=3600 bun run check run bash -c 'for i in 1 2 3 4 5; do bun test --timeout 15000 ./server/find.contract.test.ts || exit 1; done': 5/5 consecutive passes, 18 tests each, runner exit 0; source unchanged throughout. Baseline and fixed reports:b79813b2-1dd9-4c2e-8121-011ea62d78d2,3bedd127-711e-479a-89e4-03081936ad09undernode_modules/.cache/check/.UNIT_TEST_WORKERS=2 CHECK_WAIT_SECONDS=3600 bun run check fast: exit 1 only in untouchedserver/portal.test.ts,running Portal > does not follow redirects when checking the relay version(10-second readiness timeout reporting Portal not installed). Unit totals: 3573 pass, 1 fail, 50 skip across 287 files. Generated-type freshness, typecheck and build all exit 0. Report:130c8ec7-b2ec-46d0-ae89-86daacbda03f. This is recorded as an out-of-scope load/environment failure under the assignment's explicit exception; PR CI is the authoritative gate, and local Fast is not claimed green.git diff --check: exit 0. LSP unavailable (typescript-language-servernot installed); repository typecheck passed instead. Workflow syntax is platform-skipped on darwin arm64 and remains CI-owned.changelog.d/README.md.