Bourse.OracleProvenance.Derivation (bourse v0.1.0)

Copy Markdown View Source

Derives binary oracle provenance from committed venue-reality evidence.

Reality recordings establish that a method was observed. The owned spec is used only to route that method to the interpretive slots it exercises.

Summary

Functions

Resolves the exact endpoint route an accepted-request golden was signed against, raising when the golden matches no (or more than one) route.

Returns whether a real response body contains domain data rather than shape alone.

Derives the critical interpretive slots a promotion candidate must evidence.

Classifies the environment named by a committed manifest host.

Canonicalizes a manifest method name — snake atom string or JS name — to its unified JS name. Names outside Unified.method_defs/0 pass through unchanged.

Returns the explicit method-to-field-map extensions outside the struct vocabulary.

Derives reports for the runtime venue set from committed reality manifests.

Types

critical_slot()

@type critical_slot() :: %{path: String.t(), expected_methods: [String.t()]}

host_class()

@type host_class() :: :production | :testnet_demo | :provider_doc

slot_report()

@type slot_report() :: %{
  path: String.t(),
  verified: boolean(),
  host_classes: [host_class()],
  contributing_methods: [String.t()],
  semantic: boolean(),
  critical: boolean(),
  expected_methods: [String.t()],
  unverified_methods: [String.t()],
  verification_paths: [verification_path()],
  verification_citations: [String.t()]
}

venue_report()

@type venue_report() :: %{
  venue: String.t(),
  verified: [String.t()],
  unverified: [String.t()],
  slots: [slot_report()]
}

verification_path()

@type verification_path() ::
  :recorded_error
  | :provider_doc
  | :response
  | :accepted_request
  | :public_accepted_request

Functions

accepted_route!(venue, golden)

@spec accepted_route!(String.t(), map()) :: map()

Resolves the exact endpoint route an accepted-request golden was signed against, raising when the golden matches no (or more than one) route.

body_populated?(body)

@spec body_populated?(term()) :: boolean()

Returns whether a real response body contains domain data rather than shape alone.

critical_slots(spec)

@spec critical_slots(map()) :: [critical_slot()]

Derives the critical interpretive slots a promotion candidate must evidence.

host_class(host)

@spec host_class(String.t()) :: host_class()

Classifies the environment named by a committed manifest host.

js_method!(method)

@spec js_method!(String.t()) :: String.t()

Canonicalizes a manifest method name — snake atom string or JS name — to its unified JS name. Names outside Unified.method_defs/0 pass through unchanged.

method_slot_extensions()

@spec method_slot_extensions() :: %{required(String.t()) => String.t()}

Returns the explicit method-to-field-map extensions outside the struct vocabulary.

reports!(opts \\ [])

@spec reports!(keyword()) :: [venue_report()]

Derives reports for the runtime venue set from committed reality manifests.