Skip to main content

Module computation

Module computation 

Source
Expand description

Attested Computation concepts.

An Attested Computation carries not just what a value means but a sanctioned way to compute it, so a consumer can confirm an agent ran the blessed computation instead of improvising its own. Provenance answers “where did this claim come from”; attestation answers “was this number produced the way we said it must be.”

---
type: Attested Computation
runtime: bigquery
parameters:
  - { name: year, type: integer, required: true }
executor:
  resource: references/skills/run-on-bq.md
  receipt: [job_id, executed_sql, result]
attester:
  resource: references/attesters/revenue.py
---

# Computation

    SELECT SUM(amount) AS revenue
    FROM finance.recognized_revenue
    WHERE fiscal_year = @year

This crate records and checks the contract; it never executes anything. Running the computation, producing a receipt, and running the attester over that receipt are consumer-side concerns, and the runtime artifacts they produce are explicitly not stored in the bundle. What AttestedComputation gives you is the contract in typed form: the runtime that defines what parameters mean, the computation itself (inline or by path), and the executor/attester interfaces.

Structs§

AttestedComputation
The contract of an Attested Computation concept: its top-level frontmatter plus the computation itself.
Attester
The deterministic check.
Executor
How the computation is run.
InlineComputation
A computation held in the body under # Computation.
Parameter
One typed, named hole an agent may fill.

Enums§

ComputationSource
Where the sanctioned computation lives.

Constants§

ATTESTED_COMPUTATION_TYPE
The type value that marks a concept as an Attested Computation.
COMPUTATION_HEADING
The conventional body heading that introduces an inline computation.

Functions§

contract_path_candidates
Resolves a contract’s path-valued fields to bundle-relative candidates, as (field, raw, candidates).
extract_inline_computation
Extracts the code block under a # Computation heading.