Follow-up to #493.
Problem
#493 added end-to-end validation for running Dashboard variable option SQL, but the Run path does not currently reject a query that produces more than the supported 1000 option rows.
Requiring authors to include an explicit top-level LIMIT 1000 would add SQL-parsing complexity and enforce syntax rather than the actual option-count contract. The existing probe already wraps the query with LIMIT 1001, so the extra row can be used to detect overflow directly.
Intended behaviour
After a successful dashboard-variable Run response passes column-shape validation, reject it when the raw returned row count is greater than VARIABLE_OPTION_CAP.
- Keep
compileOptionProbe bounded at VARIABLE_OPTION_CAP + 1.
- Count raw returned rows before any future filtering or deduplication.
- Accept zero through 1000 rows.
- Reject 1001 returned rows with a specific diagnostic explaining that option SQL may return at most 1000 rows.
- Do not require the authored SQL to contain an explicit
LIMIT clause.
- Preserve transport errors and cancellation; row-count validation must run only after a successful complete response.
- A row-count failure must not be recorded as a successful run for History or detached-result source capture.
- Keep the Dashboard option-batch bounds and truncation handling unchanged.
Acceptance criteria
Related: #465, #493.
Follow-up to #493.
Problem
#493 added end-to-end validation for running Dashboard variable option SQL, but the Run path does not currently reject a query that produces more than the supported 1000 option rows.
Requiring authors to include an explicit top-level
LIMIT 1000would add SQL-parsing complexity and enforce syntax rather than the actual option-count contract. The existing probe already wraps the query withLIMIT 1001, so the extra row can be used to detect overflow directly.Intended behaviour
After a successful
dashboard-variableRun response passes column-shape validation, reject it when the raw returned row count is greater thanVARIABLE_OPTION_CAP.compileOptionProbebounded atVARIABLE_OPTION_CAP + 1.LIMITclause.Acceptance criteria
LIMITpass when their actual result contains at most 1000 rows.LIMITare judged by their actual returned row count, not by parsing the SQL text.dashboard-variableRun path.Related: #465, #493.