Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
This PR fixes issues with flaky cancellation_empty_by test. The original test gated the runner's `waitFor: blocked` on `t1`'s `wait_for_cancel_once_async`, which had no causal relationship to `tracerSuggestion` having actually run inside the empty-`by` snapshot task. On CI under load the runner could trigger the insert before `tracerSuggestion` registered its `onSet` callback, leading to intermittent timeouts. Add a label-keyed `IO.Promise` registry (`syncPromisesRef`) plus `getSyncPromise` / `resolveSyncPromise` primitives and a `wait_for_sync <label>` tactic to `Lean.Server.Test.Cancel`. The empty-`by` test's `tracerSuggestion` now resolves a sync promise after registering its onSet, and `t1` waits on that promise before emitting `blocked`. The empty-`by` example must precede `t1` because `try?` inside the snapshot task synchronously waits on prior pending async theorem bodies during library search (likely a separate upstream issue); with that ordering the test is fully deterministic. `t1` also drops `wait_for_cancel_once_async` in favor of plain `trace "blocked"`. The test now also `dbg_trace`s at each sync point (`tracerSuggestion ready`, `sync received`, `cancelTokenSet`) so the .out.expected captures the deterministic execution sequence. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .claude | ||
| .github | ||
| .vscode | ||
| doc | ||
| images | ||
| releases_drafts | ||
| script | ||
| src | ||
| stage0 | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| .gitpod.Dockerfile | ||
| .gitpod.yml | ||
| .ignore | ||
| AGENTS.md | ||
| CMakeLists.txt | ||
| CMakePresets.json | ||
| CODEOWNERS | ||
| CONTRIBUTING.md | ||
| flake.lock | ||
| flake.nix | ||
| lean-toolchain | ||
| LICENSE | ||
| LICENSES | ||
| README.md | ||
| RELEASES.md | ||
This is the repository for Lean 4.
About
- Quickstart
- Homepage
- Theorem Proving Tutorial
- Functional Programming in Lean
- Documentation Overview
- Language Reference
- Release notes starting at v4.0.0-m3
- Examples
- External Contribution Guidelines
Installation
See Install Lean.
Contributing
Please read our Contribution Guidelines first.
Building from Source
See Building Lean.