Expand description
RFC-024 PR-D — ff_claim_grant table accessors + the two new
RFC-024 methods (issue_reclaim_grant, reclaim_execution).
Replaces the pre-RFC JSON stash at
ff_exec_core.raw_fields.claim_grant (see scheduler.rs:252 pre-
PR-D). The scheduler’s write path now calls
write_claim_grant below; the scheduler’s verify/read path
(scheduler::verify_grant) reads from the same table.
§Isolation
Both RFC-024 methods run under SERIALIZABLE + a 3-attempt retry
loop (mirrors operator::cancel_execution_impl).
§Grant identity
grant_id (BYTEA PK) is the sha256 of the Valkey/HMAC-signed
grant_key string. Deterministic, stable across retries, and
decoupled from the HMAC encoding (no need to re-sign on backfill).
Constants§
- DEFAULT_
MAX_ RECLAIM_ COUNT - Default per-Rust-surface ceiling per RFC-024 §4.6.
Functions§
- grant_
id_ from_ key - sha256(grant_key) → 32-byte grant_id.
- issue_
reclaim_ grant_ impl - read_
claim_ grant_ identity - Read a claim-grant row (kind=‘claim’) for verification /
diagnostics. Returns
Ok(None)when absent. - reclaim_
execution_ impl - write_
claim_ grant - Insert a fresh claim grant row. Called by the scheduler’s Stage 5.