Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"bippy": "0.5.43",
"concurrently": "10.0.4",
"cross-env": "10.1.0",
"electron": "40.10.2",
"electron": "41.10.3",
"electron-builder": "^26.8.1",
"esbuild": "^0.28.1",
"eslint": "^9.39.4",
Expand All @@ -176,7 +176,7 @@
"wait-on": "^9.0.5"
},
"build": {
"electronVersion": "40.10.2",
"electronVersion": "41.10.3",
"appId": "com.recursiveintell.ares",
"productName": "Ares",
"executableName": "Ares",
Expand Down
12 changes: 10 additions & 2 deletions hermes_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
_PREVIEW_SCAFFOLDED_SQL,
)
from hermes_state_portability import SessionPortabilityMixin
from hermes_state_runs import SessionRunCustodyMixin
from hermes_state_schema import SessionSchemaMixin
from hermes_state_search import SessionSearchMixin

Expand Down Expand Up @@ -4279,7 +4280,7 @@ def classify_session_status(
return SESSION_STATUS_COMPLETE


class SessionDB(SessionSearchMixin, SessionSchemaMixin, SessionPortabilityMixin):
class SessionDB(SessionSearchMixin, SessionSchemaMixin, SessionPortabilityMixin, SessionRunCustodyMixin):
"""
SQLite-backed session storage with FTS5 search.

Expand Down Expand Up @@ -14201,8 +14202,15 @@ def _do(conn):
def compare_and_set_meta_many(
self, items: List[Tuple[str, Optional[str], str]]
) -> bool:
"""Atomically publish several meta rows if every preimage matches."""
"""Atomically publish several meta rows if every preimage matches.

Each normalized key must occur only once. Otherwise two writes can
validate the same preimage and silently overwrite one another within
an apparently successful batch. Reject before entering the transaction.
"""
normalized = [(str(key), expected, str(value)) for key, expected, value in items]
if len({key for key, _expected, _value in normalized}) != len(normalized):
raise ValueError("duplicate keys in metadata compare-and-set batch")
if not normalized:
return True

Expand Down
Loading
Loading