fix: keep workspaces tied to repository identity - #993
Conversation
A repository route can be reassigned after a repository is removed or renamed. Route-keyed workspaces then reject the new repository even though the catalog already knows that it has a different stable identity. Persist the catalog repository ID on provider workspaces. Renames now retain their workspaces, and a later occupant of the old route gets an independent workspace namespace. Legacy rows stay route-keyed only when their ownership is unambiguous; otherwise the existing safety fence remains in place. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
This comment has been minimized.
This comment has been minimized.
Workspace listing resolved each stable repository with a nested read while the outer result rows still held a pool connection. Concurrent callers could consume every read connection and stop all list requests. Resolve the current repository route in the list query instead. Base-branch sync also acquired the reconciliation read lock again during repository verification. A queued writer could then block the nested read while the outer read prevented that writer from proceeding. Reuse the existing lock for verification. The existing rename and route-reuse tests now assert the stable workspace ownership introduced by this pull request. Review decision: the user marked route-keyed local Git storage as not an issue, so this commit makes no change for that finding. Source: roborev-ci comment #993 (comment). Generated with Codex Co-authored-by: Codex <noreply@openai.com>
This comment has been minimized.
This comment has been minimized.
Existing databases can contain the same repository item under both sides of a rename. Assigning both rows the same repository ID made the new unique index reject the migration and prevented startup. Keep the newest workspace and delete the older workspace as one unit instead of extending legacy route support. Background pull request association and pushed-head refreshes also resolved mutable routes after loading a workspace. A replacement repository could therefore receive work for the old workspace. Carry the stable repository ID through refresh operations and stop when that repository is inactive. Review source: #993 (comment) Generated with Codex Co-authored-by: Codex <noreply@openai.com>
This comment has been minimized.
This comment has been minimized.
Pushed-head work can wait in a background queue while a repository route is reassigned. A route-only refresh could then fetch data from the replacement repository and store it under the original workspace owner. Keep full and CI refreshes pinned to the stable repository ID, and discard results when the route fence changes. Migration timestamps have second-level precision. Use insertion order to choose the newer duplicate when timestamps tie, so migration cleanup does not depend on random workspace IDs. The base-branch lock regression now exercises the real caller in an isolated process. A future nested read-lock regression fails without hanging the test suite. Generated with Codex Co-authored-by: Codex <noreply@openai.com>
roborev: Combined Review (
|
Workspace creation now keys provider-backed workspaces by the stable catalog repository ID. Previously, a route that had been occupied by another repository was rejected even when the catalog knew the current occupant was different.