2code icon indicating copy to clipboard operation
2code copied to clipboard

Local-flag delete of unmapped leftover extras can git-remove a Herdr-open checkout

Open AkaraChen opened this issue 2 months ago • 1 comments

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=local and LocalAdapter are gone
  • There is no Local-flag delete_sqlite_identity → cleanup_profile → git worktree remove path
  • Production RuntimeRouter is 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.

AkaraChen avatar Sep 16 '26 06:09 AkaraChen

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-1055 production_source_has_no_local_pty_runtime: production has no LocalAdapter, TWOCODE_RUNTIME, or src/runtime/local.rs.
  • src-tauri/crates/service/src/runtime.rs:845-847 herdr_gui_startup_wires_sidecar_without_local_fallback: same absences on the GUI connect path.
  • src-tauri/crates/service/src/profile.rs:41 delete_profile → delete_with_runtime → Herdr worktree.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.

AkaraChen avatar Sep 16 '26 19:09 AkaraChen