Skip to content

test(regressions): add missing regressions for build cache, Files scope, worktree focus and agy temp links - #4550

Merged
devswha merged 2 commits into
mainfrom
test/b5-missing-regressions
Nov 24, 2026
Merged

devswha merged 2 commits into
mainfrom
test/b5-missing-regressions

Conversation

@devswha

@devswha devswha commented Nov 23, 2026

Copy link
Copy Markdown
Owner

What

Test bundle B5 of the test-suite plan: regression tests for four fixes that went in without one (two of them regressed before). Tests only; no production file changes.

# Fix Test
A1 #4159 scripts/build-cache.ts re-checks the cache after taking the lock scripts/build-cache.test.ts: two real build-cache.ts jobs on one key, ordered by gate files (fs.watch, no sleep). Job 2 misses the cache, meets job 1's lock, and is paused just before its retry; job 1 stores its build and releases. Both exit 0, one build in total, job 2's dist/ restored from the cache.
A2 #3028 Changes keeps its scope when Files moves to another pane/PC new src/components/FilesDialog.test.tsx: render FilesDialog, pick Branch, compare with main, rerender with another paneId, then the stale pane's answer arrives: Branch stays pressed and the stale file is not shown.
A3 #1222 the new worktree dialog focuses the Branch field src/components/WorktreeDialog.test.tsx: in create mode focus is on the Branch input with its suggested value fully selected.
A4 #2030 agy catalog under a symlinked temp dir (macOS /var -> /private/var) server/agy.test.ts: a new row of the WAL-catalog table runs the reader with TMPDIR/TEMP/TMP pointing at a symlink.

Evidence: each test goes red when its fix is reverted

Each mutation was written into the production file, the test run, and the original bytes restored (sha256 checked; production diff is empty).

# Revert Result
A1 if (owner && restored()) -> if (false && ...) (no look under the lock) red: builds [1, 1] instead of [1, 0]
A2 put back key={${machineId}:${paneId}} on <RepoChanges> (the key cbdcafa removed) red: scope falls back to Working tree
A3 move ref={first} from the Branch input to the Name input (pre-#1222) red: focus and selection on the Name input
A4 remove snapshot = realpathSync(snapshot) in server/agy.ts red: only the symlinked row fails with AgyUnavailable; the other three rows stay green. This reproduces on Linux too: SQLite's SQLITE_OPEN_NOFOLLOW refuses a path with a symlinked directory component, so Linux CI guards #2030.

Validation

  • bun test scripts/build-cache.test.ts src/components/FilesDialog.test.tsx src/components/WorktreeDialog.test.tsx server/agy.test.ts: all new tests pass.
  • bun scripts/typecheck.ts: exit 0.
  • bun run check fast (P620, 241 s): typecheck, build, generated files ok; unit 24,890 pass, 160 skip, 1 fail: scripts/conventions.test.ts "waits marked fixed" on scripts/relay-new-pc-press-regression.ts:180, which fails on origin/main itself (1d71a71) and is fixed by test(relay): the new-PC press check polls for a join instead of a fixed wait #4547; this PR does not touch that file. The branch takes main in once test(relay): the new-PC press check polls for a join instead of a fixed wait #4547 lands.
  • Browser regressions that name FilesDialog or the worktree dialog (file-viewer-regression, files-panel-demo-regression, repo-diff-browser-qa, ui-regression, phone-worktree-sheet-regression, ...): not run locally since no component code changes; they run in this PR's Integration and browser job (CI runner image).

…focus and agy temp links

Cover #4159 (look in the cache again once the lock is taken), #3028 (Changes keeps Branch across a pane switch), #1222 (New worktree focuses and selects Branch) and #2030 (agy catalog under a symlinked temp root). Each test fails with its fix reverted.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Tests
    • Expanded automated coverage for concurrent build-cache access, including restoring a cached build while another build is in progress.
    • Added checks for WAL catalog behavior with missing or present side files and symlinked temporary directories.
    • Added regression coverage for switching panes while file requests are pending, and for branch input focus and text selection in the worktree dialog.

The pull request adds tests for build-cache concurrency, WAL catalog reads through a symlinked temporary directory, and file and worktree dialog interactions.

Changes: Build-cache concurrency

Layer / File(s) Summary
Gate and cache restore test
scripts/build-cache.test.ts
The Vite fixture can wait for a gate process. A two-checkout test verifies that the contender restores the published build after its initial cache miss, without running Vite.

WAL catalog test coverage

Layer / File(s) Summary
Side-file and symlink cases
server/agy.test.ts
The parameterized test covers missing WAL or SHM files, both files present, and a symlinked temporary directory passed through the child process environment.

Files dialog regression test

Layer / File(s) Summary
Pane change during pending request
src/components/FilesDialog.test.tsx
The test changes panes while a Branch file request is pending and checks the selected pane, cleared selector, and displayed files.

Worktree dialog focus test

Layer / File(s) Summary
Suggested branch input
src/components/WorktreeDialog.test.tsx
The create-mode test checks that the Branch input receives focus and its suggested value is fully selected.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Possibly related PRs

  • devswha/ovis#2825: Introduced the build cache and per-key lock behavior exercised by the new concurrency test.
  • devswha/ovis#1727: Added checkpointed WAL catalog reads, which the symlinked temporary-directory test exercises.
Merge Risk: Minimal · up to 7d3a0

This pull request adds regression tests and does not change production behavior. No merge-blocking issues were found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the test-only change and its four targets (build cache, Files scope, worktree focus, agy temp links), matching the changeset. It is long at 106 characters, but it is specific and on to…
Description check Passed The description follows the template. It has a Change section that explains the four regressions and their fixes, and a Validation section listing the commands run, their results, and the skipped brow…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the test-only change and its four targets (build cache, Files scope, worktree focus, agy temp links), matching the changeset. It is long at 106 characters, but it is specific and on topic.

Full details: Description check

Explanation

The description follows the template. It has a Change section that explains the four regressions and their fixes, and a Validation section listing the commands run, their results, and the skipped browser regressions. The template asks for a linked issue for features only; this PR is test-only, and the description cites the issue numbers for each fix. The CONTRIBUTING.md checks and changelog entry are not mentioned, which is a minor gap.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Fix failing CI checks

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e12967f and 7d3a08b.

Files selected for processing: 4

  • scripts/build-cache.test.ts
  • server/agy.test.ts
  • src/components/FilesDialog.test.tsx
  • src/components/WorktreeDialog.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 remain after this review.

@devswha devswha changed the title test: add missing regressions for build cache, Files scope, worktree focus and agy temp links test(regressions): add missing regressions for build cache, Files scope, worktree focus and agy temp links Nov 23, 2026
@devswha
devswha merged commit 4600e8f into main Nov 24, 2026
28 of 29 checks passed
@devswha

devswha commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head 7d3a08b7e. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit reviewed this head.

Test-only PR. Reviews that ran: a gate review by omo-native-gate-reviewer (APPROVE: each new test re-run red with its fix reverted, A1 run 24 times in parallel without a flake). CodeRabbit hit its review limit on the first head. The one Fast checks failure (server/file-view.test.ts open-descriptor count, a file this PR does not touch) passed on rerun.

@devswha
devswha deleted the test/b5-missing-regressions branch November 24, 2026 00:50
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