From 5ead1499cd46c033a94baa096eda2502248a7c1d Mon Sep 17 00:00:00 2001 From: aecsocket <43144841+aecsocket@users.noreply.github.com> Date: Sun, 2 Aug 2026 15:13:13 +0100 Subject: [PATCH] flatten input context --- .../moderation/technical-review/rules.vue | 4 ++-- .../moderation/tech_review/rules_scan.rs | 20 +++++++++++++++---- packages/delphi-cel-experiment/src/main.rs | 14 ++++++++----- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/apps/frontend/src/pages/moderation/technical-review/rules.vue b/apps/frontend/src/pages/moderation/technical-review/rules.vue index 47032a24a9..fbc86e94c5 100644 --- a/apps/frontend/src/pages/moderation/technical-review/rules.vue +++ b/apps/frontend/src/pages/moderation/technical-review/rules.vue @@ -64,7 +64,7 @@
- Input (input)
+ Context
= {
diff --git a/apps/labrinth/src/routes/internal/moderation/tech_review/rules_scan.rs b/apps/labrinth/src/routes/internal/moderation/tech_review/rules_scan.rs
index 99d573803f..ed39d82193 100644
--- a/apps/labrinth/src/routes/internal/moderation/tech_review/rules_scan.rs
+++ b/apps/labrinth/src/routes/internal/moderation/tech_review/rules_scan.rs
@@ -114,7 +114,7 @@ pub struct DelphiRuleSchemaResponse {
pub components: BTreeMap,
}
-/// Get the schemas for the CEL input and output values.
+/// Get the schemas for the CEL context and output values.
#[utoipa::path(
context_path = "/moderation/tech-review",
tag = "moderation",
@@ -800,12 +800,24 @@ async fn insert_materialized_effects(
pub(super) fn evaluate_rule(
program: &cel::Program,
- input: impl Serialize,
+ input: &RuleInput,
) -> Result