v0.1.20
Pristine-entry proof position (ProofPositionSelector::Entry)
- New
Entryproof-position selector — the goal state before any tactic runs.proof_statealready exposed the
pristine entry goal as thegoals_beforeof the first position, buttry_proof_stepcould only splice a candidate
after the first tactic, so a from-scratch tactic block (e.g.intro …; exact …) read fromgoals_beforeran with
the first binder already introduced and failed.Entryanchors on the first tactic's pre-state and splices the
candidate before the first tactic (aligned to its column, never dedented to a top-level command), so a from-scratch
block elaborates against the untouched goal and the original tactics' downstream errors are reported as downstream,
not candidate-local. Forproof_state,Entryrendersgoals_before == goals_after. The variant is additive on the
#[non_exhaustive]LeanWorkerProofPositionSelector(wire) andProofPositionSelector(host);Index { index }
keeps its existing "index-th tactic state" meaning. Seedocs/architecture/info-tree-projection.md.
Worker robustness: no verify crash, honest degraded verdict, pretty proof-state locals
A heavy verify_declaration / proof_state workload run against a RED module while the worker thrashed against its RSS
cap surfaced three defects in the read-only query path; all three are fixed.
verify_declarationno longer aborts the child on a proof state degraded by memory pressure. The
Lean.MetavarContext.getDecl … unknown metavariablepanic on the proof-state walk is an uncatchableabort()under
the child'sLEAN_ABORT_ON_PANIC=1, so it is contained at two layers. The shim screens a captured proof state for
dangling metavariables with the totalMetavarContext.findDecl?(never the pure-panic!getDecl) before any
renderer dereferences it, rendering a degraded goal as<goal unavailable: elaboration degraded under resource pressure>and routing the verdict toBudgetExceededwithaxioms_available = false. As an authoritative backstop
for any residual transitive-mvar abort, the supervisor maps aChildPanicOrAbortduring a verify / query-batch
request to a synthesized degraded verdict (verify →BudgetExceededwith unavailable facts; batch → per-selector
BudgetExceeded) and records achild_abortrestart, so the caller always gets a verdict and the next call is served
by a fresh child.verify_declarationno longer returnsNotFoundfor a valid lemma degraded by memory pressure. The Lean shim
reclassifies anotFoundwhose diagnostics carry a resource marker (deep recursion, interrupted, out of memory) to
timeout/BudgetExceeded, and the worker child taints a non-positive verdict (neverAccepted) toBudgetExceeded
when its post-job RSS is at or above an internal, default-off ceiling. A clean name-absent query on a healthy worker
still returnsNotFound.proof_state.localsnow render pretty and notation-aware, through the same delaborator asgoals_before/
goals_after, instead of rawExpr.toString(_uniq.NNNN, ~6 KB/decl — the proximate RSS-spike trigger). A new
additivelocals_raw: boolfield on theProofStateInDeclarationselector (#[serde(default)], defaultfalse)
restores the raw form on request. The verify path and the try-proof-step goals path, which read onlygoals_after,
now render no locals at all.
No new verification-status variant or protocol version bump: BudgetExceeded is reused for the degraded case and
locals_raw is backward compatible via #[serde(default)]. The internal env var LEAN_RS_VERIFY_RSS_TAINT_KIB
(plumbed from the pool's per-worker RSS ceiling) gates the child-side taint and defaults to off. See
docs/architecture/info-tree-projection.md for the degraded-verdict
semantics and locals rendering modes, and
docs/architecture/06-panic-containment.md for the supervisor
verdict-on-abort contract.