Detail bug report: View on Detail
Closes #168
storedRuleIssue (the author-time gate that runs on every custom-rule save) applied the verb-vs-signal-kind gate (VERBS_FOR_KIND) only to the top-level comparison. The not branch of argIssue recursed into the inner comparison's arg-type check without ever verifying the inner verb applied to the signal kind — so a rule like { kind: "not", args: [{ kind: "under", args: [7] }] } on a text signal passed validation but threw SignalEvaluationError at every evaluation. The worker caught the throw and recorded the rule as skipped, so any saved rule with a cross-kind verb inside not never enforced and degraded the run to "A rule could not run." The gap was reachable through the MCP save_custom_rule tool and the CLI, which accept arbitrary definition JSON.
In the not branch of argIssue in packages/sdk/src/stored-rule.ts, the inner verb is now checked against VERBS_FOR_KIND[kind] before recursing — mirroring the top-level gate and the evaluator's per-kind switch, which dispatches the inner comparison through the same kind-gated logic. A cross-kind inner verb now returns ${innerVerb} does not apply to this signal instead of passing through to the arg-type check.
packages/sdk/src/stored-rule.test.ts:
not are rejected across all kind crossings (number-only on text/boolean/textList, text-only on number/boolean/textList, list-only on text/number/boolean, equals on textList) plus a double-negation case.not still pass for each kind, double negation passes, and the arg-type gate still runs inside not.save_custom_rule tool rejects a cross-kind-in-not rule before storage and accepts a valid same-kind-in-not rule, using a real throwaway Postgres container. Confirmed the CLI forwards both definitions unchanged to the server.not rule evaluates with status: "evaluated" (not skipped, no throw) and that the "custom rule threw — treated as skipped (bug)" log line does not appear.Automatic Fixes PRs can be configured here.
The latest updates on your projects. Learn more about Unkey Deploy
| Name | Status | Preview | Inspect | Updated (UTC) |
|---|---|---|---|---|
| tripwire / web (preview) | Ready | Visit Preview | Inspect | Nov 7, 2026 6:53am |
@detail-app[bot], Tripwire blocked this change request.
Rate limit: You opened 54 change requests in a short time. Wait before you open another.
A new commit will not fix this.
If you think it should merge anyway, say so in a comment. A maintainer will decide.
Sign in to comment.