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

leftover_sqlite_id can pin New Tab pty_sessions.profile_id to a leftover sqlite UUID

Open AkaraChen opened this issue 2 months ago • 1 comments

Summary

Parent: #445 / #436 Task 6. Found while reviewing task-5-stop-profile-mappings. Closed by Task 6 session-store rewrite on task-6-herdr-session-store (commit ea94b3b) and leftover sqlite UUID removal on task-8-drop-profiles (commit 7c4e947). Task 9 on task-9-delete-local-pty DROPped pty_sessions (commit 89191e6) as leftover-table cleanup. Close this issue when task-9-delete-local-pty lands.

leftover_sqlite_id used to pin New Tab pty_sessions.profile_id to a leftover sqlite UUID when the GUI workspace_id was not find_by_id. After Task 6, tabs restore from session.snapshot / pane_id. After Task 8, sqlite profiles is absent.

Implemented

  • Task 6: New Tab / list use live Herdr pane_id; no leftover sqlite profile FK
  • Task 8: sqlite profiles DROPped
  • Task 9: sqlite pty_sessions DROPped; PtySessionRecord is a derived GUI DTO

Do not treat remaining leftover-UUID session pinning as open. Do not add profile_runtime_mappings back as the session join.

AkaraChen avatar Sep 16 '26 06:09 AkaraChen

Verified on tip task-1-verify-gaps. leftover_sqlite_id and sqlite pty_sessions are gone. New Tab / list use live pane_id; profile_id is workspace_id.

  • src-tauri/crates/service/src/runtime/herdr.rs:2398 asserts leftover_sqlite_id absent from production source.
  • herdr.rs:780-783 session_record_from_pane: id is pane.pane_id, profile_id is pane.workspace_id.
  • herdr.rs:872-902 create_session: tab.create returns pane_id as session_id.
  • Tests: list_reattaches_live_pane_without_restore_or_tab_create (listed[0].id == "w1:p1", profile_id == "w1"), create_session_unmapped_linked_returns_pane_id_not_sqlite_fk, list_omits_leftover_sqlite_pty_sessions.
  • src-tauri/tests/integration_pty_db.rs pty_sessions_table_is_dropped.

Closing: the leftover sqlite UUID cannot pin New Tab profile_id on this tip.

AkaraChen avatar Sep 16 '26 19:09 AkaraChen