Train BB: Tasks backend, pieces 1-3 (#671) #674

Closed
kayg wants to merge 0 commits from train/2026-10-23bb into dev
Owner

Train BB ran the full suite (run bb1, dev 756596c + Tasks 46645ff): fmt, clippy, workspace tests, build, svelte-check, every Playwright project. Rust all green. Browser: cr390 265+213, wk1440 139+191, wk390 156+193+130, small 19 all passed; cr1440 330 + 1 failed (swipe-rows:173 pin), admin 41 + 2 failed (admin-contrast). admin-contrast re-run with its setup: 6/6 passed. swipe-rows:173 diagnosed (Codex, #671): the test clicked Pin while the desktop open spring was still moving (~900 ms); instrumentation showed one notes.changed and two list rereads after a pin - no update loop. Fixed in 7b15a9b (test waits for the settled row and asserts at most two rereads per pin/unpin): 5x chromium-1440 + 5x webkit-1440 = 10/10, full swipe suite chromium-390 24 passed. 7b15a9b differs from the train-tested tree only in that spec.

Contents (#671, ADR 0066 pieces 1-3): task index built in the notes describe pass (same transaction, journal-driven, rebuild identical); Today/Upcoming/Anytime/Someday + group-by lists and counts from one transaction; task notes hidden from Notes lists; frontmatter writer changes only touched keys with exact types (1e5, 0x1F, yes/no, dates stay text); malformed frontmatter refused; outside edits win over a pending field write; checkboxes in code blocks ignored; link scanner uses CommonMark code-block boundaries (77-84% faster on a 1 MiB note, unchanged at 10k notes).

Independent reviews: round 1 (6 findings) -> fixed 1eaa3f0; round 2 (fence variant) -> 0f3bc68; perf review (too slow) -> 46645ff; final check: merge. Perf at 100k: lists p95 6.5-12 ms, warm write p95 9.5 ms; cold-index growth ~21-23% accepted by kayg.

🤖 Generated with Claude Code

https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk

Train BB ran the full suite (run bb1, dev 756596c + Tasks 46645ff): fmt, clippy, workspace tests, build, svelte-check, every Playwright project. Rust all green. Browser: cr390 265+213, wk1440 139+191, wk390 156+193+130, small 19 all passed; cr1440 330 + 1 failed (swipe-rows:173 pin), admin 41 + 2 failed (admin-contrast). admin-contrast re-run with its setup: 6/6 passed. swipe-rows:173 diagnosed (Codex, #671): the test clicked Pin while the desktop open spring was still moving (~900 ms); instrumentation showed one notes.changed and two list rereads after a pin - no update loop. Fixed in 7b15a9b (test waits for the settled row and asserts at most two rereads per pin/unpin): 5x chromium-1440 + 5x webkit-1440 = 10/10, full swipe suite chromium-390 24 passed. 7b15a9b differs from the train-tested tree only in that spec. Contents (#671, ADR 0066 pieces 1-3): task index built in the notes describe pass (same transaction, journal-driven, rebuild identical); Today/Upcoming/Anytime/Someday + group-by lists and counts from one transaction; task notes hidden from Notes lists; frontmatter writer changes only touched keys with exact types (1e5, 0x1F, yes/no, dates stay text); malformed frontmatter refused; outside edits win over a pending field write; checkboxes in code blocks ignored; link scanner uses CommonMark code-block boundaries (77-84% faster on a 1 MiB note, unchanged at 10k notes). Independent reviews: round 1 (6 findings) -> fixed 1eaa3f0; round 2 (fence variant) -> 0f3bc68; perf review (too slow) -> 46645ff; final check: merge. Perf at 100k: lists p95 6.5-12 ms, warm write p95 9.5 ms; cold-index growth ~21-23% accepted by kayg. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
kayg added 11 commits 2026-10-22 23:27:29 +00:00
ADR 0066 build pieces 1-3.

- notes: a describer extension point. Plugins add a pass over every
  note the list describes; their rows commit in the same meta.db
  transaction as the note's row, so the scan, the watcher and rooms all
  feed them and a journal event never precedes them. A version bump, or
  an open without the describer, re-describes every note. Links are
  found once and shared with backlinks.
- notes: props, a key-level frontmatter reader and writer that
  understands one-line lists, lists over lines, quoted links and
  comments. Only touched keys change; unreadable frontmatter is refused.
  EditKind::Props works the edit out on the room's live text.
- tasks: the describe pass (task notes by `status`, checkbox lines with
  their first link), tables tasks / task_tags / task_lines / checkboxes,
  and the actions tasks.list, tasks.counts, tasks.untracked, tasks.get
  and tasks.update. Manual order (order.db) read path.
- perf: tasks-bench and perf/tasks-vm.sh for the ADR's speed gates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
WIP: one props property-test case still failing in the full workspace
run (found with more cases; not yet diagnosed). Everything else green.

- tasks index v4: covering indexes (tasks_list, task_tags_list) so
  counts and the first pass of a list are index-only; lst column;
  tag_counts, untracked_notes and task_stats kept in the describe
  transaction; one checkboxes row per note (open boxes only); cold
  fills drop the tasks indexes and run after_fill.
- notes: describer fresh_drops/after_fill hooks; a fill stopped halfway
  is finished on open.
- lists: index-only first pass, then the shown rows; child-tag grouping
  in Rust; allocation-free manual rank lookup.
- Untracked list walks notes newest first (or sorts few notes).
- storage_startup test: copying a database no longer leaves the
  destination's stale -wal/-shm behind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Compare frontmatter values by YAML type before skipping writes, including
text items in lists. Keep unknown task statuses open without rewriting them.
Hide task notes before Notes filtering and pagination, with show: tasks for
Collections and the full index retained for search and backlinks.

Avoid empty rename jobs for titles ending in numbers. Let property edits
reach durable history while a frozen note snapshot is written to disk.
Keep narrower covering indexes for open lists and avoid sorting child tag
lists twice. Measure real field changes and report failed performance gates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Preserve history admission and shutdown reservations alongside task property edits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Resolve outside property conflicts by whole keys at guarded save time. Read list rows and badge queries from one snapshot, preserve YAML text types, reject malformed frontmatter, include either future date in Upcoming, and exclude code and HTML from task detection. Add review reproductions and honor property-test case overrides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Libtest can print the first child marker after the test-name prefix. Find the marker within that line so the crash test keeps the acknowledged task ID when RUST_TEST_THREADS=1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztK
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Stabilize pin swipe e2e
Some checks failed
CI / web (pull_request) Failing after 1m6s
CI / server (pull_request) Successful in 1m46s
CI / rust (pull_request) Failing after 5m0s
7b15a9b3a1
Wait for the row spring before clicking tray actions and assert that the post-save list rereads stay bounded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01U5oTUycqAh7DT72mdSUztk
Author
Owner

Closing: this PR's head commit is already in dev (checked 26 Oct, against dev a779a46). The train landed it by merging directly into dev.

Closing: this PR's head commit is already in `dev` (checked 26 Oct, against dev `a779a46`). The train landed it by merging directly into dev.
kayg closed this pull request 2026-10-26 11:18:03 +00:00
Some checks failed
CI / web (pull_request) Failing after 1m6s
CI / server (pull_request) Successful in 1m46s
CI / rust (pull_request) Failing after 5m0s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!674
No description provided.