Files

174 lines
9.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Session handoff — 2026-06-12 (68)
Sixty-eighth handover. Continues directly from handoff-67 (which
triaged a manual-testing pass into fixes + filed issues). This was an
**issue-burndown session**: six Gitea issues closed across five
commits, each landed with the full phased workflow + a `/runda` +
Devil's-Advocate pass before commit. Net: **six issues closed, five
commits, +29 tests, zero regressions.**
## §1. State at handoff
**Branch:** `main`. Working tree **clean**; all work committed.
**Five unpushed commits** (push is the user's step).
**Tests: 2436 passing / 0 failing / 0 skipped / 1 ignored** (the
long-standing `friendly` doctest). **Clippy clean** (nursery, all
targets). Breakdown: 1730 lib + 506 integration (`it`) + 200
typing-surface-matrix. +29 over handoff-67's 2407.
**Commits since handoff-67:**
```
ee3ccd8 feat(hint): advertise the optional seed count in the hint panel (#26)
deb0948 feat(seed): year-as-int + conventional choice-set heuristics (#33, #34)
fde50ce fix(ui): mark sidebar focus with an accent colour, not bold (#25)
3d4a0fd fix(render): trim IEEE-754 noise from displayed decimal arithmetic (#32)
7e4bc12 fix(completion): treat a bare in-scope table alias as an alias, not an unknown column (#31)
```
## §2. Issues closed this session (all committed, all tested, all `/runda`-reviewed)
Each closed on `git.lazyeval.net/oli/rdbms-playground` with a summary
comment. The `/runda` pass earned its keep on every one — see the
"DA caught" notes.
1. **#31 (`7e4bc12`) — bare table alias treated as unknown column.**
A bare in-scope table alias in a SQL expression (`… GROUP BY o`,
`o` aliasing `FROM Orders o`) got `no such column o on table …` and
zero completions. Now: completion offers each FROM source's
*qualifier* (alias-if-present-else-table) at a bare `sql_expr_ident`
slot; the `matched.len()==0` arm emits a targeted
`alias_used_as_column` / `table_used_as_column` hint after the
projection-alias check. **DA caught** two real bugs pre-commit: a
DSL leak (the hint fired for simple-mode `expr_column` refs, which
have no `table.column` syntax) and wrong advice for an
aliased-table-by-real-name — both fixed by gating on
`role == "sql_expr_ident"` + matching the *effective qualifier*.
ADR-0032 Amendment 3.
2. **#32 (`3d4a0fd`) — decimal aggregation float noise.** `decimal`
is exact TEXT, but SQLite has no decimal type, so arithmetic
coerces to IEEE-754 double; `sum(price*qty)` rendered
`298.59999999999997`. Now `format_real_display` (db.rs) rounds REAL
to 15 sig figs **for display only**, wired into `format_cell`.
**DA caught** a real regression: I'd also wired it into
`render_value`, which is a *canonical identity key* for the
uniqueness dry-runs (`dry_run_unique`, `check_uniqueness_collisions`)
— rounding there would report collisions the exact-valued engine
wouldn't. Reverted `render_value` to exact; locked with a
regression test. CSV/FK-key/EXPLAIN paths stay exact. ADR-0005
Amendment 1.
3. **#25 (`fde50ce`) — sidebar focus accent colour, not bold.** Bold
box-drawing glyphs render broken in asciinema casts.
`panel_border_style` now uses a non-bold accent colour
(`theme.mode_simple`); bold stays fine on text spans. **DA caught**
that the issue's "Tier-2 snapshots need re-accepting" was wrong —
`render_to_string` is text-only, so no snapshot changed. Added a
render-level test that inspects the actual border *cells*.
User visually confirmed. ADR-0046 Amendment 1.
4. **#33 + #34 (`deb0948`) — seed heuristics: year-as-int + choice
sets.** Two additive D7 catalogue rules. **#33:** `year`/`*_year`/
`published`/`founded` → bounded `int` year (19502025, or the
`dob`-style birth window 19452007 for `birth`/`born`/`dob`); new
`YearRecent`/`YearBirth` generators. Placed *after* the quantity
rule so `year_count` stays a count. **#34:** type-gated `PickFrom`
sets for `priority`/`prio`, `severity`, `rating`/`stars`; `status`
**deliberately excluded** (user-confirmed on the issue — values too
domain-specific). `priority` left `ENUM_TOKENS`. A user `IN`-CHECK
still wins. **DA/process caught** that I'd skipped reading the issue
*comments* (where the `status` decision + a website cast note lived)
**lesson: always read issue comments**. Also closed a
pre-existing column-fill integration-test gap. ADR-0048 Amendment 1.
5. **#26 (`ee3ccd8`) — optional `count` advertised in the hint panel.**
At `seed <table> ▮` only `set`/`--seed` chips showed; the optional
row count (a bare positional number) was invisible, and the prior
`IntroProse` attempt was reverted because `pending_hint_mode` is
cleared by the trailing optionals. Now `walk_optional` stashes a
skipped inner's `IntroProse` key into a new
`WalkContext.surviving_intro_hint` (key + position) before the empty
match clears it; a **position guard** (`pos == cursor`) stops it
leaking past a later `set …` clause or once the count is given. Tab
still cycles the keywords. Prose mentions the count, `.column`
column-fill, `set`, and `--seed` (user-chosen scope). **DA caught**
a coverage gap (advanced-mode path untested — seed runs in both
modes); added the test. ADR-0022 Amendment 7.
## §3. Open issues — next session's candidates
Four open, all on `git.lazyeval.net/oli/rdbms-playground`. **All four
are interaction/UX design changes that need a decision or two from the
user up front — none is a pure mechanical fix.** Read each issue body
**and its comments** before starting (the #33/#34 lesson).
- **#28 — Reconsider relationship prose in `add column` (incidental
DDL) confirmations** *(enhancement)*. **Revisits a decided area**
needs a **new ADR** superseding the relevant part of ADR-0016 §5 /
ADR-0044 §1. User preference (from the issue): do **not** show the
`References:` / `Referenced by:` block in the add-column
confirmation. Confirm scope with the user (just `add column`, or all
incidental DDL). The highest-ceremony of the four.
- **#27 — Bottom status line: keybindings-only, context- and
state-aware; add `mode advanced` to empty hint** *(enhancement)*.
Per-nav-focus keybindings (Input vs sidebar), **including transient
states** (Tab-cycle, history) per user preference. May warrant a
small ADR. Touches `src/ui.rs` rendering + the nav-focus model
(ADR-0046).
- **#29 — Command input keystroke support.** Esc / double-Esc to clear
a partly-typed command; possibly Ctrl-A/Ctrl-E (Home/End). Relates
to the deferred **I1b readline shortcuts** (`requirements.md`).
**Needs a key-set decision** from the user before coding.
- **#30 — History brings back all commands in both modes.**
Advanced-mode history entries can't replay in simple mode; proposal:
if we can distinguish them, prepend `:` to reuse advanced history
from simple mode. Interaction design; touches the input-history +
mode model (ADR-0003).
No strong ordering. **#28** is the only one that *must* produce an ADR.
**#29** is closest to "small once the key-set is decided." **#27** and
**#30** are medium UX work.
## §4. Carried-over follow-up (not a `main`-branch task)
- **Website `seed` cast re-record** (from #34's comment thread). The
`website` branch ships a `seed` cast exercising a `tickets` table
with `priority`; now that `priority` collapses to `low/medium/high`,
the cast should be re-recorded (`cd website && pnpm casts seed`,
needs a `../target/debug` binary) so the table tightens. The issue
comment notes it is **likely redundant** — casts get a full
re-record sweep before publication. Tracked on the `website` branch,
**not** here. `website/` is not in the `main` tree.
## §5. Other open roadmap (unchanged from handoff-67 §5)
`seed` is feature-complete (`requirements.md` SD1/SD2 `[x]`, now with
the #33/#34 catalogue refinements noted inline). User's call:
- **H2 `hint`** — the last A1 gap (its own ADR).
- **TT5 CI** — test infra exists; no CI workflow yet (the `ci` branch
exists — check its state before starting).
- **TT4 PTY (Tier-4)** — ADR-0008 specifies it; not wired.
- Larger: **V4 journal**, **tutorial/lesson system** (each needs an ADR).
## §6. How to take over
1. Read handoffs 66 → 67 → 68, `CLAUDE.md`, `docs/requirements.md`.
2. Confirm green baseline: `cargo test` (expect 2436 pass / 1 ignored)
+ `cargo clippy --all-targets` (clean).
3. Pick from §3 (#28/#27/#29/#30). **For each, read the issue body AND
its comments** before designing, and **escalate the design fork to
the user** before coding — all four have genuine UX decisions. #28
needs a new ADR.
4. Follow the project workflow: phased (requirements → divergent →
eval → execute → verify), test-first (failing test before the fix),
`/runda` + DA pass before every commit, ADR amendment for any
decided-area change + the README index-upkeep rule, and confirm the
commit message with the user before committing.
5. Consider a `cargo sweep` at this milestone (`target/` grows across
sessions; see CLAUDE.md "Build hygiene").