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

Task 1 attach-user-session exceeds the 400–700 line estimate (tracking)

Open AkaraChen opened this issue 2 months ago • 0 comments

Summary

Parent: #470 / #466. Tracking only — not a follow-up implementation.

Issue #470 estimated 400–700 lines and required material scope growth to become a separate issue. The attach-user-session rewrite is larger because #470 also required CLI-equivalent default-socket resolution, herdr session list named-session reuse when the default socket is absent, live proof that a 2code-created workspace is visible on that XDG's default socket, inversion of the private 2code namespace tests/docs, and GUI connect_gui_herdr inheriting the ensured endpoint for CLI attach.

Approximate churn on task-1-attach-user-session vs task-3-prove-herdr-only (26a8b81): 825 insertions / 211 deletions (10 files).

What grew

  • src-tauri/crates/infra/src/herdr/process.rs (default-socket resolver, named-session list attach, fake + live tests)
  • src-tauri/crates/infra/src/herdr/transport.rs / terminal.rs (allow herdr.sock, refuse *-client.sock, drop --session 2code / takeover still refused)
  • src-tauri/crates/service/src/runtime.rs (GUI connect CLI attach follows the ensured endpoint; named-session GUI connect test)
  • Docs current-state sentences in docs/architecture.md, docs/configuration.md, docs/herdr-integration.md

The extra lines are tests and the socket/session switch #470 asked for. Production still does not implement Task 2 (version policy / prefer user binary / herdr update) or Task 3 (bidirectional e2e + sharing-contract rewrite).

Decision

Keep the extra evidence in Task 1. Splitting named-session GUI CLI attach or the live default-socket proof into a later issue would leave #470's acceptance criteria unproven.

Do not fold Task 2 or Task 3 into task-1-attach-user-session. No production work belongs on this tracking issue.

AkaraChen avatar Sep 17 '26 05:09 AkaraChen