symfonic.kernel.contracts.run_preclaim¶
run_preclaim ¶
Admit a run's lineage before a durable effect made ahead of its start (CORE-194/199).
A caller that spends something durable before the kernel issues its run -- the
private receipt carrier claims its invocation first -- would otherwise learn
only at the run's start that its lineage refuses, with the claim already
spent. :func:admit_before_start asks the run start's own questions first:
the lineage is resolved here as _issue_run_identity will resolve it, from
the same task, and nothing is registered. The run's start still proves it
again; this narrows the window, it does not replace that proof. The admitted
lineage is returned for the caller to hold until its run issues: it holds the
runs it descends from strongly, where _ISSUED holds them only weakly.
admit_before_start
async
¶
Refuse now what a run of these ids, started from here, would refuse at its start.
In prove_inherited's order: the declared provers prove the ancestry
first, and a prover's refusal propagates as raised (the caller decides what
of it to expose); only then does an unresolved lineage refuse with the
kernel's own UNPROVABLE_LINEAGE. An empty run_id stands for the
fresh id the run's context will mint.
Returns the admitted lineage. A caller that spends something durable before its run issues keeps it alive until then, so a named run whose last other reference is released meanwhile still resolves at the run's start.
Source code in src/symfonic/kernel/contracts/run_preclaim.py
prospective_lineage ¶
The lineage identity would be issued now, built but not registered.
Mirrors run_identity._issue_run_identity: the run descends from the run
this context executes in (or the task's issuing or spawning run) and from
every issued run it names; it is unresolved when it names one it cannot
reach. Re-issuing the running run's own id keeps that run's lineage.