fix: propagate cancellation to parallel tactic subtasks via command-level snapshot tasks This PR adds `Core.State.commandSnapshotTasks`, a separate array for snapshot tasks that are reported at command level rather than tactic level. Unlike regular `snapshotTasks` (which are consumed by tactic machinery and nested into `TacticFinishedSnapshot.moreSnaps`), command-level snapshot tasks become siblings in the snapshot tree, making their cancel tokens directly reachable by `cancelRec` without waiting for the parent tactic to complete. The `TacticM` parallel combinators (`par`, `par'`, `parFirst`, etc.) now automatically register subtask cancel tokens as command-level snapshot tasks, so parallel subtasks spawned during tactic elaboration are promptly cancelled on re-elaboration. This removes the need for custom cancel-propagation wrappers in `Try.lean`. Also changes `asTask` to return `IO.CancelToken` instead of `BaseIO Unit`, which allows direct registration of the token without a polling thread. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This is the repository for Lean 4.
See Install Lean.
Please read our Contribution Guidelines first.
See Building Lean.