Files
hermes-agent/gateway
Teknium 932952d9d3 fix(rooms): bind room owner claim to the room insert transaction
Canonical groups.create called authorize_room(create=True) before the
roster/name/target validation and in its own write transaction. A
rejected create (e.g. empty member list -> invalid_params, or a storage
error during the insert) therefore committed a durable
gateway.hosted.owner.v1:<room> row with no hosted_rooms row, and every
other actor's later valid create of that id returned permission_denied.

authorize_room now accepts the caller's connection, and create_room takes
an admit(conn) hook that runs inside its BEGIN IMMEDIATE after payload
validation. groups.create passes the owner claim through that hook on
both the driver and metadata-only paths, so the owner row and room row
commit or roll back together. First-writer fencing is unchanged: the
claim still reads the owner row under the same write lock, so of two
concurrent valid creators exactly one wins.

Review: https://github.com/NousResearch/hermes-agent/pull/106742#pullrequestreview-5464799967
(cherry picked from commit bf3690cab39c02660fa964fe36244eeaccc52ff6)
2026-10-09 02:10:47 -07:00
..
2026-10-08 21:29:48 +02:00
2026-10-08 21:29:48 +02:00
2026-10-08 19:28:23 +02:00
2026-10-08 19:54:07 +02:00