Skip to content

test(find): assert the unchanged viewport independently of history growth - #1098

Merged
devswha merged 1 commit into
mainfrom
ci/find-offset-flake
Oct 14, 2026
Merged

devswha merged 1 commit into
mainfrom
ci/find-offset-flake

Conversation

@devswha

@devswha devswha commented Oct 14, 2026

Copy link
Copy Markdown
Owner

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

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-03081936ad09 under node_modules/.cache/check/.
  • UNIT_TEST_WORKERS=2 CHECK_WAIT_SECONDS=3600 bun run check fast: exit 1 only in untouched server/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-server not installed); repository typecheck passed instead. Workflow syntax is platform-skipped on darwin arm64 and remains CI-owned.
  • Only the contract test changes. No production behavior or user-visible change, so no changelog fragment is required by changelog.d/README.md.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: devswha/herdr-web-ui/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2290386b-a31b-4497-9a83-a814d25274da
📥 Commits

Reviewing files that changed from the base of the PR and between f979703 and 47572ea.

📒 Files selected for processing: 1
  • server/find.contract.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devswha
devswha merged commit f0f5ae5 into main Oct 14, 2026
17 checks passed
@devswha
devswha deleted the ci/find-offset-flake branch October 14, 2026 14:03
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.

1 participant