Make external codec boundaries explicit and exhaustive

This commit is contained in:
ms2k 2026-07-19 05:33:39 +09:00
commit d7de87fb8f
2 changed files with 319 additions and 25 deletions

View file

@ -33,6 +33,8 @@ const STATE_RESET: TableDefinition<u8, &[u8]> = TableDefinition::new("state_rese
const SINGLETON_KEY: u8 = 0;
const STATE_RESET_SCHEMA_V1: &str = "lazaret-state-reset-v1";
pub const DOMAIN_STATE_SERIALIZED_RECORD_TYPE_NAMES: &[&str] = &["StateResetIntentV1"];
#[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
pub struct StateResetIntentV1 {
schema: String,

View file

@ -265,6 +265,10 @@ fn reset_intent_is_typed_transactional_and_domain_bound() {
domain().domain_id,
StateResetScopeV1::Selected(b"/usr".to_vec()),
);
assert_eq!(
DOMAIN_STATE_SERIALIZED_RECORD_TYPE_NAMES,
&[<StateResetIntentV1 as SchemaType>::NAME]
);
assert_eq!(
encode(&intent).unwrap(),
[