Skip to content

fix: preserve remote session identity across session restore paths#1319

Closed
wsp1911 wants to merge 1 commit into
GCWing:mainfrom
wsp1911:main
Closed

fix: preserve remote session identity across session restore paths#1319
wsp1911 wants to merge 1 commit into
GCWing:mainfrom
wsp1911:main

Conversation

@wsp1911

@wsp1911 wsp1911 commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

Preserve remote workspace identity across session-targeted agent flows and restore paths.

Fixes #

Type and Areas

Type:

bug fix / regression fix

Areas:

Rust core, desktop/Tauri, CLI, runtime ports, remote connect, web UI tests

Motivation / Impact

Remote sessions could lose their SSH identity when restored or queued through some internal paths, causing session history, cron/session tools, /init, manual compaction, fork context capture, or remote dialog turns to resolve against the wrong local/slugged storage path.

This PR makes remote session identity explicit across session workspace bindings, scheduler submissions, cron/session tools, remote dialog submissions, and persistence/session listing paths. Remote sessions now restore from resolved session storage directories, while logical workspace paths remain separate for tools and display.

It also updates the startup contract test to match the renamed thread-goal storage helper while preserving the no-restore read-only contract.

Verification

  • pnpm run fmt:rs
  • cargo test -p bitfun-core workspace_identity_ -- --nocapture
  • cargo check -p bitfun-core
  • pnpm --dir src/web-ui run test:run src/app/startup/startupPerformanceContract.test.ts
  • cargo check -p bitfun-desktop
  • git diff --check

Reviewer Notes

The main compatibility-sensitive change is the distinction between logical workspace paths and final on-disk session storage directories. Remote workspaces should continue to expose remote logical paths to tools/UI, but persistence and restore paths should use the resolved SSH mirror session directory.

Unresolved remote sessions intentionally stay under the dedicated unresolved remote session tree instead of falling back to local project slug storage.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

- remove legacy auto-memory prompt injection and workspace memory file context
- move AGENTS/CLAUDE instruction loading into a standalone instruction_context service
- drop workspace_memory_files from runtime contracts, custom agent serialization, and UI config
- remove obsolete memory storage path exposure from runtime layout and desktop storage API
@wsp1911 wsp1911 closed this Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant