mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-10-22 22:31:45 +00:00
Question and permission recovery now follows the same ownership rule as prompts and live events, so a session working in a nested checkout of another repository no longer triggers "Question and permission recovery is incomplete", and its questions are recovered after a disconnection. ## Problem Observed on a live installation: - A session had been moved into `D:\CodeNomad\.codenomad\worktrees\prompt-replay-yield`. That directory is a worktree of a separate clone under `%TEMP%`, not of `D:\CodeNomad`. - Because the directory is inside the opened folder, the workspace manager owns it: CodeNomad lists the session, accepts prompts and routes its live events. - The pending-request broker additionally required the candidate to share the workspace's Git common directory. - While the session was idle, its directory was an optional hint and was excluded. - As soon as it worked, the directory became required and was rejected with `403 Directory does not belong to workspace`. - Two liveness passes later the warning appeared. The first live episode matches to the minute: the session became active at 21:26:47 UTC and the warning followed at 21:27. - Any question that session asked while CodeNomad was closed or disconnected could not be recovered. A read-only probe against the running app reproduced both answers: - required: 403 "Directory does not belong to workspace"; - optional: `excluded`; - a registered worktree used as a control: `ok` in both cases. ## Change - `pending-requests.ts` no longer adds a same-repository requirement on top of the workspace manager's ownership. A candidate owned by the manager is read. - **Repository-change fence kept:** each candidate's own Git common directory is recorded at admission and must be unchanged after the RPC. - **Unowned paths unchanged:** sibling clones and unowned historical hints are still excluded or reported as errors exactly as before. - **Dead code removed:** owned directories can no longer be "outside" exclusions, so the identity fields of those exclusions are gone. ## Tests - New manager test with the real `WorkspaceManager`: a worktree of an independent clone placed in `.codenomad/worktrees` is owned for both request and event purposes, under the root's worktree identity (so the root deletion fence covers it). - New route regression: - an owned nested checkout of another repository returns its permissions and forms; - removing its `.git` during the RPC withholds coverage. - On the previous code it fails with exactly the live 403. - Updated the tests that encoded the old rule: - an unowned historical clone is still excluded and never queried; - once owned it is scanned; - an owned candidate whose identity becomes blocked during the read still reports `error`. - Results: `pending-requests.test.ts` 40/40; `manager`, `instance-event-ownership` and `instance-proxy` tests 101/101; server typecheck clean. ## Follow-ups (separate PRs) - Make the warning state its cause and workspace. - Treat the server's compaction deferral (503 `Pending discovery deferred`) as a deferral in the UI rather than a failure. |
||
|---|---|---|
| .. | ||
| architecture.md | ||
| BROWSER_AUTOMATION.md | ||
| BROWSER_DEVICE_EMULATION.md | ||
| CACHE_REFRESH_CONVENTIONS.md | ||
| DESKTOP_DATA_PROFILES.md | ||
| DEVELOPER_MODE.md | ||
| FILES_PANEL.md | ||
| HOTKEYS.md | ||
| INDEX.md | ||
| MISSIONS.md | ||
| MISSIONS_AUTONOMOUS_PLUGIN_REQUIREMENTS.md | ||
| MISSIONS_CONTINUITY_CONTRACT.md | ||
| MISSIONS_ENVIRONMENT_ADMISSION.md | ||
| MISSIONS_FAMILY_AUTHORITY.md | ||
| MISSIONS_HUMAN_ANSWER_RECEIPTS.md | ||
| MISSIONS_NATIVE_PRODUCT_ACCEPTANCE.md | ||
| MISSIONS_RECURRING_SIMPLE.md | ||
| MISSIONS_RECURRING_SIMPLE_QUALIFICATION.md | ||
| MISSIONS_REFACTOR_VALIDATION.md | ||
| MISSIONS_SESSION_RECOVERY.md | ||
| MISSIONS_WATCHED_SOURCES.md | ||
| NATIVE_INTERRUPTION_UX.md | ||
| OPENCODE_V2_COMPATIBILITY.md | ||
| OPENCODE_V2_POST_BETA.md | ||
| PALETTE_SOURCES.md | ||
| PANEL_EXTENSIONS.md | ||
| PLUGIN_ACTIVATION_CONTROLS.md | ||
| PROVIDER_ACCOUNTS_UX_PLAN.md | ||
| REMOTE_CONTROL.md | ||
| RUNTIME_MAINTENANCE.md | ||
| SESSION_ENVIRONMENT.md | ||
| SESSION_HISTORY_NAVIGATION.md | ||
| SESSION_HISTORY_QUERIES.md | ||
| SESSION_PRUNING_RPC.md | ||
| SESSION_PRUNING_SAFETY.md | ||
| solidjs-llms.txt | ||
| TAURI_UPDATER.md | ||
| USER_HELP.md | ||
| WORKTREE_SESSION_PLACEMENT.md | ||