Skip to content

D127 c2 (B) — shell: the search answers in parts within D105's 100 ms on 500 meetings, the list hidden whole - #1422

Draft
kitokey-ines[bot] wants to merge 11 commits into
mainfrom
d127c2-search-measured
Draft

kitokey-ines[bot] wants to merge 11 commits into
mainfrom
d127c2-search-measured

Conversation

@kitokey-ines

@kitokey-ines kitokey-ines Bot commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Head: b44de2a. For the decider, in one sentence: on 500 meetings of an hour, a word typed in the sidebar's search now shows its first result in under 100 ms, cold or not (77 ms cold in the median; 1.3 s before), « Recherche… » said while the rest arrives, and a group of results draws its first 50 with a button for the others.

Before (7db71e8, D127a as merged + the kept passages) After
cold: nothing moves for 1.28 s after the first word typed, then the results the search answering in parts, « Recherche… » under the first results, fr light
the same, en dark
a word in every summary: 500 results drawn at once (93 ms) a group's first 50 results and « Afficher 10 de plus », fr light

Deliverable: D127
Related: #1419 (the same cost elsewhere in the window; stays open).

Module

shell, exactly one, and D127's section of cycle 12 (its criterion 2 asks for the method and the figures there):

Deliverable

D127, criterion 2, its second pull request (#1421 is the first: the generator and its test): « Given 500 meetings of an hour, made for the test, when a word is searched, then the first results show within the budget D105 sets for an interaction, measured on the release package; the method — a scan of the files or an index — chosen by that measure and written in D127's section ». #1400 delivered criterion 1 (D127a), #1418 criterion 3.

What it changes

Element Behaviour
The shell's search reads at most 50 ms, then answers with what it found, newest meetings first, and whether it is complete; every title is in its first answer (no file to read); each text read is kept until its file changes, read with no lock held
The window the list is hidden in one write while a search shows; « Recherche… » is said (role=status) at once when nothing is shown yet, and until the search is complete; each answer's new results are appended, never drawn anew, so the focus and the place stay; an answer for words replaced since is dropped
Many results a group draws its first 50, then « Afficher N de plus » (the design system's ghost button); pressed, the others are drawn and the focus goes to the first of them
Read-ahead from the first list drawn, not only when the field takes the focus
The shell failing the rows filtered by their title, as before D127

Conventions followed. D105's 100 ms response budget (cycle 11, amended 2026-11-20), measured by D105's method (#1034). WCAG 2.2 SC 4.1.3 Status Messages: « Recherche… » is a status, « Aucune réunion trouvée. » is said only once the search is complete. No market reference is given here: none was read and dated for this PR.

Kept: the kept passages, answered in parts. Left out: a full-text index (the measure shows the kept passages hold the budget at 500 hours), a list virtualised, ranking.

The measure (the method, never merged)

The release build in a session of its own, D105's harness from #1034 (speed.py, speed.sh, headless.sh's KITOKEY_SPEED) plus speed_search.py: in the page, from the words typed to the status shown, the first passage drawn and the search complete, each plus one frame. Cold: the window just drawn, the field focused and « devis » typed at once. 5 runs, medians, 2026-12-01, AMD Ryzen AI 7 PRO 350, WebKitGTK 2.54.2, on set500v2 (#1421's generator: 500 meetings of an hour, 78 MB, every line read by the shell). The probe's patch: ~/.config/nstack/agents/ines/cache/d127c2/ui/probe.patch; the command:

KITOKEY_SPEED=5 KITOKEY_SPEED_SET=<the 500 meetings> bash scripts/headless.sh
Head Cold: status / 1st passage / complete « budget » « zzqx » complete « devis »
9cb1ae7 (product = this head's) 14 / 77 (runs 69–99) / 83 63 (70) 55 50 (52)

The page's thread never stalls more than 30 ms. Shell side, release, tests/search_speed.rs under the machine's lock: every file read at each search 414 ms (#1421); kept, 32 ms a search, 449 ms to read every file the first time, +122 MB resident for 500 hours (each line kept as written and folded).

How the cold case was found: on 7db71e8/807aef52 it stayed at 1276 ms whatever the search did; the probe's diagnosis showed the page's thread stalled 1258 ms before searched was even sent; timing sought()'s steps showed hiding the list's 500 rows one by one at 1.9 s in WebKitGTK and showing them again at 2.1 s. Those runs used the first set, which left two lines in three unread (#1421 fixes the generator): their figures are not kept. The same cost elsewhere in the window: #1419.

Oracle

  • cargo test --test search: red on a stub reading every meeting (« the newest meeting first, one meeting read »: 3 read), then green; the mutant « cut = break » (titles stop at the deadline) red on « every title at the first answer », then green.
  • Red at 7c0106a (DG's c2 checks, product before): i-d127c2-dg-red-7c0106a9: FAIL JavascriptException … null is not an object (evaluating 's.hidden') — no status element.
  • Red at e42d388 (« the list hidden whole », product before): i-d127c2-dg-red2-e42d3881: 47 ok, 2 FAIL, both the new check — « a search hides the list whole, no row hidden or marked one by one », got [True, 4, 1] (4 rows or groups hidden one by one, 1 mark), fr and en.
  • Green at 9cb1ae7: i-d127c2-dg-green3-9cb1ae7e (found_by_what_was_said,palette_used): 72 ok, 0 FAIL.
  • Green at the head 8b23d17 (the shots added): i-d127c2-dg-green4-8b23d17a (found_by_what_was_said,palette_used): 80 ok, 0 FAIL.
  • The measure above, at 9cb1ae7 on set500v2, run by the coordinator under the machine's lock.

Review budget

Contracts

  • No contract affected

Definition of Done

  • Oracle green: cargo test --locked --test search, DG
  • Lint, format: cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, node --check ui/window.js, py_compile
  • The shell's tests: cargo test --locked, 614 passed, 0 failed, at 807aef5; no NOT RUN
  • E2E on critical journeys: the attest
  • Affected documentation updated: D127's section, words.rs comments
  • Diff self-reviewed

Risks


Test sheet

Verifier: to be named by the coordinator — the sheet goes in a signed comment (D305).

🤖 Generated with Claude Code

kitokey-ines Bot and others added 11 commits December 1, 2026 01:38
… search timed on them (D127 criterion 2)

Agent-Session: cabe12ee-7978-42b1-82ad-5090c4cba137
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…a file rewritten or gone, is read ahead, and holds D105's 100 ms on 500 meetings in release (D127 criterion 2)

Agent-Session: cabe12ee-7978-42b1-82ad-5090c4cba137
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…arches, read again once changed, read ahead when the search or the palette opens (D127 criterion 2)

Agent-Session: cabe12ee-7978-42b1-82ad-5090c4cba137
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and the newest meetings read, appended until complete; DG says « Recherche… », keeps the focus, drops an answer for other words, draws 50 a group (D127 criterion 2)

Agent-Session: d68d8ea4-0375-44c6-98e5-667929031835
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… held while a file is read, and the window draws each answer as it comes, read ahead from the first list (D127 criterion 2)

Agent-Session: d68d8ea4-0375-44c6-98e5-667929031835
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, and its checks read each group by its heading (D127 criterion 2)

Agent-Session: d68d8ea4-0375-44c6-98e5-667929031835
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…en or marked one by one, and that a failing shell leaves the rows filtered by their title (D127 criterion 2)

Agent-Session: d68d8ea4-0375-44c6-98e5-667929031835
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sking the shell; its rows are filtered one by one only when the shell does not answer — 1.9 s at the first word typed on 500 meetings (D127 criterion 2)

Agent-Session: d68d8ea4-0375-44c6-98e5-667929031835
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…kept passages answered in parts, the first passage in 52 ms cold on 500 meetings of an hour in release

Agent-Session: d68d8ea4-0375-44c6-98e5-667929031835
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… results with its button, each language in its theme (D127 criterion 2)

Agent-Session: d68d8ea4-0375-44c6-98e5-667929031835
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hole — the first passage in 77 ms cold, 122 MB more held for 500 hours

Agent-Session: d68d8ea4-0375-44c6-98e5-667929031835
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants