Dependency
Blocked on ContextualWisdomLab/TEPP#156, which must publish a versioned completed analysis-run result/read contract. TEPP's current AnalysisRunAccepted is a durable submission receipt, not a temporal measurement.
Current defect
LineageWeave's TEPP start path accepts only an immediate completed / succeeded envelope with a result. A normal TEPP accepted response therefore becomes tepp_result_not_persisted and the local run fails. Treating accepted as a measurement would be worse: it would manufacture a scientific result from transport evidence.
Required lifecycle
- Submit the immutable snapshot-bound request.
- Validate and persist the accepted receipt as transport evidence: remote
run_id, idempotency key, request digest, accepted state, provider/model contract, snapshot, cutoff, and received time.
- Keep the local analysis run
Running while the remote run is accepted/running.
- Poll/read TEPP's versioned result contract with bounded timeout/backoff and durable outbox/inbox semantics.
- Revalidate tenant/workspace, idempotency key, snapshot identity, knowledge cutoff, model contract, output profile, remote run identity, result schema version, canonical digest, and terminal state.
- In one transaction, persist the validated completed result and append local
Succeeded; terminal remote failure appends a typed local Failed event.
- Replays must be idempotent. A changed result for the same remote run/digest identity fails closed.
Global Ask boundary
- TEPP accepted receipts never enter answer claims.
- Completed TEPP artifacts are versioned measurement evidence, not public-web truth.
- SearXNG verification may not receive TEPP source text, result payloads, respondent/item information, latent scores, or protected identities.
- Global Ask may cite a TEPP artifact only with its model/result schema/provenance and an explicit
measurement_evidence truth status; it may not label it web_verified or authoritative_real_world_fact.
TDD acceptance
- accepted response persists and leaves the local run Running;
- accepted response cannot create
analysis_run_tepp_result;
- result polling is bounded and crash-resumable;
- completed result with any request-binding mismatch fails closed;
- duplicate accepted/result deliveries do not duplicate status or result rows;
- changed digest for the same completed remote run is rejected;
- terminal provider failure becomes a typed local failure;
- hidden/cross-tenant runs remain 404/denied without leaking existence;
- Global Ask cannot external-search or truth-promote TEPP artifacts;
- migration clean install/rollback, full integration tests, production statement/branch coverage 100%, and public docstrings 100%.
Scope boundary
Do not mix Global Ask SearXNG UI work, fast-mlsirm estimator changes, new TEPP estimators, or unrelated stack repairs into this PR.
Dependency
Blocked on ContextualWisdomLab/TEPP#156, which must publish a versioned completed analysis-run result/read contract. TEPP's current
AnalysisRunAcceptedis a durable submission receipt, not a temporal measurement.Current defect
LineageWeave's TEPP start path accepts only an immediate
completed/succeededenvelope with a result. A normal TEPPacceptedresponse therefore becomestepp_result_not_persistedand the local run fails. Treatingacceptedas a measurement would be worse: it would manufacture a scientific result from transport evidence.Required lifecycle
run_id, idempotency key, request digest, accepted state, provider/model contract, snapshot, cutoff, and received time.Runningwhile the remote run is accepted/running.Succeeded; terminal remote failure appends a typed localFailedevent.Global Ask boundary
measurement_evidencetruth status; it may not label itweb_verifiedorauthoritative_real_world_fact.TDD acceptance
analysis_run_tepp_result;Scope boundary
Do not mix Global Ask SearXNG UI work, fast-mlsirm estimator changes, new TEPP estimators, or unrelated stack repairs into this PR.