[Bug]: session metadata can be written to and read from different directories under CI tempdirs
- Dominant language
- Rust
- Stars
- 2.2k
- Forks
- 229
- Avg merge
- 2h 46m
- Merged PRs (30d)
- 577
Description
## Summary
Session creation persisted session metadata through an already-resolved sessions_dir while the load/update path fed the raw workspace root; the two chains re-enter project_sessions_dir through its is_resolved_sessions_dir branch, which depends on dunce::canonicalize and diverges on CI /tmp tempdirs, so metadata was written to a directory the reader never checks.
Fix: feed the raw workspace root to the persistence layer for local workspaces (remote workspaces keep the mirror-resolved path), making project_sessions_dir the single source of truth for both chains.
## Area
src/crates/assembly/core/src/agentic/session/session_manager.rs (create chain + metadata workspace path selection). Crate: bitfun-core.
## Reproduction or evidence
At 32f2427697, the create chain passes session_storage_path to create_session_if_absent (session_manager.rs, create block ~:2778); is_resolved_sessions_dir branch present (~:1113/:1149). Under CI tempdirs the canonicalize-resolved branch diverges from the raw-root branch → persist/read land in different directories → ubuntu CI flaky.
## Environment
ubuntu/macos CI runners (tempdir /tmp volatility); baseline 32f2427697. The ubuntu flaky face cannot be reproduced locally on a Windows host → verified via remote CI Rust Build Check(ubuntu) + CLI Tests(ubuntu) runs.
---
AI-assisted change. Testing: verified locally (`cargo check` exit 0; `cargo test --features agent-runtime session_manager::tests` 137 passed, 0 failed); ubuntu flaky face covered by remote CI runs.
Contributor guide
Research direction
Start in src/crates/assembly/core/src/agentic/session/session_manager.rs, especially the create block around line 2778 and the is_resolved_sessions_dir branches around lines 1113 and 1149. Trace how local and remote workspace paths reach project_sessions_dir, then run cargo test --features agent-runtime session_manager::tests and cargo check. Done means session metadata is written and read from the same directory under CI tempdirs without regressing the reported passing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100