liminal-server 0.24.9

Standalone server for the liminal messaging bus
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
//! Publication of a loudly rebuilt checkpoint before its owner becomes ready.

use liminal::durability::settle::apply_routed_batch_settled;
use liminal::durability::{DurabilityError, DurableStore};

use super::checkpoint_batches::{
    CheckpointPublishError, batch_bytes, publication_bound, split_history,
};
use super::log::{OperationLog, OperationLogError, RETIRED_GENERATION};
use super::operation_batch::{CheckpointStageError, OperationBatch};
use super::outbox_log::{OutboxLog, OutboxLogError};
use super::restore_checkpoint::{CheckpointError, CheckpointLiveState, RestoreCheckpoint};
pub(super) use super::restore_checkpoint_boot_error::BootCheckpointError;
use super::restore_checkpoint_history::{CheckpointHistoryRoot, ROOT_ENCODED_BYTES};
use super::restore_checkpoint_history_capture::PreparedCheckpointHistory;
use super::restore_checkpoint_locator::{CheckpointLocator, checkpoint_conversation_route};
use super::restore_from_checkpoint::{
    CheckpointDecision, CheckpointMetadata, CheckpointRefusal, PreparedCheckpointRestore,
    RebuildRequired, TailReplayError, load_checkpoint, prepare_checkpoint_restore,
    prepare_replayed_checkpoint,
};
use super::routed_stream::RoutedStreamRefusal;
use super::state::ConversationAuthority;
use super::state::checkpoint_owner::ConversationAuthorityRestoreContext;

pub(super) struct ReportedRebuild {
    required: RebuildRequired,
}

#[derive(Debug, thiserror::Error)]
pub(super) enum CheckpointRebuildError {
    #[error("rebuilt checkpoint conversation differs from its refused locator or operation log")]
    ConversationMismatch,
    #[error(transparent)]
    Operation(#[from] OperationLogError),
    #[error(transparent)]
    Extension(#[from] OutboxLogError),
    #[error(transparent)]
    Checkpoint(#[from] CheckpointStageError),
    #[error(transparent)]
    Store(#[from] DurabilityError),
    #[error(transparent)]
    Fresh(#[from] super::restore_checkpoint::CheckpointError),
    /// DUR-024 R2: one item alone is over the store's bound.
    #[error(transparent)]
    Refused(#[from] CheckpointPublishError),
    /// DUR-024 R1: a history batch the store refused, by its 1-based index.
    #[error("history batch {index} refused: {source}")]
    Batch {
        index: usize,
        #[source]
        source: DurabilityError,
    },
}

/// A rebuilt publication that did not complete, with the fresh checkpoint
/// handed back when the refusal came after it was prepared, so the owner
/// serves from its replay (DUR-024 R3) instead of being lost with the error.
pub(super) struct RebuiltPublicationFailure<L, const N: usize> {
    pub(super) error: CheckpointRebuildError,
    pub(super) checkpoint: Option<Box<RestoreCheckpoint<L, N>>>,
}

impl<L, const N: usize> RebuiltPublicationFailure<L, N> {
    /// A failure after the checkpoint was prepared: the owner is handed
    /// back to serve from its replay.
    fn after(
        error: impl Into<CheckpointRebuildError>,
        checkpoint: RestoreCheckpoint<L, N>,
    ) -> Self {
        Self {
            error: error.into(),
            checkpoint: Some(Box::new(checkpoint)),
        }
    }
}

/// Records the exact refusal before the caller starts authoritative replay.
pub(super) fn report_rebuild(required: RebuildRequired) -> ReportedRebuild {
    tracing::warn!(
        conversation_id = required.conversation_id,
        refusal = %required.refusal,
        "CHECKPOINT_REBUILD: full authoritative replay is required before readiness"
    );
    ReportedRebuild { required }
}

pub(super) struct RebuiltCheckpointPublication<L, const N: usize> {
    checkpoint: RestoreCheckpoint<L, N>,
    history: PreparedCheckpointHistory,
    prefix_digest: [u8; 32],
}

/// Publishes replayed heads and returns the same owner after the conditional
/// operation. DUR-024 R1: a history over the batch bound is committed in
/// batches first, each under the bound, and the heads, the body and the
/// locator ride in the final commit only.
pub(super) async fn publish_rebuilt_checkpoint<L: CheckpointLiveState + Send, const N: usize>(
    reported: ReportedRebuild,
    store: &dyn DurableStore,
    log: &OperationLog,
    outbox_log: &OutboxLog,
    publication: RebuiltCheckpointPublication<L, N>,
    observed_locator: Option<&[u8]>,
) -> Result<RestoreCheckpoint<L, N>, RebuiltPublicationFailure<L, N>> {
    let RebuiltCheckpointPublication {
        checkpoint,
        history,
        prefix_digest,
    } = publication;
    let refused_conversation_id = reported.required.conversation_id;
    let (positions, root, live) = checkpoint.into_parts();
    let fresh = match reported.required.prepare_fresh(positions, root, live) {
        Ok(fresh) => fresh,
        Err(error) => {
            return Err(RebuiltPublicationFailure {
                error: error.into(),
                checkpoint: None,
            });
        }
    };
    let checkpoint = fresh.checkpoint;
    if positions.conversation_id != refused_conversation_id
        || positions.conversation_id != log.conversation_id()
    {
        return Err(RebuiltPublicationFailure {
            error: CheckpointRebuildError::ConversationMismatch,
            checkpoint: Some(Box::new(checkpoint)),
        });
    }
    if history.root.encode_canonical().as_slice() != checkpoint.history_root().as_slice() {
        return Err(RebuiltPublicationFailure {
            error: CheckpointRebuildError::Fresh(
                super::restore_checkpoint::CheckpointError::Association {
                    field: "rebuilt HISTORY root",
                },
            ),
            checkpoint: Some(Box::new(checkpoint)),
        });
    }
    let route = checkpoint_conversation_route(positions.conversation_id);
    let commit = RebuiltCommit {
        history,
        prefix_digest,
        observed_locator,
        route: &route,
    };
    let (commits, checkpoint) = commit_rebuilt(store, log, outbox_log, checkpoint, commit).await?;
    super::restore_checkpoint_history::retire_v1_history(store, positions.conversation_id).await;
    tracing::info!(
        conversation_id = positions.conversation_id,
        refusal = %fresh.refusal,
        commits,
        "CHECKPOINT_REBUILD: replayed heads and fresh checkpoint are durably published"
    );
    Ok(checkpoint)
}

/// What a rebuilt publication commits beside the checkpoint itself: the
/// prepared history, the digest of the prefix it covers, the locator observed
/// before the rebuild (the conditional expectation) and the conversation's
/// route.
struct RebuiltCommit<'a> {
    history: PreparedCheckpointHistory,
    prefix_digest: [u8; 32],
    observed_locator: Option<&'a [u8]>,
    route: &'a str,
}

/// The commits of a rebuilt publication: history batches under the bound,
/// then the final batch with the heads, the body and the locator and
/// whatever history fitted beside them. Answers how many commits it made,
/// with the checkpoint handed back either way: the owner it carries serves
/// from its replay when the store refuses (R3). The checkpoint is owned
/// here, never borrowed across an await, so the future stays `Send`.
async fn commit_rebuilt<L: CheckpointLiveState + Send, const N: usize>(
    store: &dyn DurableStore,
    log: &OperationLog,
    outbox_log: &OutboxLog,
    checkpoint: RestoreCheckpoint<L, N>,
    commit: RebuiltCommit<'_>,
) -> Result<(usize, RestoreCheckpoint<L, N>), RebuiltPublicationFailure<L, N>> {
    let RebuiltCommit {
        history,
        prefix_digest,
        observed_locator,
        route,
    } = commit;
    let positions = checkpoint.positions();
    let bound = publication_bound(store);
    let (_, mut nodes) = history.into_nodes();
    let mut batch = OperationBatch::new(route);
    if let Err(error) = log
        .stage_bootstrap_head(&mut batch, positions.next_log_sequence)
        .await
    {
        return Err(RebuiltPublicationFailure::after(error, checkpoint));
    }
    if let Err(error) = outbox_log
        .stage_bootstrap_head(&mut batch, positions.extension_sequence)
        .await
    {
        return Err(RebuiltPublicationFailure::after(error, checkpoint));
    }
    let staged =
        batch.stage_rebuilt_checkpoint(store, &checkpoint, prefix_digest, observed_locator);
    if let Err(error) = staged.await {
        return Err(RebuiltPublicationFailure::after(error, checkpoint));
    }
    // A body's parts go with the history, before the locator.
    nodes.extend(
        batch
            .take_body_parts()
            .into_iter()
            .map(|part| (part.key, part.value)),
    );
    let mut batches = match split_history(nodes, bound.bound, bound.item_limit()) {
        Ok(batches) => batches,
        Err(error) => return Err(RebuiltPublicationFailure::after(error, checkpoint)),
    };
    let tail = batch.value_bytes();
    if tail > bound.item_limit() {
        let refusal = CheckpointPublishError::ItemExceedsStoreBound {
            key: "checkpoint body".to_owned(),
            bytes: tail,
            bound: bound.item_limit(),
        };
        return Err(RebuiltPublicationFailure::after(refusal, checkpoint));
    }
    if batches
        .last()
        .is_some_and(|last| batch_bytes(last).saturating_add(tail) <= bound.bound)
    {
        if let Some(last) = batches.pop() {
            for item in last {
                if let Err(error) = batch.stage(item) {
                    return Err(RebuiltPublicationFailure::after(error, checkpoint));
                }
            }
        }
    }
    let commits = batches.len().saturating_add(1);
    for (index, items) in batches.into_iter().enumerate() {
        if let Err(source) = apply_routed_batch_settled(store, route, items).await {
            let error = CheckpointRebuildError::Batch {
                index: index.saturating_add(1),
                source,
            };
            return Err(RebuiltPublicationFailure::after(error, checkpoint));
        }
    }
    if let Err(error) = batch
        .commit(store, || log.issuance().mark_submitted())
        .await
    {
        return Err(RebuiltPublicationFailure::after(error, checkpoint));
    }
    Ok((commits, checkpoint))
}

/// What a load left published for its conversation (DUR-020 R6).
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub(super) enum BootCheckpoint {
    /// A validated checkpoint was restored, or the conversation has no rows.
    Restored,
    /// The rebuild published a checkpoint.
    Published,
    /// The rebuilt owner could not be captured, so nothing was published and
    /// the next load rebuilds again unless the restore unit publishes it once
    /// its drain has finished the fate that refused the capture.
    Unpublished,
}

pub(super) async fn restore_at_boot(
    store: &dyn DurableStore,
    log: &OperationLog,
    outbox_log: &OutboxLog,
    config: &crate::config::types::ParticipantConfig,
    limits: super::outbox::ConversationOutboxLimits,
) -> Result<super::state::ConversationAuthority, BootCheckpointError> {
    Box::pin(restore_at_boot_reporting(
        store, log, outbox_log, config, limits,
    ))
    .await
    .map(|(owner, _)| owner)
}

/// [`restore_at_boot`], also answering what the load left published.
pub(super) async fn restore_at_boot_reporting(
    store: &dyn DurableStore,
    log: &OperationLog,
    outbox_log: &OutboxLog,
    config: &crate::config::types::ParticipantConfig,
    limits: super::outbox::ConversationOutboxLimits,
) -> Result<(super::state::ConversationAuthority, BootCheckpoint), BootCheckpointError> {
    let conversation_id = log.conversation_id();
    // The tombstone first: a retired conversation refuses by name before any
    // checkpoint or row is read, never as a rebuild's failure. The key is
    // read once; every read below is on the generation it named.
    let generation = log.generation().await?;
    if generation == RETIRED_GENERATION {
        return Err(BootCheckpointError::Retired { conversation_id });
    }
    let pin = &OperationLog::at_generation(log.store(), conversation_id, generation);
    let loaded = load_checkpoint::<ConversationAuthority, ROOT_ENCODED_BYTES>(
        store,
        conversation_id,
        |positions, root| ConversationAuthorityRestoreContext::new(*positions, root, config),
        |locator, root| {
            CheckpointHistoryRoot::decode_canonical(root, locator.conversation_id())
                .map(|_| ())
                .map_err(|source| CheckpointError::LiveState {
                    source: Box::new(source),
                })
        },
    )
    .await?;
    let prepared = match loaded.decision {
        CheckpointDecision::Restore(checkpoint) => {
            let preparation =
                (|| {
                    let raw =
                        loaded
                            .observed_locator
                            .as_deref()
                            .ok_or(CheckpointError::Association {
                                field: "validated checkpoint locator",
                            })?;
                    let locator = CheckpointLocator::decode_canonical(raw, conversation_id)
                        .map_err(|error| CheckpointError::LiveState {
                            source: Box::new(error),
                        })?;
                    prepare_checkpoint_restore(checkpoint, &locator, config)
                })();
            let preparation = match preparation {
                Ok(prepared) => {
                    // The root alone, so a restore reads the same at any
                    // history length; each identity is cross-checked by the
                    // warm once the conversation serves.
                    match super::restore_checkpoint_history_capture::verify_history_root(
                        store,
                        prepared.root,
                    )
                    .await
                    {
                        // The body's identities, before the tail replays
                        // onto them: what the index at this root holds.
                        Ok(()) => super::restore_checkpoint_history_capture::capture_history_check(
                            &prepared.owner,
                            prepared.root,
                        )
                        .map(|check| {
                            let mut prepared = prepared;
                            prepared.owner.checkpoint_history_check = Some(check);
                            prepared
                        })
                        .map_err(super::restore_checkpoint_history_capture::HistoryCaptureError::checkpoint),
                        Err(
                            super::restore_checkpoint_history_capture::HistoryCaptureError::Index(
                                super::restore_checkpoint_history_index::HistoryIndexError::Store(
                                    error,
                                ),
                            ),
                        ) => {
                            return Err(BootCheckpointError::Store(error));
                        }
                        Err(error) => Err(error.checkpoint()),
                    }
                }
                Err(error) => Err(error),
            };
            preparation.map_err(|error| RebuildRequired {
                conversation_id,
                refusal: CheckpointRefusal::Invalid(error),
            })
        }
        CheckpointDecision::Rebuild(required) => Err(required),
    };
    match prepared {
        Ok(prepared) => Box::pin(restore_validated_tail(pin, outbox_log, config, prepared))
            .await
            .map(|owner| (owner, BootCheckpoint::Restored)),
        // Boxed as the restore arm is: the rebuild's future carries the
        // batches it lays out, and the boot stack is not where it lives.
        Err(required) => {
            Box::pin(rebuild_before_ready(
                store,
                (pin, log),
                outbox_log,
                config,
                limits,
                required,
                loaded.observed_locator.as_deref(),
            ))
            .await
        }
    }
}

async fn restore_validated_tail(
    log: &OperationLog,
    outbox_log: &OutboxLog,
    config: &crate::config::types::ParticipantConfig,
    prepared: PreparedCheckpointRestore,
) -> Result<ConversationAuthority, BootCheckpointError> {
    let conversation_id = log.conversation_id();
    let root = prepared.root;
    let owner = prepared.owner;
    let generation = log.generation().await?;
    let native = OperationLog::at_generation(log.store(), conversation_id, generation);
    let native_head = native.read_stream_next_seq().await?.unwrap_or(0);
    let route = checkpoint_conversation_route(conversation_id);
    let source = |sequence| {
        let native = &native;
        let route = &route;
        async move {
            if sequence < native_head {
                native.read_at(sequence).await
            } else {
                // A boundary with no routed tail behind it selects no row,
                // the answer `OperationLog::read_committed_at` gives: a
                // migrated or flat-only stream has a native head and no
                // routed head, and its tail is simply empty.
                match log.read_routed_at(route, sequence).await {
                    Err(OperationLogError::RoutedStream(RoutedStreamRefusal::MissingHead {
                        ..
                    })) => Ok(None),
                    read => read,
                }
            }
        }
    };
    let (mut owner, audit, schema, prefix) = owner
        .replay_checkpoint_tail(
            prepared.start,
            (prepared.audit, prepared.prefix_digest),
            source,
            log,
            outbox_log,
            config,
        )
        .await
        .map_err(|error| match error {
            TailReplayError::Replay(error) => BootCheckpointError::Replay(error),
            TailReplayError::Source(error) => BootCheckpointError::Operation(error),
        })?;
    let extension = owner
        .outbox
        .as_ref()
        .ok_or(CheckpointError::Position {
            field: "restored outbox",
        })?
        .checkpoint_boundaries()
        .0;
    let positions = owner.checkpoint_positions(schema, owner.next_log_sequence, extension)?;
    owner.retain_checkpoint_metadata(root, &audit)?;
    owner.advance_checkpoint_metadata(positions, root.encode_canonical(), prefix)?;
    Ok(owner)
}

/// `logs` is the reader pinned to the unit's generation and the operation's
/// own handle, whose issuance the publication marks.
async fn rebuild_before_ready(
    store: &dyn DurableStore,
    logs: (&OperationLog, &OperationLog),
    outbox_log: &OutboxLog,
    config: &crate::config::types::ParticipantConfig,
    limits: super::outbox::ConversationOutboxLimits,
    required: RebuildRequired,
    observed_locator: Option<&[u8]>,
) -> Result<(ConversationAuthority, BootCheckpoint), BootCheckpointError> {
    let (pin, log) = logs;
    let conversation_id = log.conversation_id();
    let (owner, audit, schema, prefix) =
        ConversationAuthority::replay_for_rebuild(conversation_id, pin, outbox_log, config, limits)
            .await?;
    if owner.next_log_sequence == 0 {
        // A conversation with no rows has nothing to rebuild and nothing to
        // report: this is every first touch of a fresh id on the request path.
        return Ok((owner, BootCheckpoint::Restored));
    }
    if let Err(refusal) = owner
        .checkpoint_lifecycle_capturable()
        .and_then(|()| owner.checkpoint_positions_framable())
    {
        // The rebuilt owner is mid-finalization: a binding fate the drain
        // has yet to finish leaves its slot, frontier or retained origin in
        // a state the checkpoint's own round-trip refuses. A load is not the
        // place to refuse it. The owner serves from its replay, as the
        // legacy replay served it, the repair and the drain finish the fate,
        // and the next crossing or seal publishes the checkpoint; a boot
        // before then rebuilds once more through the routed route. The
        // refusal is said by name so a capture refused for any other reason
        // is never silent.
        // Why the stored checkpoint was not used is said too: a full replay
        // with no stored-checkpoint reason beside it was silent about the
        // re-replay it caused (11 October 2026).
        tracing::warn!(
            conversation_id,
            refusal = %refusal,
            checkpoint_refusal = %required.refusal,
            "CHECKPOINT_REBUILD: the rebuilt owner cannot be captured yet; it serves from its replay and the next crossing publishes its checkpoint"
        );
        // The owner commits only against validated checkpoint metadata, so it
        // keeps its replay's audit, positions and prefix the way a restored
        // tail does, over the empty history root: nothing is published, and
        // the crossing that publishes captures the identity history from
        // nothing exactly as this rebuild would have.
        return serve_from_replay(owner, &audit, schema, prefix, conversation_id);
    }
    let reported = report_rebuild(required);
    let history = super::restore_checkpoint_history_capture::capture_identity_history(
        store,
        &owner,
        CheckpointHistoryRoot::empty(conversation_id),
    )
    .await
    .map_err(|error| BootCheckpointError::Checkpoint(error.checkpoint()))?;
    let root = history.root;
    let checkpoint = prepare_replayed_checkpoint(owner, &audit, schema, root, prefix)?;
    let checkpoint = match publish_rebuilt_checkpoint(
        reported,
        store,
        log,
        outbox_log,
        RebuiltCheckpointPublication {
            checkpoint,
            history,
            prefix_digest: prefix,
        },
        observed_locator,
    )
    .await
    {
        Ok(checkpoint) => checkpoint,
        Err(RebuiltPublicationFailure {
            error,
            checkpoint: Some(checkpoint),
        }) => {
            // DUR-024 R3: a publication the store refused leaves the owner
            // serving from its replay, exactly as an uncapturable owner
            // serves; the next crossing publishes, over whatever batches
            // landed. Never a full replay, never a containment, for this.
            tracing::warn!(
                conversation_id,
                refusal = %error,
                "CHECKPOINT_REBUILD: the rebuilt checkpoint's publication was refused by the store; the owner serves from its replay and the next crossing publishes its checkpoint"
            );
            let (_, _, owner) = (*checkpoint).into_parts();
            return serve_from_replay(owner, &audit, schema, prefix, conversation_id);
        }
        Err(RebuiltPublicationFailure { error, .. }) => return Err(error.into()),
    };
    let metadata = CheckpointMetadata::from_rebuilt(&checkpoint, prefix)?;
    let (_, _, mut owner) = checkpoint.into_parts();
    owner.install_checkpoint_metadata(metadata)?;
    Ok((owner, BootCheckpoint::Published))
}

/// The owner serving from its replay with nothing published: validated
/// metadata over the empty history root, so the crossing that publishes
/// captures the identity history from nothing exactly as the rebuild would
/// have (DUR-020 R6, DUR-024 R3).
fn serve_from_replay(
    mut owner: ConversationAuthority,
    audit: &super::fenced_attach_terminal::ComposedTerminalValidation,
    schema: super::restore_checkpoint::CheckpointSchema,
    prefix: [u8; 32],
    conversation_id: u64,
) -> Result<(ConversationAuthority, BootCheckpoint), BootCheckpointError> {
    let root = CheckpointHistoryRoot::empty(conversation_id);
    let extension_sequence = owner
        .outbox
        .as_ref()
        .ok_or(super::restore_checkpoint::CheckpointError::Position {
            field: "absent replayed outbox",
        })?
        .next_extension_sequence();
    let positions =
        owner.checkpoint_positions(schema, owner.next_log_sequence, extension_sequence)?;
    owner.retain_checkpoint_metadata(root, audit)?;
    let metadata = CheckpointMetadata::validated(positions, root.encode_canonical(), prefix)?;
    owner.install_checkpoint_metadata(metadata)?;
    Ok((owner, BootCheckpoint::Unpublished))
}