STET

flux-pr-1604

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

pass_with_warn

Tests passed. 1/1 commands passed. Strength: strong.

100.0% run pass rate
Tier 1
primary testspasseddecision conflictnon equivalentfail
env PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin cargo test --all-features
gold passagent pass

Partial score: 1/1

Publishable: yesCache: miss

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
Tests passed
#2
equivalence
Equivalence judgment
#3

non_equivalent

code review
Code review judgment
#4

fail

decision
Final decision
#5

pass_with_warn

Quality

equivalence
non_equivalent
88% confidence
code review
fail
3 findings
footprint
low (0.23)
behavioral
0.0%
cost
$1.07 · 2.5M

Equivalence Reasoning

behavioral

The patch adds a `from_before_set` flag and rendering logic, but it likely misses a core parsing fix: `FROM` is not reserved as a table-alias blocker (gold adds it to `RESERVED_FOR_TABLE_ALIAS`). Without that, `UPDATE t1 FROM t2 SET ...` can be parsed incorrectly because `FROM` may be consumed during table parsing. It also gates pre-`SET` `FROM` to Snowflake only, while the intended change/gold approach supports both positions more generally in parser behavior.

Code Review

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

The patch appears unlikely to fully satisfy the intended change: it introduces a fragile AST representation, likely misses a required parser/keyword integration detail, and handles FROM-clause position support asymmetrically.

3 findings
Pre-SET FROM parsing likely misses tokenization/alias interaction
major

The parser only checks for `FROM` after `parse_table_and_joins()`. Without the companion keyword-reservation change, `FROM` can be consumed as alias context and the Snowflake form may fail to parse reliably.

src/parser/mod.rs:11793
AST uses boolean state instead of typed FROM-position variant
major

Adding `from_before_set: bool` to `Statement::Update` creates representationally invalid states (`from_before_set=true` with `from=None`) and broad API churn. A dedicated enum for before/after-SET `FROM` is safer and clearer.

src/ast/mod.rs:2474
Clause-position support is dialect-limited and asymmetric
major

Pre-`SET` `FROM` is only parsed for Snowflake, and post-`SET` remains gated by a dialect list. This asymmetric handling weakens support for round-tripping both forms consistently.

src/parser/mod.rs:11795