Skip to content

W1: Provenance as query semantics (tick directive + proof objects + deterministic cursors) #198

Description

@flyingrobots

Pulse context: "provenance as query semantics".

Goal

  • Treat Wesley queries as deterministic, time-addressed slices through a worldline.
  • Make provenance/proof artifacts an explicit (opt-in) part of query semantics so outputs are replayable and explainable.

Scope

  • Define a time-addressing directive (e.g. @tick(at: Tick!)) and what it means for compilation targets.
    • Semantics must be HistoryTime-only (ticks/epochs/commit ids). No HostTime semantic deadlines.
  • Define proof output conventions:
    • Field-parallel proof objects (e.g. __proof_<field> or a uniform __proof field) that can return tick, digest, and optional lineage steps.
    • Proof modes: brief (tick + final digest), lineage (full chain), cost (plan/row counts for audits).
  • Deterministic pagination:
    • Cursor shape includes {tick, digest, stable_order_key} so slices are stable across replays.
    • Prohibit/avoid offset pagination for replay-stability.
  • Capability/security gating:
    • Proof emission must be opt-in and capability-gated to avoid leaking sensitive provenance.

Acceptance criteria

  • Spec section (or new PROV-* spec) defines:
    • directive syntax
    • proof object shapes
    • cursor determinism requirements
    • security/capability requirements
  • At least one end-to-end example query + expected proof payload shape.

Parent

Activity

  1. flyingrobots commented on Jun 1, 2026

    @flyingrobots
    OwnerAuthor

    Closing from Echo triage: this is not blocking current GraphQL-schema -> generated Rust usage.

    Current Echo source anchors:

    • crates/echo-wesley-gen/tests/generation.rs:892 exercises generated query observer installation.
    • crates/echo-wesley-gen/tests/generation.rs:912 checks the generated query reading artifact shape.
    • crates/echo-wesley-gen/tests/generation.rs:923 verifies ReadingObserverBasis::QueryView.

    GraphQL directive semantics like @tick, proof-object shape, and deterministic cursor semantics belong in Wesley/TTD design unless Echo has a concrete runtime API to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature umbrella (epic)specSpec/Design document

    Projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions