STET

flux-pr-1839

sqlparser-rs (Rust) · W1 · GPT-5.1 Codex Mini

fail_guardrail

Tests: unknown. 0/1 commands passed. Strength: missing.

100.0% run pass rate
Tier 1
guardrail preflight failedprimary equivalenceunknownnon equivalentneeds generated testsweak signal riskall commands ignoredunknown no gold pass commands
env PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin cargo test --all-features
gold unknownagent

Partial score: 0/0

Publishable: yesWeak signal risk: yes

Trajectory

unknown · partial order only

Canonical trajectory missing; showing coarse derived order only.

patch written
Patch captured
#1

Stet captured agent.patch for this trial.

validation
Validation recorded
#2
equivalence
Equivalence judgment
#3

non_equivalent

code review
Code review judgment
#4

fail

decision
Final decision
#5

fail_guardrail

Quality

equivalence
non_equivalent
88% confidence
code review
fail · 35/100
3 findings
footprint
low (0.21)
behavioral
cost
$1.36 · 3.6M

Equivalence Reasoning

behavioral

The patch captures much of the intent (optional `AS`, named table return types, column constraints, bare `RETURN SELECT`), but it is not fully equivalent: it changes `DataType::Table` to a new `TableDataType` shape without showing corresponding updates to all existing `DataType::Table(...)` construction sites (notably the generic `parse_data_type` `TABLE` branch), which likely breaks existing behavior/build. It also does not introduce distinct `AS RETURN` body variants like the gold approach, so MSSQL `AS RETURN` round-tripping/format semantics are not fully aligned.

Code Review

correctness: 1/4introduced bug risk: 1/4edge case handling: 2/4maintainability idioms: 2/4

The patch moves toward the requested MSSQL function coverage, but it likely does not fully satisfy the intended change because AS RETURN variants are not modeled distinctly and bare RETURN SELECT is normalized in a way that can lose expected representation/round-trip semantics.

3 findings
AS RETURN forms are not represented distinctly in function-body AST
major

The parser maps RETURN bodies into CreateFunctionBody::Return(Expr) instead of introducing distinct AS RETURN expression and AS RETURN SELECT variants, so the intended MSSQL forms cannot be preserved explicitly.

app/src/parser/mod.rs:5217
Bare RETURN SELECT is normalized to subquery expression
major

parse_mssql_return_expr converts SELECT/WITH returns into Expr::Subquery(parse_query), which may serialize differently from the requested bare SELECT RETURN form and can break expected round-trip behavior for inline table-valued functions.

app/src/parser/mod.rs:5282
DataType::Table API was broadened with MSSQL-specific fields
minor

Replacing DataType::Table(Vec<ColumnDef>) with DataType::Table(TableDataType { table_variable, columns }) introduces cross-dialect semantic coupling and a wider compatibility surface than needed for the targeted change.

app/src/ast/data_type.rs:40