docs(tt4,nfr): record Tier-4 + NFR verification (ADR-0008 A1, ADR-0057)
Document the regression-hardening work from this session: - ADR-0008 Amendment 1 — Tier 4 realized: the portable-pty + vt100 harness, expectrl dropped, serial/fail-fast design, the four flows, sidebar-region reads, command pacing (issue #39), CI default-target (advances TT5). - ADR-0057 (new) — NFR verification strategy: contrast + ΔE2000 gates (NFR-5/7), startup/RSS measured (NFR-1/3: release ~29 ms / ~10 MB), NFR-2 by architecture, NFR-4/6 reviewer note. Records the two shipped light-theme contrast defects this work caught and fixed. - requirements.md: TT4 [~]->[x], TT5 [/] (only a Windows exec runner left), NFR-1/2/3/5/7 ->[x], NFR-4/6 ->[/], each with evidence. - CHANGELOG.md (new): Keep a Changelog + SemVer, [Unreleased] + [0.2.0]. - README ADR index updated; handoff-76; the working plan. Docs-only (CI gate skips via paths-ignore).
This commit is contained in:
+72
-27
@@ -918,28 +918,34 @@ since ADR-0027.)
|
||||
for representative views.
|
||||
- [x] **TT3** Tier 3: synthetic event-loop integration tests
|
||||
covering the user-facing flows in this checklist.
|
||||
- [~] **TT4** Tier 4: PTY-based end-to-end for the four critical
|
||||
- [x] **TT4** Tier 4: PTY-based end-to-end for the four critical
|
||||
flows named in ADR-0008 (cold launch → DDL → quit; save →
|
||||
reopen; export → import → rebuild; undo after DROP).
|
||||
*(Verified 2026-06-07: **nothing is wired** — no
|
||||
`portable-pty` / `expectrl` / `vt100` dependencies, no PTY test
|
||||
files; ADR-0008 §Tier-4 is a specification only. The Tier-3
|
||||
`tests/it/*_e2e.rs` files are synthetic event-loop tests, not
|
||||
PTY. Correcting a stale `CLAUDE.md` line that read "Tier 4 is
|
||||
wired only for the listed critical flows" — it was not wired at
|
||||
all. Genuinely deferred.)*
|
||||
*(Implemented 2026-06-22 — ADR-0008 **Amendment 1**;
|
||||
`tests/e2e_pty.rs` (commit `fd63de3`). Drives the actual built
|
||||
binary in a real pseudo-terminal: `portable-pty` + `vt100`
|
||||
(**`expectrl` dropped** — conflicting PTY layer, replaced by a
|
||||
hand-rolled `wait_for` on the vt100 grid). Fixed 100×30, per-test
|
||||
temp `--data-dir`, serial, tight fail-fast 3 s waits; table
|
||||
presence read from the Tables sidebar region (Output echoes
|
||||
commands); commands paced to completion (stale-schema-cache
|
||||
misparse on faster-than-human input → issue #39). All four flows
|
||||
green (flow 2 asserts a **column** round-trips, not just the
|
||||
table name). Was previously a spec-only deferral; the earlier
|
||||
2026-06-07 "nothing is wired" note is now resolved.)*
|
||||
- [/] **TT5** CI runs all tiers on Linux, macOS, and Windows on
|
||||
stable Rust.
|
||||
*(Partial, 2026-06-15. **CI is live** on the self-hosted Gitea
|
||||
Actions (`docs/ci/adr/`): the gate runs `clippy -D warnings` +
|
||||
`cargo test` (Tiers 1–3) on the **Linux** runner for every branch
|
||||
push / PR, and `release-macos` runs the suite natively on the
|
||||
**macOS** runner. **Windows is build-only** — cross-compiled, not
|
||||
executed (no Windows runner). **Tier 4** (PTY, TT4) is still
|
||||
unwired, so "all tiers" is not yet fully met. "Stable Rust" is
|
||||
satisfied by the flake's pinned `1.95.0` (a stable release, not
|
||||
nightly). Remaining for full TT5: a Windows execution runner and
|
||||
Tier-4 PTY in CI.)*
|
||||
*(Partial, updated 2026-06-22. **CI is live** on the self-hosted
|
||||
Gitea Actions (`docs/ci/adr/`): the gate runs `clippy -D warnings`
|
||||
+ `cargo test` (now Tiers **1–4** — the `e2e_pty` target runs by
|
||||
default) on the **Linux** runner for every branch push / PR, and
|
||||
`release-macos` runs the suite natively on the **macOS** runner.
|
||||
**Tier 4 in CI on Linux is now met** (TT4); PTY-in-container was
|
||||
validated (openpty + spawn under Docker), first real CI run is the
|
||||
final confirmation. **Windows is build-only** — cross-compiled,
|
||||
not executed (no Windows runner). "Stable Rust" is satisfied by
|
||||
the flake's pinned `1.95.0`. **Remaining for full TT5: a Windows
|
||||
execution runner** (the macOS + Tier-4 gaps are now closed).)*
|
||||
|
||||
## Cross-cutting
|
||||
|
||||
@@ -1015,41 +1021,80 @@ target is measurable, it is stated numerically; where it is
|
||||
necessarily qualitative, the criterion is named and the bar is
|
||||
"reviewer judgement against the criterion."
|
||||
|
||||
- [ ] **NFR-1 Performance — startup.** Cold launch to first
|
||||
All seven were formally verified 2026-06-22 (ADR-0057). Approach:
|
||||
contrast/distinctness **gated** by tests, startup/memory **measured**
|
||||
against the targets, the rest **verified by argument / reviewer note**.
|
||||
|
||||
- [x] **NFR-1 Performance — startup.** Cold launch to first
|
||||
rendered frame under 500ms on commodity hardware (developer
|
||||
laptop, mid-range desktop). Measured in CI on the Linux runner
|
||||
as a regression gate.
|
||||
- [ ] **NFR-2 Performance — input latency.** Keystroke-to-render
|
||||
laptop, mid-range desktop).
|
||||
*(Verified 2026-06-22, ADR-0057 — measured via the Tier-4 PTY
|
||||
harness; release-binary median **~29 ms** to first frame (5
|
||||
trials, this dev machine), ~17× under target. The harness test
|
||||
`startup_to_first_frame_is_reasonable` gates a generous
|
||||
debug-binary bound for gross-regression detection; a tight 500 ms
|
||||
CI gate was declined as flaky on a shared runner — user decision.)*
|
||||
- [x] **NFR-2 Performance — input latency.** Keystroke-to-render
|
||||
latency under 16ms during normal editing; long-running queries
|
||||
must execute off the UI thread so the interface remains
|
||||
responsive (typing, scrolling, mode switching) while a query is
|
||||
running.
|
||||
- [ ] **NFR-3 Performance — resource footprint.** Idle memory
|
||||
*(Verified 2026-06-22, ADR-0057 — by architecture: database work
|
||||
runs on the dedicated worker thread (ADR-0010) and terminal input
|
||||
on a separate Tokio task (`spawn_event_reader`, `runtime.rs`), so
|
||||
a running query cannot block input/render. No automated sub-16 ms
|
||||
latency test — it would be flaky and low-value.)*
|
||||
- [x] **NFR-3 Performance — resource footprint.** Idle memory
|
||||
under 50MB on the smallest target platform; no busy-loops; CPU
|
||||
near zero when waiting for input.
|
||||
- [ ] **NFR-4 Visual quality — distinctive design.** Colour
|
||||
*(Verified 2026-06-22, ADR-0057 — release-binary idle RSS
|
||||
**~10 MB** (5 trials, Linux), ~5× under target. The event loop
|
||||
blocks on `recv` (no busy-loop). The harness test
|
||||
`idle_memory_footprint_is_reasonable` gates a generous
|
||||
debug-binary RSS bound on Linux.)*
|
||||
- [/] **NFR-4 Visual quality — distinctive design.** Colour
|
||||
palette and typography are deliberate and consistent across
|
||||
views; layout uses Unicode box-drawing and symbols where they
|
||||
add clarity; rendering avoids the generic flat-default look
|
||||
that ships with most TUI frameworks. Criterion: a reviewer can
|
||||
identify the app from a screenshot of any view.
|
||||
- [ ] **NFR-5 Visual quality — colour use.** Colour conveys
|
||||
*(Reviewer note 2026-06-22, ADR-0057 — satisfied by the bespoke
|
||||
two-theme palette, the three-region framed layout, and the
|
||||
annotated plan/relationship rendering; qualitative, not
|
||||
automatable.)*
|
||||
- [x] **NFR-5 Visual quality — colour use.** Colour conveys
|
||||
information rather than decoration: mode indication, query
|
||||
result types (numeric vs text vs null), error severity,
|
||||
syntax highlighting categories. Foreground/background
|
||||
combinations meet WCAG-AA contrast (4.5:1 for normal text)
|
||||
even though we have not committed to broader accessibility.
|
||||
- [ ] **NFR-6 Cross-platform parity.** Behaviour and visual
|
||||
*(Verified 2026-06-22, ADR-0057 — **gated** in `src/theme.rs`:
|
||||
every text foreground clears 4.5:1 on both themes; the
|
||||
advanced-mode border clears 3:1 (plain border decorative-exempt);
|
||||
token pairs clear ΔE2000 ≥ 15. Writing the gate caught + fixed two
|
||||
shipped light-theme defects (`tok_string` 4.42:1, `tok_flag`
|
||||
3.15:1) and two near-duplicate dark pairs, `65eab71`.)*
|
||||
- [/] **NFR-6 Cross-platform parity.** Behaviour and visual
|
||||
quality are equivalent across Linux, macOS, and Windows on
|
||||
crossterm-supported terminals. Platform-specific divergence
|
||||
(e.g. font fallbacks) is documented, not silently tolerated.
|
||||
- [ ] **NFR-7 Light and dark background support.** The colour
|
||||
*(Reviewer note 2026-06-22, ADR-0057 — partly evidenced by the CI
|
||||
matrix (Linux + macOS execute the suite incl. Tier 4; Windows is
|
||||
build-only). Documented divergence: on terminals/multiplexers
|
||||
without true-colour passthrough the 24-bit palette is quantised to
|
||||
256 colours and near hues can collide (a terminal-capability
|
||||
issue). Full parity awaits a Windows execution runner — see TT5.)*
|
||||
- [x] **NFR-7 Light and dark background support.** The colour
|
||||
scheme remains legible and visually coherent on both light and
|
||||
dark terminal backgrounds. The mechanism (auto-detect via
|
||||
terminal query, explicit user setting, or both) is an
|
||||
implementation choice, but the outcome is non-negotiable: no
|
||||
dark-on-dark or light-on-light readability failures on either
|
||||
background.
|
||||
*(Verified 2026-06-22, ADR-0057 — the WCAG-AA contrast gate
|
||||
(NFR-5) runs over **both** themes, so the legibility outcome is
|
||||
enforced on light and dark. Selection mechanism is `--theme` +
|
||||
`COLORFGBG` auto-detect (OSC-11 querying deferred).)*
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user