Task Claim Receipt Route (routes/task_claim_receipt.py)

bernstein · src/bernstein/core/routes/task_claim_receipt.py · python · Apache-2.0
automation, pos, security, tag:tasks, tag:claims, tag:signatures

POST /tasks/claim-receipt runs the dependency-gated claim path and returns a signed, content-addressed claim or refusal receipt a worker can re-verify offline against the audited run.

# Source: https://github.com/sipyourdrink-ltd/bernstein | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""Verifiable claim-receipt route for the task server (#2555).

``POST /tasks/claim-receipt`` drives the dependency-gated claim path
(:func:`bernstein.core.tasks.claim.claim_next_entry` plus
:class:`~bernstein.core.tasks.claim.ClaimFilter`) and returns a signed,
content-addressed :class:`~bernstein.core.protocols.mcp.claim_receipt.ClaimReceipt`
instead of the mutable task projection the older claim routes return.

The receipt is the returned projection of the same dependency snapshot the
existing ``task.claim_receipt`` audit event already records
(:func:`record_task_claim_receipt

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key