Files
synapse/rust
Erik JohnstonandClaude Opus 5.5 afae38f4ee Port the state-dependent auth rules to Rust
A port of check_state_dependent_auth_rules and auth_types_for_event,
with the helpers they use: power level lookups with Python's int()
coercion, the membership rules, _check_power_levels, check_redaction and
the MSC3757 and MSC4289 rules.

Failures come in two kinds. Rejected maps to AuthError, which state
resolution skips. Invalid covers what the Python raises as something
else (SynapseError(400) from power level validation, ValueError from
int(), KeyError from a missing field), which state resolution must not
swallow.

Third-party invites do the structural checks in Rust and call back into
Python for the ed25519 signature check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ULdieJyQoHNzeHq42H2M1p
2026-10-13 09:54:14 +00:00
..