lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

mod.rs (88832B)


      1 //! Versioned schema authority for `runtime.sqlite`.
      2 //!
      3 //! The public descriptor surface exposes version and integrity metadata only.
      4 //! Embedded SQL remains an implementation detail of this backend.
      5 
      6 /// Lowest runtime schema version this package can recognize.
      7 pub const MINIMUM_VERSION: u32 = 1;
      8 /// Current runtime schema version created by this package.
      9 pub const CURRENT_VERSION: u32 = 23;
     10 
     11 const RUNTIME_V1_SQL: &str = include_str!("0001_runtime.up.sql");
     12 const CANONICAL_EVENT_STORAGE_V2_SQL: &str = include_str!("0002_canonical_event_storage.up.sql");
     13 const OPERATION_JOURNAL_V3_SQL: &str = include_str!("0003_operation_journal.up.sql");
     14 const OUTBOX_DELIVERY_EVIDENCE_V4_SQL: &str = include_str!("0004_outbox_delivery_evidence.up.sql");
     15 const PROJECTION_METADATA_V5_SQL: &str = include_str!("0005_projection_metadata.up.sql");
     16 const LEGACY_IMPORT_JOURNAL_V6_SQL: &str = include_str!("0006_legacy_import_journal.up.sql");
     17 const LEGACY_EVENT_STAGING_V7_SQL: &str = include_str!("0007_legacy_event_staging.up.sql");
     18 const LEGACY_OUTBOX_STAGING_V8_SQL: &str = include_str!("0008_legacy_outbox_staging.up.sql");
     19 const LEGACY_IMPORT_COMMITS_V9_SQL: &str = include_str!("0009_legacy_import_commits.up.sql");
     20 const PROJECTION_REBUILD_SOURCE_BINDING_V10_SQL: &str =
     21     include_str!("0010_projection_rebuild_source_binding.up.sql");
     22 const AUTHORED_OPERATIONS_V11_SQL: &str = include_str!("0011_authored_operations.up.sql");
     23 const MATERIALIZED_PROJECTION_DOCUMENTS_V12_SQL: &str =
     24     include_str!("0012_materialized_projection_documents.up.sql");
     25 const AUTHORED_DRAFT_REVISIONS_V13_SQL: &str = include_str!("0013_authored_draft_revisions.up.sql");
     26 
     27 const AUTHORED_DRAFT_QUERY_V14_SQL: &str =
     28     include_str!("0014_authored_draft_query_metadata.up.sql");
     29 const AUTHORED_SIGNED_FACTS_V15_SQL: &str = include_str!("0015_authored_signed_facts.up.sql");
     30 
     31 const AUTHORED_DELIVERY_FACTS_V16_SQL: &str = include_str!("0016_authored_delivery_facts.up.sql");
     32 
     33 const AUTHORED_DELIVERY_RECONCILIATION_V17_SQL: &str =
     34     include_str!("0017_authored_delivery_reconciliation.up.sql");
     35 
     36 const EVENT_MUTATION_EPOCH_V18_SQL: &str = include_str!("0018_event_mutation_epoch.up.sql");
     37 
     38 const CANONICAL_VISIBILITY_INDEX_V19_SQL: &str =
     39     include_str!("0019_canonical_visibility_index.up.sql");
     40 
     41 const PROJECTION_CACHE_BUDGET_V22_SQL: &str = include_str!("0022_projection_cache_budget.up.sql");
     42 const PROJECTION_RETIRED_SELECTION_V23_SQL: &str =
     43     include_str!("0023_projection_retired_selection.up.sql");
     44 
     45 const PROJECTION_ATOMIC_GENERATIONS_V21_SQL: &str =
     46     include_str!("0021_projection_atomic_generations.up.sql");
     47 
     48 const INDEXED_VISIBILITY_READS_V20_SQL: &str = include_str!("0020_indexed_visibility_reads.up.sql");
     49 
     50 /// Stable, non-SQL description of one forward runtime migration.
     51 #[derive(Clone, Copy, Debug, Eq, PartialEq)]
     52 pub struct MigrationDescriptor {
     53     version: u32,
     54     name: &'static str,
     55     up_sha256: &'static str,
     56     owned_objects: &'static [&'static str],
     57 }
     58 
     59 impl MigrationDescriptor {
     60     /// Returns the positive, monotonically increasing migration version.
     61     pub const fn version(self) -> u32 {
     62         self.version
     63     }
     64 
     65     /// Returns the stable migration name.
     66     pub const fn name(self) -> &'static str {
     67         self.name
     68     }
     69 
     70     /// Returns the lowercase SHA-256 of the exact embedded migration bytes.
     71     pub const fn up_sha256(self) -> &'static str {
     72         self.up_sha256
     73     }
     74 
     75     /// Returns the complete, sorted SQLite catalog owned after this migration.
     76     pub const fn owned_objects(self) -> &'static [&'static str] {
     77         self.owned_objects
     78     }
     79 }
     80 
     81 const RUNTIME_V1_OBJECTS: &[&str] = &[
     82     "radroots_runtime_atomic_commits",
     83     "radroots_runtime_delivery_evidence",
     84     "radroots_runtime_delivery_evidence_item_idx",
     85     "radroots_runtime_event_index_checkpoints",
     86     "radroots_runtime_event_index_manifests",
     87     "radroots_runtime_event_index_shards",
     88     "radroots_runtime_event_provenance",
     89     "radroots_runtime_event_provenance_observed_idx",
     90     "radroots_runtime_events",
     91     "radroots_runtime_events_admission_idx",
     92     "radroots_runtime_events_delete_guard",
     93     "radroots_runtime_events_event_id_idx",
     94     "radroots_runtime_events_raw_update_guard",
     95     "radroots_runtime_journal_idempotency_idx",
     96     "radroots_runtime_journal_operations",
     97     "radroots_runtime_journal_recovery_idx",
     98     "radroots_runtime_outbox_items",
     99     "radroots_runtime_outbox_ready_idx",
    100     "radroots_runtime_outbox_targets",
    101     "radroots_runtime_projection_checkpoints",
    102     "radroots_runtime_projection_invalidations",
    103     "radroots_runtime_projection_rebuilds",
    104     "radroots_runtime_projection_rebuilds_stage_idx",
    105     "radroots_runtime_source_generations",
    106     "radroots_runtime_source_generations_delete_guard",
    107     "radroots_runtime_source_generations_identity_guard",
    108 ];
    109 
    110 const RUNTIME_V2_OBJECTS: &[&str] = &[
    111     "radroots_runtime_atomic_commits",
    112     "radroots_runtime_delivery_evidence",
    113     "radroots_runtime_delivery_evidence_item_idx",
    114     "radroots_runtime_event_index_checkpoints",
    115     "radroots_runtime_event_index_manifests",
    116     "radroots_runtime_event_index_shards",
    117     "radroots_runtime_event_provenance",
    118     "radroots_runtime_event_provenance_observed_idx",
    119     "radroots_runtime_events",
    120     "radroots_runtime_events_admission_idx",
    121     "radroots_runtime_events_delete_guard",
    122     "radroots_runtime_events_event_id_idx",
    123     "radroots_runtime_events_raw_update_guard",
    124     "radroots_runtime_journal_idempotency_idx",
    125     "radroots_runtime_journal_operations",
    126     "radroots_runtime_journal_recovery_idx",
    127     "radroots_runtime_outbox_items",
    128     "radroots_runtime_outbox_ready_idx",
    129     "radroots_runtime_outbox_targets",
    130     "radroots_runtime_projection_checkpoints",
    131     "radroots_runtime_projection_invalidations",
    132     "radroots_runtime_projection_rebuilds",
    133     "radroots_runtime_projection_rebuilds_stage_idx",
    134     "radroots_runtime_source_generations",
    135     "radroots_runtime_source_generations_active_idx",
    136     "radroots_runtime_source_generations_delete_guard",
    137     "radroots_runtime_source_generations_identity_guard",
    138     "radroots_runtime_source_generations_sequence_guard",
    139 ];
    140 
    141 const RUNTIME_V4_OBJECTS: &[&str] = &[
    142     "radroots_runtime_atomic_commits",
    143     "radroots_runtime_delivery_evidence",
    144     "radroots_runtime_delivery_evidence_item_idx",
    145     "radroots_runtime_event_index_checkpoints",
    146     "radroots_runtime_event_index_manifests",
    147     "radroots_runtime_event_index_shards",
    148     "radroots_runtime_event_provenance",
    149     "radroots_runtime_event_provenance_observed_idx",
    150     "radroots_runtime_events",
    151     "radroots_runtime_events_admission_idx",
    152     "radroots_runtime_events_delete_guard",
    153     "radroots_runtime_events_event_id_idx",
    154     "radroots_runtime_events_raw_update_guard",
    155     "radroots_runtime_journal_idempotency_idx",
    156     "radroots_runtime_journal_operations",
    157     "radroots_runtime_journal_recovery_idx",
    158     "radroots_runtime_outbox_items",
    159     "radroots_runtime_outbox_operation_idx",
    160     "radroots_runtime_outbox_ready_idx",
    161     "radroots_runtime_outbox_targets",
    162     "radroots_runtime_projection_checkpoints",
    163     "radroots_runtime_projection_invalidations",
    164     "radroots_runtime_projection_rebuilds",
    165     "radroots_runtime_projection_rebuilds_stage_idx",
    166     "radroots_runtime_source_generations",
    167     "radroots_runtime_source_generations_active_idx",
    168     "radroots_runtime_source_generations_delete_guard",
    169     "radroots_runtime_source_generations_identity_guard",
    170     "radroots_runtime_source_generations_sequence_guard",
    171 ];
    172 
    173 const RUNTIME_V6_OBJECTS: &[&str] = &[
    174     "radroots_runtime_atomic_commits",
    175     "radroots_runtime_delivery_evidence",
    176     "radroots_runtime_delivery_evidence_item_idx",
    177     "radroots_runtime_event_index_checkpoints",
    178     "radroots_runtime_event_index_manifests",
    179     "radroots_runtime_event_index_shards",
    180     "radroots_runtime_event_provenance",
    181     "radroots_runtime_event_provenance_observed_idx",
    182     "radroots_runtime_events",
    183     "radroots_runtime_events_admission_idx",
    184     "radroots_runtime_events_delete_guard",
    185     "radroots_runtime_events_event_id_idx",
    186     "radroots_runtime_events_raw_update_guard",
    187     "radroots_runtime_journal_idempotency_idx",
    188     "radroots_runtime_journal_operations",
    189     "radroots_runtime_journal_recovery_idx",
    190     "radroots_runtime_legacy_import_delete_guard",
    191     "radroots_runtime_legacy_import_identity_guard",
    192     "radroots_runtime_legacy_import_member_delete_guard",
    193     "radroots_runtime_legacy_import_member_identity_guard",
    194     "radroots_runtime_legacy_import_member_state_guard",
    195     "radroots_runtime_legacy_import_members",
    196     "radroots_runtime_legacy_import_state_guard",
    197     "radroots_runtime_legacy_import_state_idx",
    198     "radroots_runtime_legacy_imports",
    199     "radroots_runtime_outbox_items",
    200     "radroots_runtime_outbox_operation_idx",
    201     "radroots_runtime_outbox_ready_idx",
    202     "radroots_runtime_outbox_targets",
    203     "radroots_runtime_projection_checkpoints",
    204     "radroots_runtime_projection_invalidations",
    205     "radroots_runtime_projection_rebuilds",
    206     "radroots_runtime_projection_rebuilds_stage_idx",
    207     "radroots_runtime_source_generations",
    208     "radroots_runtime_source_generations_active_idx",
    209     "radroots_runtime_source_generations_delete_guard",
    210     "radroots_runtime_source_generations_identity_guard",
    211     "radroots_runtime_source_generations_sequence_guard",
    212 ];
    213 
    214 const RUNTIME_V7_OBJECTS: &[&str] = &[
    215     "radroots_runtime_atomic_commits",
    216     "radroots_runtime_delivery_evidence",
    217     "radroots_runtime_delivery_evidence_item_idx",
    218     "radroots_runtime_event_index_checkpoints",
    219     "radroots_runtime_event_index_manifests",
    220     "radroots_runtime_event_index_shards",
    221     "radroots_runtime_event_provenance",
    222     "radroots_runtime_event_provenance_observed_idx",
    223     "radroots_runtime_events",
    224     "radroots_runtime_events_admission_idx",
    225     "radroots_runtime_events_delete_guard",
    226     "radroots_runtime_events_event_id_idx",
    227     "radroots_runtime_events_raw_update_guard",
    228     "radroots_runtime_journal_idempotency_idx",
    229     "radroots_runtime_journal_operations",
    230     "radroots_runtime_journal_recovery_idx",
    231     "radroots_runtime_legacy_event_staging",
    232     "radroots_runtime_legacy_event_staging_delete_guard",
    233     "radroots_runtime_legacy_event_staging_insert_guard",
    234     "radroots_runtime_legacy_event_staging_update_guard",
    235     "radroots_runtime_legacy_import_delete_guard",
    236     "radroots_runtime_legacy_import_identity_guard",
    237     "radroots_runtime_legacy_import_member_delete_guard",
    238     "radroots_runtime_legacy_import_member_identity_guard",
    239     "radroots_runtime_legacy_import_member_state_guard",
    240     "radroots_runtime_legacy_import_members",
    241     "radroots_runtime_legacy_import_state_guard",
    242     "radroots_runtime_legacy_import_state_idx",
    243     "radroots_runtime_legacy_imports",
    244     "radroots_runtime_outbox_items",
    245     "radroots_runtime_outbox_operation_idx",
    246     "radroots_runtime_outbox_ready_idx",
    247     "radroots_runtime_outbox_targets",
    248     "radroots_runtime_projection_checkpoints",
    249     "radroots_runtime_projection_invalidations",
    250     "radroots_runtime_projection_rebuilds",
    251     "radroots_runtime_projection_rebuilds_stage_idx",
    252     "radroots_runtime_source_generations",
    253     "radroots_runtime_source_generations_active_idx",
    254     "radroots_runtime_source_generations_delete_guard",
    255     "radroots_runtime_source_generations_identity_guard",
    256     "radroots_runtime_source_generations_sequence_guard",
    257 ];
    258 
    259 const RUNTIME_V8_OBJECTS: &[&str] = &[
    260     "radroots_runtime_atomic_commits",
    261     "radroots_runtime_delivery_evidence",
    262     "radroots_runtime_delivery_evidence_item_idx",
    263     "radroots_runtime_event_index_checkpoints",
    264     "radroots_runtime_event_index_manifests",
    265     "radroots_runtime_event_index_shards",
    266     "radroots_runtime_event_provenance",
    267     "radroots_runtime_event_provenance_observed_idx",
    268     "radroots_runtime_events",
    269     "radroots_runtime_events_admission_idx",
    270     "radroots_runtime_events_delete_guard",
    271     "radroots_runtime_events_event_id_idx",
    272     "radroots_runtime_events_raw_update_guard",
    273     "radroots_runtime_journal_idempotency_idx",
    274     "radroots_runtime_journal_operations",
    275     "radroots_runtime_journal_recovery_idx",
    276     "radroots_runtime_legacy_event_staging",
    277     "radroots_runtime_legacy_event_staging_delete_guard",
    278     "radroots_runtime_legacy_event_staging_insert_guard",
    279     "radroots_runtime_legacy_event_staging_update_guard",
    280     "radroots_runtime_legacy_import_delete_guard",
    281     "radroots_runtime_legacy_import_identity_guard",
    282     "radroots_runtime_legacy_import_member_delete_guard",
    283     "radroots_runtime_legacy_import_member_identity_guard",
    284     "radroots_runtime_legacy_import_member_state_guard",
    285     "radroots_runtime_legacy_import_members",
    286     "radroots_runtime_legacy_import_state_guard",
    287     "radroots_runtime_legacy_import_state_idx",
    288     "radroots_runtime_legacy_imports",
    289     "radroots_runtime_legacy_outbox_staging",
    290     "radroots_runtime_legacy_outbox_staging_delete_guard",
    291     "radroots_runtime_legacy_outbox_staging_insert_guard",
    292     "radroots_runtime_legacy_outbox_staging_parent_idx",
    293     "radroots_runtime_legacy_outbox_staging_update_guard",
    294     "radroots_runtime_outbox_items",
    295     "radroots_runtime_outbox_operation_idx",
    296     "radroots_runtime_outbox_ready_idx",
    297     "radroots_runtime_outbox_targets",
    298     "radroots_runtime_projection_checkpoints",
    299     "radroots_runtime_projection_invalidations",
    300     "radroots_runtime_projection_rebuilds",
    301     "radroots_runtime_projection_rebuilds_stage_idx",
    302     "radroots_runtime_source_generations",
    303     "radroots_runtime_source_generations_active_idx",
    304     "radroots_runtime_source_generations_delete_guard",
    305     "radroots_runtime_source_generations_identity_guard",
    306     "radroots_runtime_source_generations_sequence_guard",
    307 ];
    308 
    309 const RUNTIME_V9_OBJECTS: &[&str] = &[
    310     "radroots_runtime_atomic_commits",
    311     "radroots_runtime_delivery_evidence",
    312     "radroots_runtime_delivery_evidence_item_idx",
    313     "radroots_runtime_event_index_checkpoints",
    314     "radroots_runtime_event_index_manifests",
    315     "radroots_runtime_event_index_shards",
    316     "radroots_runtime_event_provenance",
    317     "radroots_runtime_event_provenance_observed_idx",
    318     "radroots_runtime_events",
    319     "radroots_runtime_events_admission_idx",
    320     "radroots_runtime_events_delete_guard",
    321     "radroots_runtime_events_event_id_idx",
    322     "radroots_runtime_events_raw_update_guard",
    323     "radroots_runtime_journal_idempotency_idx",
    324     "radroots_runtime_journal_operations",
    325     "radroots_runtime_journal_recovery_idx",
    326     "radroots_runtime_legacy_event_staging",
    327     "radroots_runtime_legacy_event_staging_delete_guard",
    328     "radroots_runtime_legacy_event_staging_insert_guard",
    329     "radroots_runtime_legacy_event_staging_update_guard",
    330     "radroots_runtime_legacy_import_commit_delete_guard",
    331     "radroots_runtime_legacy_import_commit_update_guard",
    332     "radroots_runtime_legacy_import_commits",
    333     "radroots_runtime_legacy_import_delete_guard",
    334     "radroots_runtime_legacy_import_identity_guard",
    335     "radroots_runtime_legacy_import_member_delete_guard",
    336     "radroots_runtime_legacy_import_member_identity_guard",
    337     "radroots_runtime_legacy_import_member_state_guard",
    338     "radroots_runtime_legacy_import_members",
    339     "radroots_runtime_legacy_import_state_guard",
    340     "radroots_runtime_legacy_import_state_idx",
    341     "radroots_runtime_legacy_imports",
    342     "radroots_runtime_legacy_outbox_staging",
    343     "radroots_runtime_legacy_outbox_staging_delete_guard",
    344     "radroots_runtime_legacy_outbox_staging_insert_guard",
    345     "radroots_runtime_legacy_outbox_staging_parent_idx",
    346     "radroots_runtime_legacy_outbox_staging_update_guard",
    347     "radroots_runtime_outbox_items",
    348     "radroots_runtime_outbox_operation_idx",
    349     "radroots_runtime_outbox_ready_idx",
    350     "radroots_runtime_outbox_targets",
    351     "radroots_runtime_projection_checkpoints",
    352     "radroots_runtime_projection_invalidations",
    353     "radroots_runtime_projection_rebuilds",
    354     "radroots_runtime_projection_rebuilds_stage_idx",
    355     "radroots_runtime_source_generations",
    356     "radroots_runtime_source_generations_active_idx",
    357     "radroots_runtime_source_generations_delete_guard",
    358     "radroots_runtime_source_generations_identity_guard",
    359     "radroots_runtime_source_generations_sequence_guard",
    360 ];
    361 
    362 const RUNTIME_V11_OBJECTS: &[&str] = &[
    363     "radroots_runtime_atomic_commits",
    364     "radroots_runtime_authored_artifacts",
    365     "radroots_runtime_authored_artifacts_admission_ready_idx",
    366     "radroots_runtime_authored_artifacts_signing_ready_idx",
    367     "radroots_runtime_authored_atomic_commits",
    368     "radroots_runtime_authored_atomic_commits_delete_guard",
    369     "radroots_runtime_authored_atomic_commits_update_guard",
    370     "radroots_runtime_authored_delivery_attempts",
    371     "radroots_runtime_authored_delivery_plans",
    372     "radroots_runtime_authored_delivery_ready_idx",
    373     "radroots_runtime_authored_delivery_targets",
    374     "radroots_runtime_authored_migration_evidence",
    375     "radroots_runtime_authored_migration_evidence_delete_guard",
    376     "radroots_runtime_authored_migration_evidence_update_guard",
    377     "radroots_runtime_authored_operations",
    378     "radroots_runtime_delivery_evidence",
    379     "radroots_runtime_delivery_evidence_item_idx",
    380     "radroots_runtime_event_index_checkpoints",
    381     "radroots_runtime_event_index_manifests",
    382     "radroots_runtime_event_index_shards",
    383     "radroots_runtime_event_provenance",
    384     "radroots_runtime_event_provenance_observed_idx",
    385     "radroots_runtime_events",
    386     "radroots_runtime_events_admission_idx",
    387     "radroots_runtime_events_contract_metadata_guard",
    388     "radroots_runtime_events_contract_metadata_insert_guard",
    389     "radroots_runtime_events_delete_guard",
    390     "radroots_runtime_events_event_id_idx",
    391     "radroots_runtime_events_raw_update_guard",
    392     "radroots_runtime_journal_idempotency_idx",
    393     "radroots_runtime_journal_operations",
    394     "radroots_runtime_journal_recovery_idx",
    395     "radroots_runtime_legacy_event_staging",
    396     "radroots_runtime_legacy_event_staging_delete_guard",
    397     "radroots_runtime_legacy_event_staging_insert_guard",
    398     "radroots_runtime_legacy_event_staging_update_guard",
    399     "radroots_runtime_legacy_import_commit_delete_guard",
    400     "radroots_runtime_legacy_import_commit_update_guard",
    401     "radroots_runtime_legacy_import_commits",
    402     "radroots_runtime_legacy_import_delete_guard",
    403     "radroots_runtime_legacy_import_identity_guard",
    404     "radroots_runtime_legacy_import_member_delete_guard",
    405     "radroots_runtime_legacy_import_member_identity_guard",
    406     "radroots_runtime_legacy_import_member_state_guard",
    407     "radroots_runtime_legacy_import_members",
    408     "radroots_runtime_legacy_import_state_guard",
    409     "radroots_runtime_legacy_import_state_idx",
    410     "radroots_runtime_legacy_imports",
    411     "radroots_runtime_legacy_outbox_staging",
    412     "radroots_runtime_legacy_outbox_staging_delete_guard",
    413     "radroots_runtime_legacy_outbox_staging_insert_guard",
    414     "radroots_runtime_legacy_outbox_staging_parent_idx",
    415     "radroots_runtime_legacy_outbox_staging_update_guard",
    416     "radroots_runtime_outbox_items",
    417     "radroots_runtime_outbox_operation_idx",
    418     "radroots_runtime_outbox_ready_idx",
    419     "radroots_runtime_outbox_targets",
    420     "radroots_runtime_projection_checkpoints",
    421     "radroots_runtime_projection_invalidations",
    422     "radroots_runtime_projection_rebuilds",
    423     "radroots_runtime_projection_rebuilds_stage_idx",
    424     "radroots_runtime_source_generations",
    425     "radroots_runtime_source_generations_active_idx",
    426     "radroots_runtime_source_generations_delete_guard",
    427     "radroots_runtime_source_generations_identity_guard",
    428     "radroots_runtime_source_generations_sequence_guard",
    429 ];
    430 
    431 const RUNTIME_V12_OBJECTS: &[&str] = &[
    432     "radroots_runtime_atomic_commits",
    433     "radroots_runtime_authored_artifacts",
    434     "radroots_runtime_authored_artifacts_admission_ready_idx",
    435     "radroots_runtime_authored_artifacts_signing_ready_idx",
    436     "radroots_runtime_authored_atomic_commits",
    437     "radroots_runtime_authored_atomic_commits_delete_guard",
    438     "radroots_runtime_authored_atomic_commits_update_guard",
    439     "radroots_runtime_authored_delivery_attempts",
    440     "radroots_runtime_authored_delivery_plans",
    441     "radroots_runtime_authored_delivery_ready_idx",
    442     "radroots_runtime_authored_delivery_targets",
    443     "radroots_runtime_authored_migration_evidence",
    444     "radroots_runtime_authored_migration_evidence_delete_guard",
    445     "radroots_runtime_authored_migration_evidence_update_guard",
    446     "radroots_runtime_authored_operations",
    447     "radroots_runtime_delivery_evidence",
    448     "radroots_runtime_delivery_evidence_item_idx",
    449     "radroots_runtime_event_index_checkpoints",
    450     "radroots_runtime_event_index_manifests",
    451     "radroots_runtime_event_index_shards",
    452     "radroots_runtime_event_provenance",
    453     "radroots_runtime_event_provenance_observed_idx",
    454     "radroots_runtime_events",
    455     "radroots_runtime_events_admission_idx",
    456     "radroots_runtime_events_contract_metadata_guard",
    457     "radroots_runtime_events_contract_metadata_insert_guard",
    458     "radroots_runtime_events_delete_guard",
    459     "radroots_runtime_events_event_id_idx",
    460     "radroots_runtime_events_raw_update_guard",
    461     "radroots_runtime_journal_idempotency_idx",
    462     "radroots_runtime_journal_operations",
    463     "radroots_runtime_journal_recovery_idx",
    464     "radroots_runtime_legacy_event_staging",
    465     "radroots_runtime_legacy_event_staging_delete_guard",
    466     "radroots_runtime_legacy_event_staging_insert_guard",
    467     "radroots_runtime_legacy_event_staging_update_guard",
    468     "radroots_runtime_legacy_import_commit_delete_guard",
    469     "radroots_runtime_legacy_import_commit_update_guard",
    470     "radroots_runtime_legacy_import_commits",
    471     "radroots_runtime_legacy_import_delete_guard",
    472     "radroots_runtime_legacy_import_identity_guard",
    473     "radroots_runtime_legacy_import_member_delete_guard",
    474     "radroots_runtime_legacy_import_member_identity_guard",
    475     "radroots_runtime_legacy_import_member_state_guard",
    476     "radroots_runtime_legacy_import_members",
    477     "radroots_runtime_legacy_import_state_guard",
    478     "radroots_runtime_legacy_import_state_idx",
    479     "radroots_runtime_legacy_imports",
    480     "radroots_runtime_legacy_outbox_staging",
    481     "radroots_runtime_legacy_outbox_staging_delete_guard",
    482     "radroots_runtime_legacy_outbox_staging_insert_guard",
    483     "radroots_runtime_legacy_outbox_staging_parent_idx",
    484     "radroots_runtime_legacy_outbox_staging_update_guard",
    485     "radroots_runtime_outbox_items",
    486     "radroots_runtime_outbox_operation_idx",
    487     "radroots_runtime_outbox_ready_idx",
    488     "radroots_runtime_outbox_targets",
    489     "radroots_runtime_projection_checkpoints",
    490     "radroots_runtime_projection_documents",
    491     "radroots_runtime_projection_invalidations",
    492     "radroots_runtime_projection_rebuilds",
    493     "radroots_runtime_projection_rebuilds_stage_idx",
    494     "radroots_runtime_projection_snapshots",
    495     "radroots_runtime_projection_snapshots_created_idx",
    496     "radroots_runtime_projection_snapshots_update_guard",
    497     "radroots_runtime_source_generations",
    498     "radroots_runtime_source_generations_active_idx",
    499     "radroots_runtime_source_generations_delete_guard",
    500     "radroots_runtime_source_generations_identity_guard",
    501     "radroots_runtime_source_generations_sequence_guard",
    502 ];
    503 
    504 const RUNTIME_V13_OBJECTS: &[&str] = &[
    505     "radroots_runtime_atomic_commits",
    506     "radroots_runtime_authored_artifacts",
    507     "radroots_runtime_authored_artifacts_admission_ready_idx",
    508     "radroots_runtime_authored_artifacts_signing_ready_idx",
    509     "radroots_runtime_authored_atomic_commits",
    510     "radroots_runtime_authored_atomic_commits_delete_guard",
    511     "radroots_runtime_authored_atomic_commits_update_guard",
    512     "radroots_runtime_authored_delivery_attempts",
    513     "radroots_runtime_authored_delivery_plans",
    514     "radroots_runtime_authored_delivery_ready_idx",
    515     "radroots_runtime_authored_delivery_targets",
    516     "radroots_runtime_authored_draft_author_head_idx",
    517     "radroots_runtime_authored_draft_revisions",
    518     "radroots_runtime_authored_draft_revisions_delete_guard",
    519     "radroots_runtime_authored_draft_revisions_update_guard",
    520     "radroots_runtime_authored_migration_evidence",
    521     "radroots_runtime_authored_migration_evidence_delete_guard",
    522     "radroots_runtime_authored_migration_evidence_update_guard",
    523     "radroots_runtime_authored_operations",
    524     "radroots_runtime_delivery_evidence",
    525     "radroots_runtime_delivery_evidence_item_idx",
    526     "radroots_runtime_event_index_checkpoints",
    527     "radroots_runtime_event_index_manifests",
    528     "radroots_runtime_event_index_shards",
    529     "radroots_runtime_event_provenance",
    530     "radroots_runtime_event_provenance_observed_idx",
    531     "radroots_runtime_events",
    532     "radroots_runtime_events_admission_idx",
    533     "radroots_runtime_events_contract_metadata_guard",
    534     "radroots_runtime_events_contract_metadata_insert_guard",
    535     "radroots_runtime_events_delete_guard",
    536     "radroots_runtime_events_event_id_idx",
    537     "radroots_runtime_events_raw_update_guard",
    538     "radroots_runtime_journal_idempotency_idx",
    539     "radroots_runtime_journal_operations",
    540     "radroots_runtime_journal_recovery_idx",
    541     "radroots_runtime_legacy_event_staging",
    542     "radroots_runtime_legacy_event_staging_delete_guard",
    543     "radroots_runtime_legacy_event_staging_insert_guard",
    544     "radroots_runtime_legacy_event_staging_update_guard",
    545     "radroots_runtime_legacy_import_commit_delete_guard",
    546     "radroots_runtime_legacy_import_commit_update_guard",
    547     "radroots_runtime_legacy_import_commits",
    548     "radroots_runtime_legacy_import_delete_guard",
    549     "radroots_runtime_legacy_import_identity_guard",
    550     "radroots_runtime_legacy_import_member_delete_guard",
    551     "radroots_runtime_legacy_import_member_identity_guard",
    552     "radroots_runtime_legacy_import_member_state_guard",
    553     "radroots_runtime_legacy_import_members",
    554     "radroots_runtime_legacy_import_state_guard",
    555     "radroots_runtime_legacy_import_state_idx",
    556     "radroots_runtime_legacy_imports",
    557     "radroots_runtime_legacy_outbox_staging",
    558     "radroots_runtime_legacy_outbox_staging_delete_guard",
    559     "radroots_runtime_legacy_outbox_staging_insert_guard",
    560     "radroots_runtime_legacy_outbox_staging_parent_idx",
    561     "radroots_runtime_legacy_outbox_staging_update_guard",
    562     "radroots_runtime_outbox_items",
    563     "radroots_runtime_outbox_operation_idx",
    564     "radroots_runtime_outbox_ready_idx",
    565     "radroots_runtime_outbox_targets",
    566     "radroots_runtime_projection_checkpoints",
    567     "radroots_runtime_projection_documents",
    568     "radroots_runtime_projection_invalidations",
    569     "radroots_runtime_projection_rebuilds",
    570     "radroots_runtime_projection_rebuilds_stage_idx",
    571     "radroots_runtime_projection_snapshots",
    572     "radroots_runtime_projection_snapshots_created_idx",
    573     "radroots_runtime_projection_snapshots_update_guard",
    574     "radroots_runtime_source_generations",
    575     "radroots_runtime_source_generations_active_idx",
    576     "radroots_runtime_source_generations_delete_guard",
    577     "radroots_runtime_source_generations_identity_guard",
    578     "radroots_runtime_source_generations_sequence_guard",
    579 ];
    580 
    581 const RUNTIME_V14_OBJECTS: &[&str] = &[
    582     "radroots_runtime_atomic_commits",
    583     "radroots_runtime_authored_artifacts",
    584     "radroots_runtime_authored_artifacts_admission_ready_idx",
    585     "radroots_runtime_authored_artifacts_signing_ready_idx",
    586     "radroots_runtime_authored_atomic_commits",
    587     "radroots_runtime_authored_atomic_commits_delete_guard",
    588     "radroots_runtime_authored_atomic_commits_update_guard",
    589     "radroots_runtime_authored_delivery_attempts",
    590     "radroots_runtime_authored_delivery_plans",
    591     "radroots_runtime_authored_delivery_ready_idx",
    592     "radroots_runtime_authored_delivery_targets",
    593     "radroots_runtime_authored_draft_author_head_idx",
    594     "radroots_runtime_authored_draft_revisions",
    595     "radroots_runtime_authored_draft_revisions_delete_guard",
    596     "radroots_runtime_authored_draft_revisions_update_guard",
    597     "radroots_runtime_authored_draft_scope_head_idx",
    598     "radroots_runtime_authored_migration_evidence",
    599     "radroots_runtime_authored_migration_evidence_delete_guard",
    600     "radroots_runtime_authored_migration_evidence_update_guard",
    601     "radroots_runtime_authored_operations",
    602     "radroots_runtime_delivery_evidence",
    603     "radroots_runtime_delivery_evidence_item_idx",
    604     "radroots_runtime_event_index_checkpoints",
    605     "radroots_runtime_event_index_manifests",
    606     "radroots_runtime_event_index_shards",
    607     "radroots_runtime_event_provenance",
    608     "radroots_runtime_event_provenance_observed_idx",
    609     "radroots_runtime_events",
    610     "radroots_runtime_events_admission_idx",
    611     "radroots_runtime_events_contract_metadata_guard",
    612     "radroots_runtime_events_contract_metadata_insert_guard",
    613     "radroots_runtime_events_delete_guard",
    614     "radroots_runtime_events_event_id_idx",
    615     "radroots_runtime_events_raw_update_guard",
    616     "radroots_runtime_journal_idempotency_idx",
    617     "radroots_runtime_journal_operations",
    618     "radroots_runtime_journal_recovery_idx",
    619     "radroots_runtime_legacy_event_staging",
    620     "radroots_runtime_legacy_event_staging_delete_guard",
    621     "radroots_runtime_legacy_event_staging_insert_guard",
    622     "radroots_runtime_legacy_event_staging_update_guard",
    623     "radroots_runtime_legacy_import_commit_delete_guard",
    624     "radroots_runtime_legacy_import_commit_update_guard",
    625     "radroots_runtime_legacy_import_commits",
    626     "radroots_runtime_legacy_import_delete_guard",
    627     "radroots_runtime_legacy_import_identity_guard",
    628     "radroots_runtime_legacy_import_member_delete_guard",
    629     "radroots_runtime_legacy_import_member_identity_guard",
    630     "radroots_runtime_legacy_import_member_state_guard",
    631     "radroots_runtime_legacy_import_members",
    632     "radroots_runtime_legacy_import_state_guard",
    633     "radroots_runtime_legacy_import_state_idx",
    634     "radroots_runtime_legacy_imports",
    635     "radroots_runtime_legacy_outbox_staging",
    636     "radroots_runtime_legacy_outbox_staging_delete_guard",
    637     "radroots_runtime_legacy_outbox_staging_insert_guard",
    638     "radroots_runtime_legacy_outbox_staging_parent_idx",
    639     "radroots_runtime_legacy_outbox_staging_update_guard",
    640     "radroots_runtime_outbox_items",
    641     "radroots_runtime_outbox_operation_idx",
    642     "radroots_runtime_outbox_ready_idx",
    643     "radroots_runtime_outbox_targets",
    644     "radroots_runtime_projection_checkpoints",
    645     "radroots_runtime_projection_documents",
    646     "radroots_runtime_projection_invalidations",
    647     "radroots_runtime_projection_rebuilds",
    648     "radroots_runtime_projection_rebuilds_stage_idx",
    649     "radroots_runtime_projection_snapshots",
    650     "radroots_runtime_projection_snapshots_created_idx",
    651     "radroots_runtime_projection_snapshots_update_guard",
    652     "radroots_runtime_source_generations",
    653     "radroots_runtime_source_generations_active_idx",
    654     "radroots_runtime_source_generations_delete_guard",
    655     "radroots_runtime_source_generations_identity_guard",
    656     "radroots_runtime_source_generations_sequence_guard",
    657 ];
    658 
    659 const RUNTIME_V15_OBJECTS: &[&str] = &[
    660     "radroots_runtime_atomic_commits",
    661     "radroots_runtime_authored_artifacts",
    662     "radroots_runtime_authored_artifacts_admission_ready_idx",
    663     "radroots_runtime_authored_artifacts_signed_fact_guard",
    664     "radroots_runtime_authored_artifacts_signing_ready_idx",
    665     "radroots_runtime_authored_atomic_commits",
    666     "radroots_runtime_authored_atomic_commits_delete_guard",
    667     "radroots_runtime_authored_atomic_commits_update_guard",
    668     "radroots_runtime_authored_delivery_attempts",
    669     "radroots_runtime_authored_delivery_plans",
    670     "radroots_runtime_authored_delivery_ready_idx",
    671     "radroots_runtime_authored_delivery_targets",
    672     "radroots_runtime_authored_draft_author_head_idx",
    673     "radroots_runtime_authored_draft_revisions",
    674     "radroots_runtime_authored_draft_revisions_delete_guard",
    675     "radroots_runtime_authored_draft_revisions_update_guard",
    676     "radroots_runtime_authored_draft_scope_head_idx",
    677     "radroots_runtime_authored_migration_evidence",
    678     "radroots_runtime_authored_migration_evidence_delete_guard",
    679     "radroots_runtime_authored_migration_evidence_update_guard",
    680     "radroots_runtime_authored_operations",
    681     "radroots_runtime_delivery_evidence",
    682     "radroots_runtime_delivery_evidence_item_idx",
    683     "radroots_runtime_event_index_checkpoints",
    684     "radroots_runtime_event_index_manifests",
    685     "radroots_runtime_event_index_shards",
    686     "radroots_runtime_event_provenance",
    687     "radroots_runtime_event_provenance_observed_idx",
    688     "radroots_runtime_events",
    689     "radroots_runtime_events_admission_idx",
    690     "radroots_runtime_events_contract_metadata_guard",
    691     "radroots_runtime_events_contract_metadata_insert_guard",
    692     "radroots_runtime_events_delete_guard",
    693     "radroots_runtime_events_event_id_idx",
    694     "radroots_runtime_events_raw_update_guard",
    695     "radroots_runtime_journal_idempotency_idx",
    696     "radroots_runtime_journal_operations",
    697     "radroots_runtime_journal_recovery_idx",
    698     "radroots_runtime_legacy_event_staging",
    699     "radroots_runtime_legacy_event_staging_delete_guard",
    700     "radroots_runtime_legacy_event_staging_insert_guard",
    701     "radroots_runtime_legacy_event_staging_update_guard",
    702     "radroots_runtime_legacy_import_commit_delete_guard",
    703     "radroots_runtime_legacy_import_commit_update_guard",
    704     "radroots_runtime_legacy_import_commits",
    705     "radroots_runtime_legacy_import_delete_guard",
    706     "radroots_runtime_legacy_import_identity_guard",
    707     "radroots_runtime_legacy_import_member_delete_guard",
    708     "radroots_runtime_legacy_import_member_identity_guard",
    709     "radroots_runtime_legacy_import_member_state_guard",
    710     "radroots_runtime_legacy_import_members",
    711     "radroots_runtime_legacy_import_state_guard",
    712     "radroots_runtime_legacy_import_state_idx",
    713     "radroots_runtime_legacy_imports",
    714     "radroots_runtime_legacy_outbox_staging",
    715     "radroots_runtime_legacy_outbox_staging_delete_guard",
    716     "radroots_runtime_legacy_outbox_staging_insert_guard",
    717     "radroots_runtime_legacy_outbox_staging_parent_idx",
    718     "radroots_runtime_legacy_outbox_staging_update_guard",
    719     "radroots_runtime_outbox_items",
    720     "radroots_runtime_outbox_operation_idx",
    721     "radroots_runtime_outbox_ready_idx",
    722     "radroots_runtime_outbox_targets",
    723     "radroots_runtime_projection_checkpoints",
    724     "radroots_runtime_projection_documents",
    725     "radroots_runtime_projection_invalidations",
    726     "radroots_runtime_projection_rebuilds",
    727     "radroots_runtime_projection_rebuilds_stage_idx",
    728     "radroots_runtime_projection_snapshots",
    729     "radroots_runtime_projection_snapshots_created_idx",
    730     "radroots_runtime_projection_snapshots_update_guard",
    731     "radroots_runtime_source_generations",
    732     "radroots_runtime_source_generations_active_idx",
    733     "radroots_runtime_source_generations_delete_guard",
    734     "radroots_runtime_source_generations_identity_guard",
    735     "radroots_runtime_source_generations_sequence_guard",
    736 ];
    737 
    738 const RUNTIME_V16_OBJECTS: &[&str] = &[
    739     "radroots_runtime_atomic_commits",
    740     "radroots_runtime_authored_artifacts",
    741     "radroots_runtime_authored_artifacts_admission_ready_idx",
    742     "radroots_runtime_authored_artifacts_signed_fact_guard",
    743     "radroots_runtime_authored_artifacts_signing_ready_idx",
    744     "radroots_runtime_authored_atomic_commits",
    745     "radroots_runtime_authored_atomic_commits_delete_guard",
    746     "radroots_runtime_authored_atomic_commits_update_guard",
    747     "radroots_runtime_authored_delivery_attempts",
    748     "radroots_runtime_authored_delivery_facts",
    749     "radroots_runtime_authored_delivery_facts_delete_guard",
    750     "radroots_runtime_authored_delivery_facts_update_guard",
    751     "radroots_runtime_authored_delivery_plans",
    752     "radroots_runtime_authored_delivery_ready_idx",
    753     "radroots_runtime_authored_delivery_stop_guard",
    754     "radroots_runtime_authored_delivery_targets",
    755     "radroots_runtime_authored_draft_author_head_idx",
    756     "radroots_runtime_authored_draft_revisions",
    757     "radroots_runtime_authored_draft_revisions_delete_guard",
    758     "radroots_runtime_authored_draft_revisions_update_guard",
    759     "radroots_runtime_authored_draft_scope_head_idx",
    760     "radroots_runtime_authored_migration_evidence",
    761     "radroots_runtime_authored_migration_evidence_delete_guard",
    762     "radroots_runtime_authored_migration_evidence_update_guard",
    763     "radroots_runtime_authored_operations",
    764     "radroots_runtime_delivery_evidence",
    765     "radroots_runtime_delivery_evidence_item_idx",
    766     "radroots_runtime_event_index_checkpoints",
    767     "radroots_runtime_event_index_manifests",
    768     "radroots_runtime_event_index_shards",
    769     "radroots_runtime_event_provenance",
    770     "radroots_runtime_event_provenance_observed_idx",
    771     "radroots_runtime_events",
    772     "radroots_runtime_events_admission_idx",
    773     "radroots_runtime_events_contract_metadata_guard",
    774     "radroots_runtime_events_contract_metadata_insert_guard",
    775     "radroots_runtime_events_delete_guard",
    776     "radroots_runtime_events_event_id_idx",
    777     "radroots_runtime_events_raw_update_guard",
    778     "radroots_runtime_journal_idempotency_idx",
    779     "radroots_runtime_journal_operations",
    780     "radroots_runtime_journal_recovery_idx",
    781     "radroots_runtime_legacy_event_staging",
    782     "radroots_runtime_legacy_event_staging_delete_guard",
    783     "radroots_runtime_legacy_event_staging_insert_guard",
    784     "radroots_runtime_legacy_event_staging_update_guard",
    785     "radroots_runtime_legacy_import_commit_delete_guard",
    786     "radroots_runtime_legacy_import_commit_update_guard",
    787     "radroots_runtime_legacy_import_commits",
    788     "radroots_runtime_legacy_import_delete_guard",
    789     "radroots_runtime_legacy_import_identity_guard",
    790     "radroots_runtime_legacy_import_member_delete_guard",
    791     "radroots_runtime_legacy_import_member_identity_guard",
    792     "radroots_runtime_legacy_import_member_state_guard",
    793     "radroots_runtime_legacy_import_members",
    794     "radroots_runtime_legacy_import_state_guard",
    795     "radroots_runtime_legacy_import_state_idx",
    796     "radroots_runtime_legacy_imports",
    797     "radroots_runtime_legacy_outbox_staging",
    798     "radroots_runtime_legacy_outbox_staging_delete_guard",
    799     "radroots_runtime_legacy_outbox_staging_insert_guard",
    800     "radroots_runtime_legacy_outbox_staging_parent_idx",
    801     "radroots_runtime_legacy_outbox_staging_update_guard",
    802     "radroots_runtime_outbox_items",
    803     "radroots_runtime_outbox_operation_idx",
    804     "radroots_runtime_outbox_ready_idx",
    805     "radroots_runtime_outbox_targets",
    806     "radroots_runtime_projection_checkpoints",
    807     "radroots_runtime_projection_documents",
    808     "radroots_runtime_projection_invalidations",
    809     "radroots_runtime_projection_rebuilds",
    810     "radroots_runtime_projection_rebuilds_stage_idx",
    811     "radroots_runtime_projection_snapshots",
    812     "radroots_runtime_projection_snapshots_created_idx",
    813     "radroots_runtime_projection_snapshots_update_guard",
    814     "radroots_runtime_source_generations",
    815     "radroots_runtime_source_generations_active_idx",
    816     "radroots_runtime_source_generations_delete_guard",
    817     "radroots_runtime_source_generations_identity_guard",
    818     "radroots_runtime_source_generations_sequence_guard",
    819 ];
    820 
    821 const RUNTIME_V17_OBJECTS: &[&str] = &[
    822     "radroots_runtime_atomic_commits",
    823     "radroots_runtime_authored_artifacts",
    824     "radroots_runtime_authored_artifacts_admission_ready_idx",
    825     "radroots_runtime_authored_artifacts_signed_fact_guard",
    826     "radroots_runtime_authored_artifacts_signing_ready_idx",
    827     "radroots_runtime_authored_atomic_commits",
    828     "radroots_runtime_authored_atomic_commits_delete_guard",
    829     "radroots_runtime_authored_atomic_commits_update_guard",
    830     "radroots_runtime_authored_atomic_target_phase_idx",
    831     "radroots_runtime_authored_delivery_attempts",
    832     "radroots_runtime_authored_delivery_claims",
    833     "radroots_runtime_authored_delivery_claims_delete_guard",
    834     "radroots_runtime_authored_delivery_claims_update_guard",
    835     "radroots_runtime_authored_delivery_facts",
    836     "radroots_runtime_authored_delivery_facts_delete_guard",
    837     "radroots_runtime_authored_delivery_facts_update_guard",
    838     "radroots_runtime_authored_delivery_plans",
    839     "radroots_runtime_authored_delivery_ready_idx",
    840     "radroots_runtime_authored_delivery_reconciliations",
    841     "radroots_runtime_authored_delivery_reconciliations_delete_guard",
    842     "radroots_runtime_authored_delivery_reconciliations_update_guard",
    843     "radroots_runtime_authored_delivery_stop_guard",
    844     "radroots_runtime_authored_delivery_targets",
    845     "radroots_runtime_authored_draft_author_head_idx",
    846     "radroots_runtime_authored_draft_revisions",
    847     "radroots_runtime_authored_draft_revisions_delete_guard",
    848     "radroots_runtime_authored_draft_revisions_update_guard",
    849     "radroots_runtime_authored_draft_scope_head_idx",
    850     "radroots_runtime_authored_migration_evidence",
    851     "radroots_runtime_authored_migration_evidence_delete_guard",
    852     "radroots_runtime_authored_migration_evidence_update_guard",
    853     "radroots_runtime_authored_operations",
    854     "radroots_runtime_delivery_evidence",
    855     "radroots_runtime_delivery_evidence_item_idx",
    856     "radroots_runtime_event_index_checkpoints",
    857     "radroots_runtime_event_index_manifests",
    858     "radroots_runtime_event_index_shards",
    859     "radroots_runtime_event_provenance",
    860     "radroots_runtime_event_provenance_observed_idx",
    861     "radroots_runtime_events",
    862     "radroots_runtime_events_admission_idx",
    863     "radroots_runtime_events_contract_metadata_guard",
    864     "radroots_runtime_events_contract_metadata_insert_guard",
    865     "radroots_runtime_events_delete_guard",
    866     "radroots_runtime_events_event_id_idx",
    867     "radroots_runtime_events_raw_update_guard",
    868     "radroots_runtime_journal_idempotency_idx",
    869     "radroots_runtime_journal_operations",
    870     "radroots_runtime_journal_recovery_idx",
    871     "radroots_runtime_legacy_event_staging",
    872     "radroots_runtime_legacy_event_staging_delete_guard",
    873     "radroots_runtime_legacy_event_staging_insert_guard",
    874     "radroots_runtime_legacy_event_staging_update_guard",
    875     "radroots_runtime_legacy_import_commit_delete_guard",
    876     "radroots_runtime_legacy_import_commit_update_guard",
    877     "radroots_runtime_legacy_import_commits",
    878     "radroots_runtime_legacy_import_delete_guard",
    879     "radroots_runtime_legacy_import_identity_guard",
    880     "radroots_runtime_legacy_import_member_delete_guard",
    881     "radroots_runtime_legacy_import_member_identity_guard",
    882     "radroots_runtime_legacy_import_member_state_guard",
    883     "radroots_runtime_legacy_import_members",
    884     "radroots_runtime_legacy_import_state_guard",
    885     "radroots_runtime_legacy_import_state_idx",
    886     "radroots_runtime_legacy_imports",
    887     "radroots_runtime_legacy_outbox_staging",
    888     "radroots_runtime_legacy_outbox_staging_delete_guard",
    889     "radroots_runtime_legacy_outbox_staging_insert_guard",
    890     "radroots_runtime_legacy_outbox_staging_parent_idx",
    891     "radroots_runtime_legacy_outbox_staging_update_guard",
    892     "radroots_runtime_outbox_items",
    893     "radroots_runtime_outbox_operation_idx",
    894     "radroots_runtime_outbox_ready_idx",
    895     "radroots_runtime_outbox_targets",
    896     "radroots_runtime_projection_checkpoints",
    897     "radroots_runtime_projection_documents",
    898     "radroots_runtime_projection_invalidations",
    899     "radroots_runtime_projection_rebuilds",
    900     "radroots_runtime_projection_rebuilds_stage_idx",
    901     "radroots_runtime_projection_snapshots",
    902     "radroots_runtime_projection_snapshots_created_idx",
    903     "radroots_runtime_projection_snapshots_update_guard",
    904     "radroots_runtime_source_generations",
    905     "radroots_runtime_source_generations_active_idx",
    906     "radroots_runtime_source_generations_delete_guard",
    907     "radroots_runtime_source_generations_identity_guard",
    908     "radroots_runtime_source_generations_sequence_guard",
    909 ];
    910 
    911 const RUNTIME_V18_OBJECTS: &[&str] = &[
    912     "radroots_runtime_atomic_commits",
    913     "radroots_runtime_authored_artifacts",
    914     "radroots_runtime_authored_artifacts_admission_ready_idx",
    915     "radroots_runtime_authored_artifacts_signed_fact_guard",
    916     "radroots_runtime_authored_artifacts_signing_ready_idx",
    917     "radroots_runtime_authored_atomic_commits",
    918     "radroots_runtime_authored_atomic_commits_delete_guard",
    919     "radroots_runtime_authored_atomic_commits_update_guard",
    920     "radroots_runtime_authored_atomic_target_phase_idx",
    921     "radroots_runtime_authored_delivery_attempts",
    922     "radroots_runtime_authored_delivery_claims",
    923     "radroots_runtime_authored_delivery_claims_delete_guard",
    924     "radroots_runtime_authored_delivery_claims_update_guard",
    925     "radroots_runtime_authored_delivery_facts",
    926     "radroots_runtime_authored_delivery_facts_delete_guard",
    927     "radroots_runtime_authored_delivery_facts_update_guard",
    928     "radroots_runtime_authored_delivery_plans",
    929     "radroots_runtime_authored_delivery_ready_idx",
    930     "radroots_runtime_authored_delivery_reconciliations",
    931     "radroots_runtime_authored_delivery_reconciliations_delete_guard",
    932     "radroots_runtime_authored_delivery_reconciliations_update_guard",
    933     "radroots_runtime_authored_delivery_stop_guard",
    934     "radroots_runtime_authored_delivery_targets",
    935     "radroots_runtime_authored_draft_author_head_idx",
    936     "radroots_runtime_authored_draft_revisions",
    937     "radroots_runtime_authored_draft_revisions_delete_guard",
    938     "radroots_runtime_authored_draft_revisions_update_guard",
    939     "radroots_runtime_authored_draft_scope_head_idx",
    940     "radroots_runtime_authored_migration_evidence",
    941     "radroots_runtime_authored_migration_evidence_delete_guard",
    942     "radroots_runtime_authored_migration_evidence_update_guard",
    943     "radroots_runtime_authored_operations",
    944     "radroots_runtime_delivery_evidence",
    945     "radroots_runtime_delivery_evidence_item_idx",
    946     "radroots_runtime_event_index_checkpoints",
    947     "radroots_runtime_event_index_manifests",
    948     "radroots_runtime_event_index_shards",
    949     "radroots_runtime_event_provenance",
    950     "radroots_runtime_event_provenance_observed_idx",
    951     "radroots_runtime_events",
    952     "radroots_runtime_events_admission_idx",
    953     "radroots_runtime_events_contract_metadata_guard",
    954     "radroots_runtime_events_contract_metadata_insert_guard",
    955     "radroots_runtime_events_delete_guard",
    956     "radroots_runtime_events_event_id_idx",
    957     "radroots_runtime_events_mutation_insert",
    958     "radroots_runtime_events_mutation_update",
    959     "radroots_runtime_events_raw_update_guard",
    960     "radroots_runtime_journal_idempotency_idx",
    961     "radroots_runtime_journal_operations",
    962     "radroots_runtime_journal_recovery_idx",
    963     "radroots_runtime_legacy_event_staging",
    964     "radroots_runtime_legacy_event_staging_delete_guard",
    965     "radroots_runtime_legacy_event_staging_insert_guard",
    966     "radroots_runtime_legacy_event_staging_update_guard",
    967     "radroots_runtime_legacy_import_commit_delete_guard",
    968     "radroots_runtime_legacy_import_commit_update_guard",
    969     "radroots_runtime_legacy_import_commits",
    970     "radroots_runtime_legacy_import_delete_guard",
    971     "radroots_runtime_legacy_import_identity_guard",
    972     "radroots_runtime_legacy_import_member_delete_guard",
    973     "radroots_runtime_legacy_import_member_identity_guard",
    974     "radroots_runtime_legacy_import_member_state_guard",
    975     "radroots_runtime_legacy_import_members",
    976     "radroots_runtime_legacy_import_state_guard",
    977     "radroots_runtime_legacy_import_state_idx",
    978     "radroots_runtime_legacy_imports",
    979     "radroots_runtime_legacy_outbox_staging",
    980     "radroots_runtime_legacy_outbox_staging_delete_guard",
    981     "radroots_runtime_legacy_outbox_staging_insert_guard",
    982     "radroots_runtime_legacy_outbox_staging_parent_idx",
    983     "radroots_runtime_legacy_outbox_staging_update_guard",
    984     "radroots_runtime_outbox_items",
    985     "radroots_runtime_outbox_operation_idx",
    986     "radroots_runtime_outbox_ready_idx",
    987     "radroots_runtime_outbox_targets",
    988     "radroots_runtime_projection_checkpoints",
    989     "radroots_runtime_projection_documents",
    990     "radroots_runtime_projection_invalidations",
    991     "radroots_runtime_projection_rebuilds",
    992     "radroots_runtime_projection_rebuilds_stage_idx",
    993     "radroots_runtime_projection_snapshots",
    994     "radroots_runtime_projection_snapshots_created_idx",
    995     "radroots_runtime_projection_snapshots_update_guard",
    996     "radroots_runtime_source_generations",
    997     "radroots_runtime_source_generations_active_idx",
    998     "radroots_runtime_source_generations_delete_guard",
    999     "radroots_runtime_source_generations_identity_guard",
   1000     "radroots_runtime_source_generations_mutation_guard",
   1001     "radroots_runtime_source_generations_sequence_guard",
   1002 ];
   1003 
   1004 const RUNTIME_V19_OBJECTS: &[&str] = &[
   1005     "radroots_runtime_atomic_commits",
   1006     "radroots_runtime_authored_artifacts",
   1007     "radroots_runtime_authored_artifacts_admission_ready_idx",
   1008     "radroots_runtime_authored_artifacts_signed_fact_guard",
   1009     "radroots_runtime_authored_artifacts_signing_ready_idx",
   1010     "radroots_runtime_authored_atomic_commits",
   1011     "radroots_runtime_authored_atomic_commits_delete_guard",
   1012     "radroots_runtime_authored_atomic_commits_update_guard",
   1013     "radroots_runtime_authored_atomic_target_phase_idx",
   1014     "radroots_runtime_authored_delivery_attempts",
   1015     "radroots_runtime_authored_delivery_claims",
   1016     "radroots_runtime_authored_delivery_claims_delete_guard",
   1017     "radroots_runtime_authored_delivery_claims_update_guard",
   1018     "radroots_runtime_authored_delivery_facts",
   1019     "radroots_runtime_authored_delivery_facts_delete_guard",
   1020     "radroots_runtime_authored_delivery_facts_update_guard",
   1021     "radroots_runtime_authored_delivery_plans",
   1022     "radroots_runtime_authored_delivery_ready_idx",
   1023     "radroots_runtime_authored_delivery_reconciliations",
   1024     "radroots_runtime_authored_delivery_reconciliations_delete_guard",
   1025     "radroots_runtime_authored_delivery_reconciliations_update_guard",
   1026     "radroots_runtime_authored_delivery_stop_guard",
   1027     "radroots_runtime_authored_delivery_targets",
   1028     "radroots_runtime_authored_draft_author_head_idx",
   1029     "radroots_runtime_authored_draft_revisions",
   1030     "radroots_runtime_authored_draft_revisions_delete_guard",
   1031     "radroots_runtime_authored_draft_revisions_update_guard",
   1032     "radroots_runtime_authored_draft_scope_head_idx",
   1033     "radroots_runtime_authored_migration_evidence",
   1034     "radroots_runtime_authored_migration_evidence_delete_guard",
   1035     "radroots_runtime_authored_migration_evidence_update_guard",
   1036     "radroots_runtime_authored_operations",
   1037     "radroots_runtime_delivery_evidence",
   1038     "radroots_runtime_delivery_evidence_item_idx",
   1039     "radroots_runtime_event_index_checkpoints",
   1040     "radroots_runtime_event_index_manifests",
   1041     "radroots_runtime_event_index_shards",
   1042     "radroots_runtime_event_provenance",
   1043     "radroots_runtime_event_provenance_observed_idx",
   1044     "radroots_runtime_events",
   1045     "radroots_runtime_events_admission_idx",
   1046     "radroots_runtime_events_contract_metadata_guard",
   1047     "radroots_runtime_events_contract_metadata_insert_guard",
   1048     "radroots_runtime_events_delete_guard",
   1049     "radroots_runtime_events_event_id_idx",
   1050     "radroots_runtime_events_mutation_idx",
   1051     "radroots_runtime_events_mutation_insert",
   1052     "radroots_runtime_events_mutation_update",
   1053     "radroots_runtime_events_raw_update_guard",
   1054     "radroots_runtime_journal_idempotency_idx",
   1055     "radroots_runtime_journal_operations",
   1056     "radroots_runtime_journal_recovery_idx",
   1057     "radroots_runtime_legacy_event_staging",
   1058     "radroots_runtime_legacy_event_staging_delete_guard",
   1059     "radroots_runtime_legacy_event_staging_insert_guard",
   1060     "radroots_runtime_legacy_event_staging_update_guard",
   1061     "radroots_runtime_legacy_import_commit_delete_guard",
   1062     "radroots_runtime_legacy_import_commit_update_guard",
   1063     "radroots_runtime_legacy_import_commits",
   1064     "radroots_runtime_legacy_import_delete_guard",
   1065     "radroots_runtime_legacy_import_identity_guard",
   1066     "radroots_runtime_legacy_import_member_delete_guard",
   1067     "radroots_runtime_legacy_import_member_identity_guard",
   1068     "radroots_runtime_legacy_import_member_state_guard",
   1069     "radroots_runtime_legacy_import_members",
   1070     "radroots_runtime_legacy_import_state_guard",
   1071     "radroots_runtime_legacy_import_state_idx",
   1072     "radroots_runtime_legacy_imports",
   1073     "radroots_runtime_legacy_outbox_staging",
   1074     "radroots_runtime_legacy_outbox_staging_delete_guard",
   1075     "radroots_runtime_legacy_outbox_staging_insert_guard",
   1076     "radroots_runtime_legacy_outbox_staging_parent_idx",
   1077     "radroots_runtime_legacy_outbox_staging_update_guard",
   1078     "radroots_runtime_outbox_items",
   1079     "radroots_runtime_outbox_operation_idx",
   1080     "radroots_runtime_outbox_ready_idx",
   1081     "radroots_runtime_outbox_targets",
   1082     "radroots_runtime_projection_checkpoints",
   1083     "radroots_runtime_projection_documents",
   1084     "radroots_runtime_projection_invalidations",
   1085     "radroots_runtime_projection_rebuilds",
   1086     "radroots_runtime_projection_rebuilds_stage_idx",
   1087     "radroots_runtime_projection_snapshots",
   1088     "radroots_runtime_projection_snapshots_created_idx",
   1089     "radroots_runtime_projection_snapshots_update_guard",
   1090     "radroots_runtime_source_generations",
   1091     "radroots_runtime_source_generations_active_idx",
   1092     "radroots_runtime_source_generations_delete_guard",
   1093     "radroots_runtime_source_generations_identity_guard",
   1094     "radroots_runtime_source_generations_mutation_guard",
   1095     "radroots_runtime_source_generations_sequence_guard",
   1096     "radroots_runtime_visibility_deletion_addresses",
   1097     "radroots_runtime_visibility_deletion_addresses_request_idx",
   1098     "radroots_runtime_visibility_deletion_events",
   1099     "radroots_runtime_visibility_deletion_events_request_idx",
   1100     "radroots_runtime_visibility_events",
   1101     "radroots_runtime_visibility_events_head_idx",
   1102     "radroots_runtime_visibility_events_stage_idx",
   1103     "radroots_runtime_visibility_progress",
   1104 ];
   1105 
   1106 const RUNTIME_V20_OBJECTS: &[&str] = &[
   1107     "radroots_runtime_atomic_commits",
   1108     "radroots_runtime_authored_artifacts",
   1109     "radroots_runtime_authored_artifacts_admission_ready_idx",
   1110     "radroots_runtime_authored_artifacts_signed_fact_guard",
   1111     "radroots_runtime_authored_artifacts_signing_ready_idx",
   1112     "radroots_runtime_authored_atomic_commits",
   1113     "radroots_runtime_authored_atomic_commits_delete_guard",
   1114     "radroots_runtime_authored_atomic_commits_update_guard",
   1115     "radroots_runtime_authored_atomic_target_phase_idx",
   1116     "radroots_runtime_authored_delivery_attempts",
   1117     "radroots_runtime_authored_delivery_claims",
   1118     "radroots_runtime_authored_delivery_claims_delete_guard",
   1119     "radroots_runtime_authored_delivery_claims_update_guard",
   1120     "radroots_runtime_authored_delivery_facts",
   1121     "radroots_runtime_authored_delivery_facts_delete_guard",
   1122     "radroots_runtime_authored_delivery_facts_update_guard",
   1123     "radroots_runtime_authored_delivery_plans",
   1124     "radroots_runtime_authored_delivery_ready_idx",
   1125     "radroots_runtime_authored_delivery_reconciliations",
   1126     "radroots_runtime_authored_delivery_reconciliations_delete_guard",
   1127     "radroots_runtime_authored_delivery_reconciliations_update_guard",
   1128     "radroots_runtime_authored_delivery_stop_guard",
   1129     "radroots_runtime_authored_delivery_targets",
   1130     "radroots_runtime_authored_draft_author_head_idx",
   1131     "radroots_runtime_authored_draft_revisions",
   1132     "radroots_runtime_authored_draft_revisions_delete_guard",
   1133     "radroots_runtime_authored_draft_revisions_update_guard",
   1134     "radroots_runtime_authored_draft_scope_head_idx",
   1135     "radroots_runtime_authored_migration_evidence",
   1136     "radroots_runtime_authored_migration_evidence_delete_guard",
   1137     "radroots_runtime_authored_migration_evidence_update_guard",
   1138     "radroots_runtime_authored_operations",
   1139     "radroots_runtime_delivery_evidence",
   1140     "radroots_runtime_delivery_evidence_item_idx",
   1141     "radroots_runtime_event_index_checkpoints",
   1142     "radroots_runtime_event_index_manifests",
   1143     "radroots_runtime_event_index_shards",
   1144     "radroots_runtime_event_provenance",
   1145     "radroots_runtime_event_provenance_observed_idx",
   1146     "radroots_runtime_events",
   1147     "radroots_runtime_events_admission_idx",
   1148     "radroots_runtime_events_contract_metadata_guard",
   1149     "radroots_runtime_events_contract_metadata_insert_guard",
   1150     "radroots_runtime_events_delete_guard",
   1151     "radroots_runtime_events_event_id_idx",
   1152     "radroots_runtime_events_mutation_idx",
   1153     "radroots_runtime_events_mutation_insert",
   1154     "radroots_runtime_events_mutation_update",
   1155     "radroots_runtime_events_raw_update_guard",
   1156     "radroots_runtime_journal_idempotency_idx",
   1157     "radroots_runtime_journal_operations",
   1158     "radroots_runtime_journal_recovery_idx",
   1159     "radroots_runtime_legacy_event_staging",
   1160     "radroots_runtime_legacy_event_staging_delete_guard",
   1161     "radroots_runtime_legacy_event_staging_insert_guard",
   1162     "radroots_runtime_legacy_event_staging_update_guard",
   1163     "radroots_runtime_legacy_import_commit_delete_guard",
   1164     "radroots_runtime_legacy_import_commit_update_guard",
   1165     "radroots_runtime_legacy_import_commits",
   1166     "radroots_runtime_legacy_import_delete_guard",
   1167     "radroots_runtime_legacy_import_identity_guard",
   1168     "radroots_runtime_legacy_import_member_delete_guard",
   1169     "radroots_runtime_legacy_import_member_identity_guard",
   1170     "radroots_runtime_legacy_import_member_state_guard",
   1171     "radroots_runtime_legacy_import_members",
   1172     "radroots_runtime_legacy_import_state_guard",
   1173     "radroots_runtime_legacy_import_state_idx",
   1174     "radroots_runtime_legacy_imports",
   1175     "radroots_runtime_legacy_outbox_staging",
   1176     "radroots_runtime_legacy_outbox_staging_delete_guard",
   1177     "radroots_runtime_legacy_outbox_staging_insert_guard",
   1178     "radroots_runtime_legacy_outbox_staging_parent_idx",
   1179     "radroots_runtime_legacy_outbox_staging_update_guard",
   1180     "radroots_runtime_outbox_items",
   1181     "radroots_runtime_outbox_operation_idx",
   1182     "radroots_runtime_outbox_ready_idx",
   1183     "radroots_runtime_outbox_targets",
   1184     "radroots_runtime_projection_checkpoints",
   1185     "radroots_runtime_projection_documents",
   1186     "radroots_runtime_projection_invalidations",
   1187     "radroots_runtime_projection_rebuilds",
   1188     "radroots_runtime_projection_rebuilds_stage_idx",
   1189     "radroots_runtime_projection_snapshots",
   1190     "radroots_runtime_projection_snapshots_created_idx",
   1191     "radroots_runtime_projection_snapshots_update_guard",
   1192     "radroots_runtime_source_generations",
   1193     "radroots_runtime_source_generations_active_idx",
   1194     "radroots_runtime_source_generations_delete_guard",
   1195     "radroots_runtime_source_generations_identity_guard",
   1196     "radroots_runtime_source_generations_mutation_guard",
   1197     "radroots_runtime_source_generations_sequence_guard",
   1198     "radroots_runtime_visibility_deletion_addresses",
   1199     "radroots_runtime_visibility_deletion_addresses_request_idx",
   1200     "radroots_runtime_visibility_deletion_events",
   1201     "radroots_runtime_visibility_deletion_events_request_idx",
   1202     "radroots_runtime_visibility_empty_source",
   1203     "radroots_runtime_visibility_events",
   1204     "radroots_runtime_visibility_events_head_idx",
   1205     "radroots_runtime_visibility_events_stage_idx",
   1206     "radroots_runtime_visibility_heads",
   1207     "radroots_runtime_visibility_members",
   1208     "radroots_runtime_visibility_members_count_insert",
   1209     "radroots_runtime_visibility_members_count_update",
   1210     "radroots_runtime_visibility_members_event_idx",
   1211     "radroots_runtime_visibility_members_page_idx",
   1212     "radroots_runtime_visibility_pending",
   1213     "radroots_runtime_visibility_progress",
   1214 ];
   1215 
   1216 /// Ordered, immutable runtime migration plan.
   1217 const RUNTIME_V21_OBJECTS: &[&str] = &[
   1218     "radroots_runtime_atomic_commits",
   1219     "radroots_runtime_authored_artifacts",
   1220     "radroots_runtime_authored_artifacts_admission_ready_idx",
   1221     "radroots_runtime_authored_artifacts_signed_fact_guard",
   1222     "radroots_runtime_authored_artifacts_signing_ready_idx",
   1223     "radroots_runtime_authored_atomic_commits",
   1224     "radroots_runtime_authored_atomic_commits_delete_guard",
   1225     "radroots_runtime_authored_atomic_commits_update_guard",
   1226     "radroots_runtime_authored_atomic_target_phase_idx",
   1227     "radroots_runtime_authored_delivery_attempts",
   1228     "radroots_runtime_authored_delivery_claims",
   1229     "radroots_runtime_authored_delivery_claims_delete_guard",
   1230     "radroots_runtime_authored_delivery_claims_update_guard",
   1231     "radroots_runtime_authored_delivery_facts",
   1232     "radroots_runtime_authored_delivery_facts_delete_guard",
   1233     "radroots_runtime_authored_delivery_facts_update_guard",
   1234     "radroots_runtime_authored_delivery_plans",
   1235     "radroots_runtime_authored_delivery_ready_idx",
   1236     "radroots_runtime_authored_delivery_reconciliations",
   1237     "radroots_runtime_authored_delivery_reconciliations_delete_guard",
   1238     "radroots_runtime_authored_delivery_reconciliations_update_guard",
   1239     "radroots_runtime_authored_delivery_stop_guard",
   1240     "radroots_runtime_authored_delivery_targets",
   1241     "radroots_runtime_authored_draft_author_head_idx",
   1242     "radroots_runtime_authored_draft_revisions",
   1243     "radroots_runtime_authored_draft_revisions_delete_guard",
   1244     "radroots_runtime_authored_draft_revisions_update_guard",
   1245     "radroots_runtime_authored_draft_scope_head_idx",
   1246     "radroots_runtime_authored_migration_evidence",
   1247     "radroots_runtime_authored_migration_evidence_delete_guard",
   1248     "radroots_runtime_authored_migration_evidence_update_guard",
   1249     "radroots_runtime_authored_operations",
   1250     "radroots_runtime_delivery_evidence",
   1251     "radroots_runtime_delivery_evidence_item_idx",
   1252     "radroots_runtime_event_index_checkpoints",
   1253     "radroots_runtime_event_index_manifests",
   1254     "radroots_runtime_event_index_shards",
   1255     "radroots_runtime_event_provenance",
   1256     "radroots_runtime_event_provenance_observed_idx",
   1257     "radroots_runtime_events",
   1258     "radroots_runtime_events_admission_idx",
   1259     "radroots_runtime_events_contract_metadata_guard",
   1260     "radroots_runtime_events_contract_metadata_insert_guard",
   1261     "radroots_runtime_events_delete_guard",
   1262     "radroots_runtime_events_event_id_idx",
   1263     "radroots_runtime_events_mutation_idx",
   1264     "radroots_runtime_events_mutation_insert",
   1265     "radroots_runtime_events_mutation_update",
   1266     "radroots_runtime_events_raw_update_guard",
   1267     "radroots_runtime_journal_idempotency_idx",
   1268     "radroots_runtime_journal_operations",
   1269     "radroots_runtime_journal_recovery_idx",
   1270     "radroots_runtime_legacy_event_staging",
   1271     "radroots_runtime_legacy_event_staging_delete_guard",
   1272     "radroots_runtime_legacy_event_staging_insert_guard",
   1273     "radroots_runtime_legacy_event_staging_update_guard",
   1274     "radroots_runtime_legacy_import_commit_delete_guard",
   1275     "radroots_runtime_legacy_import_commit_update_guard",
   1276     "radroots_runtime_legacy_import_commits",
   1277     "radroots_runtime_legacy_import_delete_guard",
   1278     "radroots_runtime_legacy_import_identity_guard",
   1279     "radroots_runtime_legacy_import_member_delete_guard",
   1280     "radroots_runtime_legacy_import_member_identity_guard",
   1281     "radroots_runtime_legacy_import_member_state_guard",
   1282     "radroots_runtime_legacy_import_members",
   1283     "radroots_runtime_legacy_import_state_guard",
   1284     "radroots_runtime_legacy_import_state_idx",
   1285     "radroots_runtime_legacy_imports",
   1286     "radroots_runtime_legacy_outbox_staging",
   1287     "radroots_runtime_legacy_outbox_staging_delete_guard",
   1288     "radroots_runtime_legacy_outbox_staging_insert_guard",
   1289     "radroots_runtime_legacy_outbox_staging_parent_idx",
   1290     "radroots_runtime_legacy_outbox_staging_update_guard",
   1291     "radroots_runtime_outbox_items",
   1292     "radroots_runtime_outbox_operation_idx",
   1293     "radroots_runtime_outbox_ready_idx",
   1294     "radroots_runtime_outbox_targets",
   1295     "radroots_runtime_projection_checkpoints",
   1296     "radroots_runtime_projection_documents",
   1297     "radroots_runtime_projection_generations",
   1298     "radroots_runtime_projection_generations_staging_idx",
   1299     "radroots_runtime_projection_invalidations",
   1300     "radroots_runtime_projection_rebuilds",
   1301     "radroots_runtime_projection_rebuilds_stage_idx",
   1302     "radroots_runtime_projection_snapshots",
   1303     "radroots_runtime_projection_snapshots_created_idx",
   1304     "radroots_runtime_projection_snapshots_update_guard",
   1305     "radroots_runtime_source_generations",
   1306     "radroots_runtime_source_generations_active_idx",
   1307     "radroots_runtime_source_generations_delete_guard",
   1308     "radroots_runtime_source_generations_identity_guard",
   1309     "radroots_runtime_source_generations_mutation_guard",
   1310     "radroots_runtime_source_generations_sequence_guard",
   1311     "radroots_runtime_visibility_deletion_addresses",
   1312     "radroots_runtime_visibility_deletion_addresses_request_idx",
   1313     "radroots_runtime_visibility_deletion_events",
   1314     "radroots_runtime_visibility_deletion_events_request_idx",
   1315     "radroots_runtime_visibility_empty_source",
   1316     "radroots_runtime_visibility_events",
   1317     "radroots_runtime_visibility_events_head_idx",
   1318     "radroots_runtime_visibility_events_stage_idx",
   1319     "radroots_runtime_visibility_heads",
   1320     "radroots_runtime_visibility_members",
   1321     "radroots_runtime_visibility_members_count_insert",
   1322     "radroots_runtime_visibility_members_count_update",
   1323     "radroots_runtime_visibility_members_event_idx",
   1324     "radroots_runtime_visibility_members_page_idx",
   1325     "radroots_runtime_visibility_pending",
   1326     "radroots_runtime_visibility_progress",
   1327 ];
   1328 
   1329 const RUNTIME_V22_OBJECTS: &[&str] = &[
   1330     "radroots_runtime_atomic_commits",
   1331     "radroots_runtime_authored_artifacts",
   1332     "radroots_runtime_authored_artifacts_admission_ready_idx",
   1333     "radroots_runtime_authored_artifacts_signed_fact_guard",
   1334     "radroots_runtime_authored_artifacts_signing_ready_idx",
   1335     "radroots_runtime_authored_atomic_commits",
   1336     "radroots_runtime_authored_atomic_commits_delete_guard",
   1337     "radroots_runtime_authored_atomic_commits_update_guard",
   1338     "radroots_runtime_authored_atomic_target_phase_idx",
   1339     "radroots_runtime_authored_delivery_attempts",
   1340     "radroots_runtime_authored_delivery_claims",
   1341     "radroots_runtime_authored_delivery_claims_delete_guard",
   1342     "radroots_runtime_authored_delivery_claims_update_guard",
   1343     "radroots_runtime_authored_delivery_facts",
   1344     "radroots_runtime_authored_delivery_facts_delete_guard",
   1345     "radroots_runtime_authored_delivery_facts_update_guard",
   1346     "radroots_runtime_authored_delivery_plans",
   1347     "radroots_runtime_authored_delivery_ready_idx",
   1348     "radroots_runtime_authored_delivery_reconciliations",
   1349     "radroots_runtime_authored_delivery_reconciliations_delete_guard",
   1350     "radroots_runtime_authored_delivery_reconciliations_update_guard",
   1351     "radroots_runtime_authored_delivery_stop_guard",
   1352     "radroots_runtime_authored_delivery_targets",
   1353     "radroots_runtime_authored_draft_author_head_idx",
   1354     "radroots_runtime_authored_draft_revisions",
   1355     "radroots_runtime_authored_draft_revisions_delete_guard",
   1356     "radroots_runtime_authored_draft_revisions_update_guard",
   1357     "radroots_runtime_authored_draft_scope_head_idx",
   1358     "radroots_runtime_authored_migration_evidence",
   1359     "radroots_runtime_authored_migration_evidence_delete_guard",
   1360     "radroots_runtime_authored_migration_evidence_update_guard",
   1361     "radroots_runtime_authored_operations",
   1362     "radroots_runtime_delivery_evidence",
   1363     "radroots_runtime_delivery_evidence_item_idx",
   1364     "radroots_runtime_event_index_checkpoints",
   1365     "radroots_runtime_event_index_manifests",
   1366     "radroots_runtime_event_index_shards",
   1367     "radroots_runtime_event_provenance",
   1368     "radroots_runtime_event_provenance_observed_idx",
   1369     "radroots_runtime_events",
   1370     "radroots_runtime_events_admission_idx",
   1371     "radroots_runtime_events_contract_metadata_guard",
   1372     "radroots_runtime_events_contract_metadata_insert_guard",
   1373     "radroots_runtime_events_delete_guard",
   1374     "radroots_runtime_events_event_id_idx",
   1375     "radroots_runtime_events_mutation_idx",
   1376     "radroots_runtime_events_mutation_insert",
   1377     "radroots_runtime_events_mutation_update",
   1378     "radroots_runtime_events_raw_update_guard",
   1379     "radroots_runtime_journal_idempotency_idx",
   1380     "radroots_runtime_journal_operations",
   1381     "radroots_runtime_journal_recovery_idx",
   1382     "radroots_runtime_legacy_event_staging",
   1383     "radroots_runtime_legacy_event_staging_delete_guard",
   1384     "radroots_runtime_legacy_event_staging_insert_guard",
   1385     "radroots_runtime_legacy_event_staging_update_guard",
   1386     "radroots_runtime_legacy_import_commit_delete_guard",
   1387     "radroots_runtime_legacy_import_commit_update_guard",
   1388     "radroots_runtime_legacy_import_commits",
   1389     "radroots_runtime_legacy_import_delete_guard",
   1390     "radroots_runtime_legacy_import_identity_guard",
   1391     "radroots_runtime_legacy_import_member_delete_guard",
   1392     "radroots_runtime_legacy_import_member_identity_guard",
   1393     "radroots_runtime_legacy_import_member_state_guard",
   1394     "radroots_runtime_legacy_import_members",
   1395     "radroots_runtime_legacy_import_state_guard",
   1396     "radroots_runtime_legacy_import_state_idx",
   1397     "radroots_runtime_legacy_imports",
   1398     "radroots_runtime_legacy_outbox_staging",
   1399     "radroots_runtime_legacy_outbox_staging_delete_guard",
   1400     "radroots_runtime_legacy_outbox_staging_insert_guard",
   1401     "radroots_runtime_legacy_outbox_staging_parent_idx",
   1402     "radroots_runtime_legacy_outbox_staging_update_guard",
   1403     "radroots_runtime_outbox_items",
   1404     "radroots_runtime_outbox_operation_idx",
   1405     "radroots_runtime_outbox_ready_idx",
   1406     "radroots_runtime_outbox_targets",
   1407     "radroots_runtime_projection_cache_budget",
   1408     "radroots_runtime_projection_cache_capacity_guard",
   1409     "radroots_runtime_projection_cache_checkpoint_delete",
   1410     "radroots_runtime_projection_cache_checkpoint_insert",
   1411     "radroots_runtime_projection_cache_checkpoint_update",
   1412     "radroots_runtime_projection_cache_document_delete",
   1413     "radroots_runtime_projection_cache_document_insert",
   1414     "radroots_runtime_projection_cache_document_update",
   1415     "radroots_runtime_projection_cache_generation_delete",
   1416     "radroots_runtime_projection_cache_generation_insert",
   1417     "radroots_runtime_projection_cache_generation_update",
   1418     "radroots_runtime_projection_cache_owners",
   1419     "radroots_runtime_projection_cache_snapshot_delete",
   1420     "radroots_runtime_projection_cache_snapshot_insert",
   1421     "radroots_runtime_projection_checkpoints",
   1422     "radroots_runtime_projection_documents",
   1423     "radroots_runtime_projection_generations",
   1424     "radroots_runtime_projection_generations_staging_idx",
   1425     "radroots_runtime_projection_invalidations",
   1426     "radroots_runtime_projection_rebuilds",
   1427     "radroots_runtime_projection_rebuilds_stage_idx",
   1428     "radroots_runtime_projection_snapshots",
   1429     "radroots_runtime_projection_snapshots_created_idx",
   1430     "radroots_runtime_projection_snapshots_generation_created_idx",
   1431     "radroots_runtime_projection_snapshots_update_guard",
   1432     "radroots_runtime_source_generations",
   1433     "radroots_runtime_source_generations_active_idx",
   1434     "radroots_runtime_source_generations_delete_guard",
   1435     "radroots_runtime_source_generations_identity_guard",
   1436     "radroots_runtime_source_generations_mutation_guard",
   1437     "radroots_runtime_source_generations_sequence_guard",
   1438     "radroots_runtime_visibility_deletion_addresses",
   1439     "radroots_runtime_visibility_deletion_addresses_request_idx",
   1440     "radroots_runtime_visibility_deletion_events",
   1441     "radroots_runtime_visibility_deletion_events_request_idx",
   1442     "radroots_runtime_visibility_empty_source",
   1443     "radroots_runtime_visibility_events",
   1444     "radroots_runtime_visibility_events_head_idx",
   1445     "radroots_runtime_visibility_events_stage_idx",
   1446     "radroots_runtime_visibility_heads",
   1447     "radroots_runtime_visibility_members",
   1448     "radroots_runtime_visibility_members_count_insert",
   1449     "radroots_runtime_visibility_members_count_update",
   1450     "radroots_runtime_visibility_members_event_idx",
   1451     "radroots_runtime_visibility_members_page_idx",
   1452     "radroots_runtime_visibility_pending",
   1453     "radroots_runtime_visibility_progress",
   1454 ];
   1455 
   1456 const RUNTIME_V23_OBJECTS: &[&str] = &[
   1457     "radroots_runtime_atomic_commits",
   1458     "radroots_runtime_authored_artifacts",
   1459     "radroots_runtime_authored_artifacts_admission_ready_idx",
   1460     "radroots_runtime_authored_artifacts_signed_fact_guard",
   1461     "radroots_runtime_authored_artifacts_signing_ready_idx",
   1462     "radroots_runtime_authored_atomic_commits",
   1463     "radroots_runtime_authored_atomic_commits_delete_guard",
   1464     "radroots_runtime_authored_atomic_commits_update_guard",
   1465     "radroots_runtime_authored_atomic_target_phase_idx",
   1466     "radroots_runtime_authored_delivery_attempts",
   1467     "radroots_runtime_authored_delivery_claims",
   1468     "radroots_runtime_authored_delivery_claims_delete_guard",
   1469     "radroots_runtime_authored_delivery_claims_update_guard",
   1470     "radroots_runtime_authored_delivery_facts",
   1471     "radroots_runtime_authored_delivery_facts_delete_guard",
   1472     "radroots_runtime_authored_delivery_facts_update_guard",
   1473     "radroots_runtime_authored_delivery_plans",
   1474     "radroots_runtime_authored_delivery_ready_idx",
   1475     "radroots_runtime_authored_delivery_reconciliations",
   1476     "radroots_runtime_authored_delivery_reconciliations_delete_guard",
   1477     "radroots_runtime_authored_delivery_reconciliations_update_guard",
   1478     "radroots_runtime_authored_delivery_stop_guard",
   1479     "radroots_runtime_authored_delivery_targets",
   1480     "radroots_runtime_authored_draft_author_head_idx",
   1481     "radroots_runtime_authored_draft_revisions",
   1482     "radroots_runtime_authored_draft_revisions_delete_guard",
   1483     "radroots_runtime_authored_draft_revisions_update_guard",
   1484     "radroots_runtime_authored_draft_scope_head_idx",
   1485     "radroots_runtime_authored_migration_evidence",
   1486     "radroots_runtime_authored_migration_evidence_delete_guard",
   1487     "radroots_runtime_authored_migration_evidence_update_guard",
   1488     "radroots_runtime_authored_operations",
   1489     "radroots_runtime_delivery_evidence",
   1490     "radroots_runtime_delivery_evidence_item_idx",
   1491     "radroots_runtime_event_index_checkpoints",
   1492     "radroots_runtime_event_index_manifests",
   1493     "radroots_runtime_event_index_shards",
   1494     "radroots_runtime_event_provenance",
   1495     "radroots_runtime_event_provenance_observed_idx",
   1496     "radroots_runtime_events",
   1497     "radroots_runtime_events_admission_idx",
   1498     "radroots_runtime_events_contract_metadata_guard",
   1499     "radroots_runtime_events_contract_metadata_insert_guard",
   1500     "radroots_runtime_events_delete_guard",
   1501     "radroots_runtime_events_event_id_idx",
   1502     "radroots_runtime_events_mutation_idx",
   1503     "radroots_runtime_events_mutation_insert",
   1504     "radroots_runtime_events_mutation_update",
   1505     "radroots_runtime_events_raw_update_guard",
   1506     "radroots_runtime_journal_idempotency_idx",
   1507     "radroots_runtime_journal_operations",
   1508     "radroots_runtime_journal_recovery_idx",
   1509     "radroots_runtime_legacy_event_staging",
   1510     "radroots_runtime_legacy_event_staging_delete_guard",
   1511     "radroots_runtime_legacy_event_staging_insert_guard",
   1512     "radroots_runtime_legacy_event_staging_update_guard",
   1513     "radroots_runtime_legacy_import_commit_delete_guard",
   1514     "radroots_runtime_legacy_import_commit_update_guard",
   1515     "radroots_runtime_legacy_import_commits",
   1516     "radroots_runtime_legacy_import_delete_guard",
   1517     "radroots_runtime_legacy_import_identity_guard",
   1518     "radroots_runtime_legacy_import_member_delete_guard",
   1519     "radroots_runtime_legacy_import_member_identity_guard",
   1520     "radroots_runtime_legacy_import_member_state_guard",
   1521     "radroots_runtime_legacy_import_members",
   1522     "radroots_runtime_legacy_import_state_guard",
   1523     "radroots_runtime_legacy_import_state_idx",
   1524     "radroots_runtime_legacy_imports",
   1525     "radroots_runtime_legacy_outbox_staging",
   1526     "radroots_runtime_legacy_outbox_staging_delete_guard",
   1527     "radroots_runtime_legacy_outbox_staging_insert_guard",
   1528     "radroots_runtime_legacy_outbox_staging_parent_idx",
   1529     "radroots_runtime_legacy_outbox_staging_update_guard",
   1530     "radroots_runtime_outbox_items",
   1531     "radroots_runtime_outbox_operation_idx",
   1532     "radroots_runtime_outbox_ready_idx",
   1533     "radroots_runtime_outbox_targets",
   1534     "radroots_runtime_projection_cache_budget",
   1535     "radroots_runtime_projection_cache_capacity_guard",
   1536     "radroots_runtime_projection_cache_checkpoint_delete",
   1537     "radroots_runtime_projection_cache_checkpoint_insert",
   1538     "radroots_runtime_projection_cache_checkpoint_update",
   1539     "radroots_runtime_projection_cache_document_delete",
   1540     "radroots_runtime_projection_cache_document_insert",
   1541     "radroots_runtime_projection_cache_document_update",
   1542     "radroots_runtime_projection_cache_generation_delete",
   1543     "radroots_runtime_projection_cache_generation_insert",
   1544     "radroots_runtime_projection_cache_generation_update",
   1545     "radroots_runtime_projection_cache_owners",
   1546     "radroots_runtime_projection_cache_snapshot_delete",
   1547     "radroots_runtime_projection_cache_snapshot_insert",
   1548     "radroots_runtime_projection_checkpoints",
   1549     "radroots_runtime_projection_documents",
   1550     "radroots_runtime_projection_generations",
   1551     "radroots_runtime_projection_generations_staging_idx",
   1552     "radroots_runtime_projection_invalidations",
   1553     "radroots_runtime_projection_rebuilds",
   1554     "radroots_runtime_projection_rebuilds_stage_idx",
   1555     "radroots_runtime_projection_retired_generation_idx",
   1556     "radroots_runtime_projection_snapshots",
   1557     "radroots_runtime_projection_snapshots_created_idx",
   1558     "radroots_runtime_projection_snapshots_generation_created_idx",
   1559     "radroots_runtime_projection_snapshots_update_guard",
   1560     "radroots_runtime_source_generations",
   1561     "radroots_runtime_source_generations_active_idx",
   1562     "radroots_runtime_source_generations_delete_guard",
   1563     "radroots_runtime_source_generations_identity_guard",
   1564     "radroots_runtime_source_generations_mutation_guard",
   1565     "radroots_runtime_source_generations_sequence_guard",
   1566     "radroots_runtime_visibility_deletion_addresses",
   1567     "radroots_runtime_visibility_deletion_addresses_request_idx",
   1568     "radroots_runtime_visibility_deletion_events",
   1569     "radroots_runtime_visibility_deletion_events_request_idx",
   1570     "radroots_runtime_visibility_empty_source",
   1571     "radroots_runtime_visibility_events",
   1572     "radroots_runtime_visibility_events_head_idx",
   1573     "radroots_runtime_visibility_events_stage_idx",
   1574     "radroots_runtime_visibility_heads",
   1575     "radroots_runtime_visibility_members",
   1576     "radroots_runtime_visibility_members_count_insert",
   1577     "radroots_runtime_visibility_members_count_update",
   1578     "radroots_runtime_visibility_members_event_idx",
   1579     "radroots_runtime_visibility_members_page_idx",
   1580     "radroots_runtime_visibility_pending",
   1581     "radroots_runtime_visibility_progress",
   1582 ];
   1583 
   1584 pub const MIGRATIONS: &[MigrationDescriptor] = &[
   1585     MigrationDescriptor {
   1586         version: 1,
   1587         name: "runtime_authority",
   1588         up_sha256: "3b869122dd5bd58f4a15e7a71fd1377879640b36cd496d7b3f15278ef1e128c9",
   1589         owned_objects: RUNTIME_V1_OBJECTS,
   1590     },
   1591     MigrationDescriptor {
   1592         version: 2,
   1593         name: "canonical_event_storage",
   1594         up_sha256: "35b036ba84eff7135665c4ae42fa8232d8bacd8115805b03011a3eb76423f4b8",
   1595         owned_objects: RUNTIME_V2_OBJECTS,
   1596     },
   1597     MigrationDescriptor {
   1598         version: 3,
   1599         name: "operation_journal",
   1600         up_sha256: "4caa69a316777cabfc647e6d022007c1433a5793b2a55679629e8fac4d50a0f0",
   1601         owned_objects: RUNTIME_V2_OBJECTS,
   1602     },
   1603     MigrationDescriptor {
   1604         version: 4,
   1605         name: "outbox_delivery_evidence",
   1606         up_sha256: "435ad7590be7cd9d5b5ee3c9eb2d53419eba3ba12b0f0fc623f1787517524842",
   1607         owned_objects: RUNTIME_V4_OBJECTS,
   1608     },
   1609     MigrationDescriptor {
   1610         version: 5,
   1611         name: "projection_metadata",
   1612         up_sha256: "ef162e3591057414b5704ff07fc93e57127ad7996ab3d431541418fd9c285e51",
   1613         owned_objects: RUNTIME_V4_OBJECTS,
   1614     },
   1615     MigrationDescriptor {
   1616         version: 6,
   1617         name: "legacy_import_journal",
   1618         up_sha256: "5858336c25b048d6cdae1beedc8bf0bdfb530b858c3c50f501621c3314d23d4a",
   1619         owned_objects: RUNTIME_V6_OBJECTS,
   1620     },
   1621     MigrationDescriptor {
   1622         version: 7,
   1623         name: "legacy_event_staging",
   1624         up_sha256: "cb10766ab1a98fa13e27f36fdab869c72efefda98ea2331da32e90b3528c63aa",
   1625         owned_objects: RUNTIME_V7_OBJECTS,
   1626     },
   1627     MigrationDescriptor {
   1628         version: 8,
   1629         name: "legacy_outbox_staging",
   1630         up_sha256: "b2ad0ee5bf7ac9e56584623c641e5208f5446dd0ff5ced9f235cd1756781be34",
   1631         owned_objects: RUNTIME_V8_OBJECTS,
   1632     },
   1633     MigrationDescriptor {
   1634         version: 9,
   1635         name: "legacy_import_commits",
   1636         up_sha256: "f0807eecd652a26844c3502d81386a9d54480cb178abe1b71035e0601916afb7",
   1637         owned_objects: RUNTIME_V9_OBJECTS,
   1638     },
   1639     MigrationDescriptor {
   1640         version: 10,
   1641         name: "projection_rebuild_source_binding",
   1642         up_sha256: "8dfe0f83058f51e3edf9bdac16b408c6abdc88dd84a53f8e893aaf06fe89f7c7",
   1643         owned_objects: RUNTIME_V9_OBJECTS,
   1644     },
   1645     MigrationDescriptor {
   1646         version: 11,
   1647         name: "authored_operations",
   1648         up_sha256: "f07fe6695e611caa1ff2de87ee9d20356960346298f3df4158d63021fe0f9327",
   1649         owned_objects: RUNTIME_V11_OBJECTS,
   1650     },
   1651     MigrationDescriptor {
   1652         version: 12,
   1653         name: "materialized_projection_documents",
   1654         up_sha256: "c5a083ed078d2d1d9623b8c7fd6521055a59c6f4c099318779c9fa32fa17b211",
   1655         owned_objects: RUNTIME_V12_OBJECTS,
   1656     },
   1657     MigrationDescriptor {
   1658         version: 13,
   1659         name: "authored_draft_revisions",
   1660         up_sha256: "7bb6466a14c7ca601b76852addf4a19996ee9ffd62436bdac8e9bf631dc46785",
   1661         owned_objects: RUNTIME_V13_OBJECTS,
   1662     },
   1663     MigrationDescriptor {
   1664         version: 14,
   1665         name: "authored_draft_query_metadata",
   1666         up_sha256: "3e108ddf9fbbc559b5e36bbdcb1032343b771f91a074aebc62ae8ad6c1521b55",
   1667         owned_objects: RUNTIME_V14_OBJECTS,
   1668     },
   1669     MigrationDescriptor {
   1670         version: 15,
   1671         name: "authored_signed_facts",
   1672         up_sha256: "d7ed7312b36f6ae633d2018d71d1bc0117097523ff46ecfaca8a99ca739aa026",
   1673         owned_objects: RUNTIME_V15_OBJECTS,
   1674     },
   1675     MigrationDescriptor {
   1676         version: 16,
   1677         name: "authored_delivery_facts",
   1678         up_sha256: "f78d35fbe60255f152c4e7a8c23add6677ac3ae74eed7db1f3d8ef4ba0b8f3c3",
   1679         owned_objects: RUNTIME_V16_OBJECTS,
   1680     },
   1681     MigrationDescriptor {
   1682         version: 17,
   1683         name: "authored_delivery_reconciliation",
   1684         up_sha256: "01463e7effeb368dd0577bfed79f566f7bb2af76d03e8e76898cc53332e2e573",
   1685         owned_objects: RUNTIME_V17_OBJECTS,
   1686     },
   1687     MigrationDescriptor {
   1688         version: 18,
   1689         name: "event_mutation_epoch",
   1690         up_sha256: "44e8f43722bb869f824dbfa28197d17c1e8f58c6d62b8219cdd19d452eb47c3c",
   1691         owned_objects: RUNTIME_V18_OBJECTS,
   1692     },
   1693     MigrationDescriptor {
   1694         version: 19,
   1695         name: "canonical_visibility_index",
   1696         up_sha256: "fd574ba0459de5a8c36033d5332dbd647888ef35e0213bc4ee88656ac2ef49bb",
   1697         owned_objects: RUNTIME_V19_OBJECTS,
   1698     },
   1699     MigrationDescriptor {
   1700         version: 20,
   1701         name: "indexed_visibility_reads",
   1702         up_sha256: "914ed79cfb5073f3031413ebc21d64c11f3644e46cb38ef32cd85126b00a95cc",
   1703         owned_objects: RUNTIME_V20_OBJECTS,
   1704     },
   1705     MigrationDescriptor {
   1706         version: 21,
   1707         name: "projection_atomic_generations",
   1708         up_sha256: "e50dc6896a40547febf7df26f00ad66814e59d05c7bc9b09e474843195f3b79e",
   1709         owned_objects: RUNTIME_V21_OBJECTS,
   1710     },
   1711     MigrationDescriptor {
   1712         version: 22,
   1713         name: "projection_cache_budget",
   1714         up_sha256: "fa0b0c26e0ac782b77abc072f67f79c135549c8970dc9ced093220460451531d",
   1715         owned_objects: RUNTIME_V22_OBJECTS,
   1716     },
   1717     MigrationDescriptor {
   1718         version: 23,
   1719         name: "projection_retired_selection",
   1720         up_sha256: "5cbe0dbd80e8b700ccda31346c33419698294a28196f8408a2ff21b45956c365",
   1721         owned_objects: RUNTIME_V23_OBJECTS,
   1722     },
   1723 ];
   1724 
   1725 pub(crate) const fn migration_sql(version: u32) -> Option<&'static str> {
   1726     match version {
   1727         1 => Some(RUNTIME_V1_SQL),
   1728         2 => Some(CANONICAL_EVENT_STORAGE_V2_SQL),
   1729         3 => Some(OPERATION_JOURNAL_V3_SQL),
   1730         4 => Some(OUTBOX_DELIVERY_EVIDENCE_V4_SQL),
   1731         5 => Some(PROJECTION_METADATA_V5_SQL),
   1732         6 => Some(LEGACY_IMPORT_JOURNAL_V6_SQL),
   1733         7 => Some(LEGACY_EVENT_STAGING_V7_SQL),
   1734         8 => Some(LEGACY_OUTBOX_STAGING_V8_SQL),
   1735         9 => Some(LEGACY_IMPORT_COMMITS_V9_SQL),
   1736         10 => Some(PROJECTION_REBUILD_SOURCE_BINDING_V10_SQL),
   1737         11 => Some(AUTHORED_OPERATIONS_V11_SQL),
   1738         12 => Some(MATERIALIZED_PROJECTION_DOCUMENTS_V12_SQL),
   1739         13 => Some(AUTHORED_DRAFT_REVISIONS_V13_SQL),
   1740         14 => Some(AUTHORED_DRAFT_QUERY_V14_SQL),
   1741         15 => Some(AUTHORED_SIGNED_FACTS_V15_SQL),
   1742         16 => Some(AUTHORED_DELIVERY_FACTS_V16_SQL),
   1743         17 => Some(AUTHORED_DELIVERY_RECONCILIATION_V17_SQL),
   1744         18 => Some(EVENT_MUTATION_EPOCH_V18_SQL),
   1745         19 => Some(CANONICAL_VISIBILITY_INDEX_V19_SQL),
   1746         20 => Some(INDEXED_VISIBILITY_READS_V20_SQL),
   1747         21 => Some(PROJECTION_ATOMIC_GENERATIONS_V21_SQL),
   1748         22 => Some(PROJECTION_CACHE_BUDGET_V22_SQL),
   1749         23 => Some(PROJECTION_RETIRED_SELECTION_V23_SQL),
   1750         _ => None,
   1751     }
   1752 }
   1753 
   1754 #[cfg(test)]
   1755 #[cfg_attr(coverage_nightly, coverage(off))]
   1756 mod tests {
   1757     use super::{CURRENT_VERSION, MIGRATIONS, MINIMUM_VERSION, migration_sql};
   1758     use serde::Deserialize;
   1759     use sha2::{Digest, Sha256};
   1760     use sqlx::{Connection, Row, SqliteConnection};
   1761 
   1762     const PLAN_SNAPSHOT: &str =
   1763         include_str!("../../../../../contracts/storage/runtime_schema_v1.toml");
   1764 
   1765     #[derive(Debug, Deserialize)]
   1766     struct PlanSnapshot {
   1767         schema_version: u32,
   1768         database: String,
   1769         application_id: u32,
   1770         minimum_version: u32,
   1771         current_version: u32,
   1772         migration_name: String,
   1773         migration_sha256: String,
   1774         forward_only: bool,
   1775         raw_sql_public: bool,
   1776         authorities: Vec<String>,
   1777         source_invariants: Vec<String>,
   1778         migrations: Vec<MigrationSnapshot>,
   1779     }
   1780 
   1781     #[derive(Debug, Deserialize)]
   1782     struct MigrationSnapshot {
   1783         version: u32,
   1784         name: String,
   1785         sha256: String,
   1786         owned_objects: Vec<String>,
   1787     }
   1788 
   1789     #[test]
   1790     fn migration_plan_matches_governed_snapshot() {
   1791         let snapshot = toml::from_str::<PlanSnapshot>(PLAN_SNAPSHOT).expect("valid snapshot");
   1792         assert_eq!(MINIMUM_VERSION, 1);
   1793         assert_eq!(CURRENT_VERSION, 23);
   1794         assert_eq!(MIGRATIONS.len(), 23);
   1795         let migration = MIGRATIONS[8];
   1796         assert_eq!(snapshot.schema_version, 1);
   1797         assert_eq!(snapshot.database, "runtime.sqlite");
   1798         assert_eq!(snapshot.application_id, 1_380_209_236);
   1799         assert_eq!(snapshot.minimum_version, MINIMUM_VERSION);
   1800         assert_eq!(snapshot.current_version, 9);
   1801         assert_eq!(snapshot.migration_name, migration.name());
   1802         assert_eq!(snapshot.migration_sha256, migration.up_sha256());
   1803         assert!(snapshot.forward_only);
   1804         assert!(!snapshot.raw_sql_public);
   1805         assert_eq!(snapshot.authorities.len(), 12);
   1806         assert_eq!(snapshot.source_invariants.len(), 5);
   1807         assert_eq!(snapshot.migrations.len(), 9);
   1808         for (expected, actual) in snapshot.migrations.iter().zip(&MIGRATIONS[..9]) {
   1809             assert_eq!(expected.version, actual.version());
   1810             assert_eq!(expected.name, actual.name());
   1811             assert_eq!(expected.sha256, actual.up_sha256());
   1812             assert_eq!(expected.owned_objects, actual.owned_objects());
   1813         }
   1814     }
   1815 
   1816     #[test]
   1817     fn embedded_migration_checksum_is_pinned() {
   1818         for migration in MIGRATIONS {
   1819             let sql = migration_sql(migration.version()).expect("registered SQL");
   1820             assert_eq!(format!("{:x}", Sha256::digest(sql)), migration.up_sha256());
   1821         }
   1822         assert_eq!(migration_sql(CURRENT_VERSION + 1), None);
   1823     }
   1824 
   1825     #[tokio::test]
   1826     async fn fresh_database_has_exact_owned_schema() {
   1827         let mut connection = SqliteConnection::connect("sqlite::memory:")
   1828             .await
   1829             .expect("open memory SQLite");
   1830         for migration in MIGRATIONS {
   1831             sqlx::raw_sql(migration_sql(migration.version()).expect("registered SQL"))
   1832                 .execute(&mut connection)
   1833                 .await
   1834                 .expect("apply runtime schema");
   1835         }
   1836 
   1837         let rows = sqlx::query(
   1838             "SELECT name FROM sqlite_schema \
   1839              WHERE name LIKE 'radroots_runtime_%' \
   1840              ORDER BY name",
   1841         )
   1842         .fetch_all(&mut connection)
   1843         .await
   1844         .expect("inspect runtime schema");
   1845         let actual = rows
   1846             .iter()
   1847             .map(|row| row.get::<String, _>("name"))
   1848             .collect::<Vec<_>>();
   1849         assert_eq!(
   1850             actual,
   1851             MIGRATIONS
   1852                 .last()
   1853                 .expect("current migration")
   1854                 .owned_objects()
   1855         );
   1856 
   1857         let foreign_key_violations = sqlx::query("PRAGMA foreign_key_check")
   1858             .fetch_all(&mut connection)
   1859             .await
   1860             .expect("inspect foreign keys");
   1861         assert!(foreign_key_violations.is_empty());
   1862         let integrity = sqlx::query_scalar::<_, String>("PRAGMA integrity_check")
   1863             .fetch_one(&mut connection)
   1864             .await
   1865             .expect("inspect integrity");
   1866         assert_eq!(integrity, "ok");
   1867     }
   1868 }