Skip to content
Merged
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
32 changes: 20 additions & 12 deletions crates/lash-perf/src/runtime_perf/measurement/queued_work.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,12 +641,17 @@ async fn run_once_turn_input_ingress_interrupt(
);
}
let active_turn_input = active_claim.materialize_for_turn();
if !matches!(
active_turn_input.items.last(),
Some(lash_core::InputItem::Attachment {
source: lash_core::AttachmentSource::Inline { bytes, .. }
}) if bytes == &vec![1, 2, 3, turn_index as u8]
) {
// Position-independent on purpose: a claim aggregates many inputs and
// only the first carries the attachment, so the attachment is not the
// last item. Assert survival, not placement.
if !active_turn_input.items.iter().any(|item| {
matches!(
item,
lash_core::InputItem::Attachment {
source: lash_core::AttachmentSource::Inline { bytes, .. }
} if bytes == &vec![1, 2, 3, turn_index as u8]
)
}) {
anyhow::bail!("turn-input ingress active claim lost attachment bytes");
}

Expand Down Expand Up @@ -727,12 +732,15 @@ async fn run_once_turn_input_ingress_interrupt(
phase_profile.insert(phase.0, phase.1);
next_claims += 1;
let next_turn_input = next_claim.materialize_for_turn();
if !matches!(
next_turn_input.items.last(),
Some(lash_core::InputItem::Attachment {
source: lash_core::AttachmentSource::Inline { bytes, .. }
}) if bytes == &vec![4, 5, 6, turn_index as u8]
) {
// Position-independent: see the active-claim assertion above.
if !next_turn_input.items.iter().any(|item| {
matches!(
item,
lash_core::InputItem::Attachment {
source: lash_core::AttachmentSource::Inline { bytes, .. }
} if bytes == &vec![4, 5, 6, turn_index as u8]
)
}) {
anyhow::bail!("turn-input ingress next claim lost attachment bytes");
}

Expand Down
Loading