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:
@@ -274,6 +274,9 @@ fn handle_request(method: String, path: String, body: String) -> String {
|
||||
return engram_scan_nodes_json(9999, 0)
|
||||
}
|
||||
if str_eq(clean, "/api/graph/edges") {
|
||||
// TODO(reliability #8): engram_save races with awareness loop mem_save().
|
||||
// Both now use atomic write-to-temp+rename (el_runtime.c). Serialised
|
||||
// by engram_global_mu. Future: add engram_edges_json() builtin.
|
||||
let snap_path: String = env("HOME") + "/.neuron/engram/snapshot.json"
|
||||
engram_save(snap_path)
|
||||
let snap: String = fs_read(snap_path)
|
||||
|
||||
Reference in New Issue
Block a user