From 6eb5adf85943e57aa2b3e6d7aa3aa472c7e1f2bc Mon Sep 17 00:00:00 2001 From: Ragnor Comerford Date: Fri, 29 May 2026 11:57:50 +0200 Subject: [PATCH] docs(server): clarify why run_query lacks AppState parameter run_mutate takes state for workload admission; run_query doesn't because reads aren't admission-gated today. Mark the asymmetry as intentional and flag the two future events that would grow the signature: Phase 1's `expect: { max_rows_scanned: N }` budget (MR-976) or per-actor admission extending to stored-read invocations (MR-969). Prevents the natural "make these symmetrical" follow-up. --- crates/omnigraph-server/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/omnigraph-server/src/lib.rs b/crates/omnigraph-server/src/lib.rs index 275c6be..4461a14 100644 --- a/crates/omnigraph-server/src/lib.rs +++ b/crates/omnigraph-server/src/lib.rs @@ -1845,6 +1845,12 @@ async fn run_mutate( /// can call here with registry-supplied fields. Rejects inline source that /// contains mutations (D2 rule); callers wanting writes go through /// [`run_mutate`] instead. +/// +/// Intentionally does **not** take [`AppState`] (unlike [`run_mutate`]): +/// reads are not admission-gated today, so there is no `state.workload` +/// consumer. The signature grows the parameter when Phase 1 (MR-976) adds +/// the request envelope's `expect: { max_rows_scanned: N }` budget, or +/// MR-969 extends per-actor admission to stored-read invocations. async fn run_query( handle: Arc, actor: Option>,