the space row is made (host.create_space) before its access record is written, and the access record is written before its index entry. credentialScopes is copied unchecked, so createSpace {..., skey: "rides", credentialScopes: [{"role": "admin", "scopes": 1.5}]} makes the space, and the access write then fails in drisl::check_record with "not an integer". The space now exists with no access record and no index entry. updateSpace and deleteSpace answer SpaceNotFound (own_space needs the access record), and a retry with the same skey answers SpaceAlreadyExists, so the key is lost for good. Separately, for a space that has an access record but no index entry, updateSpace with name and readableBy writes the access change first, then answers SpaceNotFound from entry_of.
How to see it
Read against docs/fresh at 4636e6d, the code at: group_spaces.rs:121-147 (create_space), :200-214 (update_space), :235 (delete_space → entry_of). Paths are under crates/group-host/src unless they say otherwise. Severity: low.
What you expected
Check the access record (drisl::check_record) and look up the index entry before any write. On a failed write, end the space just made (end_space) before answering the error.
Where
The host, as built from 4636e6d. Found while checking the docs against the code.
What happened
the space row is made (
host.create_space) before its access record is written, and the access record is written before its index entry.credentialScopesis copied unchecked, socreateSpace {..., skey: "rides", credentialScopes: [{"role": "admin", "scopes": 1.5}]}makes the space, and the access write then fails indrisl::check_recordwith "not an integer". The space now exists with no access record and no index entry.updateSpaceanddeleteSpaceanswer SpaceNotFound (own_spaceneeds the access record), and a retry with the sameskeyanswers SpaceAlreadyExists, so the key is lost for good. Separately, for a space that has an access record but no index entry,updateSpacewithnameandreadableBywrites the access change first, then answers SpaceNotFound fromentry_of.How to see it
Read against
docs/freshat 4636e6d, the code at: group_spaces.rs:121-147 (create_space), :200-214 (update_space), :235 (delete_space→entry_of). Paths are undercrates/group-host/srcunless they say otherwise. Severity: low.What you expected
Check the access record (
drisl::check_record) and look up the index entry before any write. On a failed write, end the space just made (end_space) before answering the error.Where
The host, as built from 4636e6d. Found while checking the docs against the code.