You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(project-groups): keep mutations on their catalog owner - #34847
Renaming or deleting a project group must affect the computer that owns it, even when another computer is selected. A stale or ambiguous owner must not mutate another host with the same group or repository ID.
What Changed
Resolve the catalog row and its runtime target together before updates, deletion, or contained-project selection. Carry the resolved owner through reconciliation and reuse the existing host-qualified APIs. Retain collision, stale-host, subtree and member-removal regressions; duplicate tests already registered by main are not copied.
This is the focused project-group ownership contribution split from #14838 following the maintainer request: #14838 (comment). It does not replace the original PR's other contributions.
Why
The sidebar contains groups from multiple hosts. Resolving the row and destination as one operation prevents a focused runtime or a colliding identifier from selecting the wrong computer. This reuses existing ownership and runtime-target APIs rather than adding a new transport or host registry.
N/A — no layout change. Runtime routing and refusal behavior have automated store coverage; real SSH/paired-host interaction and human visual verification remain unverified.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Historical implementation validation recorded for this PR, not rerun by the 2026-10-29 description-only update:
Three focused routing/store files: 22 tests passed.
Production routing smoke: unstamped local ownership, ambiguous refusal, explicit remote selection and stale-host refusal passed.
Changed-code quality passed against ee09f979fac61fc5b1db4a528c9e3a20667b796f.
Native typecheck with two checkers passed.
The required check:changed aggregate was interrupted by disk exhaustion. It has no completed verdict and is not green.
Current-head full PR Checks and other GitHub Actions require maintainer approval and have not run their jobs. A successful auxiliary check is not the required full PR aggregate. Full-suite/build/platform validation, real SSH/paired-host execution and maintainer review remain separate gates. This PR stays Draft.
Risk
Level: High
Incorrect owner resolution could rename or delete a same-ID project group or repository on the wrong local, SSH, or paired host. Ambiguous or stale owners must fail closed. Revert the routing change to restore prior behavior; a revert cannot restore groups or repositories already changed by a user action.
AI Disclosure
AI-assisted implementation and validation. This description-format audit used OMP with openai-codex/gpt-6.1-sol. Jev was unavailable due to credential-read failure; no advisory verdict or personal contributor attestation is claimed.
Review
The change reuses host-qualified APIs and refuses missing or ambiguous owners instead of falling back to another host. No platform-specific shell command, path handling, public wire method or new dependency is introduced. Local, SSH and paired-host ownership are considered; real remote execution remains unverified. Mobile/runtime parity is not claimed from renderer-store tests. The routing lookup stays within the existing catalog operation; no new network or filesystem access is added. UI styling is unchanged. Tests cover identifier collisions and stale hosts, but do not replace real-host evidence.
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
GitHub: @kaluli123123. X (Twitter) handle: not provided. No release version change or draft promotion.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, user impact, mechanism and alternatives)
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security and performance (AI-assisted review above)
Cross-platform, SSH/remote, and path/shortcut impact considered
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
Current-main integration evidence
Published 15ef1ad209293898448f14766fd7533d9643153f with normal merge parents 627956ab19bb4093de25acd09a013258c7b5e37a and frozen main 2195eae58947313781a90ee6aa299a8c31f18d98; force: false. Exact remote tree 2058a55732edaaff32376fd91b4d8fe057fba456 and both parents were read back; the PR head matches. Git Database commits are unsigned; no Verified signature is claimed.
Integrated owner routing into the canonical batch-update/delete/contained-delete paths, preserving the mainline single-item-to-batch delegation and standard hostId API. Removed obsolete nullable-owner/focus-reconciliation routing instead of restoring it. Current main already preserves full owner records in the runtime owner index; that existing behavior was retained, not duplicated. Final contribution gate passed 37/37.
The final exact staged tree passed all selected changed-file checks.
Final ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --base=2195eae58947313781a90ee6aa299a8c31f18d98 --maxWorkers=2 --timeout=30:
check:changed: 7 changed file(s) since 2195eae58947313781a90ee6aa299a8c31f18d98 (2195eae589); running 37 check(s).
✓ 37 check(s) passed in 261.0s.
This is the selected changed-file contribution gate, not an independent full-repository/native release build. Earlier local results are historical evidence for their named trees, not current-main integration proof. No source conflict was hidden by an obsolete transport/shim or forced ref update.
Exact-head required PR checks passed and applicable real-host/platform/interaction evidence remain separate gates. Upstream permissions are pull-only; only maintainers can approve gated workflows or merge. No real SSH/WSL/phone verification, human manual-testing attestation, or new rendered before/after screenshots are claimed by this integration. No configured SSH hosts are available; no arbitrary or paid hosts were used. The PR remains open and preserves its draft status, if any, pending the actual gates.
Integrate main 6568e88. Both branches extended the owner-index test imports and first describe case; retain the full project-group owner/type contract alongside upstream legacy-local and paired-host collision coverage.
The resolved catalog owner always supplies a concrete host before member removal. Remove the obsolete nullable-owner branch and impossible empty-host condition rather than weakening the max-lines gate.
Prune only the owner mutation file from two focus reads to one after removing the unreachable fallback. Preserve all other baseline allowances and ordering.
Resolved the newer-main conflict and published the integration at 16efc88.
The conflict was an overlapping import/first-test addition in worktree-runtime-owner-index.test.ts. Both contracts are retained: this PR's full project-group owner/type regression and main's legacy-local, paired-runtime/physical-host alias and collision coverage. Main through 48eca8c765592cbc365c19fc84a8c40f803e62d9 is an ancestor of the tested head; the owner-routing production contribution remains intact.
Validation found an over-limit mutation file. Removed the unreachable focused-host fallback: the resolved catalog owner already provides a concrete host. The focus-read allowance was then tightened from 2 to 1 for that file only. No guard, gate or test assertion was weakened.
Final focused run: all 23 tests in the three owner-index/deletion/owner-routing suites passed. The complete required pnpm check:changed --base=48eca8c765592cbc365c19fc84a8c40f803e62d9 --maxWorkers=2 selected exactly 8 contribution files and passed all 29 checks, including affected unit tests, configured Node/web typechecks, formatting, lint, changed-code quality, localization and ratchets. git diff --check passed.
A standalone Node smoke executed the bundled production routing, member-selection, deletion-reconciliation and owner-index functions: ambiguous/stale owners were refused; explicit local/remote owners selected the expected target; the same-ID sibling-host group/repo survived; legacy-local and paired-host alias lookup remained valid. This is library-level runtime evidence, not a desktop UI or real SSH transport test.
Immediately before push, a merge-tree check against fetched main b28f54c5f33c03aaead56d8cbf1cd10d5bfc4a77 was clean. GitHub now reports this exact published head as mergeable, rather than conflicting.
The PR remains Draft. Exact-head PR Checks is still action_required with no executed required jobs: https://github.com/stablyai/orca/actions/runs/40845670517. Maintainer workflow approval, full current-head CI, review/merge authority and unexercised real-host/platform validation remain separate gates. The changed-path gate is not a claim that standalone full-repository lint/test/build or real SSH/paired-server/Linux/Windows/mobile validation was newly completed.
Updated in 627956ab19. This integrates pinned main 957a82359ea815361dbf8a46cad561bcce3bd649 with normal merge ancestry. The published commit SHA and file tree exactly match the locally checked commit; no existing history was rewritten.
Resolved the modify/delete conflict with main by retaining only the new host-qualified full-record/type regression; the low-value baseline fixtures removed upstream were not restored. The catalog owner routing and same-ID sibling-host protection remain intact.
Verification in this maintenance pass: 19 focused tests and a bundled production owner-index/mutation-routing smoke (10 assertions) passed. The final correct-base check:changed passed all 30 non-unit gates; affected unit selection reached the five-minute deadline without a terminal verdict. No aggregate/full-suite pass is claimed.
The current required Risk disclosure was also added to the description without changing existing human-testing/visual/CI attestations. Full repository/native packaging, real Windows/Linux/SSH or physical-phone validation where applicable, successful exact-head full PR Checks, and upstream maintainer permissions remain separate gates. No merge or closure was performed.
Published 15ef1ad209293898448f14766fd7533d9643153f with normal merge parents 627956ab19bb4093de25acd09a013258c7b5e37a and frozen main 2195eae58947313781a90ee6aa299a8c31f18d98; force: false. Exact remote tree 2058a55732edaaff32376fd91b4d8fe057fba456 and both parents were read back; the PR head matches. Git Database commits are unsigned; no Verified signature is claimed.
Integrated owner routing into the canonical batch-update/delete/contained-delete paths, preserving the mainline single-item-to-batch delegation and standard hostId API. Removed obsolete nullable-owner/focus-reconciliation routing instead of restoring it. Current main already preserves full owner records in the runtime owner index; that existing behavior was retained, not duplicated. Final contribution gate passed 37/37.
The final exact staged tree passed all selected changed-file checks.
Final ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --base=2195eae58947313781a90ee6aa299a8c31f18d98 --maxWorkers=2 --timeout=30:
check:changed: 7 changed file(s) since 2195eae58947313781a90ee6aa299a8c31f18d98 (2195eae589); running 37 check(s).
✓ 37 check(s) passed in 261.0s.
This is the selected changed-file contribution gate, not an independent full-repository/native release build. Earlier local results are historical evidence for their named trees, not current-main integration proof. No source conflict was hidden by an obsolete transport/shim or forced ref update.
Exact-head required PR checks passed and applicable real-host/platform/interaction evidence remain separate gates. Upstream permissions are pull-only; only maintainers can approve gated workflows or merge. No real SSH/WSL/phone verification, human manual-testing attestation, or new rendered before/after screenshots are claimed by this integration. No configured SSH hosts are available; no arbitrary or paid hosts were used. The PR remains open and preserves its draft status, if any, pending the actual gates.
Merged current main (075b631fd9d80df5c289118c3c18acc4f3247524) in 65b892d. The only conflicts were relocated import paths in project-group-batch-update.ts and project-group-owner-routing.ts; the owner-routing change is unchanged. Validation: vitest src/renderer/src/store/project-groups/ (13 passed), tc:node/tc:web and the changed-code quality gate passed.
No actionable comments were generated in the recent review.
Walkthrough
Project-group mutations now resolve the owner host and runtime target together. Batch updates use typed owner host IDs and restrict the local-owner fallback to catalog-host repos. Group deletion returns failure when routing is unavailable, and contained-project removal selects captured member host IDs. The documentation describes same-computer group membership and preservation of project host identity during group changes.
Merge Risk: Moderate · up to a5b75
Project-group updates now follow the group's owner host, and ambiguous owners fail closed. The earlier concern remains open that a same-ID local group and ssh-owned group can still be confused by the local update transport. Resolve or explicitly accept that before merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(project-groups): keep mutations on their catalog owner" matches the main change in the changeset. The summaries show project-group mutations (rename, delete, contained-project removal, …
Description check
The description follows the repository template and fills in most required sections: ELI5, What Changed, Why, Linked Issue (#14849), Visual Proof (N/A with reason), Testing, Performance ("None, becaus…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(project-groups): keep mutations on their catalog owner" matches the main change in the changeset. The summaries show project-group mutations (rename, delete, contained-project removal, batch updates) now resolve the target and owner host together via resolveProjectGroupMutationTarget, so mutations stay on the catalog owner. The title is concise, specific, and follows a conventional-commit style.
Full details: Description check
Explanation
The description follows the repository template and fills in most required sections: ELI5, What Changed, Why, Linked Issue (#14849), Visual Proof (N/A with reason), Testing, Performance ("None, because" is left unfinished), Risk (High, with a rollback path), AI Disclosure, Review, Agent skill boundary, and Notes. The Performance section is incomplete because the sentence after "None, because" is not finished. The Testing checklist leaves the manual test box unchecked, and the final checklist item for lint/typecheck/test/build is unchecked. The description also contains a large amount of historical and process narrative (integration commits, interrupted check runs, PR-split history) that does not describe the change itself. The mechanism and user-facing before/after are described only briefly. Because most required sections are present, the description is mostly complete, so the check passes, but the author should finish the Performance sentence and clarify the Testing status.
Resolution
Complete the Performance section by finishing the sentence after "None, because" (for example, state that the change only runs on project-group mutations and adds no extra reads or work). Clarify the Testing section about which validation gates have actually run on the current head, and tidy the historical integration notes so the description focuses on the current change.
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.
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: ff1ab94c-dbcc-4218-8333-d33620c3fff4
Commits
Reviewing files that changed from the base of the PR and between 63dba54 and a5b75f8.
Files selected for processing: 1
config/focus-setting-read-baseline.txt
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Major · Route owner-qualified project-group writes by owner, not by… · project-group-batch-update.ts:33
src/renderer/src/store/project-groups/project-group-batch-update.ts:33 Major · Data Integrity & Integration · Heavy lift
Route owner-qualified project-group writes by owner, not by id alone.
An update for an ssh: owned group routes through the local transport. The local IPC handlers and updateProjectGroup/updateProjectGroups select rows by groupId only. If a local group shares that id, the update can change the local row. A batch that contains both owners' updates can apply both to one stored object.
Pass the owner host through the single-update and batch IPC arguments. The local store must select the row by (id, owner). Map the response back to the same owner key. Until then, do not route a non-local owner through the local transport.
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: 9a6ea8d8-e583-4b4d-bc61-f914925690f6
Commits
Reviewing files that changed from the base of the PR and between 65b892d and 63dba54.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
Upstream 2cffded ("test: cut the suite to the tests that guard real
invariants") deleted both project-group store test files this branch had
modified. Accept those deletions; they covered store/IPC wiring, which
the rewritten AGENTS.md testing rule no longer wants committed. The
catalog-owner routing fix itself is unchanged.
Refreshed against current main (c354ab30ce7d615add5cbcbaae6b6ff8f3b51bdc); new head is a5b75f8a2b3.
Conflicts and how they were resolved
Both conflicts were modify/delete against 2cffdeda72c ("test: cut the suite to the tests that guard real invariants", #46786), which deleted ~93% of the suite and rewrote the AGENTS.md testing rule:
src/renderer/src/store/project-groups/repos-project-groups-delete.test.ts — accepted the upstream deletion.
src/renderer/src/store/project-groups/repos-project-groups-owner-routing.test.ts — accepted the upstream deletion.
Both files were renderer store/IPC routing tests driven through a store fixture, which the new rule lists as the kind of test to delete rather than update. The owner-routing fix itself (resolveProjectGroupMutationTarget, the batch-update and mutation call sites, and the config/focus-setting-read-baseline.txt decrement) is unchanged; config/focus-setting-read-baseline.txt merged cleanly and still carries this branch's 2 -> 1 entry for project-group-mutations.ts.
Validation on the merge commit
pnpm tc — clean (all projects).
node config/scripts/static-analysis/ratchets/renderer-state/check-focus-read-ratchet.mjs — Focus-read ratchet OK — 800 read(s).
npx oxlint and npx oxfmt --check on the files this branch changes — no findings.
State after the push
mergeable: MERGEABLE, mergeStateStatus: CLEAN; the clean check passed.
This branch has not been deployed
No deployments
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
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.
ELI5
Renaming or deleting a project group must affect the computer that owns it, even when another computer is selected. A stale or ambiguous owner must not mutate another host with the same group or repository ID.
What Changed
Resolve the catalog row and its runtime target together before updates, deletion, or contained-project selection. Carry the resolved owner through reconciliation and reuse the existing host-qualified APIs. Retain collision, stale-host, subtree and member-removal regressions; duplicate tests already registered by main are not copied.
This is the focused project-group ownership contribution split from #14838 following the maintainer request: #14838 (comment). It does not replace the original PR's other contributions.
Why
The sidebar contains groups from multiple hosts. Resolving the row and destination as one operation prevents a focused runtime or a colliding identifier from selecting the wrong computer. This reuses existing ownership and runtime-target APIs rather than adding a new transport or host registry.
Linked Issue
#14849
Visual Proof
N/A — no layout change. Runtime routing and refusal behavior have automated store coverage; real SSH/paired-host interaction and human visual verification remain unverified.
Testing
Historical implementation validation recorded for this PR, not rerun by the 2026-10-29 description-only update:
ee09f979fac61fc5b1db4a528c9e3a20667b796f.check:changedaggregate was interrupted by disk exhaustion. It has no completed verdict and is not green.Current-head full PR Checks and other GitHub Actions require maintainer approval and have not run their jobs. A successful auxiliary check is not the required full PR aggregate. Full-suite/build/platform validation, real SSH/paired-host execution and maintainer review remain separate gates. This PR stays Draft.
Risk
Level: High
Incorrect owner resolution could rename or delete a same-ID project group or repository on the wrong local, SSH, or paired host. Ambiguous or stale owners must fail closed. Revert the routing change to restore prior behavior; a revert cannot restore groups or repositories already changed by a user action.
AI Disclosure
AI-assisted implementation and validation. This description-format audit used OMP with
openai-codex/gpt-6.1-sol. Jev was unavailable due to credential-read failure; no advisory verdict or personal contributor attestation is claimed.Review
The change reuses host-qualified APIs and refuses missing or ambiguous owners instead of falling back to another host. No platform-specific shell command, path handling, public wire method or new dependency is introduced. Local, SSH and paired-host ownership are considered; real remote execution remains unverified. Mobile/runtime parity is not claimed from renderer-store tests. The routing lookup stays within the existing catalog operation; no new network or filesystem access is added. UI styling is unchanged. Tests cover identifier collisions and stale hosts, but do not replace real-host evidence.
Agent skill upstream boundary
Notes
GitHub: @kaluli123123. X (Twitter) handle: not provided. No release version change or draft promotion.
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)Current-main integration evidence
Published
15ef1ad209293898448f14766fd7533d9643153fwith normal merge parents627956ab19bb4093de25acd09a013258c7b5e37aand frozen main2195eae58947313781a90ee6aa299a8c31f18d98;force: false. Exact remote tree2058a55732edaaff32376fd91b4d8fe057fba456and both parents were read back; the PR head matches. Git Database commits are unsigned; no Verified signature is claimed.Integrated owner routing into the canonical batch-update/delete/contained-delete paths, preserving the mainline single-item-to-batch delegation and standard hostId API. Removed obsolete nullable-owner/focus-reconciliation routing instead of restoring it. Current main already preserves full owner records in the runtime owner index; that existing behavior was retained, not duplicated. Final contribution gate passed 37/37.
The final exact staged tree passed all selected changed-file checks.
Final
ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --base=2195eae58947313781a90ee6aa299a8c31f18d98 --maxWorkers=2 --timeout=30:This is the selected changed-file contribution gate, not an independent full-repository/native release build. Earlier local results are historical evidence for their named trees, not current-main integration proof. No source conflict was hidden by an obsolete transport/shim or forced ref update.
Exact-head required
PR checks passedand applicable real-host/platform/interaction evidence remain separate gates. Upstream permissions are pull-only; only maintainers can approve gated workflows or merge. No real SSH/WSL/phone verification, human manual-testing attestation, or new rendered before/after screenshots are claimed by this integration. No configured SSH hosts are available; no arbitrary or paid hosts were used. The PR remains open and preserves its draft status, if any, pending the actual gates.