From a1e4932858ebbe536d3987b9ee62a0d566bcd49f Mon Sep 17 00:00:00 2001 From: "claude@clouddev1" Date: Tue, 19 May 2026 10:28:48 +0000 Subject: [PATCH] =?UTF-8?q?docs:=20handoff=2019=20update=20=E2=80=94=20bot?= =?UTF-8?q?h=20manual-testing=20bugs=20fixed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit handoff-19 §2 now records the two bugs as fixed (was "queued next"): the optional trailing-flag completion fix (f239ca5) and the --resume temp-project pointer fix (3a40ae2). §5 drops them from "what's next" — ADR-0028 is now the natural next pick. State/§6 updated to 10 commits and 1131 tests; requirements.md test baseline → 1131. --- docs/handoff/20260519-handoff-19.md | 108 +++++++++++++++------------- docs/requirements.md | 6 +- 2 files changed, 64 insertions(+), 50 deletions(-) diff --git a/docs/handoff/20260519-handoff-19.md b/docs/handoff/20260519-handoff-19.md index 9c02825..885e253 100644 --- a/docs/handoff/20260519-handoff-19.md +++ b/docs/handoff/20260519-handoff-19.md @@ -1,11 +1,13 @@ # Session handoff — 2026-05-19 (19) Nineteenth handover. A focused **implementation run** that -**finished ADR-0027**: the §4 "known follow-ups" from -handoff-18 are all done. ADR-0027's §2 always specified that -"highlighting and the hint panel read the individual -diagnostics" — handoff-18 shipped the indicator and the model -but left that wiring as a follow-up. It is now wired. +**finished ADR-0027** and then **fixed two manual-testing +bugs**. The §4 "known follow-ups" from handoff-18 are all +done: ADR-0027's §2 always specified that "highlighting and +the hint panel read the individual diagnostics" — handoff-18 +shipped the indicator and the model but left that wiring as a +follow-up. It is now wired. Two unrelated bugs the user found +mid-run (§2) are also fixed. **Headline: the diagnostics are visible where they happen.** An unknown table / column (ERROR) and a dubious comparison @@ -16,12 +18,15 @@ and explained in the hint panel — not just summarised by the ## State at handoff -**Branch:** `main`. Working tree clean. **7 commits** since +**Branch:** `main`. Working tree clean. **10 commits** since handoff-18 (`39b92a7`), all local — push asynchronously, not blocking. ``` - docs: handoff 19 + ADR-0027 follow-up/amendment notes + docs: handoff 19 update — both manual-testing bugs fixed +3a40ae2 runtime: don't record an unmodified temp as the --resume target +f239ca5 walker: keep optional trailing flags completable after `--` +0e5f226 docs: handoff 19 — ADR-0027 highlight/hint wiring finished c1c9f6c runtime: extract the indicator debounce into a tested state machine 400fb71 ui: surface diagnostics in the ambient hint panel (ADR-0027 §2) bbfb70c ui: overlay diagnostic spans on the input field (ADR-0027 §2) @@ -30,7 +35,7 @@ bbfb70c ui: overlay diagnostic spans on the input field (ADR-0027 §2) 426e801 command: Operand carries a source span ``` -**Tests:** **1125 passing, 0 failing, 1 ignored** (`cargo +**Tests:** **1131 passing, 0 failing, 1 ignored** (`cargo test` — up from 1100 at handoff-18). The ignored test is the long-standing `` ```ignore `` doc-test in `src/friendly/mod.rs`. Typing-surface matrix: **161 cells**, @@ -109,40 +114,47 @@ numeric-only — `bool` and the text-/blob-backed types are not flagged; rationale is in the amendment. `docs/adr/ README.md` updated per the index-upkeep rule. -## §2. ⚠️ Two manual-testing bugs — NOT fixed, queued next +## §2. Two manual-testing bugs — both fixed Mid-run the user reported two bugs from manual testing and -explicitly deferred the fixes. **These are the top of the -next session's queue.** They are unrelated to ADR-0027. +deferred the fixes; both are now done (commits `f239ca5`, +`3a40ae2`). They are unrelated to ADR-0027. -1. **`add 1:n relationship` — missing completion + wrong - usage hint.** Typing `add 1:n relationship from - Artists.album_id to Albums.id --` does **not** offer - `--create-fk`. Separately, the ambient hint at the end of - `add 1:n relationship from … to …` shows the **wrong** - usage block — `add column …` — because - `grammar::usage_key_for_input` (commit `151ed08`) - disambiguates `add column` / `add index` but not the - `1:n relationship` form, so it falls back to the first - `add` form. Same *class* of bug `151ed08` fixed; the fix - is to teach `usage_key_for_input` the relationship form, - plus wire the `--create-fk` flag completion. - *(The user confirmed the `[ERR]` shown for the - non-existent column in that input is correct and welcome - — that is this run's schema-existence diagnostic working. - Do not touch it.)* -2. **`--resume` points at an unpersisted temp project.** An - empty temp project is created on launch but, by design - (ADR-0015), not persisted when it has no content — yet - `last_project` still records its path, so a later - `--resume` fails with a confusing "path does not exist". - The user asked for: (a) `last_project` updated only once - a path is **truly persisted with content**; (b) a - friendly error when `--resume` finds no `last_project` - at all. - -Both are recorded as tasks (#7, #8 in this session's task -list) with full repro detail. +1. **`add 1:n relationship` — optional flag not completable + after `--` (`f239ca5`).** Typing `add 1:n relationship + from X.a to Y.b --` to start `--create-fk` made completion + go **empty**: the trailing `--` turns the parse into a + trailing-junk `Mismatch`, and the Mismatch arm of the + completion expected-set resolution returned only + `[EndOfInput]` — the skipped optional-flag expectations, + carried in `tail_expected`, were dropped. + `completion_probe` and `expected_at_input` now merge + `tail_expected` into a Mismatch's expected set; the fix + covers the whole optional-trailing-flag class + (`--create-fk`, `--cascade`, `--force-conversion` / + `--dont-convert`). This *also* resolved the "wrong usage + hint" symptom: with `--create-fk` offered as a candidate + the hint panel shows candidates, not the parse-error + usage block. The audit (the user's requested scan) found + `usage_key_for_input` **correct** for every multi-form + command — `add` / `drop` / `show`, including the digit-led + `add 1:n relationship` — so the "shows `add column`" + symptom was not a code bug in the current tree; it is now + regression-locked. *(The `[ERR]` on the non-existent + column is the schema-existence diagnostic working — left + intact.)* +2. **`--resume` recorded an unpersisted temp (`3a40ae2`).** + An empty temp is created on launch but auto-deleted on + quit while still empty (ADR-0015); the unconditional + startup `write_last_project` recorded its path anyway, so + a later `--resume` resolved to a deleted directory. All + three resume-pointer writes are now gated on + `!project.is_unmodified_temp()` (startup, on-switch, and a + new on-quit write — the quit write is where a launch-temp + the user *filled with content* finally gets remembered). + The "no previous project" friendly error the user asked + for already existed (`project.resume_no_previous`) — + verified, no change needed. ## §3. Architectural delta (vs. handoff-18) @@ -197,14 +209,14 @@ list) with full repro detail. ## §5. What's next -1. **The two §2 bugs** — `add 1:n relationship` completion / - usage hint, and `--resume` / `last_project`. The user - deferred these explicitly; they are first in line. -2. **ADR-0028 — query plans (`explain`).** Still the last +1. **ADR-0028 — query plans (`explain`).** The last unimplemented member of the handoff-16 design trio; **Accepted**, not started. `show data … where` is the filtered query whose plan flips between a full scan and - an index search. + an index search. The diagnostics model and the + `OutputLine` span-styling ADR-0028 describes are both + easier to reach now. +2. The §2 bugs are **done** — nothing pending there. Other open clusters unchanged from handoff-16/17/18 (snapshot/undo `U`-series; constraints `C3`; `C4` m:n; @@ -219,11 +231,11 @@ Other open clusters unchanged from handoff-16/17/18 3. **Read `docs/adr/0027-input-validity-indicator.md`** — especially the new "Follow-up" and "Amendment 1" sections. -4. **Run `cargo test`** — 1125 passing, 0 failing, 1 ignored. +4. **Run `cargo test`** — 1131 passing, 0 failing, 1 ignored. 5. **Run `cargo clippy --all-targets -- -D warnings`** — clean. -6. **Start with §5.1 — the two manual-testing bugs.** They - were deferred mid-run with the user's agreement; they are - the committed next step, ahead of ADR-0028. +6. **Pick the next work from §5** — ADR-0028 is the natural + pick (the §2 manual-testing bugs are already fixed); + prioritisation is a user decision, so ask. ### Note on the typing-surface matrix diff --git a/docs/requirements.md b/docs/requirements.md index 2964ed3..e3baf4a 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -28,8 +28,10 @@ repo is pushed). After the ADR-0027 highlight / hint follow-up (precise WARNING spans, the diagnostic overlay + hint wiring, the -`LIKE`-on-numeric WARNING, the debounce state machine): -**1125 passing, 0 failing, 1 ignored** (`cargo test` — the one +`LIKE`-on-numeric WARNING, the debounce state machine) plus +two manual-testing bug fixes (optional trailing-flag +completion; the `--resume` temp-project pointer): +**1131 passing, 0 failing, 1 ignored** (`cargo test` — the one ignored test is a long-standing `` ```ignore `` doc-test in `src/friendly/mod.rs`). Clippy clean with the nursery lint group enabled. (Earlier reference points: 1100 after ADR-0027's