fix(runtime): classify a skipped forward as Unsupported, not IdentityMismatch

QwenStepTxn::commit folded "no logits/argmax was produced" into the generic
`_ => IdentityMismatch` arm of the output match when prefill-finish support was
added. The previous guard (and its test
full_forward_guard_refuses_skipped_layers_missing_logits_and_wrong_callback_token)
distinguished a skipped forward (Unsupported(Executor)) from a wrong callback
token (IdentityMismatch). Restore that classification; wrong tokens, and the
finish_prefill None path, are unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Pavlo Ratushnyi
2026-10-14 16:41:51 +02:00
co-authored by Claude Sonnet 5.5
parent de21513033
commit f3b11f973e
@@ -462,6 +462,11 @@ impl<'driver> QwenStepTxn<'_, 'driver> {
return Err(Error::Unsupported(Stage::Executor));
}
match output {
// A token callback without a produced logits/argmax is a skipped
// forward (Unsupported), distinct from a wrong callback token.
Some(_) if !self.prefill_finished && self.forward_output.is_none() => {
return Err(Error::Unsupported(Stage::Executor));
}
Some(value) if !self.prefill_finished && self.forward_output == Some(value) => {}
None if self.prefill_finished && self.forward_output.is_none() => {}
_ => return Err(Error::IdentityMismatch),