solver: a job cancelled before it starts stops before any setup work

The cancel check came only at the factorization, so on a busy CI runner a
pre-cancelled frequency solve still spent 17 s on setup (cancel_tests).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-15 12:44:16 -04:00
1 parent 3e997dab43
commit f220c7108b
4 files changed
+11

No files matched your search

+2
View File
@@ -107,6 +107,8 @@ impl Operator for Shifted<'_> {
/// Solve a buckling step (the step named `step`, or the model's only buckling step).
pub fn solve_buckle(model: &Model, step: Option<&str>, limits: &Limits) -> Result<FrequencyResult> {
// A job cancelled before it starts stops here, before any setup work.
fieldcraft_model::progress::check()?;
let step = model.select_step(step, |p| matches!(p, Procedure::Buckle { .. }), "buckling")?;
let Procedure::Buckle { modes, shift } = step.procedure else {
return Err(Error::Internal("buckling step".into()));