Summary
Wasm-shim mechanics for the reservation flow: issue Reserve at the request phase, capture the reservation_id, and issue Commit at the response/stream-end phase (or immediately on the error path). Marked "TBD" in RFC 0021 — this issue covers the implementation design and build.
Design: RFC 0021, reference-level section "Expected work by component" (wasm-shim).
Depends on: Kuadrant/limitador#506 (Reserve/Commit RPCs).
Acceptance Criteria
Notes for reviewers
PR description should include: how to review (suggested order: ServiceType additions → CEL evaluation → stored_values plumbing → error-path Commit), and manual verification (local Envoy + wasm-shim, drive a request through a TokenRateLimitPolicy-protected route, observe Reserve/Commit calls e.g. via Limitador logs).
Summary
Wasm-shim mechanics for the reservation flow: issue
Reserveat the request phase, capture thereservation_id, and issueCommitat the response/stream-end phase (or immediately on the error path). Marked "TBD" in RFC 0021 — this issue covers the implementation design and build.Design: RFC 0021, reference-level section "Expected work by component" (wasm-shim).
Depends on: Kuadrant/limitador#506 (
Reserve/CommitRPCs).Acceptance Criteria
ServiceTypegainsRateLimitReserve/RateLimitCommit, additive to the existing enum (RateLimit | RateLimitCheck | RateLimitReport | Auth | Tracing | Dynamic); existing variants/handling inDynamicService/DynamicTaskuntouchedreservation.amount/reservation.ttlevaluated viamessage_builderCEL on theReserveaction, same mechanism ashits_addendtodayreservation_idreturned byReservecaptured via anon_reply→Storeaction intoReqRespCtx.stored_values, read back later in the sameKuadrantFilterinstance (no host export needed)Commitimmediately, typically withactual_amount: 0, instead of relying solely on TTL expiry (see RFC's Security considerations)Notes for reviewers
PR description should include: how to review (suggested order:
ServiceTypeadditions → CEL evaluation → stored_values plumbing → error-path Commit), and manual verification (local Envoy + wasm-shim, drive a request through aTokenRateLimitPolicy-protected route, observe Reserve/Commit calls e.g. via Limitador logs).