fix(state): fail loudly when state.db is replaced under a live process
Detect same-inode cp via a generation stamp, halt FTS repair, and divert unwritten transcripts to sessions/<id>.jsonl plus the gateway pending spool. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -752,7 +752,7 @@ def finalize_turn(
|
||||
"health (`hermes doctor`), then send your message again"
|
||||
)
|
||||
# Machine-readable cause for the gateway/desktop: exactly
|
||||
# 'session_persistence_failed:<locked|compression|turn_lease|corrupt|disk|unknown>'.
|
||||
# 'session_persistence_failed:<locked|compression|turn_lease|corrupt|replaced|disk|unknown>'.
|
||||
# Never clobber a failure_reason another path already stamped.
|
||||
if "failure_reason" not in result:
|
||||
_cause = getattr(agent, "_last_persistence_error_cause", None)
|
||||
|
||||
Reference in New Issue
Block a user