Local-flag delete of unmapped leftover extras can git-remove a Herdr-open checkout
Summary
Parent: #445 / #436 Task 5. Found while reviewing task-5-stop-profile-mappings. Closed by deleting the Local-flag path on task-9-delete-local-pty (commit 89191e6). Close this issue when that branch lands.
Task 5 imported leftover sqlite extras with JSON worktree.open and did not write profile_runtime_mappings. Local-flag GUI delete treated a leftover mapping as a dual-ownership lock, but unmapped leftover extras could still git worktree remove a checkout open in live Herdr.
#452 required finishing this by deleting TWOCODE_RUNTIME=local rather than adding a live-path Local-delete lock.
Implemented on task-9-delete-local-pty
TWOCODE_RUNTIME=local/--twocode-runtime=localandLocalAdapterare gone- There is no Local-flag
delete_sqlite_identity→cleanup_profile→git worktree removepath - Production
RuntimeRouteris Herdr-only; Herdr-down fail-closes without a Local spawn
Do not treat remaining Local-flag delete-lock work as open. Task 10 launch/adopt is unrelated.
Verified on tip task-1-verify-gaps (stacked on task-10-launch-adopt / 52d77d5). The Local-flag delete path is gone; this is not a live git worktree remove of a Herdr-open checkout.
src-tauri/crates/service/src/runtime.rs:1045-1055production_source_has_no_local_pty_runtime: production has noLocalAdapter,TWOCODE_RUNTIME, orsrc/runtime/local.rs.src-tauri/crates/service/src/runtime.rs:845-847herdr_gui_startup_wires_sidecar_without_local_fallback: same absences on the GUI connect path.src-tauri/crates/service/src/profile.rs:41delete_profile→delete_with_runtime→ Herdrworktree.remove/workspace.close. If Herdr leaves the checkout, it fail-closes:profile.rs:1035-1038"not using git worktree remove".- Tests:
herdr_without_client_does_not_git_worktree_remove,local_extras_delete_fails_closed_without_git_worktree_remove.
Closing: the named Local-flag delete defect cannot happen on this tip.