fix(reliability): state-management — document and partially fix concurrent state races
Neuron Soul CI / build (pull_request) Has been cancelled
Neuron Soul CI / build (pull_request) Has been cancelled
Issues addressed: - #2: Document session_index non-atomic RMW (engram node safe under new mutex) - #3: Document conv_history global race in handle_chat (session path unaffected) - #4: Scope session_continuity state key per session_id in layered_cycle - #5: Document active_imprint_id global race with fix path - #6: Fix next_bridge_id to use uuid_v4() for collision-free IDs - #7: Document session_hist_save delete-then-insert race - #8: Document /api/graph/edges engram_save race (fixed in el_runtime.c) - #10: Document agentic_conv_history global race in awareness loop Issues #1 (engram_global mutex) and #8 (atomic engram_save write-to-temp+rename) are fully fixed in el_runtime.c (committed to foundation/el repo separately). Issue #9 skipped — already fixed in PR #31.
This commit is contained in:
@@ -5,6 +5,10 @@
|
||||
|
||||
// imprint_current — returns the active imprint ID from state.
|
||||
// Falls back to "base" (bare Neuron, no suit) when nothing is loaded.
|
||||
//
|
||||
// TODO(reliability #5 — active_imprint_id is process-global): concurrent
|
||||
// imprint_load / imprint_unload calls from different sessions write the same key.
|
||||
// Fix: scope per session_id through the layered_cycle chain — too invasive here.
|
||||
fn imprint_current() -> String {
|
||||
let id: String = state_get("active_imprint_id")
|
||||
return if str_eq(id, "") { "base" } else { id }
|
||||
|
||||
Reference in New Issue
Block a user