Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

### Fixed

- Action WAL recovery reuses ordered verified replay cursors instead of retaining a full state for each basis tick. It preserves basis, Tick, result, obstruction and conflict checks, including delayed stale bases.

- The generic operation runner names typed obstruction kinds, footprint conflicts, and missing outcomes in bounded summaries. It omits raw outcome records and invocation data on both Action error paths.

- `xtask run-edict-operation` runs outside Git and resolves relative artifact and WAL paths from the caller directory. Repository maintenance commands retain their Git-root behavior.
Expand Down
7 changes: 7 additions & 0 deletions crates/warp-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,13 @@ pub use tick_patch::{
slice_worldline_indices, PortalInit, SlotId, TickCommitStatus, TickPatchError, WarpOp,
WarpOpKey, WarpTickPatchV1,
};
#[cfg(all(
feature = "native_rule_bootstrap",
feature = "trusted_runtime",
any(test, feature = "host_test")
))]
pub use trusted_runtime_host::EchoOperationParentStateWorkForTest;

#[cfg(all(feature = "native_rule_bootstrap", feature = "trusted_runtime"))]
pub use trusted_runtime_host::{
EvidenceCatalogPosture, RuntimeWalActivationGap, TrustedRuntimeApp, TrustedRuntimeHost,
Expand Down
22 changes: 17 additions & 5 deletions crates/warp-core/src/provenance_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -991,13 +991,14 @@ pub(crate) fn advance_replay_state<P: ProvenanceStore>(
replayed: &mut WorldlineState,
start_tick: WorldlineTick,
target_tick: WorldlineTick,
) -> Result<(), ReplayError> {
) -> Result<usize, ReplayError> {
if start_tick == target_tick {
return Ok(());
return Ok(0);
}

let root = *replayed.root();
let mut last_entry = None;
let mut applied = 0;
for raw_tick in start_tick.as_u64()..target_tick.as_u64() {
let tick = WorldlineTick::from_raw(raw_tick);
let entry = provenance.entry(worldline_id, tick)?;
Expand Down Expand Up @@ -1044,10 +1045,11 @@ pub(crate) fn advance_replay_state<P: ProvenanceStore>(
.tick_history
.push((snapshot, receipt, replay_patch));
last_entry = Some(entry);
applied += 1;
}

finalize_replay_metadata(replayed, target_tick, last_entry.as_ref());
Ok(())
Ok(applied)
}

pub(crate) fn replay_worldline_state_at_from_provenance<P: ProvenanceStore>(
Expand All @@ -1056,6 +1058,16 @@ pub(crate) fn replay_worldline_state_at_from_provenance<P: ProvenanceStore>(
base_state: &WorldlineState,
target_tick: WorldlineTick,
) -> Result<WorldlineState, ReplayError> {
replay_worldline_state_at_with_work(provenance, worldline_id, base_state, target_tick)
.map(|(state, _)| state)
}

pub(crate) fn replay_worldline_state_at_with_work<P: ProvenanceStore>(
provenance: &P,
worldline_id: WorldlineId,
base_state: &WorldlineState,
target_tick: WorldlineTick,
) -> Result<(WorldlineState, usize), ReplayError> {
let history_len = WorldlineTick::from_raw(provenance.len(worldline_id)?);
if target_tick > history_len {
return Err(ReplayError::History(HistoryError::HistoryUnavailable {
Expand All @@ -1066,14 +1078,14 @@ pub(crate) fn replay_worldline_state_at_from_provenance<P: ProvenanceStore>(
validate_replay_base(provenance, worldline_id, base_state)?;
let (mut replayed, start_tick) =
restore_replay_base(provenance, worldline_id, base_state, target_tick)?;
advance_replay_state(
let applied = advance_replay_state(
provenance,
worldline_id,
&mut replayed,
start_tick,
target_tick,
)?;
Ok(replayed)
Ok((replayed, applied))
}

#[derive(Debug, Clone)]
Expand Down
Loading
Loading