GCWing / GCWing/OpenBitFun

[Bug]: session metadata can be written to and read from different directories under CI tempdirs

Chiusa
#2,636 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Rust
Stelle
2.3k
Fork
231
Merge medio
2h 49m
PR unite (30g)
589

Descrizione

## 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.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust
Ambito
backend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Specificata chiaramente
Idoneità per principianti
75/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.