Skip to content

refactor: group source-control modules by Git operation - #41812

Merged
nwparker merged 1 commit into
mainfrom
module-layout-v2/source-control-owner-layout-cc29
Nov 13, 2026
Merged

nwparker merged 1 commit into
mainfrom
module-layout-v2/source-control-owner-layout-cc29

Conversation

@nwparker

@nwparker nwparker commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

ELI5

Group source-control code by the Git operation it owns, so comparisons, diffs, status, upstream tracking, mutations, and submodules are easier to find.

Files Added Deleted Net
Test 50 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​125 $\color{#cf222e}{\Huge{\mathbf{−}}}$​356 $\color{#cf222e}{\Huge{\mathbf{−}}}$​231
Prod 69 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​321 $\color{#cf222e}{\Huge{\mathbf{−}}}$​301 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20

What Changed

  • Move 75 files into nine concrete domains; retain eight substantive cross-domain owners at the root.
  • Update callers and test mocks to import each defining owner directly. Preserve production bodies, import order, cache identity, cancellation, native/WSL/SSH routing, and filesystem behavior.
  • Re-key the affected test timing entries, existing lint debt identities, and the diff benchmark path.
  • Apply repository test policy to nine affected registrations, including two whole test files. Preserve 159 retained registrations as whole callbacks; no replacement-coverage claim.

Why

Related Git operations were spread across a flat directory. Existing module boundaries already express their responsibilities, so grouping those modules improves navigation without adding barrels, compatibility aliases, or new implementation layers.

Linked Issue

Internal cleanup tracker; no pre-existing issue.

Visual Proof

N/A — module layout and import paths change without a UI or interaction change.

Testing

macOS local validation:

  • pnpm tc passed.
  • Scoped oxlint and oxfmt --check passed.
  • Existing owning tests: 47 files passed, 538 tests passed, one skipped (--maxWorkers=2). Includes the runtime registration driver for the affected spec fragments.
  • Final rebased-head ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed: all 34 checks passed (550.2 seconds), including broader affected unit tests.
  • pnpm check:code-quality:changed origin/main: passed with zero new findings across 100 changed code files.

Hosted CI will cover build and platform checks. No rendered UI flow changed.

No tests added; existing tests follow repository test policy.

Risk

Level: Medium. A missed import or path selector could break a Git operation, especially on Windows, WSL, or SSH hosts. Exact production comparisons, direct-owner resolution, typechecking, focused tests, and hosted platform checks cover those boundaries. No saved-data migration; a plain revert restores the previous layout.

Review

Independent source/boundary and test/support/metadata audits passed against the actual parent. Separate post-format and rebase audits confirmed complete AST preservation, unchanged import ordering and binding identity, and preservation of all incoming main changes. Mechanical residue is fully adjudicated as path metadata, policy retirements, and import formatting. Detailed evidence and the cleanup tracker remain local.

Agent skill upstream boundary

  • Not applicable; no upstream skill-installer material copied or translated.

Checklist

  • One cohesive source-control ownership batch; direct imports without barrels.
  • Current-head local gates and independent actual-native audits complete.
  • Cross-platform, SSH, remote hosts, mobile, and folder workspaces considered.
  • No visual change; screenshots not applicable.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change updates Git source-control imports and callers to use reorganized subdirectories. It also updates test mocks, CI timing entries, baselines, and a benchmark candidate path. Several tests and one CI timing entry were removed. The summaries report no runtime logic changes in the import updates.

Merge Risk: Minimal · up to 225ea

This refactor moves source-control modules into operation-based folders and updates imports, mocks and tooling paths without changing behavior. No concrete breakage was found. The one point for the author is that several tests were removed, which the PR attributes to repository test policy.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the refactor and the main change: source-control modules are grouped by the Git operation they own. The raw summary confirms the bulk of the diff is directory moves with updated import…
Description check Passed The description follows the template sections: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Risk, AI Disclosure (left blank for a team member), Review, Agent skill upstream boundary, …
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 refactor and the main change: source-control modules are grouped by the Git operation they own. The raw summary confirms the bulk of the diff is directory moves with updated import paths for source-control modules into subdirectories such as mutations, status, diffs, comparisons, ignores, submodules, and upstream. The title is specific and short, and it does not use vague wording.

Full details: Description check

Explanation

The description follows the template sections: ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Risk, AI Disclosure (left blank for a team member), Review, Agent skill upstream boundary, Notes, and Checklist. It explains the before and after, the mechanism, the rationale, the risk level, and the rollback path. Gaps: the Linked Issue section says there is no pre-existing issue, but the template requires an actual issue for outside contributors, and the Testing checkboxes are not ticked. The Notes section is retained from the template. The Review section relies on local evidence that reviewers cannot inspect. The 'Why' section does not explain why the chosen layout beats other options in much depth.

Resolution

Consider adding a concrete issue link under Linked Issue (or confirming it is an internal maintainer case), ticking the Testing checkboxes that apply, and briefly stating the alternatives considered in the Why section.

  • 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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 92aa08c1-9a66-4c50-b962-e3d63b1b8d03
Commits

Reviewing files that changed from the base of the PR and between 57dbdf8 and 225ead2.

Files selected for processing: 119

  • config/flaky-test-pattern-baseline.txt
  • config/main-sync-fs-baseline.txt
  • config/scripts/ci/sharding/ci-shard-timings.json
  • config/scripts/performance/source-control/git-diff-blob-concurrency-benchmark.mjs
  • src/main/git/source-control/comparisons/branch-change-entries.ts
  • src/main/git/source-control/comparisons/branch-change-list-cache-real-git.test.ts
  • src/main/git/source-control/comparisons/branch-change-list-cache.ts
  • src/main/git/source-control/comparisons/branch-compare.ts
  • src/main/git/source-control/comparisons/branch-diff.ts
  • src/main/git/source-control/comparisons/commit-compare.ts
  • src/main/git/source-control/comparisons/commit-diff.ts
  • src/main/git/source-control/comparisons/commit-pair-cache.ts
  • src/main/git/source-control/comparisons/compare-ref-oids.ts
  • src/main/git/source-control/comparisons/status-branch-compare-real-ref.test.ts
  • src/main/git/source-control/diffs/blob-absence-real-git.test.ts
  • src/main/git/source-control/diffs/diff-result.ts
  • src/main/git/source-control/diffs/diff-textconv-real-git.test.ts
  • src/main/git/source-control/diffs/diff-too-large-real-git.test.ts
  • src/main/git/source-control/diffs/file-diff.ts
  • src/main/git/source-control/diffs/git-blob-read.ts
  • src/main/git/source-control/diffs/staged-rename-diff-real-git.test.ts
  • src/main/git/source-control/diffs/status-diff.test.ts
  • src/main/git/source-control/diffs/status-test-harness.ts
  • src/main/git/source-control/diffs/textconv-driver.ts
  • src/main/git/source-control/drive-checkout/drive-checkout-suspect-paths.test.ts
  • src/main/git/source-control/drive-checkout/drive-checkout-suspect-paths.ts
  • src/main/git/source-control/drive-checkout/drive-checkout-suspect-status.ts
  • src/main/git/source-control/drive-checkout/drive-checkout-suspect-writes.ts
  • src/main/git/source-control/git-read-cache-invalidation.ts
  • src/main/git/source-control/git-upstream-status-read-owner.test.ts
  • src/main/git/source-control/ignores/check-ignored-paths.ts
  • src/main/git/source-control/ignores/huge-folder-ignore.test.ts
  • src/main/git/source-control/ignores/huge-folder-ignore.ts
  • src/main/git/source-control/input-stamps/deadline-bounded-stamp.ts
  • src/main/git/source-control/input-stamps/gitattributes-stamp-paths.ts
  • src/main/git/source-control/input-stamps/stamped-git-config.ts
  • src/main/git/source-control/input-stamps/worktree-diff-stamp.ts
  • src/main/git/source-control/mutations/commit-changes.ts
  • src/main/git/source-control/mutations/complete-merge-real-git.test.ts
  • src/main/git/source-control/mutations/discard-changes.ts
  • src/main/git/source-control/mutations/git-conflict-operation.ts
  • src/main/git/source-control/mutations/stage-worktree-changes.test.ts
  • src/main/git/source-control/mutations/staged-commit-context.ts
  • src/main/git/source-control/mutations/staging-discard-index-safety.test.ts
  • src/main/git/source-control/mutations/staging.ts
  • src/main/git/source-control/mutations/status-discard-symlink.test.ts
  • src/main/git/source-control/mutations/status-pathspec-literals.test.ts
  • src/main/git/source-control/settled-diff-cache.ts
  • src/main/git/source-control/status/get-status-options.ts
  • src/main/git/source-control/status/porcelain-v1-records.test.ts
  • src/main/git/source-control/status/porcelain-v1-records.ts
  • src/main/git/source-control/status/status-branch-line-total-exec-contract.test.ts
  • src/main/git/source-control/status/status-branch-line-total-input.ts
  • src/main/git/source-control/status/status-branch-line-total-real-git.test.ts
  • src/main/git/source-control/status/status-branch-line-total-untracked-base.test.ts
  • src/main/git/source-control/status/status-cquoted-paths.test.ts
  • src/main/git/source-control/status/status-index-lock-wait.ts
  • src/main/git/source-control/status/status-line-stats-host-paths.test.ts
  • src/main/git/source-control/status/status-line-stats-renames-real-git.test.ts
  • src/main/git/source-control/status/status-line-stats.ts
  • src/main/git/source-control/status/status-porcelain-stream.ts
  • src/main/git/source-control/status/status-read-failure-real-git.test.ts
  • src/main/git/source-control/status/status-read.ts
  • src/main/git/source-control/status/status-shared-symlinks.test.ts
  • src/main/git/source-control/status/status-untracked-directories.ts
  • src/main/git/source-control/submodules/status-submodule.test.ts
  • src/main/git/source-control/submodules/submodule-diff.ts
  • src/main/git/source-control/submodules/submodule-gitlink-oid.ts
  • src/main/git/source-control/submodules/submodule-gitlink-pathspec-real-git.test.ts
  • src/main/git/source-control/submodules/submodule-paths.ts
  • src/main/git/source-control/submodules/submodule-restore-recurse-real-git.test.ts
  • src/main/git/source-control/submodules/submodule-restore-recurse.ts
  • src/main/git/source-control/submodules/submodule-status.ts
  • src/main/git/source-control/upstream/effective-upstream-status-cache.ts
  • src/main/git/source-control/upstream/effective-upstream-status-probe.ts
  • src/main/git/source-control/upstream/git-upstream-status-read-owner.ts
  • src/main/git/source-control/upstream/resolved-upstream-name-cache.ts
  • src/main/git/source-control/upstream/status-upstream-ref.test.ts
  • src/main/git/source-control/upstream/status-upstream-ref.ts
  • src/main/git/source-control/upstream/upstream-deferred-fork-remote-real.test.ts
  • src/main/git/source-control/upstream/upstream.test.ts
  • src/main/git/source-control/upstream/upstream.ts
  • src/main/git/worktrees/checkout/branch-switch-real-git.test.ts
  • src/main/git/worktrees/checkout/branch-switch-target-real-git.test.ts
  • src/main/git/worktrees/checkout/commit-actions-real-git.test.ts
  • src/main/git/worktrees/checkout/commit-actions.ts
  • src/main/git/worktrees/content-paths/worktree-include-file.ts
  • src/main/git/worktrees/content-paths/worktree-shared-directories.ts
  • src/main/ipc/filesystem/filesystem-git-commit-generation-handlers.ts
  • src/main/ipc/filesystem/filesystem-git-commit-handlers.ts
  • src/main/ipc/filesystem/filesystem-git-diff-handlers.ts
  • src/main/ipc/filesystem/filesystem-git-index-handlers.ts
  • src/main/ipc/filesystem/filesystem-git-status-handlers.ts
  • src/main/ipc/filesystem/filesystem-git-status-staging.test.ts
  • src/main/ipc/filesystem/filesystem-pull-request-linked-issue-lifetime.test.ts
  • src/main/ipc/filesystem/filesystem-wsl-stopped-distro-git.test.ts
  • src/main/ipc/filesystem/filesystem-wsl-stopped-distro-reads.test.ts
  • src/main/ipc/filesystem/filesystem.test.ts
  • src/main/ipc/filesystem/git-remote/compare-handlers.ts
  • src/main/ipc/filesystem/git-remote/sync-handlers.ts
  • src/main/ipc/workspace-cleanup/workspace-cleanup-document-lifetime.test.ts
  • src/main/ipc/workspace-cleanup/workspace-cleanup-execution-host-routing.test.ts
  • src/main/ipc/workspace-cleanup/workspace-cleanup-git-evidence.ts
  • src/main/ipc/worktrees/creation/worktree-base-directory-git-status-events.test.ts
  • src/main/ipc/worktrees/git/git-status-upstream-ref-watch-request.ts
  • src/main/providers/git/local-provider.ts
  • src/main/runtime/integrations/git/runtime-git-diff-commands.ts
  • src/main/runtime/integrations/git/runtime-git-generation-admission.test.ts
  • src/main/runtime/integrations/git/runtime-git-generation-commands.ts
  • src/main/runtime/orca-runtime-tests/repository-project-operations-part-02.spec.ts
  • src/main/runtime/orca-runtime-tests/runtime-test-module-registration.spec.ts
  • src/main/runtime/repositories/runtime-repository-issue-command.test.ts
  • src/main/source-control/hosted-review-creation-eligibility.test.ts
  • src/main/source-control/hosted-review-creation-git-state.ts
  • src/main/source-control/hosted-review-creation.test.ts
  • src/main/source-control/hosted-review-execution-host-routing.test.ts
  • src/main/workspace-hooks/issue-command-file.ts
  • src/main/workspace-hooks/issue-command-wsl-stopped-distro.test.ts
  • tests/tools/branch-line-total-renderer.test.mjs
Files with no reviewable changes: 2

  • src/main/git/source-control/git-upstream-status-read-owner.test.ts
  • tests/tools/branch-line-total-renderer.test.mjs

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

@nwparker
nwparker merged commit 2050d9f into main Nov 13, 2026
56 checks passed
@nwparker
nwparker deleted the module-layout-v2/source-control-owner-layout-cc29 branch November 13, 2026 04:41
audichuang added a commit to audichuang/orca that referenced this pull request Nov 14, 2026
…tests

Upstream stablyai#41322, stablyai#41475, stablyai#41350, stablyai#41437, stablyai#41812, stablyai#41772, stablyai#42063, stablyai#42093, stablyai#42107
and stablyai#21108 moved modules the fork imports or mocks; point fork code, fork tests
and the seam list at the new paths.
audichuang added a commit to audichuang/orca that referenced this pull request Nov 16, 2026
…tests

Upstream stablyai#41322, stablyai#41475, stablyai#41350, stablyai#41437, stablyai#41812, stablyai#41772, stablyai#42063, stablyai#42093, stablyai#42107
and stablyai#21108 moved modules the fork imports or mocks; point fork code, fork tests
and the seam list at the new paths.
audichuang added a commit to audichuang/orca that referenced this pull request Nov 18, 2026
…tests

Upstream stablyai#41322, stablyai#41475, stablyai#41350, stablyai#41437, stablyai#41812, stablyai#41772, stablyai#42063, stablyai#42093, stablyai#42107
and stablyai#21108 moved modules the fork imports or mocks; point fork code, fork tests
and the seam list at the new paths.
audichuang added a commit to audichuang/orca that referenced this pull request Nov 18, 2026
…tests

Upstream stablyai#41322, stablyai#41475, stablyai#41350, stablyai#41437, stablyai#41812, stablyai#41772, stablyai#42063, stablyai#42093, stablyai#42107
and stablyai#21108 moved modules the fork imports or mocks; point fork code, fork tests
and the seam list at the new paths.
audichuang added a commit to audichuang/orca that referenced this pull request Nov 19, 2026
…tests

Upstream stablyai#41322, stablyai#41475, stablyai#41350, stablyai#41437, stablyai#41812, stablyai#41772, stablyai#42063, stablyai#42093, stablyai#42107
and stablyai#21108 moved modules the fork imports or mocks; point fork code, fork tests
and the seam list at the new paths.
audichuang added a commit to audichuang/orca that referenced this pull request Nov 20, 2026
…tests

Upstream stablyai#41322, stablyai#41475, stablyai#41350, stablyai#41437, stablyai#41812, stablyai#41772, stablyai#42063, stablyai#42093, stablyai#42107
and stablyai#21108 moved modules the fork imports or mocks; point fork code, fork tests
and the seam list at the new paths.
audichuang added a commit to audichuang/orca that referenced this pull request Nov 20, 2026
…tests

Upstream stablyai#41322, stablyai#41475, stablyai#41350, stablyai#41437, stablyai#41812, stablyai#41772, stablyai#42063, stablyai#42093, stablyai#42107
and stablyai#21108 moved modules the fork imports or mocks; point fork code, fork tests
and the seam list at the new paths.
audichuang added a commit to audichuang/orca that referenced this pull request Nov 20, 2026
…tests

Upstream stablyai#41322, stablyai#41475, stablyai#41350, stablyai#41437, stablyai#41812, stablyai#41772, stablyai#42063, stablyai#42093, stablyai#42107
and stablyai#21108 moved modules the fork imports or mocks; point fork code, fork tests
and the seam list at the new paths.
audichuang added a commit to audichuang/orca that referenced this pull request Nov 21, 2026
…tests

Upstream stablyai#41322, stablyai#41475, stablyai#41350, stablyai#41437, stablyai#41812, stablyai#41772, stablyai#42063, stablyai#42093, stablyai#42107
and stablyai#21108 moved modules the fork imports or mocks; point fork code, fork tests
and the seam list at the new paths.
nwparker added a commit to yohangwak/orca that referenced this pull request Nov 24, 2026
…t phrases capitalized in automation run rows

The automation run, saved-automation, automation-result, event-row,
import-plan, import-done, and goal rows in the German UI fell back to
English because 148 keys under components.native-chat were missing from
de.json. Each new key sits after the sibling it follows in en.json.

Reused/reusedFrom run rows also lowercased the first letter of the event
phrase, which broke German nouns ("Erneut verwendet: kommentar") and
acronyms ("Reused cI failed"). Drop lowerFirst and let the template
carry the casing ("Reused: Comment on stablyai#41812").

Fixes stablyai#48097

Co-authored-by: Neil <[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.

1 participant