Tasks write actions for the UI port: move, reorder, rename, version, bulk move, delete, duplicate (on the executor) #894
Closed
kayg
wants to merge 4 commits from
feat/tasks-actions into dev
pull from: feat/tasks-actions
merge into: kayg:dev
kayg:main
kayg:port/tasks-float-2
kayg:fix/train-1116-2
kayg:fix/train-1116-3
kayg:fix/train-1116-1
kayg:fix/flake-1134
kayg:fix/server-1182
kayg:dev
kayg:port/notes-float-3c
kayg:docs/auto-update-ig
kayg:feat/dav-transport
kayg:port/tasks-float-1
kayg:wip/mail1011-sv-order-1116
kayg:fix/flake-1179
kayg:fix/flake-1178
kayg:fix/guards-1153-fsio-split
kayg:fix/guards-1153-notes-split-we
kayg:fix/guards-1153-notes-lib
kayg:fix/guards-1153-notes-home
kayg:fix/guards-1153-ui-primitives
kayg:fix/guards-1153-primitives-e2e
kayg:fix/guards-1153-visibility-doc
kayg:feat/paper-grey-1116
kayg:fix/flake-1165
kayg:fix/flake-1119
kayg:docs/imap-766-plan-v2
kayg:fix/e2e-unique-ports
kayg:t3/paged-search-reconcile-final
kayg:wip/mail1011-final-1115
kayg:docs/tasks-float-port
kayg:perf/editor-first-paint-1c
kayg:feat/imap-notes-fetch
kayg:feat/imap-notes-projection
kayg:feat/imap-notes-readonly
kayg:feat/imap-notes-auth
kayg:feat/imap-notes-server-foundation
kayg:wip/mail1011-txn-ownvocab-1115
kayg:wip/mail1011-txn-novocab-1115
kayg:perf/p1117-final-harness
kayg:perf/single-shot-repeats
kayg:port/tasks-matrix
kayg:wip/mail1011-txn-1115
kayg:fix/static-gates-1155
kayg:feat/files-s1-identity-r7
kayg:fix/files-r7-idle-loop
kayg:fix/daily-train-1152
kayg:port/notes-float
kayg:fix/editor-tables-test-types
kayg:port/notes-float-listscript
kayg:port/notes-float-phone-preload
kayg:perf/sound-comparator
kayg:port/notes-float-listscroll
kayg:port/notes-float-budgets
kayg:port/notes-float-suite-fix-b
kayg:port/notes-float-sidebar-fix
kayg:port/notes-float-trim
kayg:port/notes-float-3-lists
kayg:fix/attachments-meta-capability
kayg:docs/carddav-writes-v2-plan
kayg:feat/contacts-companion-pure
kayg:issue/carddav-read-perf-fix-r2
kayg:issue/carddav-read-r2
kayg:port/notes-float-devsync2
kayg:review/calendar-2
kayg:review/switcher-a-pills
kayg:port/notes-float-switcher-a
kayg:port/port-tables-2
kayg:review/switcher-ends
kayg:wip/whiteboard-s1-1114
kayg:port/port-tables
kayg:wip/mail1011-perfneutral
kayg:review/photo-tint
kayg:port/notes-float-shell
kayg:wip/local/collections-db
kayg:wip/local/mail-p1
kayg:wip/local/cold-growth-on-tiering
kayg:wip/local/tiering-v3-s1
kayg:wip/local/wal1051-cap
kayg:wip/local/tiering-v3-s1-resume
kayg:wip/local/index-position-startup-scan
kayg:port/notes-float-flat
kayg:port/notes-float-promote
kayg:wip/handover/mail1011-candidate
kayg:wip/handover/files-s1-candidate
kayg:port/notes-float-shell-only
kayg:port/notes-float-perf
kayg:feat/whiteboard-s1
kayg:feat/tiering-v5
kayg:fix/app-switch-hitch
kayg:wip/local/files-s1-dev-v4-final
kayg:feat/files-s1-dev-v4
kayg:fix/c2-glass-shared
kayg:feat/flat-lists
kayg:wip/handover/whiteboard-s1-resume
kayg:wip/att-lazy-861
kayg:feat/switcher-browse
kayg:wip/att-lazy-860
kayg:feat/tasks-float
kayg:recovered/flat-backup-candidate
kayg:perf/stalls-1054-kc
kayg:land/ai-toolbar
kayg:feat/collections-db
kayg:feat/collections-db-fixes
kayg:codex/mail-1011-redesign-20261111
kayg:fix/ai-toolbar
kayg:backup/macos-vm/st3-head
kayg:perf/trim-candidate-phonestack
kayg:feat/switcher-three
kayg:fix/1051-index-idle-checkpoint
kayg:perf/stalls-1054-kb
kayg:perf/stalls-1054-k
kayg:perf/stalls-1054-r3
kayg:fix/c2-contrast-tail
kayg:perf/stalls-1054-r3-preview
kayg:feat/collections-before
kayg:feat/tiering-v4
kayg:fix/timelog-caret
kayg:wip/local/tasks-actions
kayg:docs/tasks-writes-v2-plan
kayg:st3-r3
kayg:feat/pass8
kayg:review/calendar-2-before-1111
kayg:wip/tiering-v3-cold4
kayg:perf/stalls-1054-r2
kayg:fix/suite-A4
kayg:fix/suite-A5-probe
kayg:fix/suite-A6
kayg:fix/suite-A3
kayg:fix/suite-A2
kayg:fix/suite-A5
kayg:fix/suite-A1
kayg:wip/local/attachments-861-fix
kayg:feat/contrast
kayg:wip/local/ports-861
kayg:storage/wal-checkpoint-off-save-1051
kayg:wip/local/mail-1011-reconcile-20261110
kayg:feat/style-sheet-fixes
kayg:feat/money-round
kayg:perf/stalls-1054
kayg:wip/tiering-v3-cold5
kayg:t3/mail-1011-liveness
kayg:feat/iphone-fixes
kayg:feat/notes-approve
kayg:wip/local/shrow-work
kayg:feat/files-s1-identity
kayg:feat/quickfix
kayg:wip/tiering-v3-cold
kayg:wip/local/shared-row-swipes
kayg:backup/macos-vm/pfx-B
kayg:backup/macos-vm/pfx-C
kayg:backup/macos-vm/pfx-D
kayg:feat/contrast-r1
kayg:feat/tiering-v3-s2-tags
kayg:feat/folder-drop
kayg:t3/photos-s1
kayg:feat/tiering-v3-s1-namespace
kayg:wip/local/photos-s1
kayg:t3/photos-plan-slice-one
kayg:recovered/backup/p1b-61505
kayg:t3/paged-search-reconcile
kayg:t3/smooth-pane-transitions
kayg:t3/index-position-startup-scan
kayg:fix/private-staging-759b-r2
kayg:backup/macos-vm/hk/hk1009/pr877
kayg:backup/macos-vm/hk/hk1009/pr878
kayg:docs/undo-block-ids-plan
kayg:fix/undo-768
kayg:backup/macos-vm/hk/hk1009/pr875
kayg:backup/macos-vm/hk/hk1009/pr904
kayg:proto/block-identity-v7d
kayg:backup/macos-vm/hk/hk1009/pr846
kayg:backup/macos-vm/hk/hk1009/pr860
kayg:backup/macos-vm/hk/hk1009/pr861
kayg:backup/macos-vm/hk/hk1009/pr849
kayg:backup/macos-vm/hk/hk1009/pr848
kayg:backup/macos-vm/hk/hk1009/pr853
kayg:backup/macos-vm/hk/hk1009/pr957
kayg:backup/macos-vm/hk/hk1009/pr893
kayg:backup/macos-vm/hk/hk1009/pr889
kayg:backup/macos-vm/hk/hk1009/pr902
kayg:docs/imap-notes-plan
kayg:docs/quota-plan-2
kayg:fix/parallel-test-flakes
kayg:docs/calendar-backend-v2-plan
kayg:feat/calendar-ical-converter
kayg:backup/macos-vm/hk/hk1009/pr808
kayg:docs/contacts-import-v2-plan
kayg:issue/610-pm-midnight
kayg:feat/calendar-v2-s1-containment
kayg:backup/macos-vm/hk/hk1009/pr854
kayg:backup/macos-vm/hk/hk1009/pr845
kayg:backup/macos-vm/hk/hk1009/pr917
kayg:docs/dav-recorder-v2-plan
kayg:plan/previews-865
kayg:plan/save-log-durable-entry
kayg:backup/macos-vm/hk/hk1009/pr934
kayg:fix/e2e-data-on-ram
kayg:backup/macos-vm/hk/hk1009/pr888
kayg:feat/appwindow3
kayg:feat/appwindow2
kayg:feat/appwindow
kayg:feat/money-p1
kayg:feat/keys-sheet
kayg:review/calendar-2-themes
kayg:feat/smooth-cursor
kayg:fix/float-style
kayg:review/calendar-2-float
kayg:release/2026-11-06-hotfix
kayg:archive/port/rows-drop-code
kayg:archive/port/rows-actions
kayg:archive/port/rows
kayg:scratch/tasks-894-ui-gates
kayg:review/calendar-2-night-wip
kayg:recovered/flaky/toast-reduced
kayg:release/2026-11-05
kayg:archive/flaky/rows-drop-fixed
kayg:archive/flaky/rows-actions
kayg:archive/flaky/rows
kayg:sim/bm15-final
kayg:sim/bm15-bis-932
kayg:sim/bm15-bis-909
kayg:sim/bm15
kayg:sim/bm15-bis-887
kayg:perf/tiering-option-b
kayg:fix/sw-lazy-precache
kayg:archive/plan/save-log-durable-entry
kayg:mock/money-fix2
kayg:archive/fix/e2e-data-on-ram
kayg:mock/appearance-all
kayg:mock/pill-press
kayg:mock/pill-press-mac
kayg:backup/macos-vm/appearance-after
kayg:mock/auto-swipes
kayg:mock/mail-actions
kayg:backup/macos-vm/mock/mail-actions
kayg:mock/money-static
kayg:archive/review/standards-917
kayg:perf/tiering-761-fix
kayg:mock/type-audit
kayg:mock/third-pane
kayg:feat/contacts-import-v2-s1
kayg:perf/executor-hot-path
kayg:archive/port/hidden-blocks
kayg:archive/port/devices
kayg:scratch/executor-on-894
kayg:scratch/executor-spans2
kayg:scratch/executor-spans
kayg:archive/port/rows-drop
kayg:feat/tiering-761-d-scale
kayg:feat/tiering-761-c-index
kayg:feat/tiering-761-b-reader
kayg:archive/review/sharing-pr3-review-9fec3d1f
kayg:perf/ports-lazy-budgets
kayg:feat/tiering-761-a-migration
kayg:archive/review/sharing-pr3-review
kayg:archive/review/sharing-pr3-review-code
kayg:archive/plan/previews-865
kayg:archive/port/port-attachments-3
kayg:archive/port/contacts-merge
kayg:fix/motion-audit-859
kayg:fix/motion-audit-859-mac
kayg:archive/port/port-pickers
kayg:archive/port/port-tables-2
kayg:archive/port/port-tables
kayg:recovered/local/sharing-s1-pr2-room-snapshot-candidate
kayg:archive/fix/parallel-test-flakes-code-minipc01
kayg:docs/imap-766-readonly-slice
kayg:feat/dav-recorder-v3
kayg:research/788-diagnosis
kayg:archive/fix/parallel-test-flakes
kayg:archive/perf/pr792-cold-index-edit
kayg:docs/sharing-slice-1
kayg:recovered/feat/dav-recorder-v2
kayg:recovered/feat/dav-recorder-v2-edd7bbb
kayg:spike/imap-766-s0-cases
kayg:archive/fix/undo-768
kayg:recovered/feat/dav-recorder
kayg:recovered/feat/dav-recorder-901acd4
kayg:feat/contacts-import
kayg:perf/cold-growth-on-764
kayg:perf/cold-growth-on-tiering
kayg:recovered/feat/tasks-set-status
kayg:feat/tasks-move-reorder
kayg:feat/tasks-delete-promote-duplicate
kayg:feat/carddav-writes
kayg:perf/quota-on-tiering
kayg:perf/quota-simple
kayg:perf/cold-growth-on-quota-stack
kayg:recovered/perf/cold-growth-on-tiering
kayg:feat/calendar-identity
kayg:feat/calendar-event-parser
kayg:feat/calendar-props-maps
kayg:port/glass-when-ring
kayg:recovered/feat/tiering-761-s1-wip-8132a84
kayg:recovered/feat/tiering-761-s1-wip-9da4094
kayg:recovered/feat/tiering-761-s1-wip-724512c
kayg:recovered/feat/tiering-761-s1-wip-66e667e
kayg:recovered/feat/tiering-761-s1
kayg:wip/6by32-01-tier-761-s1-pause-20261030
kayg:spike/imap-766-s0
kayg:wip/6by32-02-calternal-pause-20261030
kayg:wip/8by64-01-review-688-pause-20261030
kayg:wip/6by32-01-verify-744-pause-20261030
kayg:wip/6by32-01-verify-742-pause-20261030
kayg:fix/private-staging-759b
kayg:wip/6by32-01-review-748-pause-20261030
kayg:wip/6by32-01-review-733c-pause-20261030
kayg:wip/6by32-01-review-733b-pause-20261030
kayg:review/calendar-month
kayg:wip/local/bm15-trash
kayg:plan/759b-staging
kayg:review/767b-tests
kayg:review/preview-2026-10-29
kayg:docs/tiering-731-plan
kayg:wip/c6b02-review-733d
kayg:wip/c6b02-bm1-full-a
kayg:docs/deploy-plan
kayg:fix/storage-owner-liveness-642
kayg:fix/storage-fix-7
kayg:feat/tiering-731
kayg:wip/tiering-731-first-attempt
kayg:perf/idle-honest-2
kayg:fix/storage-private-tmp-642-dev
kayg:fix/storage-exact-file-quarantine-642
kayg:perf/one-flush-save
kayg:review/calendar-static
kayg:review/indexing-ring
kayg:review/when-field-2
kayg:proto/block-identity-2-review
kayg:proto/block-identity-review
kayg:review/when-field
kayg:issue/tasks-create-ids
kayg:issue/tasks-create
kayg:review/combined
kayg:review/task-polish
kayg:review/top-buttons
kayg:review/q1-q5
kayg:archive/integ325-293
kayg:archive/integ325-ci
kayg:issue/calendar-adr
kayg:archive/old/train/2026-10-23bk2
kayg:archive/old/train/2026-10-23bk
kayg:issue/469-mockup-9a
kayg:issue/smart-tasks-mockup
kayg:issue/469-menus
kayg:issue/652-signout-flake
kayg:issue/652-history-fix7
kayg:issue/652-history-fix6
kayg:archive/old/issue/spring-check-perf
kayg:issue/spring-check-perf
kayg:issue/659-rename-fast
kayg:archive/old/train/2026-10-21ar
kayg:issue/search-hardening-3
kayg:issue/652-history-fix5
kayg:issue/660-port-sheets-glass
kayg:issue/652-history-fix4
kayg:issue/652-history-fix3
kayg:issue/652-history-fix2
kayg:issue/652-history-flake
kayg:train/2026-10-21an
kayg:issue/settings-admin-port
kayg:issue/search-port
kayg:train/2026-10-20am
kayg:issue/storage-split-fix2
kayg:issue/storage-split
kayg:archive/old/issue/folder-ids-fix
kayg:train/2026-10-20al
kayg:archive/old/issue/folder-ids
kayg:train/2026-10-20ak
kayg:issue/tables-mockup
kayg:train/2026-10-19aj
kayg:train/2026-10-19ai
kayg:issue/469-merge-fixes
kayg:issue/sidebar-band
kayg:archive/old/issue/608-settings-spec
kayg:train/2026-10-19ah
kayg:issue/swipe-offscreen
kayg:train/2026-10-19ag
kayg:archive/old/issue/590-nlp-adr
kayg:archive/old/issue/587-event-after-write-2
kayg:train/2026-10-19af
kayg:archive/old/issue/587-event-after-write
kayg:issue/469-pill-room-c
kayg:issue/469-pill-room
kayg:train/2026-10-19ae
kayg:issue/469-narrow-handle
kayg:issue/397-ios-swipe-2
kayg:issue/469-desk-fixes
kayg:archive/old/issue/auto-update-adr
kayg:issue/469-filter-gap
kayg:issue/469-port-1b
kayg:issue/442-opacity-flake
kayg:issue/327-web-fast-3
kayg:archive/old/issue/469-port-1
kayg:issue/469-port-1
kayg:issue/327-web-fast-2
kayg:archive/old/issue/327-web-fast
kayg:archive/old/issue/425-stt-bench-vq1
kayg:archive/old/issue/445-no-bleed
kayg:archive/old/issue/400-swipe-mockup-2
kayg:issue/426-client-review
kayg:issue/426-client-2
kayg:issue/426-client
kayg:archive/old/issue/476-safe-area-lab
kayg:archive/old/issue/445-top-light
kayg:issue/471-blocks-mockup
kayg:archive/old/issue/448-links-app-2
kayg:archive/old/issue/448-links-app
kayg:archive/old/issue/398-cold-links
kayg:issue/434-442-small-2
kayg:issue/434-442-small
kayg:archive/old/issue/398-unload
kayg:archive/old/issue/445-bottom-band
kayg:issue/445-bottom-band
kayg:issue/351-rem-3
kayg:issue/351-rem-2
kayg:issue/351-rem
kayg:archive/old/issue/327-first-note
kayg:issue/395-width-phone
kayg:archive/old/issue/327-typing
kayg:issue/396-ios-edges
kayg:issue/397-ios-swipe
kayg:archive/old/issue/327-notes-index
kayg:issue/345-347-contrast-empty-2
kayg:archive/old/issue/44-arenas
kayg:issue/44-arenas
kayg:archive/integ325
kayg:archive/old/issue/327-perf-harness
kayg:archive/old/issue/44-thp
kayg:issue/44-thp
kayg:archive/old/issue/285-sticky-pills
kayg:archive/old/issue/44-trim-3
kayg:issue/44-trim-3
kayg:archive/old/issue/165-cards
kayg:archive/old/issue/165-picker-2
kayg:archive/old/issue/212-multi-select
No reviewers
Labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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!894
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/tasks-actions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
W1/W2 follow-up plan
The accepted Tasks decisions require a per-device LIFO sequence of returned undo steps. The client owns that sequence; the server validates each job's author and returns the affected/skipped task ids so a same-line edit from another device can be reported without discarding unrelated reversals.
tasks.set-status,tasks.set-status-many, move and move-many must all return usable undo steps.tasks.deletewill remove the task note and its owning checkbox/session relationship lines through one bounded exact-byte plan. Its durable restore record keeps each source note id, path, exact removed text, target bindings and nearby anchors. Undo and Trash Restore use that same record: resolve by note id, restore by block id then nearest surviving line, and fall back to the end of today's daily note with a notice if the source is gone. Existing plain links and session prose stay intact.Size, cost and limits
The gates remain Rust on dev-01 plus fresh Notes-save, typing and Tasks-list ABAB against dev. No READY is posted until those gates and the required UI gates for any UI slice pass.
Rework after review 76844 (recommendation c)
This rework follows the independent review 76844 (2 P1, 6 P2, 4 P3) and the plan in #808: every task note write goes through the one exact-byte executor that is already on dev (
crates/notes/src/write_executor/). Work is in two steps.Step 1a: shipped (gates and perf in the comments)
versionontasks.list/tasks.getrowstasks.movestatus,completed,scheduledand the owning checkbox lines on exact bytes, then the ranktasks.undo {job}(recorded inverse bytes), thentasks.reorder {restore}tasks.move-manyskippedbefore anything is writtentasks.undo {job}tasks.undo(new)tasks.reorderorder.db, a whole group the first timetasks.reorder {restore}tasks.update { title }notes.rename_taskjob, title sent alonenotes.undo {job}tasks.delete(1b)notes.restore {id}tasks.duplicate(1b)tasks.deleteof the copydelete.rs,duplicate.rs,lines.rsdeleted, actions removed from the contractstatus::plan_targetsplans both as one splice set;status_action::executesubmits one plan; a retry replays the recorded planreview_76844_p2_1_status_and_when_are_one_transactiontasks.undo= recorded inverse bytes; moves accept onlysomeday/todoreview_76844_p2_2_undo_restores_exact_bytes,undo_refuses_after_a_later_edit_and_writes_nothingreview_76844_p2_3_date_only_move_refuses_a_changed_notebetweencan loop0;betweenbounded and returnsNone; forward drags check the task, its neighbours andorderagainst the task index group (new optionaltoday/group_by/group_tag)review_76844_p2_5_bad_ranks_are_refused_and_between_always_ends,review_76844_p2_5_reorder_refuses_bad_ranks_and_other_groups,order_and_restore_name_each_task_oncereview_76844_p2_6_mixed_line_endings_refuse_and_keep_bytesstatus:keyNotes::rename_taskonly for ids the tasks index lists; other notes keep the H1 renamereview_76844_p3_rename_is_for_tasks_only_and_alonetitlemust be sent aloneDecisions
scheduled: 2026-10-20) are opaque leaves for the strict writer, which won't replace them. That move refuses with "edit in source mode" and keeps every byte (a_hand_typed_unquoted_date_refuses_and_keeps_bytes). Dates Calternal writes are quoted and move fine. Widening the strict grammar is a Calendar/Tasks decision."status": "todo"). This is existing B1 behavior on dev; undo restores the old spelling exactly.last edited.tzis still accepted. This matchestasks.set-status.Step 1b: shipped (interim delete + duplicate; gates 76937, perf 76971)
Delete = Trash the task note as an executor participant; leave its lines. The offline executor already places a removal as a journaled, recoverable rename that keeps the displaced inode (
recovery.rs::finish_inner). The Home layer refusespost: Nonetoday, so 1b adds a Trash participant there:room/executor.rs: imaging apost: Nonenote checks the pre-image and binding as today. The image is markedtrash(serde default, so old records still load).Payload::validate: a Trash image has no update, and its state equals the pre-state.published):Trash/<id>.mdis a hard link to the retained inode (exact bytes, no copy), plus<id>.json. Both steps are idempotent.links::rememberruns for the departed path.Cmd::Trash.deletedgoes into the samerecord_oncebatch.notes.restore {id}, the existing Trash restore job: it brings back the same id and the exact bytes. A strict executor inverse needs Home creation, which is step 2.Sizes: one participant, O(note bytes) to image; placement is O(1) renames.
ExpectedRoom+ full pre-imagePreparedpublished = falseDuplicate = new note only. Nothing existing is written, so it needs no executor participant:
status: todoand dropcompleted;tasks.create's path, with an id derived from the key.Undo is
notes.undoof that create job.Step 2: full version (after 1b)
Gates
Exact commands and results are posted as comments, never committed:
cargo fmt --all -- --checkcargo clippy -p calternal-tasks -p calternal-notes -p calternal-engine -p calternal --all-targets -- -D warningscargo test -p calternal-tasks,-p calternal-engine,-p calternal-notescargo test -p calternal contractandnode apps/web/scripts/action-types.mjs --checktasks-write-benchon a perf VM underperf-lock(gate:tasks.reorder_ackp95 ≤ 15 ms)Never merge.
🤖 Generated with Claude Code
Gates at
3928a30e(dev-01, Nix shell, through~/bin/slot)cargo fmt --all --checkcargo clippy --workspace --all-targets -j4 -- -D warningscargo test -j4 -p calternal-tasksactions_tests+reorder/tests)cargo test -j4 -p calternal-tasks -p calternal-notes -p calternal -p calternal-engine(run at the previous head54a92182, only clippy-only edits since)cargo test -j4 -p calternal contract_matches_the_servercontracts/actions.jsonregenerated: +6 actions,tasks.updategainstitle)node apps/web/scripts/action-types.mjs --checkactions.gen.tsregenerated, committed)New tests cover: row
versionequalsnotes.get's and a tick with it works with nonotes.get; rename (title, heading, file, links, undo, no H1 added, bad titles); reorder (one row, no file written, replay, group without ranks, stale undo refused); move (stale refused with bytes unchanged, only the date line changes, clear, undo, Someday ↔ day, placement + undo); move-many (per-item results, a stale item skipped, undo); delete (exact bytes, Trash, replay, undo byte for byte, odd lines left, last line without newline); duplicate (copy bytes, history cleared, line inserted, replay, undo, task with no line).Findings while testing (fixed in the PR): the status executor refuses when the room has unflushed bytes, so
tasks.movesaves the room first;last editedstamps on flush change the version, so the version handed back for Undo is read after the flush.Perf:
tasks.listwithversion, 10k notes + 10k tasks (perf-01, underperf-lock)tasks-bench --notes 10k --runs 3, release binaries built on dev-01 (cargo build --release --locked -p calternal-perf --bin tasks-bench), relayed through the control host, sha256 checked on both ends. base =origin/dev41f2efa3(51eb4a22…), branch =3928a30e(ce183533…). Alternated base, branch, base, branch in one session, same fixture Home. 200tasks.listcalls per list per run; the lists go through the real engine, so they include the version lookup.Cost of
version: about +0.2 to +0.35 ms at p50 (≈ +10–18 %) for a 200-row page (oneupdates_by_notelookup per row in one blocking call). Every list stays under 3.1 ms p95 here.GATE tasks.list,tasks.countsandtasks.describe: PASS in all four runs. These are the bench's own gates, so the task's "no regression beyond the gate" holds.Not caused by this PR, same on base:
GATE cold.index growth <= 10%FAILS in all four runs (base +19.8 % / +17.7 %, branch +18.9 % / +20.2 %: the tasks pass costs ~19 % of cold indexing, unchanged).GATE tasks.updateFAILED once on base (run 2) and once on branch (run 2) and passed the other two; it is flaky on this VM, with no code path of this PR in it.Not measured here: the new write actions (
move,reorder,delete,duplicate) have no bench yet; ADR 0066 liststasks.reorder_ack≤ 15 ms p95 with no file written, whichreorder_moves_one_row…asserts functionally (no file written) but does not time. Timing belongs on the perf VM in a follow-up.Raw outputs are kept on perf-01 at
~/perf/ta-keep/; the seeded Home and the binaries were removed.Independent review: #894 against the B1–B3 failure history (#798, #799, #801)
Verdict: (c) merge the best of both. Keep #894's API,
version, reorder and status-only move. Drop its delete, duplicate and line-scanner code (delete.rs,duplicate.rs,lines.rs), and rebuild those on the shared Home executor, using the planner rules and probes from #798 and #799. Then close #798 and #799. 2 P1, 6 P2, 4 P3.I reviewed head
3928a30eagainstorigin/dev41f2efa3, including every review comment on #798, #799 and #801. This is a code-reading review only. Nothing was built or run, because the control host is read-only and no VM probes were run, so the scenarios below are not reproduced. Items marked plausible depend on paths I read on dev but did not trace end to end.Key context. #798, #799 and #801 were put on hold for the same reason: #808 (
0066-tasks-writes-v2) says every task write must be a pure exact-splice planner run by ONE journaled executor. That executor and B1 v2 are already on dev (BM5: #809, #814, #812;crates/notes/src/write_executor/,docs/plans/tasks-v2-set-status.md). #894's status step uses that executor. Everything else in #894 (When edits, delete, duplicate, rename) goes through the old room andbulkpath. That is the path the v2 decision replaced, and where most of the earlier failures came from.1. The earlier failure cases, one by one
rename::edit_step→bulkStep::Edit→EditKind::Patch{base}.room/edit.rs:129–160forks the note atbaseand merges; it does not refuse. The When edit in move is a roomPropsedit. Only the status part goes through the executor.duplicate.rs:119–139inserts atb.endwith base = the snapshot version. If the source changed, the insert is merged in, with no check. See P1-1.delete.rs:54–60checks the version, then reads up to 64 source notes and waits for the job lock.delete.rs:87Step::Trash{note}carries no expected bytes.lines::blockremoves only the exact checkbox + single link-child shape. Anything else is left in place and counted.duplicate.rs:112). Every block ID is copied, not just ones on continuation lines. See P1-2.- [ ] sub ^id+- [Sub](<…>)), so each subtask gets a second owner. See P1-2.bulk/undo.rs::planplans only steps that have a result. Move and reorder undo is built only from changes that were actually made.notes.undoon a bulk job merges with later typing, and only the deleted-span guard runs. Move undo does refuse (it is version-checked) but is not exact. See P2-2.rename.rs:203) and the duplicate's properties use the lenientnotes::propswriter. Only the index'sbrokenflag refuses. B1 v2 uses the strict writer. To be fair,tasks.updateon dev already writesscheduledthis way.expectcheck, but a forward reorder never checks that the task belongs togroup, and rank values from the client are not checked. See P2-5.2. Findings
P1-1: delete and duplicate write to changed notes instead of refusing
The PR's failure table says "a note changed under a delete / copy plan → job fails, nothing deleted". The code doesn't do that.
delete.rs:68–86andduplicate.rs:119–139buildStep::Edit{base: snapshot.version}.room/edit.rs:129–160applies the Patch to a fork atbaseand merges it into the current text.- [ ] Call Bob ^aaaa…and its link child. A delete is planned. Before its step runs, a phone appendsbefore 5pmto that checkbox line (v11). The merged removal deletes the v10 characters and leavesbefore 5pmbehind as a stray fragment on the next line. The job reportsdone.Step::Trashhas no snapshot guard. If the task's status or description is edited after thedelete.rs:54check, the note is still trashed and the action reportsdone. Same as #798 r2 P1-1.P1-2: duplicate copies every block identity and every owning subtask line
duplicate.rs:99–112changes only six properties and keeps the body "exactly".- [ ] Draft outline ^aaaaaaaaaaaaaaaa, followed by the link child- [Outline](<Tasks/Outline.md>).^aaaa…, so a#^aaaa…link has two targets.review_r1_duplicate_multiline_block_id_is_freshandreview_r2_relationship_marker_retains_owner, are the starting point.P2-1: a move with both a When change and a status change is not atomic, and a replay after a crash can't finish it
moves.rs:186–200commits the status through the executor (key{key}:status). Thenmoves.rs:210–220does a separate roomPropsedit.todowith no date, so it shows in Anytime.one()now sees the status already matches, sochange_status = None. It falls tomoves.rs:202–208with the old version and returnsblock_changed. The half-done move is reported as a failure, and no undo is returned.move-many(moves.rs:313) has the same problem: items moved before the crash come backskipped, and their undo steps are lost.scheduledandcompletedas one exact-splice set for the task note, and submit it as one executor transaction.tasks::status::planalready composes property splices with the strict writer; add the When leaf. A replay then loads the recorded plan.P2-2: move's undo is not exact
moves.rs:231–237undoes by moving forward again ("move back").Move.statusaccepts all five statuses (moves.rs:54), even though the docs say someday/todo. Moving done → todo clearscompleted, and moving back to done stamps a newcompletedtime.scheduledis restored from the index value (now(),moves.rs:110–125), not from the raw bytes:tasks.reorder{restore}step are separate actions with no all-or-nothing rule.statusto someday/todo and store the rawscheduledandcompletedlines in the undo input.P2-3: a When-only move checks the version, then edits without a guard
moves.rs:202–220comparesnotes.get().version, then sends aPropsedit with no base. An edit that lands between the two is overwritten at the key level, on the lenient writer. It needs the same fix as P2-1.P2-4:
lines::blockgets the block's extent wronglines.rs:104–110looks only at line+2.P2-5:
tasks.reorderaccepts any rank and group from the clientrestore(reorder.rs:192–215) writes client-suppliedrankstrings with no charset or length check. Unknown bytes read as digit 0.0,between()(reorder.rs:246–268) never terminates."0"(withexpect= its current rank), then reorder Y withbefore: X.between("", Some("0"))pushes'0'forever.BEGIN IMMEDIATEtransaction on a blocking thread, and every other reorder for that Home waits.group.orderids are not checked to be tasks in that group, so ranks are stored for arbitrary strings.0;between;orderto be exactly the group's current members.P2-6: mixed line endings (plausible, same as #799 r1 P2)
Delete and duplicate source edits are saved through the room. A note with both LF and CRLF line endings comes back normalized, so untouched bytes change and undo can't restore them. Refuse such notes before writing, or let the executor's byte-exact placement handle it.
P3
rename.rs:52now switches to the task-title path for any note with astatus:key (for example a project note withstatus: active). Such a note gains atitle:key it never had. Use the task index instead (is this id an indexed task?).tasks.updatewith a title does the property edit and the rename as two steps (lib.rsupdate handler). If the rename fails, the first edit stays applied and no undo is returned.delete.rs:41–44) and returnsOk{state:"failed", undo:[…]}instead of the originalblock_changed.Delete{if_version}. If the copy was edited since, the delete refuses and the undo is left half done. That is safe, but it is reported as done.3. Access, idempotency, big-O
update::target) andnotes.enter(caller.user). A foreign id isnot_found. Shared-note permissions are correctly listed as out of scope.versioncosts oneMAX(seq)index lookup per row, and the perf comment shows about +0.3 ms at p50 for a 200-row page. Reorder is O(1) rows (O(G ≤ 2000) the first time). Delete and duplicate plan in O(source bytes), with at most 64 owners. The only unbounded cost is thebetweenloop in P2-5.4. Recommendation: (c), with the exact pieces
Keep from #894 (land once fixed):
versionon rows:versions.rs,History::versions, and its wiring intotasks.listandtasks.get;tasks.reorderandOrderDb::edit, with P2-5 fixed;tasks.moveandtasks.move-manyAPI and answer shapes;Rework in #894:
Drop from #894:
delete.rs,duplicate.rsandlines.rs, i.e. everything built onbulkStep::Edit/Trash.Rebuild delete and duplicate as v2 planners on the executor (#808's B3), using:
review_r1_*,review_r2_*andreview_r3_*probes as permanent regressions;review799_*probes.Interim, if the UI port can't wait for B3 v2:
Then close #798 and #799. Keep their branches until the probes are ported. #801 is already superseded by #812.
No code pushed, nothing merged.
Tasks write actions for the UI port: move, reorder, delete, duplicate, rename, version, bulk moveto Tasks write actions for the UI port: move, reorder, rename, version, bulk move. Delete and duplicate are being rebuilt on the executor.Gates: steps 1a + 1b on head
5f158246Run on
calternal-dev-01-compute02, in a Nix devshell, through~/bin/slot.cargo fmt --all -- --checkcargo clippy -j4 -p calternal-tasks -p calternal-notes -p calternal-engine -p calternal -p calternal-perf --all-targets -- -D warningsUPDATE_CONTRACTS=1 cargo test -j4 -p calternal contract(regenerated and committed in5f158246), thencargo test -j4 -p calternal contract_matches_the_servernode apps/web/scripts/action-types.mjs --checkcargo test -j4 -p calternal-taskscargo test -j4 -p calternal-enginecargo test -j4 -p calternal-notesNew probes for review 76844, all passing:
review_76844_p1_1_delete_refuses_a_changed_task,delete_trashes_through_the_executor_and_restores_exact_bytesreview_76844_p1_2_duplicate_rekeys_ids_and_refuses_subtasks,duplicate::tests::rekey_replaces_every_block_id_the_same_way_and_nothing_elsereview_76844_p2_1_status_and_when_are_one_transactionreview_76844_p2_2_undo_restores_exact_bytes,undo_refuses_after_a_later_edit_and_writes_nothingreview_76844_p2_3_date_only_move_refuses_a_changed_notereview_76844_p2_5_bad_ranks_are_refused_and_between_always_ends,review_76844_p2_5_reorder_refuses_bad_ranks_and_other_groups,order_and_restore_name_each_task_oncereview_76844_p2_6_mixed_line_endings_refuse_and_keep_bytesreview_76844_p3_rename_is_for_tasks_only_and_alonea_hand_typed_unquoted_date_refuses_and_keeps_bytesNot yet covered: a crash-point matrix for the new Trash participant (crash at Placed / Committed / HistoryInstalled / BatchPublished / PublicationRecorded, then recovery). The executor's own placement and recovery tests cover the removal itself. The Trash publication is idempotent by construction (link-or-verify plus details-if-missing), but no crash test drives it yet. It's the first item of step 2.
Perf: write actions on perf-01, under
perf-lockSetup: release binaries built on dev-01 at
cac156dd(cargo build --release --locked -p calternal-perf --bin tasks-write-bench), relayed through the control host. sha256 matched on both ends:82a5ce20…. The fixture is atasks-bench --notes 10kHome (10k notes + 10k task notes). Command:tasks-write-bench --base data/base-10000 --state state-w --n 200.Everything goes through the real action pipeline and is timed until the answer. Every move is undone, every delete restored, and every copy deleted.
tasks.reorder(one drag, 809-task group)tasks.moveWhen only (1 note)tasks.moveSomeday → day (status + When + owner line, 2 notes)tasks.undo(exact inverse)tasks.move-many50 taskstasks.move-many50 undotasks.set-status(B1, already on dev)tasks.delete(Trash through the executor)tasks.duplicate(new note only)Gates
tasks.reorder_ackp95 12.72 ms ≤ 15 ms (ADR 0066): PASS. First ranking of the group (ordersent): 34 ms.tasks.set-statuson dev, which uses the same shared executor and is slower than a move here. The cost is in the shared Home write executor, not in these adapters. Getting the executor near budget is its own perf task; I haven't changed the executor's speed in this PR.duplicatedoesn't touch the executor: p95 44 ms.Other findings
version: 0for a note never opened, andnotes.getopens it at a higher version. The client has to read the row again once. This was already the case before this PR.changed note inventory, while the index caught up after the 50-task move-many, and went through on retry. This is B1's existingExpectedInventoryguard. Under load, a client sees a spuriousblock_changedand must retry.The raw outputs (
write4.out, plus earlierwrite2.out) stay on perf-01 at~/perf/t894/. The seeded Home and state have been removed.Tasks write actions for the UI port: move, reorder, rename, version, bulk move. Delete and duplicate are being rebuilt on the executor.to Tasks write actions for the UI port: move, reorder, rename, version, bulk move, delete, duplicate (on the executor)Rebasing onto the executor hot-path fix (#898)
#898 (
perf/executor-hot-path, into dev) fixes the executor cost and the two spurious refusals this PR's bench found. Writes no longer reread the whole journal, the recovery sweep is skipped when nothing is in flight, and placement syncs are batched. No guard is weakened; the plan and failure table are in #898. Rebased onto #898, this branch passes the notes, tasks and engine tests. The bench numbers are in #898.A worked rebase of this PR's head
cac156ddis pushed asscratch/executor-on-894(never to be merged; it shows the resolution). To rebase:git rebase origin/perf/executor-hot-path(or onto dev once #898 lands). The conflicts are incrates/tasks/src/lib.rs(keep bothpub mod owners;andpub mod reorder;) andcrates/tasks/src/status_action.rs(keep yourexecute/plan_oneshape and apply the steps below).plan_one, replace the global epoch (home.note_write_inventory(),Requirement::ExpectedInventory { epoch }) withcrate::owners::read(&db.meta(), &folded)for each target that has owners. Plan from those rows. PushRequirement::ExpectedOwners { digest: crate::owners::digest(&owners) }, returncrate::owners::probe(owners.into_keys().collect())with the plan, and submit withhome.execute_note_write_probed(plan, Some(probe)). A move without owners gets the empty digest and always matches.versions::ofbecomeshome.row_versions(ids). Unopened notes get a negative file token instead of 0. Replace everyi.version != snap.versionorsnap.version != m.versionwith!home.version_matches(&id, sent, snap.version).await?(plan_one,moves.rs, andtrash_exactin delete).NoteWriteExecutor::read_recordsis gone. Incommitted_note_write, useNoteWriteExecutor::read_record(¬es, &journal, &home, &key), which reads one record file, not all of them.undo::inversestill takes the old epoch. The inverse's bytes are exact, so the probe has no owner rows to re-read; either drop the epoch or scope it to the inverse's notes. That's your call; #898 leaves it alone.🤖 Generated with Claude Code
kayg referenced this pull request2026-11-05 23:21:11 +00:00
Keeper proposal after reading #798, #799, #894 and all their review comments: gate #894 (
cac156dd68c222da099343628a75abfa97a75504), the replacement following review 76844, rather than revive the held bulk/room implementations. #798 round 3 explicitly requires stop-and-simplify; #799 is held for the same executor design. Propose closing #798/#799 as superseded only after recording the missing promotion/physical-line-move scope and preserving/porting their review probes. Do not close #894 as a duplicate: it carries the reviewed replacement API and the executor rework. Neither earlier PR is approved for merge. No PR closed or merged. I will merge current dev into #894, run fresh gates, add crash/retry regressions and report remaining scope explicitly.Crash/retry gate plan for current-dev qualification: keep one executor, no new write framework. Reproduced on
7cd0854aa: SIGKILL atPlaced(0)followed by the original Someday-to-day move returnsoperation key reused with different request or author. Cause: the fingerprint includes a derived target based on the current status, which recovery already changed. Fix72ef8de87fingerprints requested fields and enters replay even when the effective status is already satisfied. Cost remains O(request bytes), no new durable writes. New tests cover Placed/Committed/HistoryInstalled/BatchPublished/PublicationRecorded, exact inverse bytes, and one indexed task; delete covers the same five publication boundaries, plus a duplicate crash before the engine receipt.Per-field stale checks (#919) are an unresolved gate dependency: #928 is open and explicitly provides only an opt-in shared helper; Tasks does not yet opt in. No claim that whole-note versions satisfy this gate. The pending Tasks UI stack also still calls the old update/set-status actions, so its specs alone cannot cover move/reorder/delete. Added a browser-protocol regression spec on #894 for those actions, alongside the scratch UI integration matrix. No merge or close.
qualification update at head
2255752ccagainst dev02cdf87897c18486cd7856a487896019b3eb470d(still current):f4031f5a9, pushed72ef8de87andf0b98e5be; move/delete cover five executor boundariesbrowser spec explicitly covers protocol, not pending UI wiring: the UI stack still calls update/set-status. Notes intentionally excludes task rows, so its route is not a task editor. promotion and physical line moves remain missing scope compared with the older PRs. #894 is not GREEN. no merge or close.
reorder perf follow-up plan after the first locked RED result (p95 20.90 ms > 15 ms, 809-task group):
OrderDb::editcurrently opens a new SQLite connection, sets WAL, runs schema setup and closes it for every drag. keep one lazy writer connection per user, separate from the existing read-only connection. bound: one connection per already-open user; one write transaction still owns the whole rank plan and commit, with SQLite IMMEDIATE preserving cross-process exclusion. no schema or wire change. if open/setup fails, leave the cached slot empty and retry on the next action; if commit fails, return the error as before. validate with existing rank/restore/group tests and the same locked reorder fixture, then requalify Rust. #898 does not modify order.rs, so this does not duplicate its executor redesign.qualification continues at
57516bcbf(dev remains pinned to02cdf8789). fixed two original retry failures, then fixed the newly found legacy-record checksum regression in7b56b2ab6: omitting falseImage.trashpreserves version-one checksums. the existing ExpectedOwners compatibility tests were RED (2 failures) and now GREEN (3/3 including corrupt-record refusal). move/delete/duplicate recovery regression runner is GREEN (3 parent regressions across 11 kill windows, plus 2 helpers).fresh Chromium and WebKit action-protocol matrices on this head: 4/4 each at 1440/390. fmt, workspace/all-target clippy with warnings denied and targeted reorder tests pass. full workspace run is still active on dev-01 in
tasks-894-workspace-v3.service, log~/tasks-894-workspace-v3.log; the older workspace run was superseded and is not a pass.both shared perf locks were acquired in order at 05:53 IST and remain held. corrected tick ABAB (identical benchmark source built against dev and the PR), 100 accepted transitions per round, 50 counted retries, zero final refusals:
the initial tick mode without retries was discarded: it refused the actual transitions and mostly timed no-op resets.
b4e6a3f10fixes that harness bias. first reorder batch was RED at 20.90 ms p95;57516bcbfreuses the writer connection. the first fixed batch is GREEN at 5.41 ms for the same 809-task group; second batch pending.the first notes ABAB (3 warm runs per round) is not flat: sync.save_ack p95 +63.41%, storm.typing +6.32%, storm.save_ack -5.25%; save control -32.97%, typing control -0.14%. a 5-run-per-round repeat is queued using the final server binary; both results will be reported. final candidate server sha256
909e1c1c02df5f8306e60afa81e55dd8a073750e8bb1dddabef9008c7115b625; corrected final action benchmark9bce45e23d0ffe5f54b7c79d70cdd0bb5ebe9602b9023b344bc4be1dfbfac896.active perf-01 units:
tasks-894-perf-hold,tasks-894-reorder-fixed,tasks-894-notes-final; perf-02:tasks-894-perf-hold. tick comparison finished. reports are under~/perf/tasks-894/reports/. both holders will be stopped as soon as measurements finish. still BLOCKED on first-paint bytes (+81 raw/+31 gzip/+109 brotli) and per-field stale opt-in (#919/#928), independently of pending perf/workspace results. no merge or close.final gate report: blocked
head
bf08566987f9211d23920074d8f6694da1ee48d5, merged current dev258f3eac8a8fc925eeb5c57a9df2a4b68b44e365. no pr was merged or closed.the retry tests kill a real child process. move and delete cover placed(0), committed, history installed, batch published and publication recorded. delete checks exact trash bytes and restore. duplicate covers durable copy before receipt and checks one copy with stable marker identities. fixes include replay fingerprint stability, deterministic duplicate block ids, old journal checksum compatibility, and a lazy persistent reorder writer connection. each change was committed and pushed separately.
rust commands, through nix and ~/bin/slot on dev-01:
workspace v3 ran at
57516bcbf4165307cc9cf60518e21eebe4ba413c; its crates tree and cargo/flake files are identical to final head. fmt/clippy were repeated at final head. dev's old02cdf87897c18486cd7856a487896019b3eb470dand current258f3eac8also have identical rust/cargo/flake inputs. crates tree ids: dev8d3da72182449fb35b5d9c68e190a36541cbd195, candidate6734c40ad1e7acefe8e5c462a06922fd2d895ef7. the final merge adds frontend lazy autocomplete only. perf binaries were built before that merge and are backend-source-equivalent, not newly built at final head.browser commands, in apps/web under nix and ~/bin/slot, with CALTERNAL_BIN pointing to the worktree debug server:
frozen bun install, web check/unit tests and
bun run build && node scripts/bundle-size.mjs dist --jsonalso ran under nix/slot. current repository first-paint gate measures brotli. final dev/pr raw js 812596/812677, gzip 271284/271309, brotli 230948/230826. css raw/gzip/brotli 102659/21043/18383 on both.the pending ui stack was separately probed on scratch integration
9b54b7a8a, not the merge candidate: chromium 70 pass / 11 skip / 1 initial failure; webkit 69 / 11 / 2. composer and board failures did not reproduce in repeat-10 on either candidate or dev, so the brief's flake rule applies. tracked in #964 and #979. that stack still uses update/set-status; passing browser protocol cases does not claim move/reorder/delete ui wiring exists.perf: both shared locks held together, perf-01 acquired first; measurement on perf-01; fresh 10k-note/task fixtures, abab and dev-vs-dev control in the same session. all binaries verified by sha256. all jobs stopped, locks released and seeded data removed. raw reports, exact shell scripts and binary fingerprints are attached.
corrected tick (
--existing-only --n 50): each round has 100 accepted transitions, 50 retries and zero final refusals, including retry cost. p95 dev a1/a2 396.469/417.524 ms; candidate b1/b2 396.293/404.340 ms. means 406.996 → 400.317 ms, -1.64%; control 410.277 → 417.830 ms, +1.84%. old tick reports withoutv2timed mostly no-ops and are excluded from the verdict.new action endpoints are absent on dev, so these are absolute measurements, with delta n/a.
tasks-write-bench --n 50, two fresh fixtures:action timing is answered-attempt latency; logs separately report 100 version refetches and 50 late retries, zero final refusals. common tick above includes retry cost. before the persistent writer fix, reorder was 20.90/12.44 ms; fixed results pass twice.
final notes abab uses identical common
calternal-perfharness:--sizes 10k --runs 5 --cold-runs 1 --idle-secs 0 --storm-edits 10000 --storm-clients 4 --seed 1. p95 means of a1/a2 and b1/b2:earlier 3-warm-run results are retained separately, not pooled: sync.save_ack +63.41%, storm.typing +6.32%, storm.save_ack -5.25%. neither run establishes flat notes. #898 already owns executor hot-path redesign; this report does not merge or duplicate that work.
additional touched list/version path,
tasks-bench --notes 10000 --runs 3, 200 list samples and 2340 warm writes per round:all six list harness rounds exit 1 because first-touch update exceeds 40 ms and cold-index growth exceeds 10%, also on dev. these are complete measurement reports, not harness crashes or candidate-only failures.
keeper proposal: keep #894, which carries the reviewed executor replacement from review comment 76844. #798's round-three discussion explicitly requested simplification and #799 was held for the same redesign. conditionally close #798 (
f1600ed05109566241d1daa19c91be1d2b81ed1c) and #799 (7656894724bc5689f4ae3807665c703c455107bd) as superseded only after their review probes and missing promotion/physical-line-move scope have been preserved or explicitly resolved. do not close #894 as the duplicate. proposals were posted on all three; no closure or merge performed.evidence archive
Orchestrator status: WebKit specs are
pending: std VMs paused; no new jobs will start on dev-02 or the Mac while the pause is active. Chromium specs will run on dev-01. Perf work is waiting for the current perf-01 lock and the maintainer CPU pin; post-pin comparisons will use a fresh ABAB session and same-session dev-vs-dev control.Gate update: WebKit pending: std VMs paused. No dev-02 or Mac job has been started. Tasks and Notes Chromium is queued on dev-01 behind daily-train-1108; the fresh perf ABAB has not started while the train is active. I will post the post-pin comparison after it completes.
Rebased onto origin/dev
31972329b0; new head02e226874e. Resolved conflicts while retaining the current-dev Sharing and Notes mutation names, the caller-aware executor path, and the existing first-sync guard. Rust gates are running on dev-01 through ~/bin/slot; fresh performance and bundle measurements remain pending. Not READY yet.BLOCKED, not READY. Source review at
02e226874e03a9a1dea30005ca95e840873df5c8confirms three contract gaps before the remaining gates:tasks.undoonly accepts move and move-many jobs, and currently refuses the whole inverse when any touched/read note changed. The W1 decision requires the device's reverse-order undo behavior and a same-line edit from another device to skip only that affected step with a notice.tasks.deleteleaves the owning checkbox line in place and returnsnotes.restore. W2 plus ADR 0066 require the lines to leave with the task and to return at the nearest surviving anchor, or in today's daily note with a notice if the original note is gone.tasks.set-statusandtasks.set-status-manystill describe Home undo as gated, despite the accepted undo-everything decision.No gate pass is claimed. The dev-01 Rust job is still queued behind occupied slots, with no Rust command result yet. Fresh Notes save, typing and Tasks list ABAB plus the bundle gate remain pending. I will keep #887 downstream until these are resolved and verified.
Status: BLOCKED, not READY. Head is now
7b5ff29df4a67db645e229ae28c8c911e8854124. I pushed the delete/restore regression expectation first: deleting must remove the owning checkbox and relationship line; Undo must restore the source note byte for byte.The existing Rust gate is still running against the previous
02e226874e03a9a1dea30005ca95e840873df5c8worktree. It has completedcargo test -p calternal-tasks(107 passed, 0 failed) and is continuing; this does not validate the new test. I will wait for that run, then run the new test through~/bin/slotto confirm the expected failure before implementation. The W1/W2 plan is now at the top of the PR description. Fresh perf and bundle gates remain pending.#894 update (11 Nov): rebased onto current
origin/dev1a14e9f10f9776c0002e3be8a38bcf77670537f5without conflicts. New head:c7534513eba069387fc6a3bfcca574de8d7f9f1d. The source delete/restore implementation is pushed. A focused diagnostic is still queued on dev-01 against the pre-rebase head and will not count as final-head evidence. Rust gates, fresh Notes save/typing/Tasks-list ABAB and bundle qualification remain pending; #894 stays BLOCKED.#894 current-head update (11 Nov)
Head
78f00ffada25b4e38f6fd3dbeafd5b010db6e404adds the missing directcalternal-markdown-viewdependency tocalternal-notes, used by the source-link restore helper incrates/notes/src/trash.rs.The first current-head focused delete and contract test jobs both stopped at compile time with
E0433for that undeclared crate, before either assertion ran. The focused delete regression is queued again on dev-01 through~/bin/slot. Contract verification, Rust gates, bundle qualification, and fresh save/typing/Tasks-list ABAB are still pending. #894 remains BLOCKED; no gate pass is claimed.#894 progress update (11 November)
Head
0f0b93f3a6c34de55b607700b91f13fa45756a4bfixes the compile error found by the current-head focused delete retest:trash.rsnow formats the replacement while the label borrows the source, then moves the exact source bytes into the splice. The first retest at78f00fffailed at compile time with E0505 before assertions.The focused delete test is queued again on dev-01 through
~/bin/slot:No gate pass is claimed. Contract verification, full Rust gates, web checks/e2e, bundle qualification, and fresh Notes-save/typing/Tasks-list ABAB remain pending. The earlier
storm.save_ackp95+35.76%andstorm.typing+17.60%results remain unwaived; #894 is still BLOCKED.#894 progress update (11 November)
The retest at
0f0b93fpassed the Trash borrow fix and then found a second compile issue:tasks.deletehashes retained bytes without a directblake3dependency, and the file has an unusedErrorCodeimport. Headbaa497b4624598b72cce38e5e0e0d1c39cbea1f4declares the dependency and removes that import.The focused delete regression is queued again on dev-01 through
~/bin/slot:No gate pass is claimed. Contract verification, full Rust gates, web checks/e2e, bundle qualification, and fresh Notes-save/typing/Tasks-list ABAB remain pending. The earlier
storm.save_ackp95+35.76%andstorm.typing+17.60%results remain unwaived; #894 is still BLOCKED.#894 progress update (11 November)
The follow-up retest had not acquired a dev-01 slot when static inspection found the new direct blake3 dependency missing from Cargo.lock. Head
53bb45c1e8now includes the lockfile edge as well as the manifest dependency and the import cleanup. The focused delete regression has been queued again on dev-01 through ~/bin/slot:cargo test -p calternal-tasks actions_tests::delete_removes_owner_extent_but_keeps_session_prose --lib --locked -j4
No gate pass is claimed. Full Rust, web/e2e, bundle, and fresh Notes-save/typing/Tasks-list ABAB remain pending. The earlier save and typing regressions remain unwaived; #894 is still BLOCKED.
#894 resumed progress (11 November)
Head
7710842e44adds a regression for undo after another device inserts an unrelated line before an owning checkbox. The focused test is still queued on dev-01 through ~/bin/slot behind the active train; no result is available yet. A separate earlier focused delete test remains queued on its existing worktree, which has a pre-existing flake.nix edit; that worktree is untouched.No gate pass is claimed. Rust, web/e2e, bundle, and fresh Notes-save/typing/Tasks-list ABAB remain pending. The earlier storm.save_ack +35.76% and storm.typing +17.60% regressions are still unwaived. #894 remains BLOCKED.
#894 progress (11 November)
Head
882c901dc6adds a same-line external-edit regression. The branch is up to date with latest origin/dev (merge base7d6774e44c; no rebase conflicts). The existing unrelated-line undo check and focused delete check remain active on dev-01 behind train-1112a; the new undo boundary tests are queued through ~/bin/slot. No gate result is claimed yet. The earlier Notes-save +35.76% and typing +17.60% deltas remain unwaived.Progress update (12 November) — BLOCKED, not READY
Head:
5300c7ab0545a4819145a357d132fcc38dc58569; fetchedorigin/devbe968d9df0c759d4200c50d8d8396990cd43338fis already an ancestor, so rebase is an up-to-date no-op.The earlier unit at
9aa3acdauto-collected aftercargo fmt --all -- --checkfailed; it did not run tests. The format fix is now pushed. On this head,cargo fmt --all -- --checkpasses, then the focused W1 regression fails:It returns
BlockChanged: recorded task line changedinstead of undoing the unaffected batch item and reporting the skipped task ID. I am implementing that per-task behavior next. No gate pass is claimed. The prior Notes-save+35.76%and typing+17.60%remain unwaived; full Rust, contract, web/e2e, contrast, bundle, and fresh ABAB gates are pending.Resumed gate status (12 November, 17:52 IST) — BLOCKED, not READY
Head
5e44041200c0627462a3716880480f361042a4e0; fetchedorigin/devbe968d9df0c759d4200c50d8d8396990cd43338fis an ancestor, so rebasing was an up-to-date no-op with no conflicts.The prior focused undo run had already finished before reconnect. Its retained log ends with 18 passed and 0 failed; this is not the full Rust gate set. No current #894 service remains running.
I could not resume dev-01 gates: three
timeout 60 netbird ssh claude@calternal-dev-01-compute02attempts failed by 17:52 IST (the first timed out; the next two returned “no route to host”). No test command started on those retries and no source changes were made. I will continue when that host is reachable.The earlier Notes-save
+35.76%and typing+17.60%results remain unwaived. Fresh controlled ABAB, full Rust, contract, web/e2e, full suite per project, contrast and bundle gates are pending. No budgets were raised.Progress update (12 November) — BLOCKED, not READY
Current head:
d79b03083(fix(tasks): remove unused undo test snapshot). This removes the unuseddaily_beforebinding seen in the retained test compile output, which would tripclippy -D warnings. It is a one-line test-only cleanup; no behavior or budget changed.origin/devremains an ancestor of the branch.The prior focused undo run at parent
5e440412ended with 18 passed and 0 failed, but does not validate this new head or the full Rust gates. Dev-01 still reports NetBirdConnecting; three SSH attempts through 17:52 IST failed (timeout, then twono route to hosterrors). No current-head gate started on dev-01. I will rerun after connectivity returns.The earlier Notes-save
+35.76%and typing+17.60%remain unwaived. Full Rust/contract, web checks and unit tests, targeted e2e, full suite per project, contrast, bundle, and fresh Notes-save/typing/Tasks-list ABAB remain pending. No budgets were raised.Resume state (12 November)
d79b030830a5513c9436ffdfb0ad0d022043dc78. Fetchedorigin/devisbe968d9df0c759d4200c50d8d8396990cd43338f; it is already an ancestor, so the rebase is up to date with no conflicts.tasks894-final-head-20261112to this head. There was no active #894 process in that tree. The activetrain-1112bcontainer build on dev-01 and NFA WebKit suites on dev-02 were left running.tasks894-rust-gates-20261112-ws1.servicethrough~/bin/slot. Scratch log:/tmp/tasks894-rust.MzrVp5/run.log; exit file:/tmp/tasks894-rust.MzrVp5/exit. No gate result is claimed yet.att-lazy-gate1,nfa-1a-smoke, andtables-typing-diag-r4; no ticket or lock has been taken because binaries are not staged. Mac bench lock is free; the existing Safari session was left untouched.+35.76%and typing+17.60%results remain unwaived.Dev-01 post-reboot check (12 November)
The host reports boot at 13:32 local CET; the #894 gate unit started at 13:47 CET, after that boot, and is still active. It has not passed
~/bin/slotyet: the only live Rust command found is the daily train'scargo test --workspace --locked -j4, and the #894 unit is waiting behind it. I did not restart the active unit.No current-head Rust command or assertion output has run, so there is no partial gate result to keep or discard. The older focused undo run was on parent
5e440412, not this head, and is not counted. No perf turn or measurement was started.The current log copy and all future #894 logs/fixtures are under the existing worktree's ignored
target/directory:/home/claude/Developer/Worktrees/tasks894-final-head-20261112/target/tasks894-resume-20261112.6t5hm4/rust-gates.log. A live mirror unit is active while the current gate writes its original log. Train and NFA jobs were left running.Outage recovery (12 November)
The dev-01 unit reported as waiting in the earlier update did not survive the 13:32 UTC reboot. There is no active #894 unit or job now, so I am not treating that run as a pass; any output from a run spanning the outage is discarded.
A post-reboot Rust workspace run on head
2320f172f268047b9b4b5ff5104f902d5f9a3c5efailed in thecalternalandfix_tz_livetargets because its longTMPDIRleft the helper without an admin socket. I will requeue it through~/bin/slotwith a short temp path under the surviving Worktrees.Post-reboot release binaries for #894 and dev completed and both SHA256 manifests verify. Fixture data was regenerated under the #894 worktree; the fixture-seed timings run on dev-01 are not performance evidence. No ABAB measurement or gate pass is claimed. #894 remains BLOCKED.
Post-reboot gate status (12 November 2026)
Head:
2320f172f268047b9b4b5ff5104f902d5f9a3c5e, based on fetchedorigin/dev7747f0490e107391060ebd228dc71a856da28282.~/bin/slot; it is still running. No Rust pass is claimed yet. Pre-outage and tmpfs-path results are excluded.tasks-actions.spec.ts: 2/2 passed on each main project (chromium-1440, chromium-390, webkit-1440, webkit-390).web.bundle.chunk.pressat 7.876 KiB against the unchanged 7.86 KiB cap. A same-head-on-dev comparison is running to identify whether #894 changed it; no budget was raised.Verdict: BLOCKED, pending the remaining gates and resolution of any PR-caused regression.
Bundle comparison and dev-01 reattach update (13 November 2026)
Head remains
2320f172f268047b9b4b5ff5104f902d5f9a3c5e.The same
perf/web.sh --bundle-only --gateon the currentorigin/devworktree passed. On #894, the unchanged gate reports:web.bundle.chunk.pressweb.bundle.tasks_js_brotliweb.bundle.total_js_brotliNo budgets were changed. The #894 bundle gate is currently red; the small measured growth is reported for kayg's review. A second #894 bundle build was started to confirm repeatability.
NetBird now reports dev-01 as Connecting and SSH returns no route. I cannot yet query the Rust unit's current state, so its result is unverified. It was observed active in the workspace test phase before the connection dropped; I have not restarted it. No READY is claimed.
Bundle gate and same-build dev comparison (13 November 2026)
Head:
c56dbfdf448ae7be5cd0b1c63465a07ce43e3516. Base:7747f0490e107391060ebd228dc71a856da28282.On dev-01, through
~/bin/slot, ranbun install --frozen-lockfile,node apps/web/scripts/action-types.mjs --check, thenPERF_WORK=<worktree target> PERF_OUT=<worktree target> bash perf/web.sh --bundle-only --gate. Both action-contract check and bundle gate passed with the existing budgets.web.bundle.chunk.pressweb.bundle.first_js_brotliweb.bundle.plugins_js_brotliweb.bundle.tasks_js_brotliweb.bundle.total_js_brotliThe press and total remain within their existing caps, but total JS grows by 0.209 KiB against dev. This growth still needs kayg's OK before READY. No budgets were raised.
Bundle growth approval needed before READY
The post-boot c56 bundle gate is within the existing caps and passed without budget changes. Against dev, first JS is 223.693 vs 223.749 KiB (-0.056), Tasks JS is 12.630 vs 12.631 KiB (-0.001), and total JS is 535.317 vs 535.108 KiB (+0.209). Please reply
OKif this measured total-JS growth is acceptable. I will keep the current budgets and leave #894 non-READY until that approval arrives.Tasks stack handover — 13 Nov 2026
Active order and pushed heads
feat/tasks-actions@c8bac8aee4c8c6e0edecf5ec0c95f5582d2c4ef0port/tasks-matrix@43d4edd51940fd7cce315123847e792ddd5d4cb1Both refs were pushed; pushes reported up to date. #894 is based on current
origin/dev7747f0490e107391060ebd228dc71a856da28282(rebase was a no-op). #1027's merge base with that dev head is4906cdb114f001ee75e917524070b6d5cf51af1f; it has not been rebased onto #894.Resolved inventory: #808 is closed as a covered write-plan proposal; #798 and #799 are superseded by the #808/#894 direction; #887, #888, #889, #893, and #957 are merged. The dependency inventory is in issue #1105. No merges were performed here.
#894 current-head gates
Passing on
c8bac8a: Rust fmt, clippy, workspace, contract, action-types and server-build gates (all exit 0); Svelte-check (0 errors, 19 warnings); Vitest (27 files / 261 tests); targetedtasks-actions(2/2 in each of Chromium/WebKit at 1440/390); repeated pane transition (100/100 each engine); contrast (10/10); bundle caps; and full WebKit 1440 (603 passed, 667 skipped) and 390 (1,045 passed, 225 skipped). Full Chromium 390 passed (1,052 passed, 218 skipped).Full Chromium 1440 is red: 607 passed, 662 skipped, 1 failed.
e2e/missing-links.spec.ts:156failed at line 181 after “Create a new note”: the textbox did not contain the expected title (the assertion’s actual text ended in-1sh7xr. And more). This is outside the Tasks action spec, but it fails the required full-suite gate. Triage it on the next host: apply the flaky-test rule (repeat-each=10 on train and dev); if it reproduces, fix it; otherwise open a stability issue.Bundle is within existing caps, with no budget change: first JS 223.693 vs dev 223.749 KiB (-0.056); Tasks JS 12.630 vs 12.631 KiB (-0.001); total JS 535.317 vs 535.108 KiB (+0.209). Kayg’s explicit OK to the measured total-JS growth is still required before READY. The latest #894 comment asks for it.
Perf is still blocked
There is no fresh controlled ABAB for current head
c8bac8a. The earlier confirmed Notes-save+35.76%and typing+17.60%regressions remain unwaived.The latest retained run is older head
2320f172, under/home/claude/Developer/Worktrees/tasks894-perf-20261113/target/perf-abab-2320/. It is not acceptance evidence: it has no dev-vs-dev control and its task runs failedtasks.updateand cold-index growth gates. Provisional A1/B1/A2/B2 per-run p95 medians were save ACK 14.8→15.8 ms (+6.8%), typing 2.895→3.015 s (+4.1%); Tasks-list p95 also rose: Anytime 2.01→2.64 ms (+31%), Today 2.69→3.50 ms (+30%), Someday 2.19→2.80 ms (+28%), Upcoming 2.95→3.26 ms (+10%). Do not accept or waive these older results.#1027 current state
The latest PR evidence is from 9 Nov at the unchanged
43d4eddhead:tasks-matrixreported 3 passing tests; the older Board/card/tick group reported 34 passes per engine. Its screenshots are Chromium-only (2x, light/dark, 1440/390); they are not real Safari or iPhone Simulator shots. The prior bundle report measured 13.15 KiB against 12.69 KiB and noted 0.09 KiB idle-screen jitter. These are pre-rebase results, not a current READY gate. The layout was previously reported as lazy and outside typing/open-note paths; no current-head perf evidence exists.Exact next steps
docs/perf/comparing.md. Stage and SHA-verify binaries before taking a perf turn; run the save-soak arms required by that doc. Keep #894 BLOCKED until all of this passes.review/calendar-2. Add the shots to the #1027 Forgejo comment. Do not wait for a merge; do not merge.Scripts and harnesses
/home/claude/Developer/Worktrees/tasks894-c56-20261113. Run the Rust gates withcd ~/Developer/Worktrees/tasks894-c56-20261113 && bash target/tasks894-recovery-c8-20261113/run-rust-gates.sh; run Chromium gates similarly withbash target/tasks894-recovery-c8-20261113/run-chromium-gates.sh. These scripts call~/bin/slotinternally. Logs and per-gate exit files are undertarget/tasks894-recovery-c8-20261113/e2e/./home/cua/Developer/Worktrees/tasks894-c56-20261113. Run WebKit gates withcd ~/Developer/Worktrees/tasks894-c56-20261113 && bash target/tasks894-recovery-c8-20261113/run-webkit-gates-r2.sh; it also uses~/bin/slot. Logs are undertarget/tasks894-recovery-c8-20261113/e2e-r2/.docs/perf/comparing.md, harness sources underperf/; the measurement binaries arecalternal-perfandtasks-bench. Build on dev-01 through~/bin/slot nix develop -c cargo build -j4 --release --locked -p calternal -p calternal-perf, relay via the control host and verify SHA256 on both perf VMs. On perf-01 use~/bin/perf-turn <lane-name> <command...>; the command must take perf-02’s~/bin/perf-lockafter perf-01’s turn lock. For task-list samples, the old command shape wastasks-bench --data <fixture> --state <run-state> --notes 10000 --runs 3. Do not rerun the stalestart-perf-turn.sh/run-after-lock.shundertarget/perf-abab-2320/: they use the old head, omit control bounds and wait on an oldgofile.https://preview.calternal.cloud/calendar-2/review.html. The brief’s deploy command runsscripts/preview-deploy.sh review/calendar-2 calendar-2from the dev-02~/Developer/Worktrees/preview-deployworktree. Capture product shots on the Mac host (lume@calternal-macos-01-std) in real Safari and iPhone Simulator, then attach only in Forgejo comments.Lane shutdown
The two Tasks e2e units exited; no Tasks unit or process remains on dev-01/dev-02 and their slots are free. No Tasks perf lock remains; I removed our dead
tasks894-abab-2320FIFO ticket. The Mac benchmark lock is absent. A separatemail1011-326e3-20261113lane still holds the shared perf locks on perf-01/perf-02; it was left untouched.#894 lane 14 Nov: dev merged, list fix, gates (perf turn queued)
Head
76e79ea8a=c8bac8aee+ merge oforigin/dev796d80cba(88d4b7ff2) + 2 commits:1cd330e4atasks: read list row versions in one batched statement, same hop.tasks.list/tasks.getfilled each row'sversionwith one history statement per row (200 per list) plus a second blocking hop and Homeenter. Now it's onejson_eachstatement (one probe of the existingupdates_by_note (note, seq)index per row: O(k log n), never a scan), run inside the list's own blocking read. New unit testversions_are_each_notes_newest_seq_in_one_batch.76e79ea8arustfmt.Bundle: kayg OK'd the +0.209 KiB total-JS growth on 14 Nov, so it no longer blocks. Same numbers on this head, no budget changes: first JS 223.693 KiB (≤ 240), Tasks JS 12.630 (≤ 20), total JS 535.317 (≤ 545.32).
What #894 adds to Notes save and typing (static profile)
Nothing runs per save or per keystroke. The task describer (
crates/tasks/src/index.rs) is unchanged, anddescriber::Notehas no version, so saves still do task work only through the existing describe step. Everything #894 adds tocrates/notesis reached only through executor transactions (room/executor.rsTrash image,write_executor/{plan,home}.rsTrash publish and task restore anchors,meta.rsexecutor publish removes), Trash/Restore (trash.rs,ops.rs) or rename (rename.rs).room/actor.rschanges only theExecutorLeasearm. No new fsync, index write or contract validation onnotes.saveor the room flush. The only hot-path addition was the per-row version read on list reads, fixed above. The perf turn below measures this.Gates (dev-01 x86 = Chromium, dev-02 = WebKit; all through
~/bin/slot)cargo fmt --all -- --check76e79ea)cargo clippy --workspace --all-targets -j4 -- -D warningsTMPDIR=<short mktemp> cargo test --workspace --locked -j4 --no-fail-fastcounter_concurrent_mutations_drift_and_restart, 10/10 on #894 and 10/10 on dev → #1119 (no auth changes here). An earlier run with a long TMPDIR failed 3 admin socket tests withSUN_LEN(environment)cargo test -p calternal contract_matches_the_servernode apps/web/scripts/action-types.mjs --checkcargo build --locked -j4 -p calternalbun run checkCI=1 bun run testperf/web.sh --bundle-only --gateplaywright test e2e/tasks-actions.spec.ts --workers=1 --retries=0… e2e/pane-transition.spec.ts --repeat-each=10missing-links.spec.ts:156 (the full chromium-1440 failure)
Flaky rule,
--repeat-each=10 --workers=1 --retries=0, chromium-1440: #894 10/10 passed; dev796d80cba1 failed / 9 passed with the same symptom (the editor still shows the linking note-rukw1w. And moreafter “Create a new note”). Not #894's; it doesn't block. Stability fix tracked in #1118 (likely the assertion reads the outgoing editor during the pane switch).Perf
Binaries (release, dev-01) staged on perf-01 and sha256-verified on both ends:
calternalbrc273f7fa…/ devcd5ebd7a…,calternal-perfbr419e0850…/ dev9fbe8a5d…,tasks-benchbrb7ee58ec…/ devb1a915f2….FIFO ticket
tasks894taken at 01:34 (perf-01 clock), 6 lanes ahead. Session:calternal-perf --sizes 10k --runs 3× 12 arms (dev, br, ctl rotating, ctl = dev again),tasks-bench --notes 10000 --runs 3× 12 arms, then 12 morecalternal-perfarms, ≤ 82 min, both perf locks held. Results will follow here. Still BLOCKED until then.Perf round 1 on
76e79ea8a(perf-01, 14 Nov 06:12–06:52 CET, both perf locks)Session:
~/bin/perf-turn tasks894, perf-02's lock held by aperf-lockunit for the whole run. Arms rotatedev br ctl br ctl dev ctl dev br br dev ctl(ctl = the same dev binaries again: the control). Two rounds ofcalternal-perf --sizes 10k --runs 3 --cold-runs 0 --idle-secs 0(8 arms per label, 3 warm runs each) around one round oftasks-bench --notes 10000 --runs 3(4 arms per label, 200 samples per list per arm). Values are the median of per-arm values. "paired" = median of each arm against its adjacent dev arm.calternal-perfJSON has no p99, so p50/p95/max are shown;maxis judged by range (comparing.md), not in the verdict.Notes save and typing: at or below dev.
sync.save_ackp95 −12.3% (control −18.4%),storm.save_ackp95 −3.8% (control −2.9%),storm.typing−1.4% (control −0.3%). The old +35.76% save / +17.60% typing regressions don't reproduce.Tasks lists: still over. p50 +3…5% on anytime, someday, tag, today, today_by_priority and anytime_by_child_tag, with the control at about −1%: the batched per-row version read still cost ~70–100 µs per list. → fixed in
32c474fe1(below), re-measuring.Also over the unpaired control, on paths #894 does not touch:
sync.durable_writep50 +1.3% vs +0.6% (+0.3 ms of 24.5 ms; paired +0.4% vs +0.2%),open.api_getp95 +19.9% vs +10.1% (paired +15.3% vs control +33.4%, so within control when paired). Round 2 re-measures both.Full table
sync.save_acksync.save_acksync.save_ackstorm.save_ackstorm.save_ackstorm.save_ackstorm.typingstorm.typingstorm.typingsync.durable_writesync.durable_writesync.durable_writesync.round_tripsync.round_tripsync.round_tripuploads.save_ackuploads.save_ackuploads.save_ackopen.noteopen.noteopen.noteopen.api_getopen.api_getopen.api_gethome.pagehome.pagehome.pagesearch.querysearch.querysearch.querytrash.deletetrash.deletetrash.deletetrash.restoretrash.restoretrash.restoretasks.anytimetasks.anytimetasks.anytimetasks.anytime_by_child_tagtasks.anytime_by_child_tagtasks.anytime_by_child_tagtasks.countstasks.countstasks.countstasks.somedaytasks.somedaytasks.somedaytasks.tagtasks.tagtasks.tagtasks.todaytasks.todaytasks.todaytasks.today_by_prioritytasks.today_by_prioritytasks.today_by_prioritytasks.untrackedtasks.untrackedtasks.untrackedtasks.upcomingtasks.upcomingtasks.upcomingOVER CONTROL (p50/p95/p99): sync.durable_write p50, open.api_get p95, tasks.anytime p50, tasks.anytime_by_child_tag p50, tasks.anytime_by_child_tag p95, tasks.anytime_by_child_tag p99, tasks.someday p50, tasks.someday p99, tasks.tag p50, tasks.today p50, tasks.today p99, tasks.today_by_priority p50
Fix: list rows carry no version (
32c474fe1, contract9db7c845d)Nothing reads
versionfrom list rows: the UI callsnotes.getbefore each action (apps/web/src/tasks/status.ts). Sotasks.listgoes back to dev's exact read (no history access),tasks.getkeepsversion(one index probe), and the action input docs now say to send the version fromtasks.getornotes.get. Test renamed toget_carries_the_version_notes_get_reports_and_rows_do_not(asserts list rows have noversion). Contract andactions.gen.tsregenerated (UPDATE_CONTRACTS=1 cargo test -p calternal contract_matches_the_server,node apps/web/scripts/action-types.mjs): description text only.Gates on
32c474fe1: fmt, clippy (--workspace --all-targets -D warnings),cargo test -p calternal-tasks -p calternal-notes --no-fail-fastall pass. Newcalternal38e4a254…,tasks-benchb94d15ae…(calternal-perf unchanged) staged on perf-01 and sha256-verified; round 2 queued (5 ahead). Final-head e2e running.Perf round 2 on
32c474fe1/9db7c845d(perf-01, 14 Nov 09:34–10:14 CET, both perf locks)Same session shape as round 1; branch binaries
calternal38e4a254…,tasks-benchb94d15ae…(sha256-verified on perf-01).76e79ea8a: +3…5%). The list read is now dev's exact read.sync.save_ackp95 was −12.3% in round 1 and is +10.3% here (control −9.3%), with identical save-path source;search.queryp50 +8.5% (#894 has no search changes);tasks.counts/tasks.untrackedtails (code unchanged by #894) at 0.25–1.4 ms on 4 arms.The preamble's gate is pooled ABAB × 3 sessions, so I'm not calling READY on one session of the final binaries. Round 3 on the same binaries is queued (
tasks894ticket, 3 ahead). The verdict will pool rounds 2+3 for everything, plus round 1 for the Notes save/typing metrics (same save-path source in all three).Gates on final head
9db7c845d: contract, action-types--check, svelte-check (0 errors), vitest 27/261, bundle (first 223.693 / Tasks 12.630 / total 535.317 KiB, kayg-approved), fullcargo test --workspace --no-fail-fast(rc 0, 131 suites ok), tasks-actions 2/2 and pane-transition 100/100 (390) on chromium-1440/390 and webkit-1440/390.Round 2 table
sync.save_acksync.save_acksync.save_ackstorm.save_ackstorm.save_ackstorm.save_ackstorm.typingstorm.typingstorm.typingsync.durable_writesync.durable_writesync.durable_writesync.round_tripsync.round_tripsync.round_tripuploads.save_ackuploads.save_ackuploads.save_ackopen.noteopen.noteopen.noteopen.api_getopen.api_getopen.api_gethome.pagehome.pagehome.pagesearch.querysearch.querysearch.querytrash.deletetrash.deletetrash.deletetrash.restoretrash.restoretrash.restoretasks.anytimetasks.anytimetasks.anytimetasks.anytime_by_child_tagtasks.anytime_by_child_tagtasks.anytime_by_child_tagtasks.countstasks.countstasks.countstasks.somedaytasks.somedaytasks.somedaytasks.tagtasks.tagtasks.tagtasks.todaytasks.todaytasks.todaytasks.today_by_prioritytasks.today_by_prioritytasks.today_by_prioritytasks.untrackedtasks.untrackedtasks.untrackedtasks.upcomingtasks.upcomingtasks.upcomingOVER CONTROL (p50/p95/p99): sync.save_ack p95, storm.typing p50, sync.durable_write p95, search.query p50, tasks.anytime p99, tasks.counts p95, tasks.counts p99, tasks.tag p95, tasks.untracked p95
Perf round 3 + pooled verdict: still BLOCKED (head
9db7c845d)Round 3: perf-01, 14 Nov 12:04–12:45 CET, same staged binaries as round 2 (sha256-verified), both perf locks. Pooled = rounds 2+3 (final binaries, 16 cp arms / 8 tasks-bench arms per label). For the Notes save path, rounds 1+2+3 are also pooled, because the save-path source is identical in all three.
Passes (at or below dev, or within the dev-vs-dev control)
storm.typingp50 −0.4%, p95 −2.9% (pooled r2+r3).storm.save_ackp50 −0.2%, p95 −3.1%.uploads.save_ack−0.7% / −4.6%.76e79ea8ais gone. List rows now read exactly what dev reads (32c474fe1).sync.save_ackp50 +0.1% (control −0.1%), p95 +0.3% (control −8.7%).Not at or below dev (why this is not READY)
search.queryp50sync.save_ackp95tasks.todayp50search.queryp50 is consistently higher (~+0.12 ms on 1.5 ms) across all three sessions. #894 changes no search or engine code:calternal-notesis only a dev-dependency ofcrates/search, andcrates/enginegains only match arms inclassify_action. So this is binary layout or something I haven't found. Either way it's a measured delta, and I can't call it noise.sync.save_ackp95 flips sign between sessions with identical save-path source. dev-vs-ctl (the same binary) also moves up to 18% between sessions. The rotationdev br ctl br ctl dev ctl dev br br dev ctlalways putsdevfirst in a round (coldest cache), so position bias is the same size as the effect. Pooled over 3 sessions it's flat, but the 2 sessions on the final binary both read ~+10%.Suggested next step (not done here, needs another ~2.5 h FIFO slot)
796d80cbawith one inert change incrates/tasks(or #894 minuscrates/notes) and run it as the "br" arm. Ifsearch.querymoves the same way, it's layout, not #894.ctl, putdevandbrin mirrored positions, and use--runs 5so save ACK p95 comes from more samples.Not merged. #1027 stays untouched until #894 is READY.
Pooled r2+r3 table
sync.save_acksync.save_acksync.save_ackstorm.save_ackstorm.save_ackstorm.save_ackstorm.typingstorm.typingstorm.typingsync.durable_writesync.durable_writesync.durable_writesync.round_tripsync.round_tripsync.round_tripuploads.save_ackuploads.save_ackuploads.save_ackopen.noteopen.noteopen.noteopen.api_getopen.api_getopen.api_gethome.pagehome.pagehome.pagesearch.querysearch.querysearch.querytrash.deletetrash.deletetrash.deletetrash.restoretrash.restoretrash.restoretasks.anytimetasks.anytimetasks.anytimetasks.anytime_by_child_tagtasks.anytime_by_child_tagtasks.anytime_by_child_tagtasks.countstasks.countstasks.countstasks.somedaytasks.somedaytasks.somedaytasks.tagtasks.tagtasks.tagtasks.todaytasks.todaytasks.todaytasks.today_by_prioritytasks.today_by_prioritytasks.today_by_prioritytasks.untrackedtasks.untrackedtasks.untrackedtasks.upcomingtasks.upcomingtasks.upcomingOVER CONTROL (p50/p95/p99): sync.save_ack p50, sync.save_ack p95, sync.durable_write p50, sync.round_trip p50, sync.round_trip p95, open.api_get p95, search.query p50, tasks.counts p95, tasks.counts p99, tasks.someday p50, tasks.tag p95, tasks.today_by_priority p50
Round 3 table
sync.save_acksync.save_acksync.save_ackstorm.save_ackstorm.save_ackstorm.save_ackstorm.typingstorm.typingstorm.typingsync.durable_writesync.durable_writesync.durable_writesync.round_tripsync.round_tripsync.round_tripuploads.save_ackuploads.save_ackuploads.save_ackopen.noteopen.noteopen.noteopen.api_getopen.api_getopen.api_gethome.pagehome.pagehome.pagesearch.querysearch.querysearch.querytrash.deletetrash.deletetrash.deletetrash.restoretrash.restoretrash.restoretasks.anytimetasks.anytimetasks.anytimetasks.anytime_by_child_tagtasks.anytime_by_child_tagtasks.anytime_by_child_tagtasks.countstasks.countstasks.countstasks.somedaytasks.somedaytasks.somedaytasks.tagtasks.tagtasks.tagtasks.todaytasks.todaytasks.todaytasks.today_by_prioritytasks.today_by_prioritytasks.today_by_prioritytasks.untrackedtasks.untrackedtasks.untrackedtasks.upcomingtasks.upcomingtasks.upcomingOVER CONTROL (p50/p95/p99): sync.save_ack p50, sync.save_ack p95, sync.durable_write p50, open.api_get p95, search.query p50, search.query p95, tasks.someday p50, tasks.today p50
#894 turn A on the new comparator (#1130): the
search.query+8.6% and thesync.save_ackp95 flips don't reproduce. They're order and noise effects.Asked by the orchestrator: mirrored arm order, a dev + inert-change layout arm, and confirmation in a second turn. All three are now in #1130.
Arms. All arms were built by me on dev-01 in fresh worktrees with the same toolchain, relayed through hd01 and sha256-checked on both ends.
calternalsha256796d80cba(dev2 is a byte copy)c3e9a68f…796d80cba+perf/inert-patch.py --seed 1 --functions 5700fd617d16…9db7c845d737e2eee…crates/tasks, reached only behindblack_box(false)fromTasksPlugin::new. That's the same crate and about the same size growth as #894, so fat LTO reshuffles the layout in a similar way.calternal-perf2b5bf648…from796d80cba.Turn A.
~/bin/perf-turn sound-comparatoron perf-01, no FRONT. A unit on hd01 held perf-02's lock for the whole turn.perf/vm/paired-turn.sh --order mirrored --seed 894 --warmup, each armcalternal-perf --sizes 10k --runs 3 --cold-runs 0(full scenario set, as the #894 lane ran it).cand dev inert dev2, round 2 its mirror.Comparator.
python3 perf/compare.py tA/layout.json --layout inert --hot sync.,storm.,uploads.,trash.,open.What this says about the two lane findings:
search.queryp50:sync.save_ackp95:--pairs, 6 units, 64 flips): 0 flags.Turn A verdict: no regression against dev or the layout arm on any hot or smoke cell. One hot cell is unresolved:
open.long_note(single-shot per run, MDE 65%; its ratio is 0.83).Turn B (
tasks-bench, same four arms, mirrored) is running now. The #894 verdict follows when B is in.#894 turn B (
tasks-bench): VOID by the null-block rule, to be re-run. #894 itself has 0 flags.Turn.
~/bin/perf-turn sound-comparatoron perf-01 (no FRONT; behindnf3oh-p1), with perf-02's lock held by a unit on hd01.perf/vm/paired-turn.sh --mode tasks-bench --notes 10000 --runs 3 --order mirrored --seed 8942 --warmup.tasks-bench's own budget gates (tasks.updatep95 > 40 ms, cold growth > 10%). They are kept as measured runs (#1130e61888a13).Binaries (sha256 on both ends),
tasks-benchper arm because it links the code it measures:796d80cba)20b21dea…796d80cba+ inert padding)691ade05…9db7c845d)16532627…Comparator.
compare.py tB/layout.json --layout inert --hot tasks., 41 cells, 10,000 random flips.Reading:
tasks.cold_tasksdev2 vs dev ×0.983, adjusted p 0.0495. That's just under α = 0.05 on one cell of 41, and it's the ~1-in-20 void rate the design accepts. The rule says void and re-run, so I don't use this turn for the verdict.tasks.todayp50 ×0.985 (upper 95% ×1.006, MDE 3.1%). The lane's r3 +9.2% doesn't reproduce.tasks.countsp95 ×1.004, p99 ×1.047 (MDE 16%).tasks.write_warmp50 ×0.998 (MDE 1.4%).#894 perf verdict on the new comparator: no regression found.
search.queryandsync.save_ackwere artefacts;tasks.describep95/p99 is a dev-arm/layout effect, not #894's code.Turn C (
tasks-bench, re-run of void turn B).~/bin/perf-turn sound-comparatoron perf-01, behind Notes Float tickets, no FRONT. perf-02's lock was held by a unit on hd01.paired-turn.sh --mode tasks-bench --notes 10000 --runs 3 --order mirrored --seed 8943 --warmup.tasks-bench's owntasks.updateand cold-growth budgets; those runs are kept.Command:
compare.py tC/layout.json --layout inert --hot tasks.. 41 cells, 10,000 flips. Exit 0 (PASS). The null block passes (smallest adjusted p 0.059).(Per cell, the four rows are: dev2 vs dev, inert vs dev, #894 vs dev, #894 vs inert.)
tasks.describep95/p99, the one interesting finding:devthere: inert ×1.039/×1.055, and even dev2 (byte-identical to dev) ×1.018/×1.043. Turn B showed the same pattern.dev. That's now fixed: the warm-up runs every arm in random order (#113064e805159).crates/tasks/src/index.rsandnotes/describer.rsare unchanged against796d80cba).#894 verdict across valid turns:
calternal-perf10k, all scenariosopen.long_noteunresolved (MDE 65%, ratio ×0.83)tasks-bench10ktasks.cold_tasksp 0.0495)tasks-bench10ksearch.queryp50 +8.6%: ×1.012 here, which is dev2-vs-dev's own size (×1.012). It was a dev-first rotation artefact.sync.save_ackp95 ±11%: ×1.002 here, while dev2 vs dev moves ×1.11. It's tail noise.tasks.todayp50 +9.2% (lane r3): ×1.000 here (turn C), ×0.985 (turn B).open.long_note: it's one long-note open per server run. Pooling a second turn A would only bring its MDE from 65% to about 46%. Resolving it needs a harness change (more long-note opens per run), not more turns. I'm recording it as a harness gap, not a blocker; its point estimate is 17% faster.Perf gate for #894: PASS under #1130's method. Not merged; the orchestrator decides.
Merge of origin/dev (
6c50dd99c) into feat/tasks-actions: gates on7f0f64df9git merge --no-ff origin/devhad no conflicts (no hand edits). Pushed as7f0f64df9. Everytasks.*action in the code (counts, create, delete, duplicate, get, list, move, move-many, reorder, set-status, set-status-many, undo, untracked, update) is incrates/engine/src/capabilities.rs; no new classification was needed.Server built from the merged head on each host (dev-01 x86, dev-02 aarch64). Slots via
~/bin/slot; waited for the daily-1115 train lock first.cargo fmt --all -- --checkcargo clippy --workspace --all-targets -j4 --locked -- -D warningscargo test --workspace -j4 --locked --no-fail-fastcargo test -p calternal-markdown-view+-p calternal-tasks create_tests::cargo test -p calternal every_registered_action_and_direct_route_has_a_capability_classificationnode apps/web/scripts/action-types.mjs --checkbun run --cwd apps/web checkbun run --cwd packages/editor checkembeds.test.ts,tables-{cell-update,parser,update}.test.ts: type-only import,Annotation.of).git diff origin/dev HEAD -- packages/editoris empty, so this branch adds nothing. Needs a fix on dev (Tables lane).bun run --cwd apps/web lintperf/web.sh --bundle-only --gatetasks-actions,pane-transition,tasks-*tasks-contrast.spec.tsPerf: no new run. The merge was conflict-free with no resolution edits, so the branch's own diff against dev is the one gated in the #1130 comparator run (search.query x1.012, save_ack p95 x1.002); the dev-side changes (attachments, Tables, CardDAV crates, #1141) were gated on dev. Nothing in the save, typing, search or tasks paths changed beyond the merge itself.
Not merged. Open risk: the packages/editor check failure above (dev, not this PR); CI's Typecheck step runs it, so dev's CI should show it too.
Merged into
devwith--no-ffby the orchestrator (perf pass under #1130; functional gates on the merged head). #1027 (Matrix) can now rebase onto dev. Closing.Pull request closed