Skip to main content

Module task_evidence

Module task_evidence 

Source
Expand description

Task evidence v1 (leanctx.cloud.task-evidence/v1, trace per change): what the engine pins for a closed Cloud task so LeanCTX Cloud can join a landed change to the context its agent saw.

POST /v1/vaults/{vault}/tasks/{n}/evidence, sent once when the engine’s agent submits or verifies the task, signed by the instance key (Ed25519 over TASK_EVIDENCE_DOMAIN ‖ canonical_json({evidence, key_id})).

Content-free by construction: ids, sha256: digests, chain hashes and counts. The task receipt it digests stays on the machine; anyone with the machine recomputes TaskEvidenceV1::receipt_digest from lean-ctx task trace <task> --json. A session leaves only as its keyed session_ref (hs_ and 32 hex characters under the engine-local receipts key, the envelope ref of the same session).

Structs§

SessionEvidenceV1
One session of the task, as counts and chain heads.
TaskEvidenceRequestV1
The request body: the evidence with its instance signature.
TaskEvidenceV1
The leanctx.cloud.task-evidence/v1 document.

Constants§

FEATURE_CHANGE_TRACE
The features entry of a Cloud that takes task evidence.
MAX_EVIDENCE_SESSIONS
At most this many sessions per evidence (as per task receipt).
MAX_POLICY_DIGESTS
At most this many distinct policy digests per evidence.
MAX_SESSION_GAPS
At most this many gaps per session.
TASK_EVIDENCE_DOMAIN
Domain of the evidence signature (instance key).
TASK_EVIDENCE_SCHEMA
TASK_RECEIPT_SCHEMA
The receipt schema every evidence digests.

Functions§

evidence_route
POST path of task number in vault, relative to the engine API base.
is_chain_hash
A chain hash as the local chains write it: 1–128 hex characters.
is_sha256_digest
sha256: and 64 lowercase hex characters.