# Session handoff — 2026-06-12 (67)

Sixty-seventh handover. Continues directly from handoff-66 (ADR-0048
`seed` Phase 2, committed). This was a **manual-testing pass**: the user
exercised the app, found several rough edges, and we triaged each into
*fix now* vs *file an issue*. Net result: **three bug fixes committed**
and **three enhancement issues filed**.

## §1. State at handoff

**Branch:** `main`. Working tree **clean**; all work committed. Unpushed
(push is the user's step).

**Tests: 2407 passing / 0 failing / 0 skipped / 1 ignored** (the
long-standing `friendly` doctest). **Clippy clean** (nursery, all
targets). +7 over handoff-66's 2400.

**Commits since handoff-65:**
```
f7155ce fix(input): thread the `:` one-shot escape into live SQL feedback
4cacb82 fix(completion): don't flag a table alias used before its FROM clause
c3e0103 fix(completion): flag-aware partial so a dash completes flags, not keywords
30b2677 docs: ADR-0048 Phase 2 implemented + handoff 66
a12facc feat(seed): set override clause + column-fill (ADR-0048 Phase 2)
```
(`a12facc`/`30b2677` are the Phase-2 work documented in handoff-66.)

## §2. Bug fixes this session (all committed, all tested)

1. **`c3e0103` — flag completion ate the dash.** Typing a flag at a
   flag position (`add 1:n relationship … -`) offered the `on` keyword
   and, on accept, produced `-on` / `---create-fk`: the partial-token
   walk stopped at `-`, so the dash was outside the replaced range.
   Fix: flag-aware partial detection (a dash-prefixed token at a word
   boundary is a flag-in-progress, **gated on a flag being expected** so
   `where x = -5` stays a number) + a unified flag matcher
   (`trim_start_matches('-')`). Affected **all** flags. 4 tests + 2
   partial-flag snapshots updated (they'd captured the latent bug).

2. **`4cacb82` — table alias flagged as an unknown column.** In a
   SELECT, the projection (`sum(ol.count*…)`) can reference an alias
   whose `FROM … OrderLines ol` sits *after* the cursor. The candidate
   engine recovers that via the §10.6 full-input lookahead (ADR-0032),
   but `invalid_ident_at_cursor` only walked text *before* the cursor —
   so `ol` matched no scope and got a red "ERR" overlay on an otherwise
   valid query. Fix: give the validity check the same full-input
   lookahead and bail when the partial prefix-matches a binding's alias
   or table. 1 test.

3. **`f7155ce` — the `:` one-shot escape broke live SQL feedback.**
   Submission strips the `:` (ADR-0003), but the *live* feedback kept it
   in the buffer handed to the walker, which bailed at the `:`. Effect:
   under `:`, Tab completed nothing and a valid query could flash `[ERR]`
   — while the same line in full `mode advanced` worked. (The hint
   already stripped it, hence "hint shows the name but Tab does
   nothing".) Fix: one shared `App::feedback_view()` (the `:`-stripped
   SQL + mapped cursor + stripped offset) routed through completion (with
   a `replaced_range` offset shift), the validity verdict, and rendering
   (new `render_input_runs_feedback` highlights/overlays the view shifted
   by the offset; the `:` renders as plain text); the ambient hint was
   consolidated onto it (removing the duplicate `strip_one_shot_prefix`).
   3 tests + the 9 existing colon tests still green.

## §3. Investigated, **no code change** (working as designed)

- **Comma-`FROM` implicit join** (`select … from A, B, C`) is
  **deliberately rejected** — ADR-0032 §11 / OOS-3: *"comma-FROM teaches
  habits we do not want to encourage; `CROSS JOIN` covers the same shape
  explicitly."* The explicit equivalent (`CROSS JOIN … WHERE …`) works.
- **`sum(…)` returning one row** with no `GROUP BY` is **correct SQL**
  (the aggregate collapses the result to one row; SQLite/the playground
  allow the non-aggregated columns where Postgres would error). The
  user's query needed `group by o.id`. Verified (1 row).

## §4. Open issues filed this session — **next session's candidates**

All on `git.lazyeval.net/oli/rdbms-playground`, label `enhancement`:

- **#26 — `seed <table>` hint omits the optional count.** A complete
  command's optional positional *number* has no Tab candidate, so it's
  invisible. `IntroProse` doesn't fit (it only fires for incomplete
  required slots; the completing Seq match clears the hint). Needs a way
  to advertise optional positional non-keyword args. *(I attempted +
  reverted this during Phase 2; see the analysis in the issue.)*
- **#27 — Bottom status line: keybindings-only, context- and
  state-aware.** Per-nav-focus keybindings (Input vs sidebar), **include
  transient states** (Tab-cycle, history) — user preference — and add
  `mode advanced` to the empty-input hint. May warrant a small ADR.
- **#28 — Reconsider relationship prose in `add column` (incidental DDL)
  confirmations.** Currently by design (ADR-0044 §1 keeps prose, not
  diagrams, for incidental DDL). **User preference: do NOT show the
  `References:` / `Referenced by:` block** in the add-column
  confirmation at all — focus on the change just made. This revisits a
  decided area → land as a **new ADR** superseding the relevant part of
  ADR-0016 §5 / ADR-0044 §1; confirm scope (just `add column`, or all
  incidental DDL).

## §5. Other open work (unchanged from handoff-66 §6)

`seed` is **feature-complete** (`requirements.md` SD1 `[x]`, SD2 `[x]`).
Remaining roadmap, user's call:

- **H2 `hint`** — the last A1 gap (its own ADR).
- **TT5 CI** — test infra exists; no CI workflow yet.
- **TT4 PTY (Tier-4)** — ADR-0008 specifies it; not wired.
- Larger: **V4 journal**, **tutorial/lesson system** (each needs an ADR).

A possible quick follow-up: a friendlier "use an explicit `JOIN`"
parse-error for comma-`FROM` (point 1) — not filed; mention if wanted.

## §6. How to take over

1. Read handoffs 65 → 66 → 67, `CLAUDE.md`, `docs/requirements.md`.
2. `seed` Phase 2 is done (ADR-0048 Status block is current). The
   manual-testing fixes (§2) are committed and green.
3. Pick from §4 (filed issues #26/#27/#28) or §5 (roadmap). #28 is a
   decision/ADR; #27 is UX (maybe ADR); #26 is a hint-system enhancement.
4. Consider a `cargo sweep` at this milestone (`target/` grows across
   sessions).
