File: crates/state/src/event.rs:382
Severity: tech-debt
Obvious? yes
SetServerDescription has an apply test (materialize.rs:1077) verifying that a stranger's event loses to the admin's, but unlike its sibling RenameServer (which has check_permission_rejects_non_admin_rename_server at crates/state/src/tests/permissions.rs:660), there is no corresponding check_permission_rejects_non_admin_set_server_description test. The apply test is implicit — the stranger's event is inserted but the materializer drops it; the explicit check_permission Err contract is what client code (crates/client/src/servers.rs:267) and the create-and-insert path rely on to reject before broadcast. Without it, a refactor that accidentally added SetServerDescription to a non-admin permission class would not be caught at the state tier — only by an end-to-end run.
Fix: add a one-line state-tier test in permissions.rs mirroring the RenameServer test, asserting check_permission(&state, &peer.endpoint_id(), &SetServerDescription{..}).is_err().
Filed by /general-audit @ 88498a5 (2026-05-04). master: #600.
File:
crates/state/src/event.rs:382Severity: tech-debt
Obvious? yes
SetServerDescriptionhas an apply test (materialize.rs:1077) verifying that a stranger's event loses to the admin's, but unlike its siblingRenameServer(which hascheck_permission_rejects_non_admin_rename_serveratcrates/state/src/tests/permissions.rs:660), there is no correspondingcheck_permission_rejects_non_admin_set_server_descriptiontest. The apply test is implicit — the stranger's event is inserted but the materializer drops it; the explicitcheck_permissionErr contract is what client code (crates/client/src/servers.rs:267) and the create-and-insert path rely on to reject before broadcast. Without it, a refactor that accidentally addedSetServerDescriptionto a non-admin permission class would not be caught at the state tier — only by an end-to-end run.Fix: add a one-line state-tier test in
permissions.rsmirroring theRenameServertest, assertingcheck_permission(&state, &peer.endpoint_id(), &SetServerDescription{..}).is_err().Filed by
/general-audit@88498a5(2026-05-04). master: #600.