test+docs: 3k Phase-3 verification sweep — e2e DML + filled cross-cut matrix

Sub-phase 3k of ADR-0033. Adds the Tier-3 end-to-end DML suite (tests/sql_dml_e2e.rs) and the cross-cut gap-fill tests, fills the verification matrix (every row a verified file::function), and produces the phase-exit report.

- tests/sql_dml_e2e.rs: INSERT…SELECT cross-table, all-ten-type multi-row INSERT + RETURNING type recovery, UPDATE-with-subquery-in-SET, cascade DELETE, UPSERT round-trip, RETURNING x3, history.log replay, OOS rejections (full §13 table), validity-indicator-from-SQL-DML.
- walker/mod.rs, highlight.rs, completion.rs, input_render.rs: inherited-diagnostic, DML-keyword highlight, INSERT INTO completion, and advanced-mode DML hint-panel cross-cuts.
- Matrix correction (user-confirmed): predicate warnings fire on row-scoped DML slots; INSERT VALUES has no row scope (ADR-0033 §8.4).
- Auto-snapshot row marked N/A (user-confirmed): ADR-0006 unimplemented for both paths; deferred.

/runda round: added an advanced-mode DML hint-panel test (A6 was attributed to simple-mode prose under the §8 advanced heading); extended OOS coverage to the full ADR-0033 §13 table (OOS-5 INDEXED BY / OOS-6 multi-statement) + a trailing-semicolon guard.

1645 passing / 0 failing / 0 skipped / 1 ignored. Clippy clean.
This commit is contained in:
claude@clouddev1
2026-05-23 22:26:04 +00:00
parent a5cdb00a86
commit 380c4238ef
7 changed files with 1150 additions and 84 deletions
+32
View File
@@ -903,6 +903,38 @@ mod tests {
}
}
#[test]
fn advanced_mode_ambient_offers_dml_slot_candidates() {
// 3k cross-cut (matrix A6, advanced surface): the ambient hint
// panel surfaces SQL DML slot assistance in Advanced mode —
// column candidates at an `UPDATE … SET` LHS slot and inside an
// `INSERT … (` column list. (The simple-mode DSL value-slot
// prose is a separate surface; this pins the §8 advanced claim.)
use crate::dsl::types::Type;
let cache = schema_with_columns(
"Customers",
&[("id", Type::Int), ("Name", Type::Text)],
);
let set_slot = "update Customers set ";
match ambient_hint_in_mode(set_slot, set_slot.len(), None, &cache, Mode::Advanced) {
Some(AmbientHint::Candidates { items, .. }) => assert!(
items.iter().any(|c| c.text == "Name" || c.text == "id"),
"UPDATE SET slot should offer column candidates; got {items:?}",
),
other => panic!("expected candidates at the UPDATE SET slot, got {other:?}"),
}
let col_list = "insert into Customers (";
match ambient_hint_in_mode(col_list, col_list.len(), None, &cache, Mode::Advanced) {
Some(AmbientHint::Candidates { items, .. }) => assert!(
items.iter().any(|c| c.text == "Name" || c.text == "id"),
"INSERT column-list slot should offer column candidates; got {items:?}",
),
other => panic!("expected candidates in the INSERT column list, got {other:?}"),
}
}
#[test]
fn simple_mode_ambient_does_not_surface_sql_candidates() {
// The simple-mode entry point keeps gating SQL — advanced