Expand description
Phase 1 function contracts — Args + Result types for each FCALL.
Each Args struct defines the typed inputs to a Valkey Function. Each Result enum defines the possible outcomes (success variants + error codes).
Modules§
- decode
- Canonical decoders for engine-owned hash shapes.
Structs§
- AddExecution
ToFlow Args - Additional
Waitpoint Binding - RFC-014 Pattern 3 — per-binding identity + HMAC token for
waitpoints beyond the primary. Structure mirrors the top-level
fields on
SuspendOutcomeDetails. - Append
Frame Args - Apply
Dependency ToChild Args - Attempt
Summary - Currently-active attempt summary inside an
ExecutionSnapshot. - Block
Execution Args - Budget
Status - Operator-facing budget status snapshot (not an FCALL — direct HGETALL reads).
- Buffer
Signal Args - Cancel
Execution Args - Cancel
Flow Args - Change
Priority Args - Check
Admission Args - Claim
Execution Args - Claim
ForWorker Args - Inputs to
EngineBackend::claim_for_worker(RFC-017 §5, §7). The Valkey impl forwards toff_scheduler::Scheduler::claim_for_worker; the Postgres impl forwards to its own scheduler module. The trait method hides the backend-specific dispatch behind one shape. - Claim
Grant - A claim grant issued by the scheduler for a specific execution.
- Claim
Resumed Execution Args - Claimed
Execution - Claimed
Resumed Execution - Close
Waitpoint Args - Complete
Execution Args - Composite
Validation Error - RFC-014 §5.1 validation error shape. Emitted by
ResumeCondition::validate_compositewhen a composite fails a structural / cardinality invariant at suspend-time, before any Valkey call. Carries a human-readabledetailper §5.1.1. - Create
Budget Args - Create
Execution Args - Create
Flow Args - Create
Pending Waitpoint Args - Create
Quota Policy Args - Delay
Execution Args - Deliver
Signal Args - Edge
Group Snapshot - Snapshot of one inbound edge group (per downstream execution).
- Edge
Snapshot - Engine-decoupled read-model for one dependency edge.
- Evaluate
Flow Eligibility Args - Execution
Info - Full execution info returned by
Server::get_execution. - Execution
Snapshot - Engine-decoupled read-model for one execution.
- Execution
Summary - Summary of an execution for list views.
- Expire
Execution Args - Expire
Suspension Args - Fail
Execution Args - Flow
Snapshot - Engine-decoupled read-model for one flow.
- Flow
Summary - Lightweight per-flow projection returned by
crate::engine_backend::EngineBackend::list_flows. - Idempotency
Key - Partition-scoped idempotency key for retry-safe
EngineBackend::suspend. - Issue
Claim Grant Args - Issue
Reclaim Grant Args - Lease
Summary - Currently-held lease summary inside an
ExecutionSnapshot. - List
Executions Page - One page of partition-scoped execution ids returned by
EngineBackend::list_executions. - List
Executions Result - Result of a list_executions query.
- List
Flows Page - One page of
FlowSummaryrows returned bycrate::engine_backend::EngineBackend::list_flows. - List
Lanes Page - One page of lane ids returned by
crate::engine_backend::EngineBackend::list_lanes. - List
Pending Waitpoints Args - Inputs to
EngineBackend::list_pending_waitpoints(RFC-017 §5, §8). Pagination is part of the signature so a flow with 10k pending waitpoints cannot force a single-round-trip read regardless of backend. - List
Pending Waitpoints Result - Page of pending-waitpoint entries. Stage A preserves the existing
PendingWaitpointInfoshape; the §8 schema rewrite (HMAC sanitisation +(token_kid, token_fingerprint)additive fields) ships in Stage D alongside the HTTP wire-format deprecation. - List
Suspended Page - One cursor-paginated page of suspended executions.
- List
Waitpoint Hmac Kids Args - Mark
Lease Expired Args - Move
ToWaiting Children Args - Pending
Waitpoint Info - One entry in the read-only view of an execution’s active waitpoints.
- Promote
Blocked ToEligible Args - Read
Frames Args - Inputs to
ff_read_attempt_stream(XRANGE wrapper). - Reclaim
Execution Args - Reclaim
Grant - A reclaim grant issued for a resumed (attempt_interrupted) execution.
- Release
Admission Args - Renew
Lease Args - Replay
Execution Args - Report
Usage Admin Args - Inputs to
EngineBackend::report_usage_admin(RFC-017 §5 budget+ quota admin §5, round-1 F4). Admin-path peer ofreport_usage— both wrapff_report_usage_and_checkon the Valkey side but the admin call is worker-less, so it cannot reuse the lease-boundreport_usage(&Handle, ...)signature.ReportUsageAdminArgscarries the same fields asReportUsageArgswithout a worker handle — kept as a distinct type so future admin-only fields (e.g.actor_identity,audit_reason) don’t pollute the worker path. - Report
Usage Args - Reset
Budget Args - Resolve
Dependency Args - Resume
Execution Args - Resume
Policy - Resume-side policy carried alongside
ResumeCondition. - Revoke
Lease Args - Rotate
Waitpoint Hmac Secret AllArgs - Args for [
EngineBackend::rotate_waitpoint_hmac_secret_all] — the cluster-wide / backend-native rotation of the waitpoint HMAC signing kid. - Rotate
Waitpoint Hmac Secret AllEntry - Per-partition entry of
RotateWaitpointHmacSecretAllResult. Mirrors [ff_sdk::admin::PartitionRotationOutcome] but typed at theff-corelayer so both Valkey and Postgres backends return the same shape without a Postgres→ferriskey dep. - Rotate
Waitpoint Hmac Secret AllResult - Result of [
EngineBackend::rotate_waitpoint_hmac_secret_all]. - Rotate
Waitpoint Hmac Secret Args - Args for
ff_rotate_waitpoint_hmac_secret. Rotates the HMAC signing kid on ONE partition. Callers fan out across every partition themselves (ff-server does the parallel fan-out inrotate_waitpoint_secret; direct-Valkey consumers mirror the pattern). - SetEdge
Group Policy Args - SetExecution
Tags Args - Args for
ff_set_execution_tags. Tag keys MUST match^[a-z][a-z0-9_]*\.— the caller-namespace rule — or the FCALL returnsinvalid_tag_key. Values are arbitrary strings. The map is ordered (BTreeMap) so two callers submitting the same logical set of tags produce identical ARGV. - SetFlow
Tags Args - Args for
ff_set_flow_tags. Same namespace rule asSetExecutionTagsArgs. The Lua function also lazy-migrates any pre-58.4 reserved-namespace fields stashed inline onflow_coreinto the new tags key. - Stage
Dependency Edge Args - State
Summary - Summary of state after a mutation, returned by many functions.
- Stream
Frame - A single frame read from an attempt-scoped stream.
- Stream
Frames - Result of reading frames from an attempt stream — frames plus terminal signal so consumers can stop polling without a timeout fallback.
- Suspend
Args - Trait-surface input to [
EngineBackend::suspend] (RFC-013 §2.2 + RFC-014 Pattern 3 widening). - Suspend
Execution Args - Suspend
Outcome Details - Shared “what happened on the waitpoint” payload carried in both
SuspendOutcomevariants. - Suspended
Execution Entry - One entry in a
ListSuspendedPage— a suspended execution and the reason it is blocked, answering an operator’s “what’s this waiting on?” without a follow-up round-trip. - Unblock
Execution Args - Update
Progress Args - Verifying
Kid - Waitpoint
Hmac Kids - Snapshot of the waitpoint HMAC keystore on ONE partition.
Enums§
- AddExecution
ToFlow Result - Append
Frame Result - Apply
Dependency ToChild Result - Block
Execution Result - Buffer
Signal Result - Cancel
Execution Result - Cancel
Flow Header - RFC-017 Stage E2: result of the “header” portion of a cancel_flow operation — the atomic flow-state flip + member enumeration.
- Cancel
Flow Result - Change
Priority Result - Check
Admission Result - Claim
Execution Result - Claim
ForWorker Outcome - Outcome of
EngineBackend::claim_for_worker.None-like shape modelled as an enum so additive variants (e.g.BackPressured { retry_after_ms }) do not force a wire break. - Claim
Resumed Execution Result - Close
Waitpoint Result - Complete
Execution Result - Composite
Body - RFC-013 reserves this enum slot; RFC-014 populates it with the
concrete composition vocabulary (
AllOf+Count). The enum is#[non_exhaustive]so RFC-016 or later RFCs may add variants (AnyOfhas been explicitly rejected per RFC-014 §2.3 in favour ofCount { n: 1, .. }; the guard exists for orthogonal future work). - Count
Kind - How
Countnodes distinguish satisfiers. RFC-014 §2.1 + §3.2. - Create
Budget Result - Create
Execution Result - Create
Flow Result - Create
Pending Waitpoint Result - Create
Quota Policy Result - Delay
Execution Result - Deliver
Signal Result - Edge
Dependency Policy - Policy controlling how an inbound edge group’s satisfaction is decided.
- Edge
Direction - Direction marker for
crate::engine_backend::EngineBackend::list_edges. - Edge
Group State - Edge-group lifecycle state (Stage A exposes only
pending+satisfied+impossible;cancelledreserved for Stage C). - Evaluate
Flow Eligibility Result - Expire
Execution Result - Expire
Suspension Result - Fail
Execution Result - Outcome of a fail_execution call.
- Flow
Status - Typed flow-lifecycle status surfaced on
FlowSummary. - Issue
Claim Grant Result - Issue
Reclaim Grant Result - Mark
Lease Expired Result - Move
ToWaiting Children Result - OnSatisfied
- Policy for unfinished sibling upstreams once the quorum is met.
- Promote
Blocked ToEligible Result - Read
Frames Result - Reclaim
Execution Result - Release
Admission Result - Renew
Lease Result - Replay
Execution Result - Report
Usage Result - Reset
Budget Result - Resolve
Dependency Result - Resume
Condition - Declarative resume condition for
SuspendArgs::resume_condition. - Resume
Execution Result - Resume
Target - Where a satisfied suspension routes back to.
- Revoke
Lease Result - Rotate
Waitpoint Hmac Secret Outcome - Outcome of a single-partition rotation.
- SetEdge
Group Policy Result - SetExecution
Tags Result - Result of
ff_set_execution_tags. - SetFlow
Tags Result - Result of
ff_set_flow_tags. - Signal
Matcher - v1 signal-match predicate inside
ResumeCondition::Single. - Stage
Dependency Edge Result - Stream
Cursor - Opaque cursor for attempt-stream reads/tails.
- Stream
Cursor Parse Error - Error produced when parsing a
StreamCursorfrom a string. - Suspend
Execution Result - Suspend
Outcome - Trait-surface output from [
EngineBackend::suspend] (RFC-013 §2.3). - Suspension
Reason Code - Reason category for a suspension (RFC-004 §Suspension Reason Categories).
- Suspension
Requester - Who requested the suspension.
- Timeout
Behavior - Timeout behavior at the suspension deadline (RFC-004 §Timeout Behavior).
- Unblock
Execution Result - Update
Progress Result - Waitpoint
Binding - How the waitpoint resource backing a
SuspendArgsis obtained.
Constants§
- MAX_
COMPOSITE_ DEPTH - Hard cap on composite-condition nesting depth (RFC-014 §5.4 invariant 4; §5.5 cap rationale). Soft-cap: bumping requires only this constant + the cap-rationale paragraph in RFC-014 §5.5 — no wire-format change. Keep in sync.
- STREAM_
READ_ HARD_ CAP - Hard cap on the number of frames returned by a single read/tail call.