Skip to content

refactor(fork): move fork test cases out of upstream test files - #58

Merged
audichuang merged 2 commits into
developfrom
fork-refactor/tests-out-of-upstream
Oct 24, 2026
Merged

audichuang merged 2 commits into
developfrom
fork-refactor/tests-out-of-upstream

Conversation

@audichuang

Copy link
Copy Markdown
Owner

Summary

Upstream ships a release about daily and is busy rewriting and trimming its own tests. The fork had appended its cases to 28 upstream test files, so every rebase risked a conflict there. Those cases now live in fork-owned siblings next to the upstream file:

 src/renderer/src/lib/
 ├── remap-open-editor-tabs-for-path-change.test.ts       # back to v1.4.239 content
+├── remap-open-editor-tabs-for-path-change.fork.test.ts  # the fork's 89 lines
  • 20 upstream test files are byte-identical to v1.4.239 again. The edits still in upstream files are where the fork deliberately changes upstream behaviour (Alt-only split, folder Source Control visibility, bound-owner reownership) or needs a mock line upstream's tests must have (dispose, ContextMenuShortcut, the gitWorktreeId census fill).
  • ci-closed-pr-caches.yml: the fork-pr target moves after pr-checks, so upstream's calls[0] assertion passes unchanged. The new fork test checks that the fork-pr.yml run is actually cancelled.
  • Two fork-added *-fork.test.ts files renamed to *.fork.test.ts. FORK.md says where fork cases for an upstream module go.

Evidence

  • Before: git diff --numstat v1.4.239 HEAD --diff-filter=M | grep -E '\.(test|spec)\.' → 28 files, +790/−58
    After: 8 files, +70/−47. 34 of those lines are in the two files left alone on purpose (terminal-file-link-target.test.ts, whose fork commit 078ffe8 drops on the next rebase, and the workspace-layout-fact-locations census).
  • Test count: 276 → 278, all pass. The two extra come from fork assertions that were split out of upstream tests into their own cases.
  • The moved tests still catch breakage. 4 mutations by the writer and 7 by Codex: each broke the covered fork behaviour and the sibling went red at the expected line, e.g. suppressing missingSides, dropping the launch-cwd override, dropping gitWorktreeId forwarding in preview-open, or omitting the persisted git owner.
  • discoverUnitFiles() collects all 25 siblings. Six upstream workflow-reading tests pass. pnpm tc:web, pnpm tc:node and check:code-quality:changed v1.4.239 exit 0.
  • Review: one Claude reviewer (no blockers) and Codex (VERDICT: ACCEPTABLE). make fork-check-full was not run: the change is test-only plus one workflow reorder, and Fork CI's full suite is the gate.

Merge Danger

Door: two-way

Blast Radius: tests

No production code changes. The workflow reorder doesn't change which runs get cancelled. One difference: a 503 on the pr-checks lookup now stops the step before it reaches the fork-pr run, where before the fork run was cancelled first.

🤖 Generated with Claude Code

audichuang and others added 2 commits October 25, 2026 06:51
…ings

Daily rebases onto upstream conflicted in upstream test files the fork had
appended to. Fork-added cases now live in fork-owned <basename>.fork.test.*
files beside them, and 20 upstream test files are back to v1.4.239.

- restored-editor-same-workspace-reown: the two rewritten upstream cases stay
  (deliberate fork behavior); the new unbound-folder case and the helper
  parameters it needs moved to the sibling.

- Append-only files: cases moved with the setup/mocks they need.
- right-sidebar-activity-visibility: upstream fixture still passes (the
  folder-workspace exception is flag-driven); fork behavior has its own case.
- ci-closed-pr-caches.yml: fork-pr-checks target moved after pr-checks so
  upstream's calls[0] assertion holds; the fork sibling also checks the
  fork run is cancelled.
- Kept minimal edits where fork behavior or production shape requires them:
  DiffSectionBody dispose mock, entry context menu ContextMenuShortcut mock,
  SourceControl preview Alt split, split-open modifiers, titlebar and the
  two restored-editor reown assertions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rule

- Rename the two fork-added -fork.test files to .fork.test; the other five
  -fork.test files ship with upstream v1.4.239 and keep their names.
- Drop the unused FILE_PATH and helper defaults from the restored-editor
  reown fork sibling.
- FORK.md: fork cases for an upstream module go in a .fork.test sibling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@audichuang
audichuang merged commit 48772ee into develop Oct 24, 2026
14 checks passed
audichuang added a commit that referenced this pull request Oct 25, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@audichuang
audichuang deleted the fork-refactor/tests-out-of-upstream branch October 25, 2026 01:53
audichuang added a commit that referenced this pull request Oct 25, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Oct 26, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Oct 27, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Oct 28, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Oct 29, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Oct 30, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 2, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 3, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 4, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 5, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 5, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 6, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 7, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 8, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 8, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 10, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 10, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 12, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 13, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 14, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 16, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 18, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 18, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 19, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 20, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 20, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 20, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
audichuang added a commit that referenced this pull request Nov 21, 2026
…am list

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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