machinechecked 0.1.14__tar.gz → 0.1.15__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. {machinechecked-0.1.14 → machinechecked-0.1.15}/PKG-INFO +1 -1
  2. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/machinechecked.egg-info/PKG-INFO +1 -1
  3. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/machinechecked.egg-info/SOURCES.txt +3 -2
  4. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/cache.py +20 -8
  5. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/cli.py +1 -0
  6. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/data/ProofLensProbe.lean +23 -9
  7. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/export.py +4 -1
  8. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/formalization.py +2 -1
  9. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/pipeline.py +9 -6
  10. machinechecked-0.1.15/engine/python/prooflens/repin.py +473 -0
  11. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/simple.py +38 -1
  12. machinechecked-0.1.15/engine/python/prooflens/web/assets/index-B_fzeuBg.js +278 -0
  13. machinechecked-0.1.14/engine/python/prooflens/web/assets/index-GfZV3aEH.css → machinechecked-0.1.15/engine/python/prooflens/web/assets/index-e4I0NErR.css +1 -1
  14. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/index.html +2 -2
  15. {machinechecked-0.1.14 → machinechecked-0.1.15}/pyproject.toml +1 -1
  16. machinechecked-0.1.14/engine/python/prooflens/web/assets/index-YAI0NIYT.js +0 -278
  17. {machinechecked-0.1.14 → machinechecked-0.1.15}/LICENSE +0 -0
  18. {machinechecked-0.1.14 → machinechecked-0.1.15}/README.md +0 -0
  19. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/machinechecked.egg-info/dependency_links.txt +0 -0
  20. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/machinechecked.egg-info/entry_points.txt +0 -0
  21. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/machinechecked.egg-info/requires.txt +0 -0
  22. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/machinechecked.egg-info/top_level.txt +0 -0
  23. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/__init__.py +0 -0
  24. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/__main__.py +0 -0
  25. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/assess.py +0 -0
  26. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/audit.py +0 -0
  27. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/bundle.py +0 -0
  28. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/config.py +0 -0
  29. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/data/prooflens.sty +0 -0
  30. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/data/schema/evidence.schema.json +0 -0
  31. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/data/schema/inventory.schema.json +0 -0
  32. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/data/schema/manifest-claim.schema.json +0 -0
  33. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/data/schema/manifest-index.schema.json +0 -0
  34. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/data/statuses.json +0 -0
  35. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/deps.py +0 -0
  36. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/evidence.py +0 -0
  37. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/manifest.py +0 -0
  38. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/paper.py +0 -0
  39. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/pdfclaims.py +0 -0
  40. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/probe.py +0 -0
  41. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/promote.py +0 -0
  42. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/published.py +0 -0
  43. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/replay.py +0 -0
  44. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/review_cli.py +0 -0
  45. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/review_queue.py +0 -0
  46. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/reviews.py +0 -0
  47. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/schemas.py +0 -0
  48. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/server.py +0 -0
  49. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/source_regions.py +0 -0
  50. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/sources.py +0 -0
  51. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/status.py +0 -0
  52. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/symbols.py +0 -0
  53. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/tex.py +0 -0
  54. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/util.py +0 -0
  55. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  56. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  57. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  58. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  59. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  60. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  61. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  62. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  63. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  64. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  65. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  66. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  67. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  68. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  69. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  70. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  71. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  72. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  73. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  74. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/cursor-editorTextHighlight-kG3uUOwL.svg +0 -0
  75. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/assets/pdf.worker.min-yatZIOMy.mjs +0 -0
  76. {machinechecked-0.1.14 → machinechecked-0.1.15}/engine/python/prooflens/web/theme.css +0 -0
  77. {machinechecked-0.1.14 → machinechecked-0.1.15}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: machinechecked
3
- Version: 0.1.14
3
+ Version: 0.1.15
4
4
  Summary: Read a mathematical paper beside its Lean formalisation, and see claim by claim what Lean establishes.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://machinechecked.org
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: machinechecked
3
- Version: 0.1.14
3
+ Version: 0.1.15
4
4
  Summary: Read a mathematical paper beside its Lean formalisation, and see claim by claim what Lean establishes.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://machinechecked.org
@@ -26,6 +26,7 @@ engine/python/prooflens/pipeline.py
26
26
  engine/python/prooflens/probe.py
27
27
  engine/python/prooflens/promote.py
28
28
  engine/python/prooflens/published.py
29
+ engine/python/prooflens/repin.py
29
30
  engine/python/prooflens/replay.py
30
31
  engine/python/prooflens/review_cli.py
31
32
  engine/python/prooflens/review_queue.py
@@ -68,6 +69,6 @@ engine/python/prooflens/web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2
68
69
  engine/python/prooflens/web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2
69
70
  engine/python/prooflens/web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2
70
71
  engine/python/prooflens/web/assets/cursor-editorTextHighlight-kG3uUOwL.svg
71
- engine/python/prooflens/web/assets/index-GfZV3aEH.css
72
- engine/python/prooflens/web/assets/index-YAI0NIYT.js
72
+ engine/python/prooflens/web/assets/index-B_fzeuBg.js
73
+ engine/python/prooflens/web/assets/index-e4I0NErR.css
73
74
  engine/python/prooflens/web/assets/pdf.worker.min-yatZIOMy.mjs
@@ -220,13 +220,18 @@ def check_space(project: Path, tmp: Path, man: dict) -> None:
220
220
  "revision, or old build output) and restore again; nothing was changed")
221
221
 
222
222
 
223
- def _unpack(arc: Path, project: Path) -> None:
223
+ def _unpack(arc: Path, project: Path, older: bool = False) -> None:
224
224
  """Unpack an archive written by `_pack` into the project and its path dependencies, with the
225
225
  tar `data` filter (no absolute paths, no `..`, no links out of the destination). Everything
226
226
  is unpacked into a staging folder first and moved into place only once the whole archive
227
- has been read, so a failure (a full disk, a corrupt archive) leaves the build as it was."""
227
+ has been read, so a failure (a full disk, a corrupt archive) leaves the build as it was.
228
+
229
+ An archive in the older layout (`older`) holds paths from the checkout's parent, under the
230
+ folder names of the checkout it was made in; each top folder is mapped onto the project or a
231
+ path dependency whose folder has that name in any case, and any other path is refused."""
228
232
  import tarfile
229
233
  deps = {d.name: d for d in path_deps(project)}
234
+ folded = {d.name.lower(): d for d in deps.values()}
230
235
  stage = Path(tempfile.mkdtemp(prefix=".lean-cache-restore-", dir=project))
231
236
  try:
232
237
  bases: dict[str, Path] = {}
@@ -234,7 +239,17 @@ def _unpack(arc: Path, project: Path) -> None:
234
239
  with tarfile.open(fileobj=z.stdout, mode="r|") as tf:
235
240
  for m in tf:
236
241
  head, _, rest = m.name.partition("/")
237
- if head == "project" and rest:
242
+ if older and not rest.strip("/") and m.isdir():
243
+ continue # the top folder itself
244
+ if older and rest and head.lower() == project.name.lower():
245
+ key, base, m.name = "project", project, rest
246
+ elif older and rest and head.lower() in folded:
247
+ base = folded[head.lower()]
248
+ key, m.name = f"path-{base.name}", rest
249
+ elif older:
250
+ raise CacheError(f"the archive's path {m.name} is not in this project or a "
251
+ "path dependency of it; build from source")
252
+ elif head == "project" and rest:
238
253
  key, base, m.name = "project", project, rest
239
254
  elif head == "path" and rest.partition("/")[0] in deps:
240
255
  name, _, m.name = rest.partition("/")
@@ -428,7 +443,7 @@ def restore(project: Path, repo: str | None = None, local: Path | None = None,
428
443
  src.fetch(name, tmp / name)
429
444
  man = json.loads((tmp / name).read_text())
430
445
  if not man.get("layout") and not name.startswith(_prefix(project.name)):
431
- continue # an archive in the older layout unpacks only into a folder of its name
446
+ continue # an archive in the older layout is named after the checkout's folder
432
447
  wanted = [p["name"] for p in man["parts"]] if man.get("parts") else [f"{stem}.tar.zst"]
433
448
  if any(w not in src.assets for w in wanted):
434
449
  continue
@@ -481,10 +496,7 @@ def restore(project: Path, repo: str | None = None, local: Path | None = None,
481
496
  if got != man["sha256"]:
482
497
  raise CacheError(f"sha256 {got} is not the manifest's {man['sha256']}; "
483
498
  "build from source")
484
- if man.get("layout") == 2:
485
- _unpack(arc, project)
486
- else:
487
- _sh(["tar", "-C", str(project.parent), "-I", "zstd -T0", "-xf", str(arc)])
499
+ _unpack(arc, project, older=man.get("layout") != 2)
488
500
  log(f"restored {stem} ("
489
501
  + ("the same Lean inputs" if key[0] == 0 else f"{dist} commits behind HEAD")
490
502
  + f", sha256 {got[:16]}…) "
@@ -352,6 +352,7 @@ def _check_json(a):
352
352
  "status": c["status"], "status_code": c["status_code"], "class": c["class"],
353
353
  "links": [{"name": l["name"], "status": l["status"], "status_code": l["status_code"], "class": l["class"],
354
354
  "source": l.get("source")} for l in c["links"]],
355
+ "correspondence": c.get("correspondence"),
355
356
  "suggestions": [{"name": x["name"], "why": x.get("why")}
356
357
  for x in c.get("suggestions", [])]}
357
358
  for c in body["claims"]]
@@ -36,8 +36,16 @@ structure Query where
36
36
  accept_prefix : String
37
37
  allowed_axioms : Array String
38
38
  requests : Array Request
39
+ /-- Each request's heartbeat budget, in thousands as `maxHeartbeats`; Lean's default if none. -/
40
+ max_heartbeats : Option Nat := none
39
41
  deriving FromJson, Inhabited
40
42
 
43
+ /-- Runs `x` with a heartbeat budget of `n` thousand heartbeats when one is given. -/
44
+ def withBudget (n? : Option Nat) (x : MetaM α) : MetaM α :=
45
+ match n? with
46
+ | some n => withTheReader Core.Context (fun c => { c with maxHeartbeats := n * 1000 }) x
47
+ | none => x
48
+
41
49
  /-! ## Environment helpers -/
42
50
 
43
51
  def moduleOf (env : Environment) (n : Name) : Name :=
@@ -376,7 +384,8 @@ def emitClosure (h : IO.FS.Handle) (roots : Array Name) (root : Name) (used : Ar
376
384
  unless inScope roots env n do continue
377
385
  let some c := env.find? n | continue
378
386
  members := members.push n.toString
379
- let (j, more) ← declRecord roots n c
387
+ -- Each member has its own heartbeat budget: a closure can hold thousands.
388
+ let (j, more) ← withCurrHeartbeats (declRecord roots n c)
380
389
  unless (← seen.get).contains n do
381
390
  seen.modify (·.insert n)
382
391
  emit h j
@@ -479,7 +488,10 @@ def indexRecords (h : IO.FS.Handle) (roots : Array Name) : MetaM Unit := do
479
488
  | .axiomInfo _ => some "axiom" | _ => none
480
489
  let some k := kind | continue
481
490
  if k == "def" && (← isInstance n) then continue
482
- let ty ← try pure (toString (← ppExpr ci.type)) catch _ => pure "(not printable)"
491
+ -- Each declaration printed has its own heartbeat budget: a project can hold tens of
492
+ -- thousands, more than one budget prints.
493
+ let ty ← withCurrHeartbeats do
494
+ try pure (toString (← ppExpr ci.type)) catch _ => pure "(not printable)"
483
495
  let doc ← findDocString? env n
484
496
  emit h (Json.mkObj [("record", "index"), ("name", n.toString), ("kind", k),
485
497
  ("module", mod.toString), ("range", ← rangeJson n),
@@ -624,8 +636,10 @@ open ProofLensProbe in
624
636
  ("githash", Lean.githash)])
625
637
  layering h q
626
638
  for r in q.requests do
627
- -- Each request has its own heartbeat budget.
628
- try withCurrHeartbeats <|
639
+ -- Each request has its own heartbeat budget. A request that fails, including by running
640
+ -- out of heartbeats (a runtime exception, which `try` does not catch), emits an error
641
+ -- record for itself and the probe goes on.
642
+ tryCatchRuntimeEx (withBudget q.max_heartbeats <| withCurrHeartbeats do
629
643
  match r.kind with
630
644
  | "spec" => specRecord h q roots seen r.name.toName
631
645
  | "accept" | "refute" => proofRecord h q r.kind r.name.toName (r.spec.map (·.toName))
@@ -645,9 +659,9 @@ open ProofLensProbe in
645
659
  else
646
660
  emit h (Json.mkObj [("record", "defclosure"), ("name", r.name),
647
661
  ("errors", toJson #["missing"])])
648
- | _ => pure ()
649
- catch err =>
650
- emit h (Json.mkObj [("record", if r.kind == "decl" then "defclosure" else r.kind),
651
- ("name", r.name), ("spec", match r.spec with | some x => Json.str x | none => Json.null),
652
- ("errors", toJson #[s!"probe-error: {← err.toMessageData.toString}"])])
662
+ | _ => pure ())
663
+ (fun err => do
664
+ emit h (Json.mkObj [("record", if r.kind == "decl" then "defclosure" else r.kind),
665
+ ("name", r.name), ("spec", match r.spec with | some x => Json.str x | none => Json.null),
666
+ ("errors", toJson #[s!"probe-error: {← err.toMessageData.toString}"])]))
653
667
  emit h (Json.mkObj [("record", "done")])
@@ -105,7 +105,10 @@ def public_claim(chunk: dict, pub) -> dict:
105
105
  out["location"] = chunk.get("location") if pub.source_text else None
106
106
  out["statement_tex"] = chunk.get("statement_tex") if pub.source_text else None
107
107
  a = chunk.get("anchor")
108
- out["anchor"] = _pick(a, ["id", "env", "number", "label", "begin", "end", "kind", "source_sha256"] +
108
+ # `head` (the baseline of the first line) is what the index's top is computed from, so the
109
+ # published claim must keep it for its location to agree with the index.
110
+ out["anchor"] = _pick(a, ["id", "env", "number", "label", "begin", "head", "end", "kind",
111
+ "source_sha256"] +
109
112
  (["file", "line"] if pub.source_text else [])) if a else None
110
113
  clauses = []
111
114
  for cl in chunk["clauses"]:
@@ -64,9 +64,10 @@ def statements(fy: dict) -> list[dict]:
64
64
  continue
65
65
  rest = src[m.end():]
66
66
  module = r.get("module") if isinstance(r.get("module"), str) else None
67
+ note = r.get("note").strip() if isinstance(r.get("note"), str) else ""
67
68
  out.append({"source": src, "kind": m.group(1).lower(), "number": m.group(2),
68
69
  "hint": _tokens(rest), "lean": names, "status": r.get("status"),
69
- "module": module})
70
+ "module": module, "note": note})
70
71
  return out
71
72
 
72
73
 
@@ -74,7 +74,8 @@ def build(cfg: Config, release: str | None = None, skip_lean: bool = False,
74
74
  or (r["kind"] in ("accept", "refute", "witness") and
75
75
  f"{r['kind']}:{r['name']}:{r.get('spec') or ''}" not in lean["proofs"])]
76
76
  if missing:
77
- raise RuntimeError(f"the stored probe does not cover {missing[:5]}; run the probe")
77
+ raise StaleEvidence(f"the stored Lean results do not cover {', '.join(missing[:5])}"
78
+ + (", …" if len(missing) > 5 else "") + "; " + RUN_PROBE)
78
79
  lean_digest = lean_inputs_digest(cfg)
79
80
  log("probe: reusing the stored probe records (no Lean input changed)")
80
81
  elif not skip_lean:
@@ -214,16 +215,17 @@ def reusable_lean(cfg: Config) -> dict:
214
215
  content of every Lean input (here and in every path dependency) and the same probe."""
215
216
  rels = ev.releases(cfg.out_dir)
216
217
  if not rels:
217
- raise RuntimeError("no stored evidence to reuse")
218
+ raise StaleEvidence("no stored Lean results to reuse; " + RUN_PROBE)
218
219
  body = ev.load(cfg.out_dir, read_json(rels[-1])["evidence"])["body"]
219
220
  lean, prov = body.get("lean"), body["provenance"]
220
221
  if not lean or not prov.get("lean_inputs_sha256") or not prov.get("probe_sha256"):
221
- raise RuntimeError("the stored evidence does not record its Lean inputs; run the probe")
222
+ raise StaleEvidence("the stored Lean results do not record their Lean inputs; "
223
+ + RUN_PROBE)
222
224
  if prov["lean_inputs_sha256"] != lean_inputs_digest(cfg):
223
- raise RuntimeError("Lean inputs changed since the stored probe (here or in a path "
224
- "dependency); run the probe")
225
+ raise StaleEvidence("Lean inputs changed since the stored Lean results (here or in a "
226
+ "path dependency); " + RUN_PROBE)
225
227
  if prov["probe_sha256"] != probe_digest():
226
- raise RuntimeError("the probe changed since the stored records; run the probe")
228
+ raise StaleEvidence("the Lean probe changed since the stored Lean results; " + RUN_PROBE)
227
229
  return lean
228
230
 
229
231
 
@@ -242,6 +244,7 @@ class StaleEvidence(RuntimeError):
242
244
 
243
245
 
244
246
  NO_RELEASE = "no release: run `machinechecked build` first"
247
+ RUN_PROBE = "run `machinechecked build` without `--reuse-lean`"
245
248
 
246
249
 
247
250
  def inventory_changed(cfg: Config, body: dict) -> str | None: