Tasks backend pieces 1–3 (ADR 0066) #671
Open
opened 2026-10-22 10:47:30 +00:00 by kayg
·
462 comments
No Branch/Tag specified
main
port/tasks-float-2
fix/train-1116-2
fix/train-1116-3
fix/train-1116-1
fix/flake-1134
fix/server-1182
dev
port/notes-float-3c
docs/auto-update-ig
feat/dav-transport
port/tasks-float-1
wip/mail1011-sv-order-1116
fix/flake-1179
fix/flake-1178
fix/guards-1153-fsio-split
fix/guards-1153-notes-split-we
fix/guards-1153-notes-lib
fix/guards-1153-notes-home
fix/guards-1153-ui-primitives
fix/guards-1153-primitives-e2e
fix/guards-1153-visibility-doc
feat/paper-grey-1116
fix/flake-1165
fix/flake-1119
docs/imap-766-plan-v2
fix/e2e-unique-ports
t3/paged-search-reconcile-final
wip/mail1011-final-1115
docs/tasks-float-port
perf/editor-first-paint-1c
feat/imap-notes-fetch
feat/imap-notes-projection
feat/imap-notes-readonly
feat/imap-notes-auth
feat/imap-notes-server-foundation
wip/mail1011-txn-ownvocab-1115
wip/mail1011-txn-novocab-1115
perf/p1117-final-harness
perf/single-shot-repeats
port/tasks-matrix
wip/mail1011-txn-1115
fix/static-gates-1155
feat/files-s1-identity-r7
fix/files-r7-idle-loop
fix/daily-train-1152
port/notes-float
fix/editor-tables-test-types
port/notes-float-listscript
feat/tasks-actions
port/notes-float-phone-preload
perf/sound-comparator
port/notes-float-listscroll
port/notes-float-budgets
port/notes-float-suite-fix-b
port/notes-float-sidebar-fix
port/notes-float-trim
port/notes-float-3-lists
fix/attachments-meta-capability
docs/carddav-writes-v2-plan
feat/contacts-companion-pure
issue/carddav-read-perf-fix-r2
issue/carddav-read-r2
port/notes-float-devsync2
review/calendar-2
review/switcher-a-pills
port/notes-float-switcher-a
port/port-tables-2
review/switcher-ends
wip/whiteboard-s1-1114
port/port-tables
wip/mail1011-perfneutral
review/photo-tint
port/notes-float-shell
wip/local/collections-db
wip/local/mail-p1
wip/local/cold-growth-on-tiering
wip/local/tiering-v3-s1
wip/local/wal1051-cap
wip/local/tiering-v3-s1-resume
wip/local/index-position-startup-scan
port/notes-float-flat
port/notes-float-promote
wip/handover/mail1011-candidate
wip/handover/files-s1-candidate
port/notes-float-shell-only
port/notes-float-perf
feat/whiteboard-s1
feat/tiering-v5
fix/app-switch-hitch
wip/local/files-s1-dev-v4-final
feat/files-s1-dev-v4
fix/c2-glass-shared
feat/flat-lists
wip/handover/whiteboard-s1-resume
wip/att-lazy-861
feat/switcher-browse
wip/att-lazy-860
feat/tasks-float
recovered/flat-backup-candidate
perf/stalls-1054-kc
land/ai-toolbar
feat/collections-db
feat/collections-db-fixes
codex/mail-1011-redesign-20261111
fix/ai-toolbar
backup/macos-vm/st3-head
perf/trim-candidate-phonestack
feat/switcher-three
fix/1051-index-idle-checkpoint
perf/stalls-1054-kb
perf/stalls-1054-k
perf/stalls-1054-r3
fix/c2-contrast-tail
perf/stalls-1054-r3-preview
feat/collections-before
feat/tiering-v4
fix/timelog-caret
wip/local/tasks-actions
docs/tasks-writes-v2-plan
st3-r3
feat/pass8
review/calendar-2-before-1111
wip/tiering-v3-cold4
perf/stalls-1054-r2
fix/suite-A4
fix/suite-A5-probe
fix/suite-A6
fix/suite-A3
fix/suite-A2
fix/suite-A5
fix/suite-A1
wip/local/attachments-861-fix
feat/contrast
wip/local/ports-861
storage/wal-checkpoint-off-save-1051
wip/local/mail-1011-reconcile-20261110
feat/style-sheet-fixes
feat/money-round
perf/stalls-1054
wip/tiering-v3-cold5
t3/mail-1011-liveness
feat/iphone-fixes
feat/notes-approve
wip/local/shrow-work
feat/files-s1-identity
feat/quickfix
wip/tiering-v3-cold
wip/local/shared-row-swipes
backup/macos-vm/pfx-B
backup/macos-vm/pfx-C
backup/macos-vm/pfx-D
feat/contrast-r1
feat/tiering-v3-s2-tags
feat/folder-drop
t3/photos-s1
feat/tiering-v3-s1-namespace
wip/local/photos-s1
t3/photos-plan-slice-one
recovered/backup/p1b-61505
t3/paged-search-reconcile
t3/smooth-pane-transitions
t3/index-position-startup-scan
fix/private-staging-759b-r2
backup/macos-vm/hk/hk1009/pr877
backup/macos-vm/hk/hk1009/pr878
docs/undo-block-ids-plan
fix/undo-768
backup/macos-vm/hk/hk1009/pr875
backup/macos-vm/hk/hk1009/pr904
proto/block-identity-v7d
backup/macos-vm/hk/hk1009/pr846
backup/macos-vm/hk/hk1009/pr860
backup/macos-vm/hk/hk1009/pr861
backup/macos-vm/hk/hk1009/pr849
backup/macos-vm/hk/hk1009/pr848
backup/macos-vm/hk/hk1009/pr853
backup/macos-vm/hk/hk1009/pr957
backup/macos-vm/hk/hk1009/pr893
backup/macos-vm/hk/hk1009/pr889
backup/macos-vm/hk/hk1009/pr902
docs/imap-notes-plan
docs/quota-plan-2
fix/parallel-test-flakes
docs/calendar-backend-v2-plan
feat/calendar-ical-converter
backup/macos-vm/hk/hk1009/pr808
docs/contacts-import-v2-plan
issue/610-pm-midnight
feat/calendar-v2-s1-containment
backup/macos-vm/hk/hk1009/pr854
backup/macos-vm/hk/hk1009/pr845
backup/macos-vm/hk/hk1009/pr917
docs/dav-recorder-v2-plan
plan/previews-865
plan/save-log-durable-entry
backup/macos-vm/hk/hk1009/pr934
fix/e2e-data-on-ram
backup/macos-vm/hk/hk1009/pr888
feat/appwindow3
feat/appwindow2
feat/appwindow
feat/money-p1
feat/keys-sheet
review/calendar-2-themes
feat/smooth-cursor
fix/float-style
review/calendar-2-float
release/2026-11-06-hotfix
archive/port/rows-drop-code
archive/port/rows-actions
archive/port/rows
scratch/tasks-894-ui-gates
review/calendar-2-night-wip
recovered/flaky/toast-reduced
release/2026-11-05
archive/flaky/rows-drop-fixed
archive/flaky/rows-actions
archive/flaky/rows
sim/bm15-final
sim/bm15-bis-932
sim/bm15-bis-909
sim/bm15
sim/bm15-bis-887
perf/tiering-option-b
fix/sw-lazy-precache
archive/plan/save-log-durable-entry
mock/money-fix2
archive/fix/e2e-data-on-ram
mock/appearance-all
mock/pill-press
mock/pill-press-mac
backup/macos-vm/appearance-after
mock/auto-swipes
mock/mail-actions
backup/macos-vm/mock/mail-actions
mock/money-static
archive/review/standards-917
perf/tiering-761-fix
mock/type-audit
mock/third-pane
feat/contacts-import-v2-s1
perf/executor-hot-path
archive/port/hidden-blocks
archive/port/devices
scratch/executor-on-894
scratch/executor-spans2
scratch/executor-spans
archive/port/rows-drop
feat/tiering-761-d-scale
feat/tiering-761-c-index
feat/tiering-761-b-reader
archive/review/sharing-pr3-review-9fec3d1f
perf/ports-lazy-budgets
feat/tiering-761-a-migration
archive/review/sharing-pr3-review
archive/review/sharing-pr3-review-code
archive/plan/previews-865
archive/port/port-attachments-3
archive/port/contacts-merge
fix/motion-audit-859
fix/motion-audit-859-mac
archive/port/port-pickers
archive/port/port-tables-2
archive/port/port-tables
recovered/local/sharing-s1-pr2-room-snapshot-candidate
archive/fix/parallel-test-flakes-code-minipc01
docs/imap-766-readonly-slice
feat/dav-recorder-v3
research/788-diagnosis
archive/fix/parallel-test-flakes
archive/perf/pr792-cold-index-edit
docs/sharing-slice-1
recovered/feat/dav-recorder-v2
recovered/feat/dav-recorder-v2-edd7bbb
spike/imap-766-s0-cases
archive/fix/undo-768
recovered/feat/dav-recorder
recovered/feat/dav-recorder-901acd4
feat/contacts-import
perf/cold-growth-on-764
perf/cold-growth-on-tiering
recovered/feat/tasks-set-status
feat/tasks-move-reorder
feat/tasks-delete-promote-duplicate
feat/carddav-writes
perf/quota-on-tiering
perf/quota-simple
perf/cold-growth-on-quota-stack
recovered/perf/cold-growth-on-tiering
feat/calendar-identity
feat/calendar-event-parser
feat/calendar-props-maps
port/glass-when-ring
recovered/feat/tiering-761-s1-wip-8132a84
recovered/feat/tiering-761-s1-wip-9da4094
recovered/feat/tiering-761-s1-wip-724512c
recovered/feat/tiering-761-s1-wip-66e667e
recovered/feat/tiering-761-s1
wip/6by32-01-tier-761-s1-pause-20261030
spike/imap-766-s0
wip/6by32-02-calternal-pause-20261030
wip/8by64-01-review-688-pause-20261030
wip/6by32-01-verify-744-pause-20261030
wip/6by32-01-verify-742-pause-20261030
fix/private-staging-759b
wip/6by32-01-review-748-pause-20261030
wip/6by32-01-review-733c-pause-20261030
wip/6by32-01-review-733b-pause-20261030
review/calendar-month
wip/local/bm15-trash
plan/759b-staging
review/767b-tests
review/preview-2026-10-29
docs/tiering-731-plan
wip/c6b02-review-733d
wip/c6b02-bm1-full-a
docs/deploy-plan
fix/storage-owner-liveness-642
fix/storage-fix-7
feat/tiering-731
wip/tiering-731-first-attempt
perf/idle-honest-2
fix/storage-private-tmp-642-dev
fix/storage-exact-file-quarantine-642
perf/one-flush-save
review/calendar-static
review/indexing-ring
review/when-field-2
proto/block-identity-2-review
proto/block-identity-review
review/when-field
issue/tasks-create-ids
issue/tasks-create
review/combined
review/task-polish
review/top-buttons
review/q1-q5
archive/integ325-293
archive/integ325-ci
issue/calendar-adr
archive/old/train/2026-10-23bk2
archive/old/train/2026-10-23bk
issue/469-mockup-9a
issue/smart-tasks-mockup
issue/469-menus
issue/652-signout-flake
issue/652-history-fix7
issue/652-history-fix6
archive/old/issue/spring-check-perf
issue/spring-check-perf
issue/659-rename-fast
archive/old/train/2026-10-21ar
issue/search-hardening-3
issue/652-history-fix5
issue/660-port-sheets-glass
issue/652-history-fix4
issue/652-history-fix3
issue/652-history-fix2
issue/652-history-flake
train/2026-10-21an
issue/settings-admin-port
issue/search-port
train/2026-10-20am
issue/storage-split-fix2
issue/storage-split
archive/old/issue/folder-ids-fix
train/2026-10-20al
archive/old/issue/folder-ids
train/2026-10-20ak
issue/tables-mockup
train/2026-10-19aj
train/2026-10-19ai
issue/469-merge-fixes
issue/sidebar-band
archive/old/issue/608-settings-spec
train/2026-10-19ah
issue/swipe-offscreen
train/2026-10-19ag
archive/old/issue/590-nlp-adr
archive/old/issue/587-event-after-write-2
train/2026-10-19af
archive/old/issue/587-event-after-write
issue/469-pill-room-c
issue/469-pill-room
train/2026-10-19ae
issue/469-narrow-handle
issue/397-ios-swipe-2
issue/469-desk-fixes
archive/old/issue/auto-update-adr
issue/469-filter-gap
issue/469-port-1b
issue/442-opacity-flake
issue/327-web-fast-3
archive/old/issue/469-port-1
issue/469-port-1
issue/327-web-fast-2
archive/old/issue/327-web-fast
archive/old/issue/425-stt-bench-vq1
archive/old/issue/445-no-bleed
archive/old/issue/400-swipe-mockup-2
issue/426-client-review
issue/426-client-2
issue/426-client
archive/old/issue/476-safe-area-lab
archive/old/issue/445-top-light
issue/471-blocks-mockup
archive/old/issue/448-links-app-2
archive/old/issue/448-links-app
archive/old/issue/398-cold-links
issue/434-442-small-2
issue/434-442-small
archive/old/issue/398-unload
archive/old/issue/445-bottom-band
issue/445-bottom-band
issue/351-rem-3
issue/351-rem-2
issue/351-rem
archive/old/issue/327-first-note
issue/395-width-phone
archive/old/issue/327-typing
issue/396-ios-edges
issue/397-ios-swipe
archive/old/issue/327-notes-index
issue/345-347-contrast-empty-2
archive/old/issue/44-arenas
issue/44-arenas
archive/integ325
archive/old/issue/327-perf-harness
archive/old/issue/44-thp
issue/44-thp
archive/old/issue/285-sticky-pills
archive/old/issue/44-trim-3
issue/44-trim-3
archive/old/issue/165-cards
archive/old/issue/165-picker-2
archive/old/issue/212-multi-select
No results found.
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#671
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Build pieces 1–3 of ADR 0066 (Tasks), branch
issue/tasks-backend:statusin frontmatter) and writestasks,task_tags,task_lines,checkboxesinmeta.dbin the same transaction as the note's list row. No second scanner.tasks.list,tasks.counts.order.dbread path only (writes are piece 7).tasks.update.Gates: fmt, clippy -D warnings, cargo test --workspace, property tests for the writer, kill -9 crash tests, perf VM:
tasks.list≤10 ms @10k / ≤25 ms @100k,tasks.describedelta, field write ack ≤40 ms.No PR, merge or deploy from this job.
Progress (branch
issue/tasks-backend):describerextension point: plugins register a pass over every described note; their rows commit in the samemeta.dbtransaction as the note's list row (scan, watcher, rooms all covered). Version bump or an open without the describer ⇒ every note re-described. Links are found once and shared with backlinks.props: key-level frontmatter reader/writer that understands one-line lists, lists over lines, quoted links, comments; only touched keys change; unreadable frontmatter is refused. New room edit kindEditKind::Propscomputes the edit on the live text inside the room (no garbled merges of two concurrent sets).found), index tables (tasks,task_tags,task_lines,checkboxes),tasks.list,tasks.counts,tasks.untracked,tasks.get,tasks.update,order.dbread path.Next: clippy/workspace tests, then perf VM gates.
Handoff (Claude → Codex), branch
issue/tasks-backend@35844b6Worktree:
/home/kayg/Developer/calternal-wt-tasksbe(the pathcalternal-wt-tasksbelongs to the tasks-mockup job). Target dir:/home/kayg/Developer/calternal-target-tasks.Done
describer(crates/notes/src/describer.rs,meta.rs): plugins register a pass over every described note. Their rows commit in the samemeta.dbtransaction as the note row (scan, watcher and rooms all covered). The hooks arefresh_drops/after_fill(cold fills drop indexes, then finish once; a fill stopped halfway finishes on open). A version bump, or an open without the describer (it forgets itself instats), re-describes every note. Links are found once and shared with backlinks.props(crates/notes/src/props.rs, tests inprops/tests.rs): a key-level frontmatter reader/writer. It handles one-line lists, lists over lines, quoted links and comments. Only touched keys change; unreadable frontmatter is refused (Broken).EditKind::Props(room/edit.rs,edit_now) works the edit out on the room's live text, with an idempotency-key writer.crates/tasks):found.rs(pass),index.rs(schema v4:tasks,task_tags,tag_counts,task_lines(+is_task),checkboxes(one row per note, open boxes only),untracked_notes,task_stats),lists.rs,counts.rs,update.rs,order.rs(order.db read path),db.rs. Wired incrates/calternal/src/plugins.rs;contracts/actions.jsonandapps/web/src/lib/actions.gen.tsregenerated.cargo test -p calternal-tasks18/18 pass. These cover lists/groups/counts, Untracked, the update's byte-safety, rebuild = same rows (counters included), cold fill = usual path, outside edits, SQL-vs-Rust order property, and kill -9 at 6 points during field writes. fmt and clippy-D warningsare clean. Workspace tests all pass except one props property case (below).storage_startupwas flaky with the describer (a stale-walleft by a SIGKILLed server, then the test'scopy_treecopied a db over it); fixed in the test helper, 8/8 green.In progress / bug to fix first
crates/notes/src/props.rssame_value:(Value::Text("true"), New::Bool(true))counts as equal even when the text was quoted ("true"), so setting Bool after Text is skipped. The seed is committed incrates/notes/proptest-regressions/props/tests.txt. Fix:Entry::valuemust tell a plaintruefrom a quoted one (e.g. compare the raw inline value) before treating it as equal toBool.Left from pieces 1–3
Speed gates still over budget (perf VM, 100k notes + 100k tasks):
cold.indexgrows +20–22% (10k: +14–20%). Budget is ≤10%.tasks.listgrouped by child tag (group_by: tags): p95 34 ms at 100k. Budget is ≤25 ms; not a default grouping, so it really belongs to Views (piece 9).Probe breakdown of the +2.9 s: tasks rows written in
apply~0.8 s, notes' own batches +0.4 s, the tasks index build 0.73 s,after_fill0.47 s, the rest from the parallel describe. Getting to ≤10% needs fewer or narrower covering copies (tasks_listandtask_tags_listeach duplicate most columns), at some cost in list speed. That trade-off is for kayg.Hiding task notes from Notes lists (ADR "settled" item 4) is not done.
Unknown
statusvalues ("finished") are not treated as task notes (ADR wording is ambiguous; open question).Perf (round 5, perf VM, p95 ms; 10k / 100k)
Writes: p50 ≈ 0.5 ms, p95 22–41 ms across runs, max up to ~150 ms (borderline; worth a look).
API (POST
/api/v1/actions/<name>or live socketact)tasks.list {list: today|upcoming|anytime|someday|tag, tag?, today: "YYYY-MM-DD", group_by?: none|status|day|when|deadline|priority|tags, group_tag?, keep?: [ids], limit?, urgent_days?}returns{group_by, groups: [{key, count, items: [Task]}], total, more, incomplete}.tasks.counts {today}returns{today, upcoming, anytime, someday, untracked, tags: {tag: n}, incomplete}.tasks.untracked {limit?}returns{items: [{note, note_path, note_title, line, mark, text, block}], more, incomplete}.tasks.get {id, today}returns aTask.tasks.update {id, scheduled?, due?, priority?, tags?, repeat?, repeat_from?, time_zone?, pinned?, waiting_on?, depends_on?: [ids], tz?}(null clears) returns{id, version}and recordstasks.updated.Taskfields: id, title, path, status, scheduled, due, time, priority, tags, repeat, pinned, waiting, waiting_on, completed, created_ms, updated_ms, overdue, urgent, important, broken.notes.*/tasks.updatedjournal events (rows commit before the event).Gotchas
task_lines (open,in_task,is_task)). That index was removed; watch for this again when adding indexes.FRESH_FROMis 10,000 outsidecfg(test), so only a 10k-file test (a_cold_fill_gives_the_same_rows_as_the_usual_way) exercises the fresh path.build-slot.shwaits.Commands
The bench is
crates/perf/src/bin/tasks-bench.rs(--data --state --notes --runs --drop-caches). It reuses the generated Homes at/mnt/b/hdd-ext4/calternal-perf/tasks-homes/base-<n>.Continuing the approved backend work on issue/tasks-backend, starting at
35844b6. Read handoff comment 64634 and ADR 0066. Merging origin/dev before the fixes; no PR, merge to a shared branch, or deployment.Found and fixed the writer equality defect in both directions: the lenient reader exposes quoted and bare scalars as text, but no-op detection must check the original scalar spelling to preserve YAML types. Added a dedicated boolean/text regression and raised the property test to 10,000 cases. Unknown nonempty status text now indexes as todo (open) while retaining the original file bytes. Notes list filtering is applied before count and pagination; show: tasks selects task notes. Tests are queued through the build slot. The perf VM has only 1.9 GB free on root and 4.3 GB on NVMe, so profiling will reuse the prior worker’s build target rather than allocate another target.
The old warm-write benchmark mostly measured no-ops: there are 60 task ids, due used k % 30, and priority used k % 2. Both repeat unchanged for each id in later rounds. This explains the 0.5 ms median and makes the old p95 insufficient evidence for real field-write latency. Fixed the benchmark so every round changes both fields and it measures 2,400 actions (60 first touches plus 2,340 warm writes), with p99. Profiling real writes on the locked perf VM now. Local test execution is waiting for a shared build slot; no other jobs were interrupted.
Perf profiling found the large write spikes. With 2,400 real writes at 100k: first-touch p95 33.80 ms; warm p50 4.37, p95 22.65, p99 135.85, max 1324.19 ms. History commits: p95 6.57 ms, max 22.17 ms. The trace shows 464 rename bulk jobs during field writes. after_save and target strip a trailing number before comparing the filename with the title, so a title such as Chapter 12 incorrectly schedules a rename despite already matching its filename. target then enumerates the entire 100k-file Tasks folder; the eventual rename is empty but still creates a durable bulk job. Fixed both guards to check the complete stem first and added a regression asserting that saving numbered titles leaves no rename ticket. Re-running with stage timings to isolate the remaining cold-index costs.
Decision (kayg, 2026-10-22): the cold-index cost (+2.9 s at 100k notes + 100k tasks, +20% vs the 10% budget) is accepted in exchange for 5–12 ms Tasks lists. Shrinking it is best-effort only (e.g. build the tasks index / after_fill lazily or in the background), not a blocker for pieces 1–3. List speed must not regress.
The property edits during file I/O fix brings 100k warm writes to p50 4.18 ms, p95 8.58 ms, p99 23.87 ms, max 54.93 ms across 2,340 real writes; first touch p95 35.04 ms. The earlier 150+ ms spikes are gone in this run. A paused-HDD test now checks that a property reply arrives before file placement finishes and that the newer field survives the next save and restart. Smaller covering indexes exclude closed tasks, with a narrow tag index retaining closed tasks for visit retention. Cold growth improved to +17.42% in the exploratory run, still above budget; list speed was preserved. Final 3-pair cold measurements and another write run at both sizes are queued. Shared local build slots have remained occupied, so correctness gates are also running on the perf VM under its lock, using an isolated HDD build target. The first clippy pass caught two cloned-reference slice warnings in the new tests; both are fixed and the gate is rerunning.
Final cold gate is still failing, so I am leaving that limit unmet under the task’s permitted fallback and preserving fast lists. Three alternating cold-cache pairs at 100k gave plain [14682, 14153, 14236] ms and Tasks [17183, 16921, 17330] ms. Median growth is +20.70%; 10k is +20.76%.
Exact phase breakdown, mean of the three 100k runs, milliseconds added (the phases sum to the mean wall increase):
Even deferring all final task index/count work would leave about 12.2% mean growth. Deferring only the wide copies cannot reach 10%.
Measured the cheap alternative on a copy of the 100k store under the perf lock. Removing the two wide indexes makes Today’s SQL alone go from p95 10.46 to 35.66 ms (budget 25), and the four sidebar counts from 2.65 to 49.24 ms (budget 5). Lazy recreation on first Tasks open costs 85.25 + 95.71 = 180.96 ms, before listing. Those options slow lists. I retained the narrower covering copies (closed tasks do not need them) and the complete same-transaction index. A larger change that defers task/tag row construction and tracks Tasks readiness separately remains needed for the cold budget.
The final 100k run passes every other perf gate: Today p95 11.05, Upcoming 12.10, Anytime 6.54, Someday 6.54, tag 11.92, child-tag grouping 16.57 (was ~34), counts 2.76, describe 0.0137. Writes: first touch p50/p95/p99 12.34/24.35/35.13 ms (60); warm 4.24/9.53/24.17 ms (2340), maximum 31.41 ms. Correction to the new paused-I/O test fixture is being checked with the full correctness gates now. No artifacts were added to the repository.
Corrected paused-I/O and numbered-title regressions pass, as do the Tasks crate tests and clippy -D warnings. The parallel workspace run then hit an existing storage-startup boundary: single_root_upgrade_backup_split_cache_delete_and_rollback returned WouldBlock at storage_startup.rs:340 immediately after offline re_pair; 9 other startup tests passed. This is the root-lock handoff, not a Tasks assertion or writer failure. I am rerunning the startup suite and the full workspace with one test thread to avoid interference between concurrently spawned server fixtures, while keeping cargo build parallelism at -j4. No product locking or durability rule was weakened. The final property test remains configured for 10,000 cases and will run explicitly before the workspace gate.
Finished this continuation on
issue/tasks-backend, pushed and verified at5f74859cf1. Mergedorigin/devatc2b7a1a063109a94e9664afad3c29d0a9f815a13first, without rebasing. No PR, shared-branch merge, deployment, or issue closure.Changes:
todoin the API) and stay byte-exact when another field changes. ADR 0066 records this.show: tasksselects them. Tests retain direct reads, search, backlinks, and task-line visibility.Final correctness gate lines, verbatim:
The explicit props gate passed all 10 tests, including the saved seed, with
PROPTEST_CASES=10000andProptestConfig::with_cases(10_000). The paused-I/O and numbered-title tests also pass in the workspace run. Rust correctness gates ran on the perf VM under its lock after the local build queues waited over 20 minutes. The final workspace used one test thread: an earlier parallel run hit the existing storage-startup root-lock handoff at storage_startup.rs:340. The startup suite passed 10/10 with one test thread; no product lock or durability rule was weakened.Final perf, milliseconds, p95 unless stated. Homes have 10k/100k notes plus the same number of tasks; lists return the first 200 rows. Each size has three alternating cold-cache pairs and 2,400 real writes.
Warm maximum: 36.63 ms at 10k, 31.41 ms at 100k. The earlier 150+ ms spikes are gone.
Perf gate lines at 10k, verbatim:
Perf gate lines at 100k, verbatim:
Left: cold indexing exceeds the 10% budget. The final medians are 1384.652 → 1672.129 ms at 10k (+20.762%) and 14236.301 → 17183.493 ms at 100k (+20.702%). The exact phase breakdown and the measured copy-removal trade-off are in comment 64647. On a copied store, dropping the two wide indexes slows Today SQL p95 from 10.46 to 35.66 ms and counts from 2.65 to 49.24 ms. Lazy recreation costs 180.96 ms on first open. Even deferring all final Tasks index/count work leaves about 12.2% mean cold growth. I retained fast lists under the permitted fallback; reaching 10% needs more task/tag construction deferred behind separate Tasks readiness or further row-write savings.
All evidence is in these issue comments and
/tmp/tasksbe-evidence, with the VM logs retained in/root/calternal-perf-tasksbe-codexand/root/calternal-perf-tasksbe-checks. Removed this job's temporary NVMe databases after measurements (3.9 GB free). No evidence or artifacts were committed.Independent review started for ADR 0066 pieces 1–3. Reviewing detached HEAD
5f74859cf1(issue/tasks-backend), merge-base with origin/devc2b7a1a063. Review only: no commits, pushes, merges or deploys. Findings and gate evidence will follow.Independent review progress at
5f74859: fmt and clippy -D warnings pass on an exact archive of HEAD on the perf VM under its lock. The local slot queue was congested; only this job's waiting process was stopped. Workspace tests are running.Code evidence for a list-contract defect: crates/tasks/src/index.rs derives day as min(scheduled, due), while lists.rs and counts.rs implement Upcoming as day > today. ADR 0066 says When or Deadline after today. On October 22, an open task scheduled October 25 with a deadline October 20 must match that predicate, but the implementation excludes it from Upcoming. Today still includes it. Both the list and its badge share the incorrect predicate, so comparing badges with lists cannot find this defect. An independent action-level regression is queued to confirm it.
Other queued probes cover scientific-notation text versus YAML number types, refusal of malformed unrelated frontmatter, long Markdown fences, outside edits during pending task writes, separate users, concurrent devices, a large note, renames and deletes. The original property test hardcodes 10,000 cases, so setting PROPTEST_CASES=20000 alone does not raise it; an external copy changes only that test configuration to 20,000 cases. Repository files remain untouched.
P1: outside edit corrupts a pending task date
Independent action-level reproduction on
5f74859: save a task with due 2026-10-23; acknowledge tasks.update due 2026-10-25 while its file save is pending; an outside editor writes due 2026-11-26 against the saved file; explicitly save the room. Persisted result isdue: 2026-11-265, neither old nor new. Watcher disabled to deterministically exercise the documented save-time outside-edit check; no sleeps. The room's character-level outside merge combines the scalar changes instead of resolving the property. Evidence: review_outside_edit_during_pending_task_write fails, mixed field Text("2026-11-265"). This can remove the task date from date-based lists. New task property edits need safe scalar conflict handling for outside edits too.Evidence log: /root/tasks671-review/independent-probes.log, retained locally in /home/kayg/codex-jobs/tasks671-review. No repository changes.
P2: live list can return a count with no row
Independent concurrent-action probe alternates one task between high and low priority while requesting Anytime grouped by priority. Observed response: {"group_by":"priority","groups":[{"count":1,"items":[],"key":"low"}],"incomplete":false,"more":false,"total":1}. review_live_list_has_consistent_rows_and_counts fails. lists.rs reads ids, group counts and full rows in separate SELECT statements without one SQLite read transaction. A group change between reads drops the only row. Hold one consistent read snapshot across child tags, groups, counts and full rows; counts also use multiple statements without a read transaction.
Evidence log: /root/tasks671-review/independent-probes.log, retained locally in /home/kayg/codex-jobs/tasks671-review. No repository changes.
P2: writer changes scientific-notation text into a YAML number
Independent serde_yaml oracle: Change::text("waiting-on", "1e+3") writes bare
waiting-on: 1e+3; YAML reads Number(1000.0), expected String("1e+3"). review_text_yaml_types fails. props.rs looks_numeric excludes signs within exponents. This also affects New::List text items, including tags accepted by tasks.update. Extend scalar quoting and the independent property generator beyond the current fixed examples; the original generator misses this class.Evidence log: /root/tasks671-review/independent-probes.log, retained locally in /home/kayg/codex-jobs/tasks671-review. No repository changes.
P2: malformed frontmatter remains writable
Create a task with
status: todoandcustom: [unterminated. tasks.update {due:"2026-10-25"} returns success and adds the due key to that invalid YAML. review_broken_frontmatter_refuses_update fails. found.rs discards entry.value errors as Other and sets broken=false whenever entries() succeeds; props::apply validates only the touched entry. ADR 0066 says broken frontmatter shows but cannot change until fixed. Validate the whole frontmatter before allowing a property edit.Evidence log: /root/tasks671-review/independent-probes.log, retained locally in /home/kayg/codex-jobs/tasks671-review. No repository changes.
P2: Upcoming excludes tasks with one future date
Action-level reproduction confirms the earlier inspection finding: on 2026-10-22, task scheduled 2026-10-25, due 2026-10-20 gives Today total 1, Upcoming total 0 and upcoming badge 0. review_upcoming_with_past_and_future_dates fails. ADR Upcoming is open and not someday with When OR Deadline after today. index.rs stores min(scheduled,due), and lists.rs:342/counts.rs filter that minimum > today. The two lists may overlap under the written contract. The same response marks overdue=false despite the past deadline; the overdue calculation prefers scheduled over due.
Evidence log: /root/tasks671-review/independent-probes.log, retained locally in /home/kayg/codex-jobs/tasks671-review. No repository changes.
P2: code-fence contents leak into Untracked
A note containing a four-backtick opening fence, a nested three-backtick rust line, a checkbox, a three-backtick line and the four-backtick close yields an Untracked row for the checkbox inside the code block. review_long_code_fence_hides_checkboxes fails. found.rs:261 tracks only the first three fence characters and accepts shorter fences or fence-looking content as closing markers. Honor the opening fence length and legal closing-line syntax; the shared links reader has the same older limitation.
Evidence log: /root/tasks671-review/independent-probes.log, retained locally in /home/kayg/codex-jobs/tasks671-review. No repository changes.
Independent review finished at HEAD
5f74859cf1, basec2b7a1a063. Final verdict: do not merge.One P1: an outside edit during a pending task write persists mixed date
2026-11-265. Five P2: a live list returns count 1 with no row; scientific-notation text becomes a YAML number; malformed frontmatter remains writable; Upcoming misses tasks with one future date; code-fence contents leak into Untracked. Evidence and source locations are in comments 64660–64665. All six reproduce again with serial tests.Pristine workspace: 893 passed, 5 existing ignored; no storage_startup lock flake. Tasks tests pass 20/20 ten times. The explicit 20,000-case property test passes. Six extra actual SIGKILL boundaries preserve a two-field pair and untouched fixture bytes. Isolation, concurrent app field edits, and a large-note rename/delete pass. Original props config hardcodes 10,000; the 20,000-case run used an external identical writer copy with only the test case count raised.
Independent perf passes list/count/describe/write budgets at both sizes: slowest list p95 3.98 / 20.45 ms, counts 0.57 / 2.69, describe 0.0113 / 0.0131, first-touch writes 24.09 / 26.67. Cold growth +11.49% / +17.78% uses the accepted exception.
Gate output, verbatim:
Perf gate output, verbatim:
10k
100k
Full report and reproducible probes:
/home/kayg/codex-jobs/tasks671-review/findings.md; VM evidence/root/tasks671-review. Checkout clean and unchanged. No commits, pushes, merges, deployment or issue closure.Started review fixes on issue/tasks-backend, base
5f74859cf1. Merging origin/dev before changes, preserving the history and shutdown guarantees from #652 and #664. The merge has conflicts in room edit/save; resolving those before regression work. CLAUDE.md is absent from the checkout and applicable ancestors. Evidence and gate logs will stay outside the repository. No PR, merge to dev/main, or deployment.The permanent regression tests now run against an archive of
5f74859, with product code unchanged. All six Tasks review tests failed, plus both property writer regressions. Logs are outside the repository at /home/kayg/codex-jobs/tasks671-fix/baseline-*.log and on the perf VM under /mnt/b/hdd-ext4/calternal-perf/tasks671-fix.P1: review_outside_edit_during_pending_task_write failed after the exact saved-base / acknowledged update / outside write / explicit save sequence. The fix uses guarded placement and resolves frontmatter conflicts as whole keys against the current file, carrying unrelated pending room keys.
Review finding 2: review_live_list_has_consistent_rows_and_counts reproduced a high-priority group with count 1 and items []. Lists, counts and Untracked now hold one read transaction across their SELECT statements, including child tags.
Review finding 3: review_text_yaml_types reproduced waiting-on: 1e+3 as Number(1000.0), expected String. Scalar quoting now covers signed exponents and numeric/date look-alikes; permanent scalar and list tests use a YAML oracle.
Review finding 4: review_broken_frontmatter_refuses_update and review_malformed_unrelated_property_blocks_writes failed on custom: [unterminated. The writer now validates the whole YAML block before any field edit; the index marks malformed tasks read-only.
Review finding 5: review_upcoming_with_past_and_future_dates reproduced Today total 1, Upcoming total 0 for scheduled 2026-10-25 and due 2026-10-20. ADR 0066 is explicit: either future date qualifies. The fix allows overlap, corrects overdue to prefer Deadline and adds a covering Upcoming index.
Review finding 6: review_long_code_fence_hides_checkboxes and review_code_and_html_are_not_checkboxes failed on the four-backtick fixture. Task detection now uses CommonMark list item boundaries to exclude fenced/indented code and HTML blocks, while retaining nested task lists.
Review finding P3: The original property test hardcodes 10,000 cases and therefore ignores PROPTEST_CASES=20000. The revised config retains 10,000 as its default and honors the environment override; its generator includes signed exponents, alternate bases, booleans, null and dates. A config regression assertion checks the requested count.
Validation finding at
c24e442283: fmt and clippy pass. The first workspace gate hit the known storage_startup lock race, outside the Tasks changes:single_root_upgrade_backup_split_cache_delete_and_rollback failed at crates/calternal/tests/storage_startup.rs:340: WouldBlock, another Calternal server is using the test's temporary home/.lock. Nine other tests passed and one existing stress test was ignored in that binary. This failure is retained in workspace.log. I will rerun with RUST_TEST_THREADS=1 to avoid concurrent test process spawns inheriting a temporary Home lock. No product or test change is being made to mask this result. The perf build is running under /root/perf-vm.lock; remaining correctness gates follow under that lock.
Perf VM results for
c24e442283. The run held flock -o /root/perf-vm.lock and used stdin /dev/null. Lists, counts, describe and field updates pass at both sizes. At 100k, the slowest list is 15.82 ms p95, counts 2.89 ms, describe 0.0474 ms and first-touch writes 29.42 ms.Cold indexing is +23.2% at 10k and +22.5% at 100k. These remain FAIL results for the 10% gate; comment 64645 explicitly accepts cold-index cost as a non-blocker for pieces 1–3, with list speed the requirement.
10k (verbatim):
100k (verbatim):
The serialized workspace run passed the previously failing storage_startup binary, then reached a new #652 real-SyncClient test whose JavaScript dependencies were absent from the perf VM archive:
Notes had 379 passed, one failed and three existing ignored. This is an environment setup failure, not a product assertion failure. Installing only the bridge's yjs, y-protocols and lib0 dependencies outside the checkout, then rerunning the specific bridge test and the full workspace gate. Source remains
c24e442.The next serialized workspace run passed all Notes tests (including the real SyncClient bridge), then exposed a Tasks crash-test harness assumption: with RUST_TEST_THREADS=1, libtest prints the first TASKS-CRASH ID marker after the test-name prefix on the same line. The harness used strip_prefix and therefore missed the ID, later failing at “the child made its task”. No durability assertion failed.
Changed only the harness to find its explicit marker within the line. This keeps serial execution available for the startup lock race, without sleeps or weaker crash assertions. Rechecking the exact SIGKILL test and all final correctness gates. Product code and perf results are unchanged from
c24e442.Finished fixes for all six review findings and P3. Pushed issue/tasks-backend at
1eaa3f0a27, after merging origin/dev at11a5d792a0. No PR, merge to dev/main, deployment, or issue closure.The permanent reproductions failed against
5f74859: all six Tasks review tests, both YAML writer tests, and the 10,000-vs-20,000 configuration assertion. They pass after the fixes. Save-time outside edits resolve whole keys against the current file, preserving unrelated pending keys; body edits retain the CRDT merge. ADR 0066 documents this rule and the overlap between Today and Upcoming. Snapshots cover lists and badges, YAML text types survive writes, malformed frontmatter rejects field edits, and CommonMark excludes code and HTML blocks from task detection.Workspace rerun: 957 passed, 7 existing ignored across 84 summaries. RUST_TEST_THREADS=1 avoids the known concurrent process-spawn/Home-lock race. The first default-thread workspace failure and the missing bridge dependency failure remain recorded below. The VM bridge dependencies were then installed at the versions in bun.lock, outside the checkout, and the real SyncClient test passed. A subsequent run exposed libtest prefixing the crash child marker under serial execution; the marker parser was fixed without weakening any crash assertions, and the exact SIGKILL test passed. The ten Tasks runs each pass 26 tests. The property test honors PROPTEST_CASES=20000; its config assertion and expanded YAML oracle pass. Tests also verify history memory admission refuses a property action before live mutation, preserving #652; the merged deferred command path retains #664 queue reservations.
Correctness gates, verbatim (the last workspace line is the serialized rerun):
Perf used product code at
c24e442; the final commit changes only crash-test marker parsing. Perf VM runs held flock -o /root/perf-vm.lock, stdin /dev/null. Lists, counts, describe and field writes pass at both sizes. Cold growth is +23.2% / +22.5%, still a FAIL against 10%, covered by the explicit non-blocking exception in comment 64645. At 100k, slowest list p95 is 15.82 ms, counts 2.89 ms, describe 0.0474 ms, first-touch update 29.42 ms, warm update 9.64 ms.10k perf gates, verbatim:
100k perf gates, verbatim:
All 1,070 tracked files on the VM matched the committed source by SHA-256. Evidence stays outside the repository at /home/kayg/codex-jobs/tasks671-fix and /mnt/b/hdd-ext4/calternal-perf/tasks671-fix on the VM. Only this run’s two NVMe state directories were removed; shared Homes and build targets remain. Staging and production were untouched.
Independent re-review started. Worktree is detached (no branch) at
1eaa3f0a27; comparison base5f74859cf1. I will rerun the six original reproductions, close variants, correctness gates and perf checks. No commits, pushes, merges or deployments.Re-review source finding: origin/dev at
11a5d792a0is an ancestor of1eaa3f0, as is the #664 merge9f8131a. The Tasks property path builds a private fork before apply_change memory admission; outside ingest resolves on a private fork before admission too. Deferred commands retain queue reservations, and the Home shutdown guards are unchanged from dev. All 1,070 tracked files in the VM test archive match the checkout by SHA-256. Formatting and clippy pass; tests and independent variants are in progress.All six original independent reproductions now pass against
1eaa3f0in the external harness:The full workspace gate passed; all ten Tasks repeats and PROPTEST_CASES=20000 passed too. Broader variants and fresh perf are still in progress. Evidence: /home/kayg/codex-jobs/tasks671-review2 and the matching directory under /mnt/b/hdd-ext4/calternal-perf on the perf VM.
P2 found in a close variant of finding 6: a real linked task after code is wrongly offered as Untracked.
Create Real target.md with status: todo, then create a source note with:
The hidden checkbox is correctly excluded, but tasks.untracked returns the real linked line as an item with text "Real target". A normal three-backtick block followed by the same line returns no Untracked item. A tilde block containing a fake closing line (~~~ trailing text) has the same failure.
Evidence: the new action-level test real_task_link_after_short_fence_is_not_untracked fails (0 passed, 1 failed), with all three responses recorded in following-code.log. The earlier 16-probe suite and all six original reproductions pass.
Cause: crates/tasks/src/found.rs:257 uses CommonMark to find real list items, then lines 282-285 take targets from note.links. Those links come from crates/notes/src/links.rs:41-59, which still toggles on the first three fence characters. It treats the shorter/fake closer as closing, then the real closing fence as opening, and misses the valid link after the block. The resulting line has no target and is classified as plain. Use consistent Markdown boundaries for task lines and their link targets and add this control/variant regression. No product files were changed by this review.
Independent re-review finished at
1eaa3f0a27. Do not merge: one P2 remains, posted in comment 64708. A real linked task after a legal long fence or a fake closing line is wrongly offered as Untracked because Tasks and the shared Notes link reader disagree about fence boundaries. The normal-fence control works.All six original reproductions pass. The first independent suite passes 16/16; the extra linked-task fence test fails 0/1. Required gates pass: workspace 957 passed, 7 existing ignored, no storage_startup flake; ten Tasks runs each pass 26 tests; the writer property test honors 20,000 cases. The #652 Saved and #664 shutdown tests pass, including real SyncClient checks, and an independent post-shutdown Tasks write probe passes.
Fresh perf passes lists/counts/describe/writes at both sizes. Slowest list p95: 4.43 ms at 10k, 17.52 ms at 100k. Cold growth +22.54% / +25.24% is covered by kayg's accepted exception. No product changes, commits, pushes, merges or deployments. The checkout is clean. Report: /home/kayg/codex-jobs/tasks671-review2/findings.md.
Correctness gates, verbatim:
Supplemental gates, verbatim:
10k perf gates, verbatim:
100k perf gates, verbatim:
Starting the Markdown link-boundary fix on branch
issue/tasks-backend. Base SHA:11a5d792a09766743051ea30f50b42ad852c22dd. Starting head:1eaa3f0a27fbb54b8742afc3dc7e0b6053e35d14.Confirmed the remaining link boundary mismatch.
tasks::found::linesuses pulldown-cmark list items and reads targets fromNote.links;notes::meta::describedfills those links withlinks::find. That scanner currently toggles on the first three fence characters. The independent action probe recorded a zero-item Untracked page for the normal fence, then a false Untracked row for the real[Real target](<Real target.md>)after both the four-backtick block containing triple backticks and the tilde block with~~~ trailing text. I am fixing the shared CommonMark boundary and adding unit and property regressions.I also checked the frontmatter boundary. A valid YAML block with a fenced code sample made a whole-note Markdown parse hide the body link, while Tasks starts parsing after frontmatter. The new Notes regression returned no visible link, and the Tasks regression returned a missing target for the valid checkbox link. I am aligning both parsers on the same body slice and keeping frontmatter links readable.
Finished on
0f3bc687ccand pushed to issue/tasks-backend.Gate output:
cargo fmt --check: exit 0 (no output)
cargo clippy -j4 --workspace --all-targets -- -D warnings: exit 0
cargo test -j4 --workspace: exit 0
test result lines: 84
passed: 965 failed: 0 ignored: 7
PROPTEST_CASES=20000 cargo test -j4 -p calternal-notes props::
notes props 20000 exit=0
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 375 filtered out; finished in 8.99s
PROPTEST_CASES=20000 cargo test -j4 -p calternal-tasks markdown_links_and_task_items_share_commonmark_boundaries
tasks boundary property 20000 exit=0
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.58s
Tasks crate, ten runs:
1/10: test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.10s
2/10: test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.21s
3/10: test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.20s
4/10: test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.43s
5/10: test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.17s
6/10: test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.10s
7/10: test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.27s
8/10: test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.06s
9/10: test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.24s
10/10: test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.16s
Notes link tests passed: 32; notes rename tests passed: 15.
Starting independent review of
1eaa3f0..0f3bc68. Checkout is detached at0f3bc687cca663f4099a7f9459cefb43344e6e7c(refissue/tasks-backend); base SHA is1eaa3f0a27fbb54b8742afc3dc7e0b6053e35d14. I will check scanner behavior, rewrite spans, tests, and performance.Finding: the paired debug timing comparison exceeds the 10% performance limit. On the perf VM, under its required lock, the median of seven alternating samples was 42.471902 ms old versus 57.074650 ms new for a 1 MiB note with one link (+34.4%), and 41.547464 ms old versus 81.560290 ms new for 10,000 short notes with one link each (+96.3%). The ignored review benchmark passed. I am checking the optimized build before concluding.
Update to the performance finding: the same paired benchmark also fails with the notes crate and pulldown-cmark compiled at optimization level 3. Median of seven alternating samples under the perf VM lock: 13.784088 ms old versus 21.289420 ms new for the 1 MiB note (+54.4%); 9.430776 ms old versus 21.506434 ms new for 10,000 notes (+128.0%). The optimized comparison test passed. Both workloads exceed the 10% limit.
Review finished at head SHA
0f3bc687cc. Correctness checks passed: the randomized outside-code comparison matched complete Link records, including byte spans; notes rename/link tests and task scanner tests passed. The worktree is clean.The performance gate fails. With the notes crate and pulldown-cmark at optimization level 3, the paired medians were 13.784088 ms old versus 21.289420 ms new for a 1 MiB note (+54.4%), and 9.430776 ms old versus 21.506434000000002 ms new for 10,000 notes (+128.0%). Both exceed the 10% limit. Recommendation: do not merge.
Gate output:
cargo fmt --check: no stdout; exit 0.
Finished
devprofile [unoptimized + debuginfo] target(s) in 1m 28sNotes test result: ok. 387 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out; finished in 37.52s
Notes doc-test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Tasks test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.77s
Tasks doc-test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Starting work on issue #671. Branch: issue/tasks-backend. Base SHA:
1eaa3f0a27. Starting head:0f3bc687cc.Finding: the first paired release run used one binary, opt-level 3, seven alternating samples, and medians. The 1 MiB note measured 14.286094 ms old and 4.044267 ms new, a 71.7% improvement. The 10,000-note set measured 5.460171 ms old and 6.044074 ms new, a 10.7% regression, just outside the limit. The 20,000-case differential test found exact pulldown-cmark code-block spans. I am tuning the no-code path before the final measurement.
Finding: ordinary notes are scanned without a CommonMark parse. A possible block opener triggers one parse for exact code-block ranges, and the scanner skips those ranges while counting line breaks with byte search. The 20,000-case differential property matched pulldown-cmark spans, including nested lists, block quotes, list fences, tabs, and CRLF. Final paired opt-level 3 medians from one binary, alternating seven samples: 1 MiB note 15.080135 ms old and 2.460184 ms new (-83.7%); 10,000 notes 5.139429 ms old and 5.140416 ms new (0.0%).
Finished issue #671 on branch issue/tasks-backend.
Head SHA:
46645ff9e7Final paired opt-level 3 medians from one binary with seven alternating samples: 1 MiB note old 15.080135 ms, new 2.460184 ms, change -83.7%; 10,000 notes old 5.139429 ms, new 5.140416 ms, change 0.0%.
Gate output
cargo fmt --check
No output; exit 0.
cargo clippy --workspace --all-targets -j4 -- -D warnings
Finished
devprofile [unoptimized + debuginfo] target(s) in 1m 58scargo test --workspace -j4 --quiet
test result: ok. 387 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 35.62s
Tasks crate 10x
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.83s
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.50s
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.61s
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.67s
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.82s
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.60s
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.53s
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.78s
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.56s
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.62s
Props 20,000 cases
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 389 filtered out; finished in 1.57s
Notes link tests
test result: ok. 17 passed; 0 failed; 0 ignored; 0 measured; 373 filtered out; finished in 1.53s
Notes rename tests
test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 374 filtered out; finished in 3.34s
Starting independent review of detached commit
46645ff9e7, based on0f3bc687cc. Scope: crates/notes/src/links.rs and its tests.Finding: the first fresh paired release run on the perf VM is within the +10% limit. Seven alternating samples with median timings measured 1 MiB note: 15.408 ms old, 2.529 ms new (-83.6%); 10,000 notes: 5.058 ms old, 5.429 ms new (+7.3%). I am repeating the paired run because the 10k result is close to the limit.
The repeat paired release runs also pass the +10% limit. Across three independent runs (each with seven alternating samples), the median of run medians was 15.228399 ms old vs 2.478995 ms new for the 1 MiB note (-83.7%), and 5.067291 ms old vs 5.157346 ms new for 10,000 notes (+1.8%). The current release test binary is built against the reviewed
46645ffscanner; the old path is the1eaa3f0scanner.Correctness finding: a 20,000-case randomized differential run matched complete Link records from the
1eaa3f0scanner outside pulldown-cmark code ranges, including byte spans and line numbers. The new scanner returned no links overlapping code ranges. Ten explicit cases passed for tabs, up to three spaces of indent, nested list and quote fences, CRLF, frontmatter, fences at the start and EOF, and indented code inside a list.Gate update: the default-profile
cargo test -p calternal-notesattempt on the perf VM ran out of space while linking example targets. I removed only the exact debug artifacts created by that attempt. The full release-profile notes suite passes (386 passed, 3 ignored), and the default-profile library suite passes (387 passed, 3 ignored). I am waiting on the required local build slot, which is reserved by the active shared train.Starting investigation on branch issue/tasks-backend. Current head is
46645ff9e7. Base for the reported train is origin/dev756596c958.Finding from the supplied bb2-a.log: 2 of 3 chromium-1440 repeats timed out at the Pin click; 1 passed. Playwright repeatedly reported the button unstable, then reported its parent .ra row intercepting pointer events, followed by the button becoming invisible. This points to row movement or swipe animation during the click; I am tracing the source before changing code.
Finding: the requested train-lane reproduction command completed with 3 of 3 chromium-1440 passes (6.5 s, 5.6 s, 5.5 s). This run did not reproduce the intermittent failure. I am instrumenting a further run to record list requests, live journal events, row mutations and animation lifetimes.
Finished independent review of issue #671.
Head SHA:
46645ff9e7Verdict: merge.
The 20,000-case randomized old-vs-new comparison matched all Link records outside code, including byte spans and line numbers. Ten explicit opener cases passed. No code links were returned.
Fresh paired release benchmark, three runs with seven alternating samples each; median of run medians: 1 MiB note 13.766674 ms old vs 3.095716 ms new (-77.5%); 10,000 notes 5.295844 ms old vs 5.293577 ms new (-0.0%). The 10k change is under the +10% limit.
Gate output:
cargo fmt --check
No output; exit 0.
cargo clippy -j4 --workspace --all-targets -- -D warnings
Finished
devprofile [unoptimized + debuginfo] target(s) in 1m 58sExit 0.
cargo test -j4 -p calternal-notes --quiet
test result: ok. 387 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 49.98s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Exit 0.
cargo test -j4 -p calternal-tasks --quiet
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.58s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Exit 0.
Findings: /home/kayg/codex-jobs/tasks671-fence-review2/findings.md. No commit, push, merge, or deploy was made.
Instrumented evidence from the first repeat: the Pin action succeeded, then the live socket sent notes.changed (seq 4) at 3.374 s and notes.saved (seq 5) at 4.078 s. Each event caused one notes.list request at the existing 250 ms debounce, at 3.625 s and 4.329 s respectively. That is two finite refreshes, not an unbounded list loop. The test then reached its Unpin click but timed out before a notes.pin request for unpin; I am narrowing that action race and recording the row animation state.
The instrumented reproduction completed 3 of 3 failures, all at the Unpin click after the Pin action and its two list refreshes had completed. In all three, the locator resolved the Unpin button, then Playwright reported the parent .ra intercepting pointer events and the button becoming invisible; no unpin request reached the server. This narrows the issue to the second swipe interaction, before the row action runs. I am checking whether waiting for the existing animation condition resolves it.
Root cause found: the e2e swipe helper waits only for ra-swiping to clear, which happens when the wheel gesture ends, before the row open spring finishes. Instrumentation measured 892 ms and 908 ms of active row/tray animations after the two swipes. Clicking in that window lets the row intercept the tray button, matching the Playwright log. Adding the condition-based
still(page)wait after each swipe produced 3 of 3 passes and showed no active animations before either click. The pin path generated exactly two notes.list refreshes, one after notes.changed and one after notes.saved; there was no repeating backend loop. I will make the test wait for settling and assert the refresh count is bounded.Cause found: this is an end-to-end timing race, not a Tasks backend update loop. On desktop, the swipe helper returns when the wheel gesture ends and the row loses its ra-swiping class. The tray's open spring continues for about 892 ms on pin and 908 ms on unpin, so Playwright can try to click while the row is still moving. The parent row then intercepts the click and the tray button disappears. Instrumentation showed one notes.changed, one notes.saved, and two list rereads after pin; there was no repeated list-message loop. Waiting for the row's actual settled state made the instrumented reproduction pass 3 of 3 runs.
The regression check now waits for the settled state before each tray click, waits for the saved event and following list reread, bounds each pin and unpin to at most two list reads, and checks the row returns to the list. It uses no fixed sleeps. No production backend changes were needed.
Head:
7b15a9b3a1Gates ran in the scratch worktree based on dev plus this branch, with a separate Cargo target. Output:
Pin test, five Chromium 1440 and five WebKit 1440 runs:
10 passed (2.0m)
Full swipe-rows suite, chromium-390:
2 skipped
24 passed (58.6s)
cargo test -j4 -p calternal-tasks:
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.84s
doc-tests calternal_tasks:
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
cargo test -j4 -p calternal-notes:
test result: ok. 387 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 27.17s
doc-tests calternal_notes:
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Landed in train BB, #674.
Train BB ran the full suite (run bb1, dev
756596c+ Tasks46645ff): 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 in7b15a9b(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.7b15a9bdiffers 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.Starting tasks.create on branch issue/tasks-create, base origin/dev
9485ccf459. Reading ADR 0066, its Calendar amendment, Composer call sites, and the existing room and journal pipeline before implementation. No PR will be opened.Findings from the implementation review:
CLAUDE.md is absent from this worktree and its ancestor directories. Following the explicit job instructions and the repository ADRs. tz follows the existing daily.open and Composer convention: a device UTC offset; absent means UTC. No external people action is performed; supplied people values are stored as a YAML text list.
Targeted action tests passed on the perf VM: create and byte-exact undo (LF and BOM/CRLF, old metadata and no trailing newline), linked-person titles, concurrent creates and name clashes, creation of a missing daily note, isolation, idempotent retry, and a 1 MB daily note. The controlled SIGKILL test also passed at the durable plan and each journal batch boundary, for create and undo with both existing and missing daily notes (11 child-process kills).
The shared local build slots are busy with the test train, so verification is proceeding on the perf VM under its lock. Its root filesystem became short of free space during compilation; further builds will use this job's own target directory on /mnt/z4-hdd, which has ample space. No other job's files or processes are being removed.
A further undo review found that putting a capture directly in a newly created daily note's seed would retain the capture if later prose prevented deletion of that daily note. The new-daily plan now creates the daily note separately and records an append whose exact inverse can be recovered from its durable history update after a crash. Undo removes the capture first, then removes the daily note only if its original content is back. Added a regression for later prose surviving while the capture disappears.
A task description can contain an H1. The generic note title rules would otherwise replace the given task title or schedule a rename after that description heading. Task properties now remain authoritative for the initial title; actual later heading edits still use the existing title-sync path. Added coverage for the description body staying exact through save.
The first wider notes run reported two missing JavaScript integration helpers in the copied remote source tree. Copied the editor integration sources and installed their three pinned runtime dependencies in this job's separate external dependency directory before rerunning. These were verification setup failures; no product change was needed for them.
The revised capture and undo tests pass, including task descriptions with their own H1, daily notes with later prose, and controlled SIGKILL at the plan and each journal batch boundary. The first verification pass has passed cargo fmt --check and workspace Clippy with warnings denied; the workspace suite is running on the perf VM.
The generated contract now includes tasks.create with title, body, scheduled, due, repeat, priority, tags, people and tz, and the web TypeScript bindings have been regenerated and checked. Final title review keeps every typed byte outside a link, reducing only the links to labels; inline code and emphasis now have a regression test too.
The workspace run exposed one more remote test dependency: packages/editor/src/sync/status.ts imports @codemirror/state. Both real SyncClient tests failed with “Cannot find module '@codemirror/state'”; the other 395 notes tests passed. Installed the pinned @codemirror/state 6.7.6 in the job's external dependency directory. The restarted gate script checks those two exact integration tests first, then runs the full workspace and repetitions. No repository dependency files were changed for this setup fix.
Committed the implementation as 23f95f51d354e6178daf244280f56dbfe91c1d13 on issue/tasks-create. Verified SHA-256 equality between that commit and all 20 Rust/contract files used by the remote gate run; the generated web bindings passed their local generator check. No evidence files are in the commit.
Completed gate output so far, verbatim:
Each tasks run reports:
The notes crash repetitions are running next, including the new capture/undo journal-step SIGKILL test, the existing notes crash unit tests, and both server notes_crash integration suites. Isolation and the perf VM create measurement remain pending. Nothing has been pushed yet.
All six correctness gates passed on the initial head, but the perf harness exposed a real recreation bug before it could produce a timing result. On the second create/undo cycle of a previously absent daily note, the retained history conflicts with reusing its fixed day id:
Undo correctly removes the daily file while retaining history. The next incarnation now gets a fresh note id if that day's fixed id already has history; daily.open continues to find it by its usual date path. Adding a regression that repeats create/undo in the same Home and again after restart. Cleaning only the two fixture files created by this failed perf attempt, after checking their exact identities and content, then rerunning all gates and the benchmark. No branch has been pushed.
The full filesystem-completion measurement on the intermediate head was:
ADR 0066 says the job plan is durable before the action answers; its file steps then run through the existing job pipeline. The action now acknowledges that durable plan and the Home owns its background execution across request disconnects. Planning stays serialized with execution to protect name allocation. Immediate notes.undo waits for a running capture, then reverses it, so the Composer's Undo works without a client race.
Also checked the web journal: it retains the derived day id. Replaced the intermediate fresh-id workaround with reuse of the empty daily CRDT/history, preserving the same day identity after Undo and restart. It also handles the never-written daily.open placeholder used by the web app. Old prose is never resurrected from a deleted daily file.
All ten targeted capture tests passed, including repeated create/undo after restart and immediate Undo from a daily placeholder. Rerunning the crash tests, acknowledgement measurement and full gates before pushing. The first failed benchmark's two files were removed only after exact identity/content checks; its original fixture bytes are restored.
Finished tasks.create on issue/tasks-create. Pushed head
15032d55c5; base origin/dev was9485ccf459. No PR was opened, and the issue remains open.The action creates a task note with typed properties and its description, keeps the typed checkbox text and person links, adds an anchored linked child bullet, and writes the quoted from backlink. Undo restores the daily bytes and removes the task; it keeps later prose. Repeated create/undo preserves today's derived note id, including after restart and with a never-written daily placeholder. The existing describe transaction maintains the task index for the caller's Home. Contracts and generated web bindings are updated.
Creation acknowledges the durable job plan, as ADR 0066 specifies. The Home completes the file steps even if the request disconnects; notes.job reports completion. Immediate notes.undo waits for the capture and then reverses it.
All gates ran on the perf VM under flock -o /root/perf-vm.lock, with cargo -j4. The remote Rust/contract source was checked against this commit, and generated web bindings were checked locally. The fixture contains 100,000 base notes plus 100,000 task notes, with user files on /mnt/b/hdd-ext4 and app data on the VM SSD. The measurement uses 20 warmups and 200 samples through the action pipeline before network time; each sample's Undo completes before the next create. The measured interval is the durable acknowledgement. Earlier findings in this issue record the initial setup failures, the daily-recreation bug, and the full-file-completion diagnostic.
Gate output, verbatim:
Workspace result lines, verbatim:
Tasks crate result lines for rounds 1–10, verbatim:
Capture SIGKILL, notes crash unit, and server crash result lines for rounds 1–10, verbatim:
Isolation result lines, verbatim:
Perf output, verbatim:
Independent tasks.create review started. Reviewing issue/tasks-create, detached head
15032d55c5, against origin/dev merge base9485ccf459. No commits, pushes, merges or deployments. Findings and gate output will follow.Review status: the diff and overriding Calendar amendment are read. Local gates are queued through the required build-slot script, which is waiting for the active shared train. No slot bypass or unrelated process termination. Static review has identified link-destination and undo-deletion paths for independent runtime probes; these are not yet reported as confirmed findings. Repository unchanged.
Independent review finding (source evidence; runtime probe is still queued): undo has an unguarded deletion window for a newly created daily note. In crates/notes/src/bulk/steps.rs, delete reads the room snapshot and history at lines 294–305, then awaits Flush at line 310, then calls remove_file at lines 313–315. Neither the file's current bytes nor the note version is checked at removal. An outside edit arriving after that check can therefore be removed. The per-Home job lock does not block outside writes or room edits. This path is now used when tasks.create made today's daily note and Undo removes it after the capture splice. The contract requires refusing or keeping the later edit. The prepared independent probe will pause only its own process immediately before unlink, fsync an outside edit from the parent, and resume to verify the consequence. No repository edits.
Independent review finding (source evidence; runtime probe queued): accepted titles can produce a child bullet that does not point to the task note. crates/notes/src/capture.rs lines 79–82 pass the literal filename to links::format, which wraps it in angle brackets without escaping. For title
Fix #123, the task path isTasks/Fix #123.mdand the bullet is- [Fix #123](<Tasks/Fix #123.md>). links::find splits the destination at #, so the path becomesTasks/Fixand is rejected as not ending in .md. For titleBuy > milk, the first > terminates the angle destination early and the bullet is not parsed. The task file can be created while its parent remains Untracked and the promised link is broken. The new escape_label also emits escaped brackets, but the existing matching_bracket reader counts escaped brackets:Call [Ammais another unroundtrippable label. New captures need filenames and emitted links that both CommonMark and the note-link reader can round-trip. These strings are accepted by create::capture's current title validation.Independent review finding (source evidence; runtime probe queued): name selection misses outside files that the index has not seen and whose case differs. In crates/notes/src/capture.rs lines 59–61, unique_md_name invokes the callback with a folded lowercase name (crates/fsio/src/names.rs), then the callback tests that folded spelling with Path::exists. On this case-sensitive host, an existing
Tasks/MiXeD.mdis not detected by a test forTasks/mixed.md. With the watcher delayed, titleMixedcan therefore createTasks/Mixed.mdalongside it; an exactTasks/Mixed.mdinstead causes the later create step to fail rather than choosingMixed 2.md. Both violate the case-insensitive naming rule. The normal notes.create allocator folds directory entries before comparing, but the new capture fast path only checks a literal candidate spelling. The independent probe writes these files after the startup scan and before invoking tasks.create, matching a delayed watcher.Execution is blocked by the active local train (PID 3480, trainpar.sh bk1); the required build-slot wrapper has been waiting for more than 40 minutes before the first gate. No slot bypass or unrelated process termination. Both permitted remote fallbacks were checked read-only: the perf VM has only 188 MB free, and staging has no existing Rust toolchain in standard locations. No remote files or services were changed. The three source findings are already posted. The report currently says do not merge because of the undo deletion window, with all unrun gates explicitly pending. Review execution is continuing unattended as soon as the slot opens.
Started fixes for #671 on branch issue/tasks-create at
15032d55c5. Merging origin/dev3fc4f6b7d3first, without rebase. Merge has conflicts in shared notes code; resolving while retaining tasks.create and the contacts undo protection. All local heavy gates will run serially through the required build slot.Confirmed all three review findings in source. Capture used the old Get/Flush/unlink path instead of dev’s DeleteCreated actor request; capture naming checked Tasks/ literally; links::format emitted # and > literally. The merge now routes create undo through the dev actor path and both created-note deletion and capture-line removal use one version/history guard inside the actor turn. Conditional removal captures the file under a private name and checks its bytes before unlinking, preserving outside replacements. Tests cover an outside daily write after the final delete check, random acknowledged edits across create/import/delete undo, link title round trips, and unindexed MiXeD.md/Mixed.md collisions. Validation is on the locked perf VM because the local build train is queued and the local disk has about 2.5 GB free. This is not a gate pass yet.
Focused validation evidence: conditional file removal passed its outside-replacement test; generated reserved destinations and the random title round-trip test passed; the random create/import/delete undo test and the write-after-final-delete-check regression passed; capture allocation and capture kill-9 recovery passed. The tasks crate passed all 40 tests, including removing capture lines beside later prose and recreating a daily note after repeated Undo. The shared guard also covers destructive ordinary bulk-edit inverses: it compares recorded characters at CRDT-relative positions, while created-note deletion and history purge compare the recorded version. Changed spans are kept and the report includes summary.partial and summary.kept. Empty daily notes keep their stable identity and history rather than being marked permanently gone. Current full-run output so far:
Workspace tests and the remaining requested gates are still running on the perf VM under flock. No gate still running is counted as passed.
The first full workspace run caught a merge regression in tests::renames::cancelled_prepared_import_drops_its_private_image_and_replays_the_plan:
Cause: splitting bulk::drive for capture planning moved dev’s PendingImage cleanup guard after the job-lock wait. A cancelled waiter never constructed the guard. Both entry points now construct their own cleanup guard before entering a shared inner runner; ordinary drive constructs it before awaiting the job lock, preserving dev’s cancellation behavior. Running the existing regression and the undo regressions before restarting all requested gates. The random undo test now also pauses a delete undo after restore and edits the note before undo progress is committed; its test dates are distinct from the other global pause hooks.
The final-tree full workspace run passed after restoring the import cancellation cleanup guard. The targeted existing cancellation regression also passed (1 passed, 0 failed), and the undo-guard group passed (3 passed, 0 failed). Verbatim completed gate lines:
The repeated tasks/contacts/crash suites, both 10,000-case property runs and the tasks.create performance gate are now running serially under the perf VM lock. No merge, deployment or issue closure has been performed.
All correctness gates have passed for committed head
36bc2344de. Verbatim completed summary lines:Undo property test output:
The release build for the tasks.create performance gate is now running under the perf VM lock. The performance gate is not yet counted as passed. The commit has parents
15032d55c5and origin/dev3fc4f6b7d3; all 109 changed files on the validation VM match the committed files by SHA-256.Performance finding after all correctness gates passed: the first allocation fix exceeded the tasks.create budget. Verbatim gate output:
The fixture has 100,000 entries in Tasks. A separate locked 30-run directory probe measured collecting all folded names at p50 50.746 ms, p95 56.029 ms. Filtering by the candidate prefix with std::fs::read_dir still took p50 34.663 ms, p95 36.544 ms, leaving too little budget for the durable action. The directory read must remain current and case-insensitive; a cache that silently skips outside additions is not acceptable. I am replacing per-entry allocation with a borrowed Linux getdents buffer and retaining only the candidate stem family, with the existing portable directory iterator as a fallback. The case, Unicode normalization and numbered-suffix collision tests are being run before remeasuring. This changes no naming rule and does not trust the index for unindexed files.
The directory allocation correction passed the full performance probe:
The name view uses its own synchronous kernel event drain under the allocation lock, not the delayed notes index or its watcher. It checks changed names on disk, including atomic replacements and exchanges. A lost queue or replaced directory rebuilds the snapshot. Unsupported filesystems use a fresh directory read instead. Tests passed for immediate outside additions with the notes watcher disabled, duplicate case forms, Unicode NFC/NFD names, atomic replacement and exchange, directory replacement, a real full kernel event queue, and 256 random outside directory operations compared against the actual directory.
Committed follow-up head
0f496271e7on top of merge36bc2344de. The final full gate train is running again on this source, including both 10,000-case property tests and a fresh-state performance run. Its formatting and strict Clippy gates have passed. No branch has been pushed yet.Final guard audit finding: the byte-restoration exception was too broad for ordinary creations. If an imported note at a daily path received a capture and that capture was undone, its bytes could equal its original seed while its history still contained acknowledged capture updates. The prior shared guard accepted any later preserve-metadata job updates when the seed bytes matched; ordinary creation deletion would then purge those later updates. The exception is now limited to derived daily identities, whose history is explicitly retained during deletion. Every ordinary creation keeps its file and history when any later non-server update exists, including an undone job. Added a regression that imports a dated note, captures into it, undoes the capture back to the exact original text, then undoes the import and verifies a partial undo with all history retained. This check is queued with a final formatting, strict Clippy and full workspace pass after the already-running train. The repeated suites and performance run are still ahead in that train and will compile the stricter guard.
Finished the review fixes for #671 on issue/tasks-create.
Pushed head
7b611f39a7. The branch includes the merge of origin/dev3fc4f6b7d3without rebase.Destructive bulk undo now uses one shared guard inside the room turn: it checks the recorded version for file deletion and history purge, and the recorded characters for text removal. Later edits are kept and reported as a partial undo. Conditional file removal checks the captured bytes and preserves outside replacements. Empty daily notes retain their stable identity and history for the next capture. Import cleanup still starts before waiting for the job lock.
Generated link destinations encode reserved characters, and parsing separates the fragment before decoding. Labels are escaped once. Capture naming checks a directory view under the allocation lock, including files the index has not seen. On native Linux filesystems it drains kernel entry events synchronously and checks changed names on disk. Overflow and directory replacement rebuild the view; unsupported filesystems and platforms scan the directory. This preserves the naming rule without scanning 100,000 entries on every capture. Tests cover both exact and case-only outside collisions on this case-sensitive host.
The random undo test covers create, import and delete jobs, edits inside capture text, ordinary appended edits, outside edits, and edits during restore before undo progress is committed. A separate regression verifies that an ordinary imported note retains later capture history even after that capture was undone back to its original bytes. Both new property tests ran with PROPTEST_CASES=10000.
All heavy validation ran serially on root@10.69.69.63 under flock -o /root/perf-vm.lock, with stdin from /dev/null and cargo -j4. Local validation was moved there because the local build train was queued and the local disk had about 2.5 GB free. The tested changed files were compared with the committed source by SHA-256. Temporary source and state files from this run were removed after saving the gate evidence outside the repository. The existing shared build cache was retained.
Verbatim gate output:
No PR was merged or deployed. The issue remains open.
Independent re-review started in detached worktree calternal-wt-tcrev (no branch), base/head
7b611f39a7. Re-running the three earlier reproductions, undo/edit and contact crash variants, and the requested gates. No commits, pushes, merges or deploys.Validation is queued by the required local build-slot wrapper behind live train bk2 (PID 1678920). The runner is waiting at cargo fmt --check; no gate is counted as passed yet. Source review and independent probe preparation continue. No shared processes have been stopped and no repository files have been changed.
Source finding pending runtime confirmation: creation undo checks only text updates in bulk/guard.rs:49–54. room/edit.rs:185–191 explicitly records a changed companion with the current text version when the text does not change. room/delete.rs:41–44 then purges ordinary creations and their companions. Thus a later acknowledged vCard-only update can be absent from the guard’s input. The existing companion precondition in bulk/mod.rs applies to undo Step::Edit, not Step::Delete from an import. Independent high-level probes add X-REVIEW and REV fields through contacts.update, verify contacts.read(original), and undo the import. Local compilation remains queued by the live train; this comment does not claim a runtime reproduction yet.
Second source concern pending runtime confirmation: fsio::remove_unless_changed moves the original inode aside, reads/checks it at crates/fsio/src/lib.rs:680–681, then unlinks it at line 689. An outside writer that opened the original file before the move can append and fsync through that descriptor between those operations. Moving the name protects replacement files, but does not exclude writes to the held inode. The independent preload probe opens the descriptor before undo and pauses only its own child at unlink of the private delete file. It will compare that case with a public-path replacement. Both are queued with the required serial validation; no runtime result is claimed yet.
The local runner stayed queued behind train bk2 without executing a heavy command. Using the job’s explicit perf-VM allowance, I stopped only my two recorded queue PIDs and moved validation to root@10.69.69.63. All 1,132 tracked source files match detached head
7b611f39a7by SHA-256. The remote run holds flock -o /root/perf-vm.lock and uses the exact requested source and CARGO_TARGET_DIR absolute paths plus the requested build-slot wrapper, cargo -j4, and one command at a time. CARGO_INCREMENTAL=0 limits disk usage. The VM has 15 GB free; its toolchain is cargo/rustc 1.98.1 (local is 1.99.0). Independent probes run first, followed by every requested gate and 10 extra notes kill9/capture repeats so no crash-test filter omits the capture journal test. No existing remote source or cache was overwritten, and no shared process was stopped.P1 runtime confirmation: import undo purges an acknowledged vCard-only update
An imported contact was updated through contacts.update, and contacts.read(version=original) confirmed the new field before undo. Both X-REVIEW:changed and REV:20261023T190000Z were accepted with changed=true while note text and version stayed identical (version 1). Undo then deleted the contact and its entire history, with no partial-undo report. This confirms the source gap in the shared text-history guard and means #680’s acknowledged-edit guarantee does not cover companion-only changes. The same source pattern exists in merged dev; this is not attributed as a newly introduced regression. Exact independent probe output follows.
OPAQUE-RESULT field="X-REVIEW:changed" update={"changed":true,"id":"67e969db-eff5-8361-b946-2cb973fa08ec","path":"Contacts/Opaque.md"} text_equal=true before_v=1 after_v=1 history_retained=false undo={"done":1,"error":null,"job":"ea279b13064729c9588ec5047cd7c5d9-undo","kind":"undo","notes":["67e969db-eff5-8361-b946-2cb973fa08ec"],"state":"done","steps":1,"summary":{"of":"contact-import","undoes":"ea279b13064729c9588ec5047cd7c5d9"}}
OPAQUE-RESULT field="REV:20261023T190000Z" update={"changed":true,"id":"1a6e7409-5957-8adb-b283-e4ac5a467c95","path":"Contacts/Opaque.md"} text_equal=true before_v=1 after_v=1 history_retained=false undo={"done":1,"error":null,"job":"ec820132ad60efafe1cd36168fd894c5-undo","kind":"undo","notes":["1a6e7409-5957-8adb-b283-e4ac5a467c95"],"state":"done","steps":1,"summary":{"of":"contact-import","undoes":"ec820132ad60efafe1cd36168fd894c5"}}
P1 runtime confirmation: undo still loses a durable write through an already-open file descriptor
The parent opened the daily file before undo. The child paused only at unlink of its private .calternal-tmp-delete daily file, after the last byte check. The parent appended through its existing descriptor, flushed, and fsynced before release. Undo completed without a partial report, the daily file stayed absent after shutdown, and the inode link count became zero. By contrast, writing a replacement at the public filename at the same pause preserved it and reported partial undo. Moving the inode aside closes the public-name replacement race, but not the original-inode write race. Exact output follows.
Started own child PID 2617031 mode public-path
RACE-TARGET /home/kayg/codex-jobs/tasks-create-review2/probe-data/2617031-daily-unlink-race/users/51de68c9-dd2f-430a-aad8-3452de434b6b/Notes/2026-10-23.md
REVIEW-UNLINK-PAUSED /home/kayg/codex-jobs/tasks-create-review2/probe-data/2617031-daily-unlink-race/users/51de68c9-dd2f-430a-aad8-3452de434b6b/Notes/.calternal-tmp-delete-2026-10-23.md
Outside writer fsynced marker; public_exists= True
RACE-RESULT daily_exists=true undo={"done":3,"error":null,"job":"tasks-create:01a169e6-f37b-77ce-83c7-546a98b9246e-undo","kind":"undo","notes":["01a169e6-f399-7079-a105-aef744da2455","day-2026-10-23"],"state":"done","steps":3,"summary":{"kept":["2026-10-23"],"of":"tasks-create","partial":true,"undoes":"tasks-create:01a169e6-f37b-77ce-83c7-546a98b9246e"}} root="/home/kayg/codex-jobs/tasks-create-review2/probe-data/2617031-daily-unlink-race"
RACE-AFTER-SHUTDOWN daily_exists=true
Outside writer inode links after child: 1
Race completed mode= public-path exit= 0 pauses= 1 public_exists= True
Started own child PID 2617042 mode open-fd
RACE-TARGET /home/kayg/codex-jobs/tasks-create-review2/probe-data/2617042-daily-unlink-race/users/963d25b0-d85e-493f-8dcc-5150e0618a30/Notes/2026-10-23.md
REVIEW-UNLINK-PAUSED /home/kayg/codex-jobs/tasks-create-review2/probe-data/2617042-daily-unlink-race/users/963d25b0-d85e-493f-8dcc-5150e0618a30/Notes/.calternal-tmp-delete-2026-10-23.md
Outside writer fsynced marker; public_exists= False
RACE-RESULT daily_exists=false undo={"done":3,"error":null,"job":"tasks-create:01a169e6-f590-7151-89c2-3d09efab46a4-undo","kind":"undo","notes":["01a169e6-f5af-77ef-b622-7b69bef52d86","day-2026-10-23"],"state":"done","steps":3,"summary":{"of":"tasks-create","undoes":"tasks-create:01a169e6-f590-7151-89c2-3d09efab46a4"}} root="/home/kayg/codex-jobs/tasks-create-review2/probe-data/2617042-daily-unlink-race"
RACE-AFTER-SHUTDOWN daily_exists=false
Outside writer inode links after child: 0
Race completed mode= open-fd exit= 0 pauses= 1 public_exists= False
Resolved cases confirmed on the exact reviewed source: generated links for #, ?, %, <, >, spaces, emoji and escaped brackets resolve through the backend link reader and identity lookup and follow the actual rename job. The frontend resolver also resolves every requested character category. Unindexed exact/case-only and NFC/NFD outside collisions allocate Mixed 2.md or Café 2.md with the original outside name still present. Independent undo/append stress preserved acknowledged edits in 100 attempts. All tested capture undo steps, three import note deletions, and restore-before-progress keep acknowledged edits; queued edits at checked/intended/unlinked deletion boundaries are refused. These passes do not cover the two separately confirmed P1 losses.
Verbatim link/rename output:
Formatting and strict Clippy have passed; the full workspace gate is now running.
Fresh workspace gate failure on the perf VM (source unchanged): cargo test --workspace exited 101 in the attachments integration crash test while writing the initial upload body, before the intended kill. Formatting, strict Clippy, and the first four tasks repeats have passed. I will preserve this failure and run a targeted repeat before one workspace retry after the requested serial suites. No product fix is being made.
Verbatim failure:
Starting the shared undo invariant fix on issue/tasks-create, base
7b611f39a7. Both reproduced P1 findings are being addressed: card-only changes must prevent removal, and removal must retain the inode and history in the 30-day Trash. Gates and evidence will be posted here.Finding: card-only changes previously had no history journal entry. The new regression tests import a contact, acknowledge X-REVIEW or REV changes with identical text, then undo the import. Both now pass: the journal position advances, undo is partial, and the edited card remains live. Initial focused run also exposed five old tests that require import undo to release storage or remove card copies immediately. Those expectations conflict with 30-day Trash retention and are being changed to assert retention until permanent Trash removal. Failed import retries also need to ignore their rolled-back Trash copies for duplicate matching while retaining the copies.
Finding from tracing the open-descriptor invariant: a daily capture undo saves its splice before removing the daily file. The save itself exchanges and unlinks the earlier inode in fsio/swap.rs::after_swap, so changing deletion alone leaves a writer opened before undo exposed. Shared undo saves now retain displaced inodes as separate entries in the existing 30-day Trash. Each entry records the undo job and source note. A new permanent regression opens the daily file before the entire undo and fsyncs outside bytes after completion; the bytes must be restorable through the normal Trash restore operation. The generated whole-note undo test now includes daily captures as well as task files, import and delete jobs.
Recovery audit finding: the old best-effort keep_outside helper logs failures and returns no result. A recovery path that uses it and then clears the deletion intent could leave history without a restorable Trash file if the Trash cannot be written. The undo-specific reconstruction now propagates errors and keeps the intent until reconstruction succeeds. A permanent test blocks the Trash with a file, checks that the intent and history survive the error, removes the obstruction, retries recovery and restores the acknowledged text. Undo plans also retain the original Create path for prepared histories whose file was never published. Current gate run has passed formatting and strict Clippy; a final run will include these recovery additions.
Workspace finding with evidence: tests::correctness::acknowledged_edit_between_undo_preparation_and_deletion_survives reported "quota counter must match a full recount", maintained 517 bytes versus recount 804 bytes. The 287-byte difference comes from the new Trash metadata written through std::fs::write without usage notification. Trash details now use calternal_fsio::write_atomic, which accounts for them and persists the undo job durably. Existing crash and partial-import tests also required purging history immediately; they now assert that rollback and crash recovery retain their histories and cards, that normal restore works, and that only permanent Trash removal releases those bytes. I stopped only recorded processes from my own obsolete gate run and am restarting validation on this final change.
Performance-path finding from source inspection: generic Trash restore builds a complete read_dir HashSet for the destination directory on every restore. The new safe daily-note reuse path invokes restore during repeated tasks.create, so a 100,000-note Home would pay that scan on each capture. Restore allocation now uses the existing DirectoryNames kernel-event cache on a blocking worker, separately from the task-name cache. A permanent regression warms the cache, creates unindexed case-only and NFC/NFD outside collisions with the general watcher disabled, then checks that restore allocates a different name and preserves the outside bytes. This is a source-level finding; the final VM gate will supply the measurement. The prior code passed the full workspace, tasks 5 times and contacts 5 times. All required gates are being rerun for this allocation change.
Legacy-history regression evidence: the initial backfill predicate counted only duplicate companion seq values. The added fixture puts an old card-only edit at a later server bookkeeping seq instead. With the initial predicate, the test failed with journal length 2 versus expected 3; with the conservative multi-row backfill, it passes. Choice for ambiguous old histories: retain them and report partial undo rather than infer that no companion mutation happened. New mutations always get their own whole-note journal position. The source is committed at e4a75a39c2d3d336aa7bbcd48f13186a18c78ffd and again matches all 1,133 VM source files. Full gates are running on that exact source.
Reproduced recovery finding: after journaling an undo and its pending save, but before moving the file, the restarted room can flush through an ordinary save. The new regression keeps an outside descriptor open across exactly that durable state. With recovery retention disabled, the outside append and fsync succeeded, then the test failed because writer.metadata().nlink() was zero. With recovery retention enabled, it passes and the outside bytes restore through the normal Trash action. Recovery now retains displaced inodes until its first successful flush, using the durable history author for attribution. A changed outside file kept after the deletion guard is also flushed while the undo retention scope is still active. The test name includes crash, so every requested crash repeat includes it. The prior whole-note property completed all 10,000 cases successfully in 343.05 seconds. Final gates are restarting for head
02c762ace5, verified against all 1,133 VM source files.Finished the shared undo retention change on
issue/tasks-create.Head: 02c762ace5fa65f6a4e4906887161e0b0fc8b4bc.
Destructive undo moves files into the existing 30-day Trash and keeps their history and companions. Companion-only changes now advance the whole-note journal. Undo saves also retain displaced inodes before publishing replacements, so writes through already-open descriptors remain restorable. Recovered pending writes retain their displaced inodes after restart too, and recovery keeps its intent when retention fails. Trash metadata is counted in storage, and failed-import retries retain their rollback histories without treating them as live duplicates. Restore allocation uses the existing kernel-watched name cache.
Permanent tests cover both reported reproductions, a descriptor opened before the entire daily undo, recovery with an unavailable Trash, attachment references, legacy card-only history, and outside name collisions after the restore cache is warm. The generated whole-note test mixes text, card-only, frontmatter and open-descriptor outside writes around create, import and delete undo. Both undo properties ran at 10,000 cases.
All gates ran serially on the perf VM under
/root/perf-vm.lock. The tested source was checked against all 1,133 local source files with zero hash mismatches. The performance fixture and state were cleaned after the run. Evidence stays outside the repository; the commit contains product code, tests and a lasting ADR.Verbatim gate output:
Verbatim performance output, including the measured samples:
Starting independent undo/Trash review for #671 and #657. Worktree is detached (no branch), base
7b611f3, review head02c762ace5. No commits, pushes, merges or deployments. Required gates will run serially through /home/kayg/Developer/calternal-ops/build-slot.sh with the requested target directory. Evidence stays outside the repository.Review update: cargo fmt --check and strict workspace/all-targets Clippy passed at
02c762ace5. Workspace tests are running serially, followed by the requested repetitions. Independent external probes are prepared for 28 edit-between-steps cases (text, card-only, frontmatter, attachment), late open-descriptor writes and restore, expiry/empty, and tasks.create response timing. Correctness verdict remains pending.Finding verified by the workspace test run: the earlier card-only import-undo regression now passes for both X-REVIEW and REV. The test checks unchanged text, an advanced whole-note journal version, partial undo, the live contact path, exact retained card bytes, and retained history. Verbatim output:
Workspace tests and remaining gates are still running; independent probe results and final verdict are pending.
Workspace gate passed at
02c762ace5: 1,188 tests passed, 8 explicitly ignored, zero failed. The earlier open-descriptor data-loss scenario now passes; restore also recovers bytes written after undo, including a descriptor displaced by daily splice and a pending undo save recovered after restart. Verbatim regression output:The independent probes and repeated gates remain pending.
Starting work on branch
issue/tasks-createfrom base SHA02c762ace5fa65f6a4e4906887161e0b0fc8b4bc. I am tracing the action request-key derivation and every server/web path that turns note text into visible strings.Finding: the engine claims and stores mutating calls by the raw request key (
crates/engine/src/execute.rs,claimandOwned::run), but hashes the action name with the input. The same key ondaily.openandtasks.createtherefore conflicts instead of identifying two different actions.tasks.createderives its capture job from the request key (crates/tasks/src/lib.rs), so I am also scoping the key passed through the action context to keep its retry and downstream edit keys consistent.Independent review complete at head
02c762ace5fa65f6a4e4906887161e0b0fc8b4bc, diff7b611f3..02c762a. Final verdict: merge.Both earlier data-loss cases now preserve work. All 28 independent edit-between-steps cases passed for text, card, frontmatter and attachments. Restoring imported contacts, tasks and displaced daily files recovered writes made through descriptors opened before undo; the original contact card survived. Expiry removed the old undo entry and history, kept recent normal deletion, and empty Trash removed the rest. Ten tasks.create responses took 10.498–36.808 ms with successful immediate undo.
All required gates passed: fmt, strict Clippy, workspace (1,188 passed; 8 ignored), tasks 5/5, contacts plus contacts-actions 5/5, notes crash 10/10. Additional notes kill9 10/10 passed. No product changes, commits, pushes or deployments. The external matrix harness had one setup compile error, corrected before its full successful run.
Full findings and complete verbatim gate logs:
/home/kayg/codex-jobs/tasks-create-review3/findings.md.Verbatim independent evidence and gate result lines
cargo fmt --check(fmt), exit 0.No output.
cargo clippy -j4 --workspace --all-targets -- -D warnings(clippy), exit 0.cargo test -j4 --workspace(workspace), exit 0.cargo test -j4 -p calternal-tasks(tasks-1), exit 0.cargo test -j4 -p calternal-tasks(tasks-2), exit 0.cargo test -j4 -p calternal-tasks(tasks-3), exit 0.cargo test -j4 -p calternal-tasks(tasks-4), exit 0.cargo test -j4 -p calternal-tasks(tasks-5), exit 0.cargo test -j4 -p calternal-contacts -p calternal-contacts-actions(contacts-1), exit 0.cargo test -j4 -p calternal-contacts -p calternal-contacts-actions(contacts-2), exit 0.cargo test -j4 -p calternal-contacts -p calternal-contacts-actions(contacts-3), exit 0.cargo test -j4 -p calternal-contacts -p calternal-contacts-actions(contacts-4), exit 0.cargo test -j4 -p calternal-contacts -p calternal-contacts-actions(contacts-5), exit 0.cargo test -j4 -p calternal-notes crash(notes-crash-1), exit 0.cargo test -j4 -p calternal-notes crash(notes-crash-2), exit 0.cargo test -j4 -p calternal-notes crash(notes-crash-3), exit 0.cargo test -j4 -p calternal-notes crash(notes-crash-4), exit 0.cargo test -j4 -p calternal-notes crash(notes-crash-5), exit 0.cargo test -j4 -p calternal-notes crash(notes-crash-6), exit 0.cargo test -j4 -p calternal-notes crash(notes-crash-7), exit 0.cargo test -j4 -p calternal-notes crash(notes-crash-8), exit 0.cargo test -j4 -p calternal-notes crash(notes-crash-9), exit 0.cargo test -j4 -p calternal-notes crash(notes-crash-10), exit 0.cargo test -j4 -p calternal-notes kill9(notes-kill9-1), exit 0.cargo test -j4 -p calternal-notes kill9(notes-kill9-2), exit 0.cargo test -j4 -p calternal-notes kill9(notes-kill9-3), exit 0.cargo test -j4 -p calternal-notes kill9(notes-kill9-4), exit 0.cargo test -j4 -p calternal-notes kill9(notes-kill9-5), exit 0.cargo test -j4 -p calternal-notes kill9(notes-kill9-6), exit 0.cargo test -j4 -p calternal-notes kill9(notes-kill9-7), exit 0.cargo test -j4 -p calternal-notes kill9(notes-kill9-8), exit 0.cargo test -j4 -p calternal-notes kill9(notes-kill9-9), exit 0.cargo test -j4 -p calternal-notes kill9(notes-kill9-10), exit 0.Finding: task capture currently formats markers as
^task-plus a UUID (crates/notes/src/capture.rs), outside ADR 0068’s 16 character lowercase Crockford format. Visible text also escapes today: list/search cleaning incrates/notes/src/search.rsdoes not remove IDs, backlink snippets return raw lines (crates/notes/src/backlinks.rs), and the web editor’s source mode and clipboard use the raw document. I found no shared block ID allocator in the current branch, so I will add a compact Crockford allocator and shared visibility filters for server responses and web display/copy paths; old marker parsing will remain lenient.Finding: apps/web/src/lib/editing.svelte.ts generated block links with Math.random().toString(36).slice(2, 8), so that path also wrote markers outside ADR 0068. The web editor also had separate preview, search, clipboard, title, and toast paths that could surface markers. I am routing these through one frontend sanitizer and updating the browser marker generator.
Scope note: I checked the tracked apps/web/src files on issue/tasks-create and there is no Composer component or Composer source path in this checkout. The current branch's notification path is now sanitized at the shared toast boundary; I will report the missing Composer source alongside the finished gates rather than pulling in an unrelated feature branch.
Gate blocker: the required build-slot wrapper is queued behind the host's active build train, so the formatting pass has not started yet. I have not interrupted the train and will continue the gates when the slot is released.
Finding:
cargo test --workspace -j4showed 10calternalisolation tests failing during attachment or backdrop uploads with 404 responses. The engine now passes an action scoped key to handlers, but the attachment route stages uploads under the raw request key andattachments.adduses the handler key to find them. I’m adding a separate raw request key for this correlation path while keeping action scoped keys for receipts and jobs, then I’ll rerun the gates.Follow up: after preserving the raw key only for adapter staging, the workspace rerun reached the contacts tests and found two direct service retry checks still passing raw keys where the action handler now uses an action scoped key. I added a shared
action_keyhelper and updated those tests to use the same scoped identity. The attachment isolation tests pass with the separate raw request key.Follow up: after updating the contacts retry checks, the workspace run reached the engine suite and found the new action scoping test incrementing the same global
t.slowcounter used by a parallel deduplication test. The key scoping assertions themselves passed. I changed the cross action test to uset.pause, which does not share that counter, and am rerunning the gates.Finding: the workspace run showed
crates/notes/src/tests/undo_guard.rsstill searching for the oldCapture ^task-marker. The new spec format is^followed by a 16 character Crockford ID, so I changed the test to anchor onCapture ^. The same parallel run also had three notes startup/history tests fail; I’m rerunning after this compatibility expectation fix to see whether those reproduce.Finding: the isolated
upgrading_without_a_saved_scan_announces_nothing_for_known_notestest consistently emitted onenotes.changedevent per existing note. The cause was reusing the new search cache version suffix in the list metadata stamp, so every note looked stale on reopen. I’m separating the search index stamp from the list stamp so search cache refreshes do not create note change events.Finding: the search reindex version was also being stored as each note list row stamp.
sync_meta_innercompares those rows with the unversioned file stamp, so reopening a home treated every note as changed; the isolatedupgrading_without_a_saved_scan_announces_nothing_for_known_notestest reproduced 50notes.changedevents. I separated the search index stamp from the list metadata stamp; the search index still gets a versioned stamp for marker cleanup reindexing.Finding: the workspace gate had one failure in
kill_nine_never_loses_or_doubles(crates/calternal/tests/notes_crash.rs:175): the client received HTTP 404 where the recovery test expected 200. The other twonotes_crashcases passed. I am rerunning the failing case in isolation to determine whether this is related to the changes or a transient crash-recovery failure.Follow-up: the failing
kill_nine_never_loses_or_doublescase passed when rerun by itself (1 passed; 0 failed). I am rerunning the full workspace gate to confirm its final status.Finding: the new open-then-create regression test fails deterministically in isolation:
daily.openandtasks.createget separate engine keys, but the task capture job stops at step 1 with an idempotency conflict (done: 1,steps: 3). The workspace run exposed this; I am tracing the conflicting job step now.Root cause and fix:
daily.opencreates an unwritten placeholder without a history row. The task capture create step treated that existing identity as a conflicting note instead of materializing it. I updated that step to write the initial daily note at the same identity; the isolatedopening_today_then_creating_tasks_scopes_keys_and_retriestest now passes.Finished and pushed
issue/tasks-createat93ed3fa578.Gate output:
cargo fmt --check: exit 0, no output.cargo clippy --workspace --all-targets -- -D warnings:Checking calternal-notes v0.1.0 (/home/kayg/Developer/calternal-wt-taskscreate/crates/notes)
Checking calternal-tasks v0.1.0 (/home/kayg/Developer/calternal-wt-taskscreate/crates/tasks)
Checking calternal-daily v0.1.0 (/home/kayg/Developer/calternal-wt-taskscreate/crates/daily)
Checking calternal-contacts-actions v0.1.0 (/home/kayg/Developer/calternal-wt-taskscreate/crates/contacts-actions)
Checking calternal-perf v0.1.0 (/home/kayg/Developer/calternal-wt-taskscreate/crates/perf)
Checking calternal v0.1.0 (/home/kayg/Developer/calternal-wt-taskscreate/crates/calternal)
Finished
devprofile [unoptimized + debuginfo] target(s) in 5.06scargo test --workspace -j4:Finished
testprofile [unoptimized + debuginfo] target(s) in 13.46stest result: ok. 31 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 1.55s
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.27s
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.08s
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.34s
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.98s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.16s
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.87s
test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
test result: ok. 10 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 10.05s
test result: ok. 19 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.29s
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.10s
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.25s
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.19s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.77s
test result: ok. 19 passed; 0 failed; 2 ignored; 0 measured; 0 filtered out; finished in 1.50s
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 123.85s
test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.26s
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.08s
test result: ok. 24 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.08s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.65s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 27 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 16 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 4.78s
test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
test result: ok. 131 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 30.34s
test result: ok. 15 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 22 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.38s
test result: ok. 17 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.46s
test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.71s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 40 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.36s
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 37 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
test result: ok. 442 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 56.61s
test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.23s
test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.81s
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
test result: ok. 8 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.31s
test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.46s
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_attachments
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_auth
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_backdrops
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_contacts
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_contacts_actions
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_core
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_daily
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_engine
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_fixtures
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_fsio
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_memory
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_migrate_v0
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_notes
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_plugin_hello
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_prefs
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_search
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_server
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_store
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_tasks
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests calternal_testkit
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Tasks crate, five runs:
tasks run 1: test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.53s
tasks run 2: test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.37s
tasks run 3: test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.60s
tasks run 4: test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.40s
tasks run 5: test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.28s
Web unit tests:
packages/editor:Test Files 37 passed (37)
Tests 300 passed (300)
Start at 09:01:08
Duration 65.37s (tests 78%, environment 16%, import 4%, setup 1%, transform 1%)
packages/text:3 pass
0 fail
7 expect() calls
Ran 3 tests across 1 file. [73.00ms]
packages/ui:Test Files 7 passed (7)
Tests 38 passed (38)
Start at 08:56:58
Duration 1.61s (transform 71%, import 16%, tests 9%, worker 4%)
apps/webunit test:6 pass
0 fail
Ran 6 tests across 1 file. [356.00ms]
Additional checks: editor
tsc --noEmitpassed;apps/webcheck reported 0 errors and 14 warnings.Starting independent review of issue #671. Worktree is detached (no branch); head/base under review is
93ed3fa578, diff base is02c762a. Review only: no commits, pushes, merges or deployments. Gates will run sequentially through the build slot.Confirmed two gaps in the marker and paste fix at
93ed3fa.packages/editor/src/editor.ts:132 returns false for an empty selection. CodeMirror then copies the entire source line, including the hidden marker. An independent editor event test copied "Call plumber ^e7k3f9x2m8q1w4zr" with the caret at column zero and no selection; expected "Call plumber", received the full marker. This also affects the shared default cut path. A clipboard output filter should cover line copies as well as selected copies.
Vim copy and paste bypass DOM clipboard events. An independent test using the app's vimMode and Vim.handleKey ran yy then p on a marked line. The document contained two copies of the same marker (expected one, received two). The custom block yank at packages/editor/src/vim/keys.ts:59 also stores raw source. Sanitizing only native copy and cut cannot guarantee fresh IDs on paste.
Both independent regression tests failed. A third test passed: selected copy of an old ^task-legacy marker kept source bytes unchanged, omitted the ID from the clipboard, and pasted text with no duplicated ID. Temporary probe files were removed; no commits or pushes.
Confirmed a stored-byte regression in crates/notes/src/blocks.rs:118-119.
split_title now runs the source through visible_text. This function supplies both the title and remaining body to makenote.rs:87-96, and Smart::rewrite replaces the complete original words on the source line. An independent test made a note from "- Call plumber ^e7k3f9x2m8q1w4zr". The resulting source contains "- Call plumber" and the target contains "# Call plumber". Neither stored document retains the block marker. The assertion failed with "marker lost from both stored documents".
This exceeds display-only hiding and drops the stored block identity. Preserve the source marker on the replacement link or deliberately carry it to the new block, while sanitizing only the displayed title. The legacy-reader probe passed: a BlockRef using ^task-01a16bf123 still resolves and can make the note.
Confirmed an upgrade retry regression in crates/engine/src/execute.rs:77-81 and 160-176.
The legacy fallback handles completed executor receipts, but an old handler may have durably saved its change before the executor saved that receipt. Existing plugins rely on key-derived contact, job, edit, invite or group IDs to cover that crash window. Passing only the new scoped key changes those identities.
An independent contact probe simulated that exact stored state by calling contacts.create directly with the old raw key "legacy-crash", without an executor receipt, then retrying the same card and key through the new engine. Expected the original ID and one contact. Received a different ID and two contacts:
left: {"count":1,"id":"0cec62e9-c7fa-834b-b7b6-5689b8402daf"}
right: {"count":2,"id":"6aa142df-778a-8bf3-8a08-eb4a639dbf5e"}
The separate completed-legacy-receipt probe passed: matching input replays, changed input conflicts, and another action may reuse the raw key. The missing case is legacy plugin-owned durable state without a receipt. Resolve matching old action state before allocating a new scoped identity, without bringing back cross-action collisions. All temporary Rust test edits were restored byte for byte.
One additional text path remains unsanitized, found by static review: apps/web/src/lib/notes.svelte.ts:275-278 sanitizes n.heading but returns stemOf(n.file) unchanged when heading is empty.
A saved Note with {kind:"note", heading:"", file:"Call plumber ^task-legacy.md"} therefore has display title "Call plumber ^task-legacy". showSavedList at lines 124-130 loads those Note objects directly from readList; notes-cache.ts reads the existing localStorage array without the new toNote conversion. This can show legacy markers when the saved list opens offline. Apply visibleText to the filename fallback as well.
This finding is based on the exact return path and cache loader, rather than a browser reproduction. An optional isolated function probe queued behind an active shared-host test train; I stopped only my own waiting build-slot wrapper (PID 3746969) and did not interrupt the train. No mandatory gate is blocked: all required gates had already passed.
Finished review gate evidence at head
93ed3fa578. cargo test -j4 --workspace, output part 1 of 3. Consecutive parts reproduce the full output verbatim. Exit code: 0.Finished review gate evidence at head
93ed3fa578. cargo test -j4 --workspace, output part 2 of 3. Consecutive parts reproduce the full output verbatim. Exit code: 0.Finished review gate evidence at head
93ed3fa578. cargo test -j4 --workspace, output part 3 of 3. Consecutive parts reproduce the full output verbatim. Exit code: 0.Finished independent review of #671 at head
93ed3fa578. Final verdict: do not merge.All requested baseline gates passed: Rust has 1194 passed and 8 ignored; web unit suites have 347 passed. Four independent probes failed: legacy handler retry without an executor receipt creates a second contact; Make note discards the stored marker; copying a line without a selection exposes its marker; Vim yy then p duplicates an ID. Static review also found an unsanitized filename fallback in offline cached titles. Each finding and its evidence is posted above.
The worktree is clean. No commits or pushes were made. The full report, probe sources, and verbatim output are in /home/kayg/codex-jobs/tasks-create-review4/findings.md and its neighboring files. Cargo test output is quoted verbatim in the preceding gate evidence comments. Other gate output follows verbatim; the format command produced no output.
cargo fmt --check
Exit code: 0.
cargo clippy -j4 --workspace --all-targets -- -D warnings
Exit code: 0.
bun run --cwd packages/editor test --maxWorkers=1
Exit code: 0.
bun run --cwd packages/ui test:primitives --maxWorkers=1
Exit code: 0.
bun test ./packages/text/src/visible-text.test.ts
Exit code: 0.
node --test apps/web/src/lib/wipe.test.mjs
Exit code: 0.
Starting the four review fixes on branch issue/tasks-create at base
93ed3fa578. Reading the independent probes and adding permanent regressions. Gates will run sequentially through /home/kayg/Developer/calternal-ops/build-slot.sh with train priority.Confirmed the four review findings against the code at
93ed3fa578:The reviewer's dynamic probes are being retained as regression tests. No open PR currently targets issue/tasks-create, so the requested branch can be pushed without the forge ignoring updates to an open PR branch.
The product changes and permanent review probes are ready. Local verification is queued through the required build-slot wrapper, which is waiting for the active train (PID 3722693) to finish. The wrapper gives trains priority; I am leaving it in place and will run all gates sequentially when it grants a slot. No shared processes have been stopped.
The upgrade review also exposed an ownership edge within finding 1: when a completed legacy executor receipt belongs to another action, allowing that new action's handler to recover raw-key state could replay the old action's edit. Engine::Owned::run now keeps that case outside the recoverable legacy key namespace. The new engine test seeds a raw receipt owned by t.say, executes t.identity with the same client key, checks that the handler cannot recover the old raw identity, and checks the retry. Legacy edit receipts are moved into the first retry's action namespace so a later action cannot claim the same edit. These tests are queued behind the active train with the other gates.
The active local train still has priority. Validation is now running on the perf VM (10.69.69.63), using the explicit remote-command exception in the job rules. The VM has Rust 1.99.0 installed, matching rust-toolchain.toml, and Bun 1.4.2. I copied the exact tracked working-tree source into /root/calternal-taskscreate-fix4-20261024T084700Z and started the permanent regressions under flock -o /root/perf-vm.lock. Commands run one at a time with cargo -j4 and editor tests limited to one worker. Logs remain outside the repository. I stopped only my own queued local formatter wrapper, whose PID I recorded as 3773272; no shared process was stopped. The train remains untouched.
The focused Rust upgrade probes passed on the perf VM: legacy contacts, note creation and edits, shared notes and contact jobs, task capture, legacy completed receipts, and the action-ownership guard. The Make note storage probe and the display-helper module guard also passed. All 15 Vim tests passed, including native yy/p, custom block yank, raw named registers and the system clipboard.
The first editor run found three test failures. Two cuts reentered CodeMirror because Happy DOM fires selectionchange synchronously during an active view update; browsers deliver it after the edit. The third expected inline paste, while CodeMirror correctly retained linewise clipboard behavior after sanitizing the text. I am suppressing only the synchronous selectionchange delivery around the simulated clipboard event and asserting the actual requirements: source marker retained, pasted prose present twice, identity present once. Product code is unchanged by these test harness fixes.
A final audit of finding 1 found that resolving the legacy notes job ID is not sufficient for Make note and Move block: makenote::make_note and move_block read and validate the original block before consulting bulk::run. After the old handler saved its change, the original strict block hash no longer matches, or the source block has moved. This can reject an identical crash retry even when it found the correct legacy job ID.
Both operations now drive and replay an existing saved job before resolving the source anchor. A permanent regression runs each operation directly under the legacy raw-key-derived job ID with a strict source hash, then retries the identical action/key through the engine and asserts the original job. All final gates will be rerun after this change. No evidence files are added to the repository.
The strict-hash legacy block-job regression now passes for both Make note and Move block. Final fmt and Clippy gates also passed; the full workspace gate is running again. Probe output follows verbatim.
The first complete gate attempt passed fmt, Clippy, the workspace, tasks 5/5, contacts 5/5, editor 307/307, UI 38/38 and shared text 3/3. Its web gate was blocked by the VM environment: /usr/local/bin/node is a symlink to /opt/bun/bin/bun, so node --test reported "Cannot use test outside of the test runner. Run bun test to run tests."
I installed Node 22.23.3, matching the local runtime, only under /root/tasks-create-fix4-node and use it through the gate script's PATH. The system node symlink was not changed. All 6 web tests and the editor type check passed with that runtime. The final gate sequence includes the saved block-job replay correction and is running against a source snapshot that matches all 1,140 tracked files and all 22 staged changes.
Gate output for
cargo fmt --checkatfd2533633d. Part 1/1. Exit code: 0. Output follows verbatim.Gate output for
cargo clippy -j4 --workspace --all-targets -- -D warningsatfd2533633d. Part 1/1. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 --workspaceatfd2533633d. Part 1/6. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 --workspaceatfd2533633d. Part 2/6. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 --workspaceatfd2533633d. Part 3/6. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 --workspaceatfd2533633d. Part 4/6. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 --workspaceatfd2533633d. Part 5/6. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 --workspaceatfd2533633d. Part 6/6. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-tasks (run 1/5)atfd2533633d. Part 1/1. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-tasks (run 2/5)atfd2533633d. Part 1/1. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-tasks (run 3/5)atfd2533633d. Part 1/1. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-tasks (run 4/5)atfd2533633d. Part 1/1. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-tasks (run 5/5)atfd2533633d. Part 1/1. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-contacts -p calternal-contacts-actions (run 1/5)atfd2533633d. Part 1/2. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-contacts -p calternal-contacts-actions (run 1/5)atfd2533633d. Part 2/2. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-contacts -p calternal-contacts-actions (run 2/5)atfd2533633d. Part 1/2. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-contacts -p calternal-contacts-actions (run 2/5)atfd2533633d. Part 2/2. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-contacts -p calternal-contacts-actions (run 3/5)atfd2533633d. Part 1/2. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-contacts -p calternal-contacts-actions (run 3/5)atfd2533633d. Part 2/2. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-contacts -p calternal-contacts-actions (run 4/5)atfd2533633d. Part 1/2. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-contacts -p calternal-contacts-actions (run 4/5)atfd2533633d. Part 2/2. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-contacts -p calternal-contacts-actions (run 5/5)atfd2533633d. Part 1/2. Exit code: 0. Output follows verbatim.Gate output for
cargo test -j4 -p calternal-contacts -p calternal-contacts-actions (run 5/5)atfd2533633d. Part 2/2. Exit code: 0. Output follows verbatim.Gate output for
bun run --cwd packages/editor test --maxWorkers=1atfd2533633d. Part 1/1. Exit code: 0. Output follows verbatim.Gate output for
bun run --cwd packages/ui test:primitives --maxWorkers=1atfd2533633d. Part 1/1. Exit code: 0. Output follows verbatim.Gate output for
bun test ./packages/text/src/visible-text.test.tsatfd2533633d. Part 1/1. Exit code: 0. Output follows verbatim.Gate output for
node --test apps/web/src/lib/wipe.test.mjsatfd2533633d. Part 1/1. Exit code: 0. Output follows verbatim.Gate output for
bun run --cwd packages/editor checkatfd2533633d. Part 1/1. Exit code: 0. Output follows verbatim.Finished the four review fixes. Head:
fd2533633d. Branch: issue/tasks-create. Pushed this branch only; no merge or deployment. Gates ran sequentially on the perf VM (10.69.69.63) under flock -o /root/perf-vm.lock, using Rust 1.99.0, Bun 1.4.2 and an isolated Node 22.23.3 runtime. All tracked source files were checked against the local snapshot.The permanent review probes cover legacy crash retries, preserved Make note markers, empty-selection copy and cut, Vim native and block yanks, old registers, and system clipboard paste. Additional upgrade tests cover notes, edits, shared jobs and task captures. The source block retains its identity after Make note; the new heading does not inherit it.
Full gate output was posted verbatim in the preceding comments. Gate wrapper output follows verbatim:
Independent review started. Reviewing origin/issue/tasks-create at
fd2533633din /home/agent/wt/tasks-create-review; merge base with origin/dev is3fc4f6b7d3. No code will be pushed. I will review persistence, retries, block identity and undo/Trash, run the relevant gates, and remove each of the four fixes temporarily to verify its regression test.P2: Vim sort deletes existing block identities.
At
fd2533633d, packages/editor/src/vim/glue.ts:60 wraps cm.replaceRange with visibleText for every replacement. The Vim :sort command uses that same method to replace existing lines; it is not a clipboard insertion.Concrete reproduction with the real createEditor, NoteSession and vimMode: open
zebra ^e7k3f9x2m8q1w4zr\nalpha ^a7k3f9x2m8q1w4zr\n, then executeVim.handleEx(cm, '%sort'). Both IDs disappear from the stored/shared document. Any links targeting those blocks break. The focused test fails:The four original regression checks pass with their fixes and each fails when its corresponding fix is temporarily removed. That proves those checks detect the original cases, but the insertion adapter filter still needs to distinguish paste from rewrites of existing text. No code has been committed or pushed.
P1: a failed undo save loses inode retention on a later save.
At
fd2533633d, crates/notes/src/room/delete.rs:93 unconditionally clears undo_retention after undo_edit_retained returns. That inner function journals the undo at line 113 before saving at line 115. If the file write fails, the journaled undo remains dirty, but subsequent saves use the ordinary non-retaining file replacement path (room/save.rs:189).Concrete reproduction: create and save a note; run and save an ordinary bulk edit adding
Owned by this job; open its file for append through an independent std::fs::File descriptor, simulating an outside writer; inject the existing one-shot WriteFails fault; undo the bulk edit. Undo returns NotSavedYet, but the undo is already in history and visible in the room. Perform a normal Save in the same room, then appenddurable-outside-write-after-retrythrough the previously opened descriptor and fsync it. Its inode now has nlink=0; closing the descriptor loses those acknowledged outside bytes. No Trash copy retains that inode. This violates ADR 0067. A restart before retry takes a different recovery path, so the existing restart-only test does not cover this case.Fresh focused output:
Retain the pending undo's attribution and retention requirement until its write succeeds, including automatic/manual retry in the same room and the receipt replay path. The independent probe was temporary and is stored outside the repository. No product changes or pushes.
P2: an unrelated action can claim a legacy edit receipt and acknowledge a change it never applies.
At
fd2533633d, crates/notes/src/history/receipts.rs:22 searches both the scoped key and its raw key, then line 36 moves any raw receipt to the caller's namespace. There is no check that the legacy edit belonged to this action. The executor's action ownership check helps only if its old receipt exists; this is precisely the upgrade crash window where that receipt is absent.Concrete reproduction: create a task note; simulate a pre-upgrade notes.append handler completing with raw key
legacy-other-action, with no executor receipt. After upgrade call tasks.update with the same public key and due2026-12-01. The API returns success and version 2, but the note still contains only the old append and has no due property. The tasks.updated event/engine receipt can now acknowledge the missing update, and retries replay that success. Cross-action reuse of a public key is explicitly supported by this branch.Fresh independent action-level probe output:
The printed note retained
status: todoandold append, with no due field. The property assertion failed:The original contact upgrade regression does pass and fails with its object_key fix removed. This is a different shared edit-receipt ownership gap. Ambiguous legacy state must not be treated as successful execution of an unrelated action. No product changes or pushes.
P3: offline cached filename titles still expose hidden block markers.
At
fd2533633d, apps/web/src/lib/notes.svelte.ts:278 returns stemOf(n.file) without visibleText when heading is empty. showSavedList (line 127) loads old Note objects directly from notes-cache.ts:19; that path does not run the newer toNote conversion. This is the earlier static fallback finding, and it remains in this head.Concrete scenario: localStorage's calternal.notes-list contains a pre-upgrade cached note with kind
note, heading"", and fileCall plumber ^task-legacy.md; open the list offline. Its displayed title includes the raw marker. An extracted-function probe evaluates the current title, stemOf, readList, visibleText, and tokenEnd source declarations against that cache fixture, with this result:This is a source-function reproduction, not a full browser run. It does not alter stored markdown. Sanitize the filename fallback or migrate the cached title before display. No code changes or pushes.
Independent review finished. Verdict: do not merge.
Reviewed branch: origin/issue/tasks-create. Head:
fd2533633d. Merge base with fetched origin/dev:3fc4f6b7d3.Findings, each reproduced independently:
The four original regression tests pass with their fixes. Removing each corresponding fix while retaining the tests reproduced every original failure: contact count 2 with a different ID; a Make note source link missing its marker; both empty-selection copy/cut tests exporting the raw marker; all four Vim marker tests failing. Each temporary removal was restored, and the broad final tests passed on the restored head. The new failures are not covered by those original checks.
Final affected-crate tests: 1,014 passed, 0 failed, 5 ignored. Application integration tests: 61 passed, 0 failed, 2 ignored. Editor: 307 passed. UI primitives: 38 passed. Shared text: 3 passed. Web unit tests: 6 passed. Property tests and SIGKILL capture/undo, import, save and application recovery tests are included. Formatting, editor types, workspace Clippy with -D warnings, and the changed benchmark binary check passed. The web check passed with 0 errors and 14 warnings.
All local heavy commands ran one at a time through /usr/local/bin/build-slot.sh after sourcing /etc/calternal/env.sh. Cargo used -j3 and CARGO_TARGET_DIR=/home/agent/target/tasks-create-review. The Rust gate covered core, engine, fsio, notes, tasks, contacts, contacts-actions, attachments, auth, daily and store; the application tests and changed perf binary ran separately. Frontend unit tests used one worker. No Playwright project or performance measurement was run.
The first Auth counter run failed at reliability_review.rs:282 (16577 versus 16440); it passed both the isolated rerun and final broad gate. Initial frontend commands lacked installed dependencies; frozen-lockfile installation resolved that. The first offline-title probe had an incorrect module path, corrected before its actual source-function reproduction. The ledger keeps those initial failures. The red regression checks and the finding probes intentionally fail.
result.md is at /home/agent/calternal/result.md, with a copy and all logs/probe sources in /home/agent/tasks-create-review-evidence/. The dedicated review worktree is clean and still at the head above. No commits, pushes, PRs, merges, deployments or issue closures.
Gate ledger, verbatim:
Final gate output tails, verbatim:
rust-final
calternal-final
editor-final
ui-final
text
web-final
editor-types-final
fmt-final
clippy-final
perf-binary
web-check
Starting the four independent-review fixes on branch issue/tasks-create in /home/agent/wt/tasks-create-fix5. Base SHA:
fd2533633d. I read review comments 65684, 65687, 65688, 65697 and 65698. Each regression will be checked against the old code before the fix; evidence will remain outside the repository.P1 confirmed: the undo wrapper clears inode retention after a journaled undo write fails. The old-code regression observes nlink=0 after ordinary Save and fsync through the outside descriptor. Retention now survives errors until the common save completion boundary, including actor close; receipt replay also saves the pending undo. Creation undo has the same wrapper bug and uses the same invariant. Existing restart recovery remains in place.
Old-code regression output, verbatim:
P2 confirmed: the Vim insertion adapter removes all markers even when replacing existing lines during sort. The old-code regression loses both block IDs. The adapter now retains each identity already present in the replaced range while stripping new copies. All 17 Vim tests pass, including the four earlier marker regressions and a 40-case fast-check property over generated modern and legacy marker documents.
Old-code regression output, verbatim:
P2 confirmed: any scoped action can claim a raw legacy receipt, despite the stored row having no action ownership. The old-code action regression returns success with no due date. Safest upgrade choice: reject ambiguous scoped/raw collisions with IdempotencyConflict, leave the old receipt intact, and ask for a fresh public key. Exact raw and exact scoped replays still work. The legacy notes upgrade test now expects this explicit conflict; the earlier contact identity regression is unchanged. A generated property checks public keys and action namespaces.
Old-code regression output, verbatim:
P3 confirmed: offline cached rows bypass toNote, and the title fallback displays the raw filename stem. The old-code cache fixture displays Call plumber ^task-legacy. The title fallback now applies visibleText at display time.
Old-code regression output, verbatim:
P1: failed undo write loses inode retention
Head SHA:
776c920e1eRoot cause: The undo wrappers cleared retention after an error even though the undo was already journaled and still needed a file write.
Fix: Keep pending retention and its author through errors; clear both undo and recovery retention only at the common successful save boundary when no dirty or in-flight work remains. Re-arm retention after the pre-undo flush, preserve an earlier pending author, and flush on keyed undo receipt replay. Creation undo shares the same lifecycle. ADR 0067 records this invariant.
Tests: tests::undo_guard::independent_review_failed_undo_save_keeps_displaced_inode; tests::undo_guard::failed_undo_receipt_retry_keeps_displaced_inode. Both fsync through a descriptor opened before undo, check the link count, and read the later bytes from Trash with the undo job attribution.
Before, with the fix reverted, reverted-undo, output verbatim:
After restoring the fix, restored-undo, output verbatim:
P2: Vim sort deletes existing block IDs
Head SHA:
776c920e1eRoot cause: The insertion adapter treated rewrites of existing text as clipboard insertions and stripped all existing IDs.
Fix: Track the marker identities in the replaced range and allow each existing identity to remain once per original occurrence; strip newly copied markers. This covers all three Vim insertion adapters, including external registers and asynchronous system clipboard paste. Add fast-check for generated editor tests.
Tests: independent review: Vim sort preserves existing block identities; sort and paste preserve identity ownership for generated marker documents. The property uses 40 generated modern or legacy marker documents with 2 to 8 distinct IDs. The earlier four Vim marker tests remain unchanged and pass.
Before, with the fix reverted, reverted-vim, output verbatim:
After restoring the fix, restored-vim, output verbatim:
P2: an unrelated action claims an old edit receipt
Head SHA:
776c920e1eRoot cause: A scoped handler could move any raw receipt into its namespace without evidence of which action wrote it.
Fix: Refuse ambiguous legacy ownership with IdempotencyConflict without moving the receipt. Exact receipts take precedence and remain replayable. The action test checks repeated refusal and then verifies that a fresh-key update writes the due date.
Tests: create_tests::independent_review_legacy_edit_cannot_swallow_another_action; history::receipts::ownership_properties::ambiguous_public_keys_never_transfer_legacy_receipts. The property generates 64 public-key and action-namespace cases, checks that raw receipts stay intact across both callers, and checks that exact scoped receipts take precedence even beside a raw receipt.
Before, with the fix reverted, reverted-receipt-action, output verbatim:
Before, with the fix reverted, reverted-receipt-property, output verbatim:
After restoring the fix, restored-receipt-action, output verbatim:
After restoring the fix, restored-receipt-property, output verbatim:
P3: old cached filename titles reveal hidden markers
Head SHA:
776c920e1eRoot cause: Old offline cached rows bypass toNote, and the title function returned the filename stem without hiding block markers.
Fix: Apply visibleText to the filename fallback at display time, preserving cached source data and the New note fallback.
Tests: offline legacy cached filename hides block markers. It evaluates the actual title and cache reader source functions against a cached row, with legacy and modern markers, an empty visible title, a plain title and ordinary caret notation.
Before, with the fix reverted, reverted-title, output verbatim:
After restoring the fix, restored-title, output verbatim:
Fixed the four independent-review findings on issue/tasks-create.
Base SHA:
fd2533633dHead SHA:
776c920e1eWorktree: /home/agent/wt/tasks-create-fix5
Each fix has a regression test. With all new tests retained, each implementation was temporarily replaced with its version at the base SHA, the tests failed, and the fixed implementation was restored. Both generated property tests also failed on the old implementations. The four earlier fixes and their regression tests remain intact.
Final affected Rust tests: 840 passed, 0 failed, 3 ignored.
The legacy receipt policy is deliberately conservative: a raw receipt without action ownership produces IdempotencyConflict for an upgraded scoped handler. It stays unclaimed, and exact raw or scoped receipts still replay. Verify the note before choosing a fresh key. The previous notes upgrade test now checks this explicit conflict instead of unsafe ownership inference. ADR 0020 records this choice. The original contact identity regression is unchanged.
Commits:
Other P1 call sites checked:
The two unconditional wrapper resets were the matching error-path bug class. Recovery already retained after failures; its clearing rule is now centralized with undo retention so actor close and newer in-flight edits use the same rule.
Gate ledger, verbatim. Nonzero reverted gates are intentional regression proofs. The first receipt probe had a formatting compile error, the first title probe had an incorrect test fixture module path, and the first library run exposed the replay test setup error described below. All were corrected before the final gates.
The initial replay test retried a terminal failed bulk job, which returns its report without entering the room receipt path. It was corrected to send the original keyed UndoEdit directly to the room. This is a test setup correction; the final ordinary-save and receipt-replay regressions both fail on the old code and pass after restoration.
fmt-final, final gate output verbatim (final output tail):
clippy-final, final gate output verbatim (final output tail):
rust-final, final gate output verbatim (test result lines followed by the final output tail):
application-final, final gate output verbatim (test result lines followed by the final output tail):
editor-final, final gate output verbatim (final output tail):
editor-types-final, final gate output verbatim (final output tail):
web-unit-final, final gate output verbatim (final output tail):
web-check-final, final gate output verbatim (final output tail):
All local heavy commands ran one at a time through /usr/local/bin/build-slot.sh after sourcing /etc/calternal/env.sh. Cargo used -j3 and CARGO_TARGET_DIR=/home/agent/target/tasks-create-fix5; frontend unit tests used one worker. No Playwright project or performance run was needed. No staging or production VM was touched. Evidence and gate logs are outside git in /home/agent/tasks-create-fix5-evidence. Only the requested issue/tasks-create branch was pushed; no merge, deployment or issue closure was performed.
result.md: /home/agent/calternal/result.md, with copies in the fix worktree and evidence directory. The four accompanying finding comments contain the before/after test output verbatim.
Independent review 6 started. Reviewing origin/issue/tasks-create in detached worktree /home/agent/wt/tasks-create-review6 at
776c920e1e. Diff base with origin/dev:3fc4f6b7d3. No code will be pushed. I will check all eight reported fixes with negative controls and review crash replay, retries, block IDs, and undo/Trash behavior.P1: a crash between retaining the old inode and publishing its replacement prevents journal recovery.
Reviewed head:
776c920e1e.crates/fsio/src/swap.rs:148 moves the public file durably into a separate Trash entry. The replacement is not published until hard_link at line 165. If SIGKILL happens between those operations, the public file is missing while its undo update and pending save are durable. crates/notes/src/room/load.rs:145 treats that missing file as an outside deletion and returns NotFound instead of replaying the pending journal. The same error escapes the startup scan through reconcile_ids.
Concrete probe: create two notes through the real bulk pipeline; stage an undo update and its pending image exactly as the existing pending-undo recovery regression does; call the actual Prepared::place with retain_replaced_at. Pause at its second expected predicate invocation, after rename_safely has completed and before hard_link. The parent kills that recorded child with SIGKILL, opens the same Home, runs the real startup scan and gets the note. Both operations return NotFound. The old inode remains in Trash, but the acknowledged journal does not restore the live note; startup discovery also fails. The existing regression that crashes before file movement passes and does not cover this boundary.
Make the retaining move recoverable before missing-file handling, or avoid leaving this publication gap. No product fix was made during review.
Focused output, verbatim:
P2: clipboard paste deletes ordinary Markdown footnote labels.
Reviewed head:
776c920e1e.packages/editor/src/editor.ts:117 applies visibleText to every paste before writing it into the shared document. packages/text/src/visible-text.ts:14 accepts a caret after an opening bracket, so it mistakes a Markdown footnote reference and definition for hidden block IDs.
Concrete failing scenario: paste
See [^source].followed by a blank line and[^source]: citationinto an empty note. The real editor and NoteSession storeSee [].and[]: citation. This changes the user's Markdown and breaks the reference, rather than only hiding an app-owned ID. The output clipboard filter also uses the same parser. Recognize actual block markers and hidden metadata references without consuming Markdown footnotes.The probe passes when only clipboardInputFilter is removed, and fails on the unchanged head. Both temporary changes and the probe were restored.
Focused failing output, verbatim:
Control output, verbatim:
P2: Vim uppercase still deletes a hidden block identity.
Reviewed head:
776c920e1e.packages/editor/src/vim/glue.ts:66 passes all replaceSelections calls through retainBlockIds. That helper at packages/editor/src/vim/retain-block-ids.ts:16 only retains exact marker strings. Vim's gUU uppercases the selected raw line, including the hidden marker. The resulting uppercase marker does not match the old marker and is stripped.
Concrete failing scenario: open
Call plumber ^e7k3f9x2m8q1w4zrwith the real createEditor, NoteSession and vimMode, then press g, U, U. The stored/shared result isCALL PLUMBERwith no ID. Existing links to that block now break, even though the user changed only visible prose. The sort regression passes, but its exact-string preservation rule does not cover a normal text transformation. Keep the original block identity outside case conversion and other visible-text rewrites.The probe was temporary and restored; no product fix was made.
Focused output, verbatim:
P2: the receipt ownership fix strands a legitimate same-action retry across upgrade.
Reviewed head:
776c920e1e.crates/notes/src/history/receipts.rs:31 refuses every scoped handler that finds only its legacy raw receipt, including the same action with the identical request. This prevents the earlier cross-action false acknowledgement, but it does not satisfy this round's explicit requirement that the change must not strand legitimate retries.
Concrete scenario: before upgrade, notes.append with public key review6-legitimate-append durably appends once, then the process dies before the engine records its outer receipt. After upgrade, submit that same notes.append request and key. It returns IdempotencyConflict on both attempts, although the note already contains exactly one appended copy. There is no successful API replay with that key. Submitting the same append with a fresh key succeeds and produces two copies.
The probe uses the real notes handler and action engine. Legacy engine receipts with action ownership and new scoped receipts still replay; this finding is limited to the handler-committed, engine-receipt-missing upgrade window. The raw-handler replay demonstrated by the existing test is an internal function call, not a successful retry through the upgraded action API.
ADR 0020 now explicitly documents conservative refusal and manual inspection. That is a deliberate product-policy change, not evidence that legitimate retry compatibility is preserved. The existing test was changed to expect the refusal. This needs a safe recoverable outcome or an explicit exception to the retry requirement; reverting to claiming unowned receipts would reintroduce the earlier cross-action bug. No product code was changed during review.
Independent focused output, verbatim:
Independent review 6 finished. Verdict: do not merge.
Reviewed origin/issue/tasks-create at
776c920e1e. Merge base with fetched origin/dev:3fc4f6b7d3. The detached worktree /home/agent/wt/tasks-create-review6 is clean and remains at that head.Four findings, independently reproduced:
All eight supplied regression checks pass at the head, and each failed at its assertions after its implementation fix was temporarily removed. Each removal was restored and the same test rerun successfully:
The full report contains exact mutations, assertion evidence, every negative/restored output tail and baseline gate tails. The scripts and full logs are outside git at /home/agent/tasks-create-review6-evidence/. result.md is /home/agent/calternal/result.md, with a copy in that evidence directory. The pre-existing result.md was backed up there.
Baseline gates passed: 1,018 Rust tests, 61 application tests, 309 editor tests, 38 UI tests, 3 shared-text tests and 7 web unit tests; 5 Rust and 2 application tests were ignored. Property tests and existing SIGKILL capture, undo, import and save recovery tests are included. Formatting, workspace Clippy with -D warnings, editor types, web check and the changed benchmark binary check passed. The web check reports 0 errors and 14 warnings.
All local heavy commands ran sequentially through one build-slot.sh job after sourcing /etc/calternal/env.sh. Cargo used -j3 and CARGO_TARGET_DIR=/home/agent/target/review6-rust. Baseline Rust tests used one test thread; frontend Vitest used one worker. No Playwright project or performance measurement was run. All temporary probes and implementation mutations were restored. No commits, pushes, PRs, merges, deployments, issue closures or VM changes were made.
Gate ledger, verbatim. Reverted gates and the four independent failing probes are intentional evidence; the footnote input-filter control passes.
Final baseline output tails, verbatim:
rust
contacts
application
editor
ui
text
editor-types
web-unit
web-check
fmt
clippy
perf-binary
head-and-clean
Starting the invariant work in /home/agent/wt/tasks-create-fix7. Base SHA:
776c920e1e. Local branch issue/tasks-create-fix7 because issue/tasks-create is checked out in the prior worktree; push destination remains issue/tasks-create. No open PR currently uses that branch. Read the review history and review 6 findings. Evidence and result stay outside git. No merge or deployment.Source findings: visibleText accepts any caret word after an opening bracket, including Markdown footnotes. Vim receives raw markers and tries to restore them after transformation by exact string identity. Room recovery clears pending bookkeeping before deciding that a missing live file is deleted. These are the invariant boundaries being examined.
Class C decision: keep refusal (option a). A raw handler receipt has no action ownership or request hash. The same note containing the same appended text is not proof that this particular action produced it. Accepting it could acknowledge an unrelated edit. Keep the legacy receipt, do not append, and tell clients to stop: the effect may already have committed, so do not retry with a new key. Existing owned engine and scoped handler receipts still replay. Testing repeated action-level refusals checks that the committed text remains exactly one copy.
Class A contract finding, not a pass: a universal byte-preserving transform cannot be implemented under all three stated conditions without extending the stored block model. Consider
one ^e7k3f9x2m8q1w4zr\ntwo ^0123456789abcdef. A marker-free join yieldsone twowith no newline. Both IDs must survive once, but the exact grammar admits only one trailing marker on that line. Keeping another marker line changes visible text; placing both on the line means the first is no longer an end-of-line marker. A delete of an entire marked block similarly conflicts with unconditional survival of every ID. The branch has no ADR 0068 file; ADR 0056 still specifies six-character IDs, and the current display tests deliberately hide arbitrary legacy caret words.Safest choice for this run: do not add another post-transform sanitizer or claim that selected operations prove the universal invariant. Class A needs a defined identity model for joins, splits, deleted blocks and legacy migration, then a projected editor binding: CodeMirror and Vim currently both operate on the same raw string as Y.Text. A transaction filter after Vim has computed a rewrite cannot make that computation run on visible text. Leaving Class A explicitly unresolved while completing the independent B/C work. The branch must not merge on this evidence.
Class B finding and implementation evidence: retaining placement used rename_safely(live, Trash) before publishing the prepared image. That made the live name absent after a durable move, even though the pending journal still owned the replacement. Room loading cleared the pending row and returned NotFound for that absence. Startup also kept its pre-recovery directory snapshot, so a recovered new file could still enter vanished-file handling.
Retaining placement now hard-links the checked inode into Trash, syncs that directory, then performs the ordinary guarded atomic exchange. It checks inode identity and rolls back a racing replacement. The original live name stays present throughout. Room loading gates a missing file with a pending image on successful replay and promotion; a failed replay keeps the durable pending row. Startup takes a fresh directory snapshot after journal reconciliation. The state machine is documented next to creation undo, including the journal records that precede each filesystem action.
Completed focused evidence, verbatim:
test swap::crash_matrix::every_publication_step_survives_sigkill ... ok
test tests::undo_guard::pending_undo_gap_recovers_during_startup_scan ... ok
test tests::undo_guard::pending_undo_gap_recovers_on_read ... ok
test tests::undo_guard::every_delete_undo_boundary_recovers_after_sigkill ... ok
test room::save::tests::kill_nine_mid_save_recovers_title_and_bytes ... ok
The filesystem child matrix covered retaining save: prepared, checked, linked, retained, exchanged, cleaned, synced; ordinary save: prepared, checked, exchanged, cleaned, synced; create: prepared, missing, published, cleaned, synced. Note save tests cover preparation, prepared image, pending row, before publication, after publication and after promotion, both retaining and ordinary. The deletion matrix is being expanded to open and closed rooms and a descriptor held by the parent across every crash. Final gates and that expanded evidence are still pending. Class A remains unresolved; this is not permission to merge.
Validation finding at the first workspace pass: contacts-actions::tests::correctness::acknowledged_edit_between_undo_preparation_and_deletion_survives failed its quota assertion. The full recount was 804 bytes while the incremental counter was 605 bytes. The 199-byte retained inode had been linked without a usage notification. The old rename recipe supplied that notification implicitly.
The retaining link now reports the new Trash path to incremental accounting immediately, including failure paths after link creation. A focused independent full-recount regression is included. The final filesystem suite passes all 44 tests, including that regression, the racing-replacement rollback and the expanded 20-point SIGKILL publication matrix. The 18-point delete/undo matrix with a parent descriptor opened before the operation also passes: outside writes before the retaining move keep undo partial/live, while writes after movement remain in Trash; ordinary deletes retain the same outside inode in Trash.
These changes are committed at
287bd31af5. Final strict Clippy passed on this source. The final workspace rerun is still pending; no push yet. Class A remains unresolved.Gate output for final-fmt at
287bd31af5. Part 1/1. Output follows verbatim.Gate output for final-clippy at
287bd31af5. Part 1/1. Output follows verbatim.Gate output for final-fsio at
287bd31af5. Part 1/1. Output follows verbatim.Gate output for final-outside-matrix at
287bd31af5. Part 1/1. Output follows verbatim.Gate output for final-rust at
287bd31af5. Part 1/4. Output follows verbatim.Gate output for final-rust at
287bd31af5. Part 2/4. Output follows verbatim.Gate output for final-rust at
287bd31af5. Part 3/4. Output follows verbatim.Gate output for final-rust at
287bd31af5. Part 4/4. Output follows verbatim.Gate output for undo-property at
287bd31af5. Part 1/1. Output follows verbatim.Gate output for save-matrix at
287bd31af5. Part 1/1. Output follows verbatim.Gate output for delete-matrix at
287bd31af5. Part 1/1. Output follows verbatim.Gate output for editor at
287bd31af5. Part 1/1. Output follows verbatim.Gate output for text at
287bd31af5. Part 1/1. Output follows verbatim.Gate output for editor-types at
287bd31af5. Part 1/1. Output follows verbatim.Gate output for web-unit at
287bd31af5. Part 1/1. Output follows verbatim.Gate output for web-check at
287bd31af5. Part 1/1. Output follows verbatim.Gate output for final-ui at
287bd31af5. Part 1/1. Output follows verbatim.Status: incomplete; do not merge. Class A is unresolved. Class B and Class C are implemented and pushed. Verified remote issue/tasks-create at
287bd31af5.Base:
776c920e1eHead:
287bd31af5Worktree: /home/agent/wt/tasks-create-fix7
Local branch: issue/tasks-create-fix7. Remote destination: issue/tasks-create. The earlier worktree owns the local issue/tasks-create branch. No open PR used that branch when checked.
Commits:
c71082cf: make ambiguous legacy receipt refusal explicitly terminal, amend ADR 0020 and test the action engine and browser action client.287bd31a: retain inodes before publication, recover pending saves before returning a missing-file error, refresh the startup scan snapshot after recovery, document the durable state machine and add crash matrices.Class A is unresolved
New ID generation uses exactly 16 lowercase Crockford characters, alphabet 0123456789abcdefghjkmnpqrstvwxyz. No precise shared marker parser or shared TS/Rust vectors were implemented. The existing parser still recognises legacy caret words too broadly, and the review 6 footnote and uppercase defects remain. No additional editor transform paths were routed through a new choke point. No full-operation TS property suite was implemented. The 10,000-case run below is the existing Rust whole-note undo property, not proof of Class A.
The requested unconditional survival rule conflicts with end-of-line-only storage for join and deletion. Joining
one ^e7k3f9x2m8q1w4zr\ntwo ^0123456789abcdefmust produce visibleone two. Keeping both markers on that line makes the first cease to be an end-of-line marker; keeping another marker line changes the visible result. Deleting an entire marked block also conflicts with unconditional ID survival. The branch has no ADR 0068; ADR 0056 still describes six-character IDs. The safe choice was to record this conflict, preserve the existing editor implementation, and avoid adding another after-the-fact sanitizer. The needed follow-up is a defined identity model for joins, splits, intentional deletion and legacy migration, followed by an editor projection in which transforms actually receive visible text.Class B
The retaining filesystem path now hard-links the checked inode into Trash and syncs that directory before an atomic exchange. It retains the original public name throughout publication. The existing inode guard rolls back racing replacements. Incremental usage is notified immediately after the link, including later failure paths.
Room loading recognises a missing file owned by a durable pending image. It completes save and promotion before returning the room or accepting another write. A failed replay leaves the durable pending row. This also recovers the old move-away publication gap. Startup takes a fresh directory snapshot after journal reconciliation so newly published files do not enter vanished-file handling.
The code comment in crates/notes/src/room/delete.rs describes creation undo, ordinary deletion, undo edits and ordinary saves: update/receipt, pending image, retained inode, publication, directory sync, promotion and intent/step completion. No outside writer inode is unlinked by the retaining publication path.
Crash matrix: 68 phase/mode combinations, each using a recorded child and SIGKILL, plus two synthetic persisted-state tests for recovery of the old missing-file gap.
The first workspace run caught missing accounting for the new hard link: the quota recount was 804 bytes and the incremental snapshot 605 bytes. The 199-byte difference was the retained inode. The final implementation includes the notification and a focused accounting regression; the failing first gate remains in the ledger below.
Class C decision: option a, keep refusal
A legacy raw handler receipt has no action owner or request hash. Content equality cannot establish which action committed it. The handler keeps that receipt, returns IdempotencyConflict and says: This request may already have changed the note before the upgrade. Stop retrying; do not submit a new key. Inspect the note to confirm the existing change.
The action-level regression repeats the identical notes.append retry three times and verifies exactly one appended copy throughout. The browser action test verifies that the terminal error is surfaced, only one HTTP request is made and no fresh key is generated. Owned engine and scoped handler receipts retain their existing replay behavior. ADR 0020 now explicitly prohibits automatic retry or key replacement after this refusal.
Gates
All heavy local commands ran serially through /usr/local/bin/build-slot.sh after sourcing /etc/calternal/env.sh. Cargo used -j3 and CARGO_TARGET_DIR=/home/agent/target/tasks-create-fix7. Rust tests used one test thread; editor tests used one worker. The final workspace passed 1,221 tests with zero failures and 8 existing ignored tests. The whole-note undo property ran 10,000 cases and passed in 345.61 seconds. Editor: 309 tests; UI: 38 tests; text: 3 tests; web: 8 tests. Svelte check reported 0 errors and 14 existing warnings. No performance run or full Playwright project was run.
Gate ledger, verbatim:
The first rust exit=101 is the accounting failure described above. The final-rust gate is the rerun on the committed source. Passing existing tests does not resolve Class A or prove its requested full-operation properties.
No merge, deployment, main/dev push, issue closure, production VM access or other VM changes. Evidence and result files remain outside git.
Push verification:
Complete gate output on this issue:
Starting tasks-create-ids on branch issue/tasks-create-ids, base
287bd31af5. Reading reviews 5 and 6 and tracing marker handling before implementing the approved identity model. Gates and evidence will be posted here; no merge or deployment.Finding: the two review failures share the same cause: CodeMirror/Vim edit source Markdown containing identity bytes, while a broad display parser treats footnotes as metadata. The new implementation projects marker-free text before editor construction and keeps identity in a synchronous state field; undo and sync keep using the source Y.Text. The first focused run passed 34 existing editor tests; five checks expected markers in the editor document and were changed to inspect the stored source while requiring a marker-free editor document. The second focused run passed all 39 tests, including generated Vim sort cases with seed 671. No baseline failure has been hidden.
New fuzz finding: seed 682 found that greedy whitespace stripping removes a real trailing space when an identified line is split after the space. The storage parser now consumes only the one separator immediately before each marker. A Windows-line-ending fixture separately found that a CR at a fence opener prevented code recognition; parsing now removes CR only for line classification and retains source offsets. Regression and fuzz reruns are in progress.
Resuming the unattended Class A identity job in /home/agent/wt/tasks-create-ids on issue/tasks-create-ids. Base SHA:
287bd31af5. The earlier run left uncommitted editor projection and shared marker parser changes; I am reviewing and completing those changes, then running the requested gates. No merge or deployment.Finding: the earlier run left a working visible-text projection, but the daily-log test still called the y-codemirror undo facet removed by that projection. First editor gate: 314 passed, 1 failed, with TypeError: Cannot read properties of undefined (reading 'undo') in test/daily.test.ts:143. The test now calls our guarded public undo command. Editor typecheck passed; web check reports 0 errors and 14 existing warnings.
The first seeded model run covered seeds 671 through 10670, 24 steps each, and passed. Inspection found another ownership ambiguity: an unmarked line with the same words as a marked line can consume the marked line's sort target. The identity module now matches complete line permutations including unmarked lines. I am adding the explicit regression and extending the operation generator before the long run.
Finding: clipboard ownership must retain the original shared Y.Text, not a callback through the reused editor view. Otherwise switching notes between cut and paste reads the destination as the source. The clipboard and Vim transfer boundaries now capture the source accessor from the live binding.
The expanded model gate passed: 10,000 sequences, seeds 671–10670, with 24 steps per sequence. New operations include cut/paste, copy/paste, multiple simultaneous edits, lower/upper/swap case, and block-style inserts. No failing fuzz seed in this run. Added real Vim regressions now check ownership after dd/p and yy/p, Unicode case operators, J aliases and undo.
Finding: a single enclosing source replacement for a multi-cursor edit can delete unchanged CRDT items between the cursors, invalidating relative block anchors there. The binding now emits separate source edits and has a regression that keeps a Yjs relative anchor on the untouched middle line.
The focused editor integration gate now passes 91 tests, including the Vim dd/p ownership regression after capturing key-start state and normalizing Vim's relocated newline. Subsequent boundary and allocation checks are being added before the final run.
Vault identity reservations now live in the existing durable history database. New task IDs are checked there, deleted reservations remain, and imported duplicate owners are rekeyed without rewriting words. Existing aliases resolve through the same storage parser in anchors, link health, search and task extraction. I am validating this additional server admission work against the crash matrix again.
Finding: regex-only code detection misses nested Markdown code and wrongly treats a four-space nested list item as a code block. The storage grammar now uses the existing Markdown parsers in both languages; shared vectors cover quoted fences, list fences and nested list identities.
A second finding follows from that: converting a marked line to code cannot keep its suffix there, because code caret words must stay literal. The identity boundary now uses a reserved hidden footer only for code identities, with regenerated line positions and byte-exact ID tokens. It restores suffixes when lines become prose. ADR 0056 records this storage choice. Shared contract checks include an open fence and a footer containing both a canonical ID and alias. This avoids changing ordinary caret code to satisfy the hiding rule.
The latest full editor gate passed 325 tests, including 10,000 seeded model sequences with code conversion and nested Markdown context. Typecheck and web check passed (0 errors; 14 existing Svelte warnings). Additional tests now cover task text-start Enter and server frontmatter edits rebasing hidden code identities. The browser spec converts the marked lines into an open code fence, checks every clipboard payload and observed DOM mutation, and checks the server footer still targets the correct text.
The final workspace Rust run, lint and browser binary build are in progress through one build slot. The crash matrix will be counted from that fresh run, not reused from the earlier baseline.
Finding from the final Rust run: room::identity::tests::server_properties_shift_code_targets_without_changing_words caught a deletion edge. After deleting the last code line, the old footer's line number is temporarily out of range, so reparsing the new footer rejects it before it can be rebased. Evidence: assertion failed: !deleted.contains("block-identities").
The rebase boundary now identifies an unchanged footer by its reserved bytes before validating its new positions. It can remove the deleted target and the now-empty footer. The same boundary handles server-added frontmatter so code IDs keep pointing at their words after a save. I will rerun this test and the affected native gates after the workspace run finishes. No fuzz seed has failed so far.
Worst-case screenshots from the passing browser run. The DOM observer and clipboard checks passed on all three requested projects.
identity-identity-never-en-ee4a6-rapid-edits-and-composition-webkit-390
identity-identity-never-en-ee4a6-rapid-edits-and-composition-chromium-1440
identity-identity-never-en-ee4a6-rapid-edits-and-composition-chromium-390
Checkpoint head:
ae4e0a04f5on issue/tasks-create-ids.CI-light gate passed: 38 test files, 329 tests, including 10,000 model sequences (seeds 671–10670; 24 steps each). The 200,000-sequence run is active with first seed 671 and last seed 200670. No failing fuzz seed has been reported.
All three requested Playwright projects passed. Screenshots are attached in the preceding comment. The corrected native unit gates passed and emitted all 68 crash-matrix cells.
Code inspection found that API appends can put text after an existing identity footer. The storage boundary now moves that footer to the end, preserves its targets and uses the readable body's ending for AppendLine. The regression covered both a closed code fence through the API and an open code fence. The open-fence test also caught a position mapper treating a replacement of the final line like an insertion before it; that mapper now retains the line's start. Both regressions pass. Final checks will run against this committed source before the branch is pushed.
The first long run ended before I attempted to stop it, so no process was signalled. It found a real failure at seed 61216, random state 1333094870, after passing the CI-light range. An ID became visible after a sequence of fence and blank-line changes. Removing one code suffix can restore a Markdown fence and change whether another suffix is recognized. The source formatter now repeats the check until every remaining suffix is recognized in the final Markdown context. Seed 61216 is a permanent replay test; the replay failed before this fix.
The expanded generator also reproduced the Unicode case ownership finding at seed 677, random state 4039673599. Whole-selection case changes now retain ownership by line when they make unmarked and marked words equal, while exact line permutations still move IDs with sorted text. The named regression and generated sequence both failed before the fix. The expanded CI-light gate is running before another 200,000-sequence run.
Gate fuzz-replays-and-literals, head
2bcf1f8b42, part 1/1. Output follows verbatim.Gate native-footer-appends-corrected, head
2bcf1f8b42, part 1/1. Output follows verbatim.Original 200,000-sequence attempt, source head
ae4e0a04f5. It stopped on seed 61216. The fixed replay and the expanded run use the later head2bcf1f8b42.Output follows verbatim.
Negative control after adding the Unicode collision case, before its product fix. The expanded generator found seed 677. Both this case and the original failing seed now have permanent coverage.
Output follows verbatim.
Gate editor-ci-head, head
2bcf1f8b42, part 1/1. Output follows verbatim.The body-prose footnote regression failed before the context fix: expected hidden: [^source], received hidden: []. Hidden-block references are now recognized only in frontmatter, including quoted IDs. Their property positions follow sorting and case changes. Body prose stays literal. The shared TypeScript and Rust contract checks pass, and the expanded 10,000-sequence model gate passes with body footnotes in its input data.
The previous partial stress run was stopped using only its recorded runner and child PIDs (513362 and 513405). The new final run uses 200,000 sequences with permanent replays for seeds 61216 and 677. It is still active. Its model and generator are unchanged by the latest integration guard commit.
Integration review also found that new ID-only effects needed the same permission guard as text edits. They can have docChanged=false. The ID effects and copy-link helper now check editing permission and frozen sessions. A regression is queued in the final full editor gate before publication. Current head:
6f1b786636.Gate identity-long-final, head
c9dd460af5, part 1/1. Output follows verbatim.Gate editor-ci-authorized, head
9acf944d06, part 1/1. Output follows verbatim.Gate editor-types-head, head
9acf944d06, part 1/1. Output follows verbatim.Gate web-types-head, head
9acf944d06, part 1/1. Output follows verbatim.Gate text-head, head
9acf944d06, part 1/1. Output follows verbatim.Gate web-unit-head, head
9acf944d06, part 1/1. Output follows verbatim.Gate fmt-head, head
9acf944d06, part 1/1. Output follows verbatim.Gate native-head, head
9acf944d06, part 1/11. Output follows verbatim.Gate native-head, head
9acf944d06, part 2/11. Output follows verbatim.Gate native-head, head
9acf944d06, part 3/11. Output follows verbatim.Gate native-head, head
9acf944d06, part 4/11. Output follows verbatim.Screenshots from the passing browser gate on head
9acf944d06. This run also checks that body prose hidden: [^source] remains intact.identity-identity-never-en-ee4a6-rapid-edits-and-composition-webkit-390
identity-identity-never-en-ee4a6-rapid-edits-and-composition-chromium-1440
identity-identity-never-en-ee4a6-rapid-edits-and-composition-chromium-390
Gate native-head, head
9acf944d06, part 5/11. Output follows verbatim.Gate native-head, head
9acf944d06, part 6/11. Output follows verbatim.Gate native-head, head
9acf944d06, part 7/11. Output follows verbatim.Gate native-head, head
9acf944d06, part 8/11. Output follows verbatim.Gate native-head, head
9acf944d06, part 9/11. Output follows verbatim.Gate native-head, head
9acf944d06, part 10/11. Output follows verbatim.Gate native-head, head
9acf944d06, part 11/11. Output follows verbatim.Gate crash-matrix-head, head
9acf944d06, part 1/1. Output follows verbatim.Gate clippy-head, head
9acf944d06, part 1/1. Output follows verbatim.Gate binary-head, head
9acf944d06, part 1/1. Output follows verbatim.Gate playwright-head, head
9acf944d06, part 1/1. Output follows verbatim.Resuming tasks-create-ids2 on branch issue/tasks-create-ids, head
9acf944d06, based on issue/tasks-create-fix7 at287bd31a. The worktree is clean. I will push this branch and run a fresh 200,000-sequence identity stress test under timeout and the shared build slot. Existing completed gates will be quoted from the previous run evidence; no merge or deployment.The push succeeded. Remote refs/heads/issue/tasks-create-ids resolves to
9acf944d06, matching the clean worktree. Saved gate SHA files match this head. The previous successful long run was onc9dd460af5, so a fresh long run is now testing the committed head with IDENTITY_SEQUENCES=200000 and IDENTITY_SEED=671 (seeds 671 through 200670, 24 steps each). Permanent regression tests already cover seeds 677 and 61216. No code changes have been needed in this continuation.Finished tasks-create-ids2. Branch issue/tasks-create-ids is pushed at head
9acf944d06, based on287bd31a. No code changes were needed in this continuation. No merge or deployment was performed.The fresh stress run passed 200,000 seeded sequences, seeds 671 through 200670 inclusive, 24 operations per sequence (4,800,000 random operations). The existing regressions for seeds 677 and 61216 also passed.
Command: source /etc/calternal/env.sh, then timeout 10800 /usr/local/bin/build-slot.sh bash -c 'cd /home/agent/wt/tasks-create-ids/packages/editor && IDENTITY_SEQUENCES=200000 IDENTITY_SEED=671 timeout 3660 bun run test test/identity.test.ts --maxWorkers=1 --reporter=verbose'. The outer timeout includes slot waiting.
Fresh stress output, verbatim:
Identity as implemented: editor text contains readable words and identity is held separately. Joining lines keeps the first canonical ID and retains the second IDs as aliases. Splitting keeps the ID on the first part; Enter at the start leaves it with the original words. The second part gets an ID when needed for a task or link. Deleting removes the line and ID; its links report missing, reservations prevent reuse, and undo restores the same ID. Cut and paste transfers ownership once; copy and paste allocates fresh IDs. Duplicate IDs already on disk keep the first target and reassign later owners. Old six-character IDs remain valid and byte-exact; new IDs use 16 Crockford characters.
Marker parsing is centralized in packages/text/src/markers.ts for all TypeScript consumers. Editor transforms use the identity boundary instead of parsing markers or modifying hidden bytes. The native side uses the shared calternal_core parser in crates/core/src/visible.rs, with the same contract vectors. Code identities and protected caret literals use the hidden storage footer. Footnotes, code, math and URLs remain ordinary text. ADR 0056 and ADR 0020 describe these rules.
Existing gate results below are from the previous run on this same head, not rerun here, as requested. Gate SHA files were checked against
9acf944d06. Web typechecking has 14 existing warnings and no errors; native tests have 3 ignored tests. Historical failed and corrected attempts remain in the original gates.txt; the final recorded gates are quoted here verbatim.editor-ci-authorized.log: full output. full saved output 1
editor-types-head.log: full output. full saved output 1
web-types-head.log: verbatim result excerpts. full saved output 1
text-head.log: verbatim result excerpts. full saved output 1
web-unit-head.log: full output. full saved output 1
fmt-head.log: full output. full saved output 1
native-head.log: verbatim result excerpts. full saved output 1, full saved output 2, full saved output 3, full saved output 4, full saved output 5, full saved output 6, full saved output 7, full saved output 8, full saved output 9, full saved output 10, full saved output 11
crash-matrix-head.log: full output. full saved output 1
clippy-head.log: full output. full saved output 1
binary-head.log: full output. full saved output 1
playwright-head.log: verbatim result excerpts. full saved output 1
Starting tc-review7, independent round 7. Reviewing issue/tasks-create-ids at
9acf944dagainst base origin/dev26388703in detached worktree /home/agent/wt/tc-review7. No product edits or pushes. I will verify ADR 0066 / ADR 0020, earlier review findings, identity and recovery behavior, format ownership, performance paths, and requested gates.Review 7 finding, P2: identity checks add whole-note work to every keystroke and vault reads to first capture.
Head
9acf944d06.Source evidence:
These are direct violations of this review's no per-keystroke whole-note passes and no vault-size work on hot paths. No latency estimate is being claimed. External deterministic tests are queued: count Text.line calls for one edit in a 1,000-line note, and install an unrelated indexed-note read trap after startup before the first capture. Runtime evidence will follow with the final report. All heavy commands remain sequential in one build-slot job.
Review 7 finding, P1: concurrent line insertions destroy a code block's stable identity.
Head
9acf944d06.packages/editor/src/identity/document.ts:105 serializes line numbers into the Markdown footer. identity/binding.ts:64 diffs that footer as ordinary shared Y.Text. Two clients starting from code on line 2 both insert one line before it and independently replace 2 with 3. Merging their actual sourceChanges updates produces this source, verbatim:
The remaining stored text is a fenced code block followed by
<!--calternal:block-identities [[33,["^abcdef"]]]-->. Both inserted lines survive, but the ID has no owner: IdentityDocument.read rejects line 33 and find('abcdef') returns null. Its previously hidden footer also enters the editable projection.The independent external test
concurrent code footer rebases preserve both insertions and the block IDfails withcode identity disappeared after concurrent newline insertion. It uses two actual Yjs replicas and the branch's IdentityDocument and sourceChanges implementations; no product code was changed. Full raw merged source and assertion are in review-probes.log.crates/notes/src/room/identity.rs:129-130 only rebases an unchanged exact footer. A concurrently merged changed footer bypasses that repair. A second probe using the real native room, durable receipt and save is queued to check the same failure on the server.
Review 7 finding, P1: typing in a note body silently rewrites a YAML block-scalar example as a task.
Head
9acf944d06.packages/editor/src/identity/document.ts:233 re-parses every line with its own checkbox regex and never excludes frontmatter. Start with these bytes:
Insert only ! at the end of body. The branch's IdentityDocument writes this unrelated YAML value:
The external test
body edit leaves frontmatter block scalar byte exactfails. This changes the stored value of example, even though the person typed only in the body. ADR 0066 explicitly excludes frontmatter from task syntax. An additional test through createEditor and its actual Y.Text binding is queued.This is also a format-ownership defect. The new regex disagrees with crates/tasks/src/found.rs:325, the task parser. Separate failing tests show that edits to 1. [ ] task, 2) [ ] task, - [>] task and - [?] task get no identity at all. The native parser accepts all four. Extend one shared parse/write/transform interface and use the actual frontmatter and CommonMark boundaries; another local regex repair would preserve the architectural defect.
Review 7 finding, P2: cutting the final line leaves its identity on an empty source line and changes the pasted block's identity.
Head
9acf944d06.packages/editor/src/identity/transfer.ts:43-46 cuts a final line without its preceding newline. identity/document.ts:209 does not treat that range as line deletion. Starting from first\nlast ^abcdef, cutting visible offsets 6..10 leaves these source bytes:
The empty line still owns abcdef. Paste into another note then sees that live source owner and assigns fresh1 instead of transferring abcdef:
The external test
cut of final line moves its ID instead of leaving it on an empty linefails: cut.find('abcdef') is 6 instead of null. This uses the exact range selected by the production empty-selection cut handler, plus the production IdentityDocument edit/paste path. A second test through real editor clipboard events is queued.The existing property oracle deletes the preceding newline for a last-line cut, while the actual clipboard handler does not. That difference explains why the seed run can pass despite this failure. Existing links now point to a blank line instead of the moved words.
Review 7 runtime corroboration on
9acf944d06:P1 concurrent footer corruption also occurs through the real native room. The external Rust test concurrent_footer_updates_keep_identity_in_real_room joins the note, derives two independent CRDT edits from its shared state, inserts lines above the code, updates each footer, sends both updates, waits for the durable save receipt and saves the file. The final native block_markers result contains zero owners of abcdef; expected one. Both the client model and the real room now independently fail this case. Full initial and merged source are in native-probes.log.
The P2 performance finding's first-capture path is also reproduced. first_capture_does_not_read_an_unrelated_indexed_note lets startup finish, leaves an unrelated indexed note as a deterministic read trap, then calls capture_task. The action fails with Internal: Is a directory (os error 21). This proves the action synchronously reads unrelated indexed notes after startup. The source loop reads every indexed note; no timing threshold or latency estimate is used. The separate one-keystroke test counted 1,004 line visits in a 1,000-line ordinary note.
The same Rust harness passed its native multi-line JSON footer and canonical joined-alias checks. Native accepts the multi-line footer as abcdef on the code line and hides it, while the editor probe has no identity and exposes the complete footer. That grammar disagreement is a separate format-ownership finding to be detailed in the final report.
The harness had 2 passing tests and these 2 expected failing regressions. Product code remains unchanged.
Review 7 finding, P2: block format readers disagree, and parse/write rules still have several owners.
Head
9acf944d06.packages/text/src/markers.ts:37 requires the footer JSON on one physical line. crates/core/src/visible.rs:161-180 accepts JSON whitespace, including newlines. With this complete source:
The independent native_accepts_multiline_footer Rust test passes: one abcdef owner targets code; the human projection is just the fenced code block. The editor comparison fails: IdentityDocument.read has no owners and its editable text includes the entire metadata footer. Native and editor therefore disagree about identity and which bytes are user text for the same file. Full outputs are in native-probes.log and review-probes.log.
The format interface is read-only, while writers live elsewhere: identity/document.ts:68-108 writes suffix and footer rules, notes/room/identity.rs:119-194 regenerates footer rules, and notes/capture.rs:94 constructs suffixes directly. Task syntax is likewise duplicated in found.rs:325, identity/document.ts:202,233, syntax/hidden.ts:34, lists/tree-lines.ts:40, and the web editing, backlinks and peek-lines helpers. The frontmatter and ordered/unknown-checkbox failures reported separately are concrete consequences of that duplication.
This does not meet the binding requirement that a format own its parse, write and transform rules in one module and that other consumers call its interface. Shared example vectors do not make independent grammars a single owner. The existing delegation wrappers in anchor, health, smartline, search and task block_id are not additional grammars and are not being flagged as such.
Independent review 7 finished. Verdict: DO NOT MERGE.
Reviewed branch issue/tasks-create-ids at
9acf944d06, detached in /home/agent/wt/tc-review7. Requested origin/dev comparison:2638870392. Merge base:3fc4f6b7d3. The branch is 60 dev commits behind and 18 ahead; I checked both diffs to distinguish its additions from dev-only changes.Five blockers, each with an independent failing test:
The real editor and clipboard corroboration produced these outputs, verbatim:
Every round-5/6 finding was checked against source and fresh regression runs:
Older contact crash identity, Make note marker preservation, clipboard marker confidentiality and Vim register/system-paste regressions also pass. The new cut finding concerns ownership, not the earlier confidentiality fix.
Fresh verification:
I overscoped a supplemental native run by raising every property to 20,000 cases. Its receipt property completed, but I stopped that redundant expanded run during a real-store undo property. Its exit 143 is incomplete, not passing and not a product failure. Every native property already passed in the completed workspace gate, and the separate requested editor operation stress completed at 20,000 seeds. Only this job's recorded timeout process and its own children were terminated.
All heavy local work ran sequentially through one build-slot.sh job after sourcing /etc/calternal/env.sh, cargo -j3, native test threads 1 and frontend workers 1. No performance latency benchmark or VM work was done. No production VM was touched.
Gate output, verbatim. Review probe failures are deliberate regressions against unchanged product code; the persisted native probe reads the resulting file from disk.
Full report, raw logs, probe source and screenshots. Representative browser screenshot.
Final HEAD and clean worktree verified. No product-code changes, commits, pushes, PRs, merges, deployments or issue closure. Findings are also saved at /home/agent/codex-jobs/tc-review7/findings.md.
Starting tc-design on isolated branch
proto/block-identity, based onorigin/devat2638870392e8dda7fa10d63babb0115036388749. Read round-7 findings and probe source. This is a throwaway design/proof branch, not a patch to the rejected branch. I will compare live CRDT identity models, port the failure boundaries, run a deterministic 20,000-seed two-client merge check, and publish a draft ADR. No shared branch edits, merge, deployment, or production access. Evidence stays in issue comments.Design finding: relative positions solve coordinate drift, but do not define ownership when their referenced text is deleted. Hiding
^idtext with decorations still leaves it in the editable/shared string. Recommendation under test: private Y.Text object embeds for identity, projected out before editor commands; structured clipboard operations and Y.UndoManager include identity changes. Position changes use Yjs item identity, never merged decimal line numbers. The serializer writes a fresh snapshot only after merge. Round-7 evidence: both clients replacing footer 2 with 3 yielded 33; two insertions should instead move the code anchor to line 4. The new prototype will replay that boundary using actual Yjs updates. A plain flat-markdown binding cannot be reused unchanged; this is a draft schema migration, not an endorsement of the rejected branch.Prototype finding: seeds 674 and 834 exposed two extra requirements beyond round 7. A bare object embed can be restored by local Undo on the other side of a concurrent inserted line; marker uniqueness alone passes while its text target is wrong. A cached RelativePosition also does not by itself name the newly recreated item after Undo. The revised prototype keeps private text-lineage attributes plus an ownership incarnation, verifies that the token is live, and resolves identity against surviving text of that incarnation. Local indexes rebuild inserted/restored items from Yjs deltas. This is why the stress check includes text witnesses, both update delivery orders, repeated updates, cut, joins, split, deletion and local Undo/Redo, rather than checking convergence alone. These are prototype findings; no product files were changed.
Proposed direction: keep IDs as private CRDT tokens plus text-lineage attributes and a note-scoped ownership map. The editor edits a marker-free projection. Disk markers are generated from the merged snapshot; decimal footer coordinates are never live shared text.
^id, hidden by decorationsRecommend the fourth option for the next implementation experiment. The first private-token draft failed a stronger case: Undo restored a token across concurrent inserted text. Lineage is necessary; uniqueness alone was not sufficient. Keep alias tokens through joins so concurrent joins cannot delete every candidate owner. Serial join keeps the first ID; contradictory concurrent alias cycles use a deterministic minimum-ID tie. Split keeps the first part (Enter at start keeps original words); deletion tombstones the token; Undo restores it. Cut changes the selected incarnation; copy allocates a new ID.
Migration: bootstrap each note once under a new room epoch from its exact disk revision. Preserve old inline IDs and aliases. Read the existing single/multiline footer only as an import format, validate its targets, then serialize a fresh snapshot. Reject corrupt/duplicate/missing targets and keep original bytes; never guess that 33 meant 4. Tasks/paragraphs use trailing
^id. Code blocks, table blocks and headings use immediately adjacent HTML metadata without coordinates. Canonical code anchors point at the first content line. Legacy IDs on other interior code lines currently stop rewrite safely; add a lossless intra-block representation before enabling migration for those notes. Obsidian’s documented standalone^idform names structured blocks, not arbitrary interior targets: https://help.obsidian.md/links . Adjacent metadata is a Calternal extension, not an Obsidian compatibility claim.One task-format interface owns checkbox parse/write/transform; one block-ID interface owns marker parse/write/migration. TS stays on the typing path; Rust and TS consume the same checked-in vectors under ADR 0053. Markdown structure supplies list/frontmatter/code context. Production adoption must replace existing independent consumers rather than add another parser beside them. First capture gets only create/allocation capabilities; reservations are maintained by the index/watch pipeline, with no request-time vault scan.
Limits are explicit in draft ADR 0067: this proof is not a product binding or native room migration. Cross-note cut requires a durable action receipt; unseen concurrent typing during a cut has ordinary Yjs source-side delete/insert semantics, not object-move semantics. Indexed structural commands, native validation, browser/IME/Vim tests, and old-peer/external-file epoch recovery remain adoption gates. Private schema state, tombstones and reservations must persist beyond markdown save/reopen.
Stress evidence update: seed 18609 reached an oracle error after 18,000+ seeds. A cut selected a mixed line whose surviving ID belonged to later words. After moving that whole line, a split before those later words must keep the ID with the first part, per the fixed owner decision. The first oracle incorrectly required the original ID's original word to remain in its target after every split. The corrected oracle records the cut receipt's first semantic prefix for each new incarnation, and a dedicated
prefix originalregression checks that rule. It still independently reconstructs actual token liveness and lineage targets from the public Yjs delta, and still fails wrong attachment, duplicate ownership, deletion drift and replica disagreement. The full 20,000-seed run is being repeated; earlier incomplete/failing stress runs are not counted as passes.Additional checks: the plain 1,000-line keystroke visits one line with no snapshot/toDelta calls. The 1,000-identified-task keystroke also visits one line and one range-filter entry, with the snapshot/global resolver disabled. First capture's dependency interface has no vault enumeration/read method, and a read-trap test checks its only action is create. These establish prototype boundaries, not a claim the existing product capture path has been fixed.
Finished tc-design. Pushed only
proto/block-identityat2e012c4a1b401b3d754ae5626768b230310225d7, based onorigin/dev2638870392e8dda7fa10d63babb0115036388749. Draft PR: #708 . The branch holds the isolated prototype, shared TS/Rust format vectors and draft ADR 0067. No product wiring, merge, deployment, issue closure, perf VM or production access. Worktree is clean; evidence stays outside git.Recommendation and migration proposal: #671 (comment) . Prototype findings: token/Undo ownership #671 (comment) and the cut/split oracle correction #671 (comment) .
The requested round-7 semantic probes pass: two partitioned Yjs clients inserting above code followed by merged save/reload, untouched frontmatter scalar, final-line cut, four missed task forms, multiline old footer, and 1,000-line typing. Extra tests cover alias/join/split/delete/Undo/Redo, duplicate cut incarnation ownership, 1,000 identified tasks, capture read capability, and safe migration refusal. Native shared vectors: 2 tests passed. TS suite: 18 passed, 0 failed. TS source and test types pass.
Exact operation-count and stress output:
Final gate output, verbatim:
Earlier token-only attempts failed stress, one original-witness oracle was corrected to obey first-part split semantics after whole-line cut, and an initial clippy style check failed before its fix. Those runs are not reported as passes. The successful full 20,000-seed run completed on the final TS/test code; only the independent Rust style correction was rechecked afterwards with native tests, fmt and clippy.
Adoption limits are explicit in ADR 0067. This is a bounded executable proof, not a production-ready resolution of #671. It still needs the native room/schema and real editor projection, indexed structural commands, cross-note cut receipts, lossless migration of arbitrary interior-code targets, actual browser/IME/Vim coverage and old-peer/external-edit recovery. Unsupported legacy interior targets fail rewrite rather than move to the wrong text. Ordinary Yjs concurrent cut/typing may leave unseen inserted characters at the source; choosing object-move semantics would require the separate-block model. No VM latency claim is made.
Starting independent defensive design review of draft PR #708. Review worktree: ~/wt/tc-design-review, detached at
2e012c4a1b(proposal branch proto/block-identity; dev base26388703). I will read ADR 0067 and the prototype before author discussion, add adversarial tests locally, and report evidence and a verdict. No product branch push, merge, or deployment.Independent block identity review
Contract: ADR 0067 at
2e012c4a1bplus fixed owner rules in the job. Author issue discussion has not been read. Worktree: /home/agent/wt/tc-design-review (detached). No product files changed.Initial scope distinction: prototype explicitly omits external-action reconciliation, schema/epoch admission, projection UI, cross-note atomicity, and interior-code migration writes. Missing integration is not evidence that Yjs itself fails; these remain adoption gates.
Review choices: tests use the public prototype commands in internal coordinates, as required by its documented adapter. Local operation-count tests only; no latency claims and no perf/prod machines touched. New tests and fuzz only in this worktree; artifacts/logs only in this job directory.
F1 — High: live empty identities vanish on typing or join
Repro tests:
typing into an imported empty block preserves identity,typing after clearing visible content preserves empty block identity,join keeps first ID when first block is emptyin tests/review.test.ts.Evidence:
^emptyinitially resolves to its live empty token;type(1, "שלום 👩🏽💻\ttext")yields no owner. Joining^first\nsecond ^secondyields no owner for either ID.typeselects lineage only from existing content;findrequires that lineage or a token-only line. Empty first block has no content lineage, and join aliases second to the now-unresolvable first.Rule: ownership stays with text on editing; Join keeps first ID and second as alias. Fix requires explicit empty-block lineage and join ownership semantics, not only a token plus surviving-text condition.
F2 — High: literal suffix and protected markdown are silently reinterpreted
Repro tests:
literal typed marker suffix survives reopen as text,protected literal suffix ....Evidence: type
^literalintoordinary; save/reopen changes visibleordinary ^literaltoordinaryand invents identityliteral. Four-backtick fence containing three backticks, invalid closing fence with trailing text, indented fenced code, and tab-indented code all cause literal^insideto be stripped on import. Fence detection checks only delimiter character, not length/indentation/closing grammar. A plain markdown text channel needs a defined escaping/ambiguity policy; arbitrary user text cannot share an unescaped reserved syntax without this loss.Rule: marker is never visible/corruptible; text survives save/reopen; files byte-exact except intended changes. Use syntax-tree structural context and reversible literal handling in the sole format owner.
F3 — High: CRLF is not a lossless import/save representation
Repro tests:
CRLF inline identity is private and intended edit preserves bytes,CRLF adjacent metadata preserves owner,protected literal suffix ... CRLF frontmatter.Evidence: parser only splits on LF; inline suffix matching sees trailing CR and fails, adjacent metadata does not end in
-->, and frontmatter boundaries do not equal---. Identity remains editable text or disappears. Additionally the CodeMirror Text projection normalizes CRLF to LF, so original line-ending bytes are not retained by the snapshot model. Test target expectations were corrected to normalized visible text, while disk bytes must remain exact.Rule: private marker, exact files apart from intended change; migration cannot silently reinterpret protected content. Preserve line-ending/trivia data explicitly or apply reversible patches against the original file representation.
F4 — High: empty fenced block metadata drifts to unrelated next paragraph
Repro test:
empty code metadata must conflict instead of relocating to neighbor.Evidence: read('\n
\n\nneighbor') returnsneighborwith IDempty-code, without error. The pending metadata survives both opening and closing fences; it is consumed by the next non-fence row. An external edit deleting the last code content line therefore retargets the block silently.Rule: every ID attached to right text; deletion must never drift to a neighbor; preserve original on ambiguity. Empty structured blocks need a representable structural anchor or explicit conflict.
Source-review finding: draft ADR 0067 explicitly leaves outside-file reconciliation, epoch/old-peer admission, native Yrs schema validation, browser binding and cross-note durable cut receipts unimplemented. The prototype confirms that boundary: load is bootstrap-only and the native crate only implements formats. Duplicate file IDs are rejected, but that is not a live-room reconciliation test. Changed IDs or removed HTML metadata while a room is open therefore remain unproved adoption gates; preserve both versions and conflict until revision-aware reconciliation is tested.
Cost finding: lines() resolves each ID through find(), and find() scans all content ranges. For N separately identified lines the current snapshot resolver is quadratic, although the ADR describes snapshot serialization as O(note size). The ADR acknowledges scan-based proof helpers, so this is a production indexing requirement, not a latency benchmark. A block-object model simplifies moves, but it still needs explicit concurrent join/split rules and projection work; there is no demonstrated simpler model satisfying every owner rule.
Independent review findings, now reproduced by tests in the review worktree:
Critical: Delete loses to an unrelated concurrent alias write. Base
alpha ^a\nbeta ^b. A deletes beta (b resolves null), B joins alpha/beta offline (b -> a), C edits alpha. After merge, b resolves to alpha (offset 1), although its token and text were deleted. Test:concurrent join cannot resurrect a remotely deleted ID as an alias. This violates Delete removes the ID forever except Undo. Alias resolution bypasses the deleted ID's lifecycle.Critical: a serial join/split/join retargets a third ID to unrelated text. Import
first ^a\nsecond ^b\nthird ^c; join first/second; split at raw offset 6. IDs a,b correctly stay on first; second has no ID; third has c. Join second/third. Expected c onsecondthird, actual c onfirst: join selects the retained b token and writes c -> b -> a. Test:retained alias token cannot steal ownership in a later serial join. Logical ownership cannot be inferred from retained token order.High: migration uses coordinates after deleting metadata lines. Adjacent heading metadata on physical line 1, heading on line 2, paragraph on line 3, and a legacy footer naming line 2 imports the legacy ID on paragraph. Test:
legacy footer coordinates refer to original file before adjacent metadata removal(also added to Rust). Reject mixed formats or map original source lines; never silently retarget.High adoption limitation: Enter at the start of identified code content keeps the ID with its words, as required, but moves the anchor to the second content line; save then throws
interior code anchor needs manual migration; do not relocate. This is reachable by ordinary edits to new-format notes. Test:Enter at start of identified code content remains saveable without relocation. The ADR admits the format gap; it applies beyond legacy migration.All 100,000 three-client seeds have completed, including undo/redo and paragraph/task/heading/code conversion edits. The witness oracle flagged 142 seeds; those flags are being replayed separately and are not needed to establish the two ownership counterexamples above. Targeted review gate: 7 pass, 20 fail. No product files changed.
Performance finding, measured by operation counts inside the required local build slot:
ordinary typing in one long line does not reread the entire notefails its no-full-note-read assertion. Avoid constructing the full candidate line when syntax classification is irrelevant. This is a medium hot-path finding, not a wall-clock benchmark.The 10,000-line fixture exceeded Bun's default 5-second timeout during setup on this shared host; the final test uses a 120-second timeout. That setup timeout is not counted as a model failure. No local latency claims, perf VM runs, or production access.
Additional high-severity concurrency finding: base
prefix\nwords ^id. Client A joins both lines and types#at visible start. Client B presses Enter at the start of words. Client C appends!to words. After duplicate/reversed three-client merge, expected ID onwords!(fixed Enter-at-start rule), actual ID on# prefix. Testconcurrent join and prefix typing cannot steal start-split identity from original textreproduces this in a few operations. The live token remains with words, but find selects an earlier prefix carrying the same lineage. Token liveness plus first surviving lineage is insufficient to implement this structural rule.Seed 826 also replays its reported witness failure: id4 resolves on
x# # ````, while its live token andWid4x tailx` survive on the next line. The public delta shows earlier prefix lineage separated from the token by a new unlabelled newline. I am reporting the 142 fuzz results as oracle flags, not 142 separately established bugs; some require a stronger semantic oracle for concurrent structural conversions. The independent serial retargeting, deletion resurrection and start-split tests establish the verdict without that uncertainty.Independent block identity review
Contract: ADR 0067 at
2e012c4a1bplus fixed owner rules in the job. Author issue discussion has not been read. Worktree: /home/agent/wt/tc-design-review (detached). No product files changed.Initial scope distinction: prototype explicitly omits external-action reconciliation, schema/epoch admission, projection UI, cross-note atomicity, and interior-code migration writes. Missing integration is not evidence that Yjs itself fails; these remain adoption gates.
Review choices: tests use the public prototype commands in internal coordinates, as required by its documented adapter. Local operation-count tests only; no latency claims and no perf/prod machines touched. New tests and fuzz only in this worktree; artifacts/logs only in this job directory.
F1 — High: live empty identities vanish on typing or join
Repro tests:
typing into an imported empty block preserves identity,typing after clearing visible content preserves empty block identity,join keeps first ID when first block is emptyin tests/review.test.ts.Evidence:
^emptyinitially resolves to its live empty token;type(1, "שלום 👩🏽💻\ttext")yields no owner. Joining^first\nsecond ^secondyields no owner for either ID.typeselects lineage only from existing content;findrequires that lineage or a token-only line. Empty first block has no content lineage, and join aliases second to the now-unresolvable first.Rule: ownership stays with text on editing; Join keeps first ID and second as alias. Fix requires explicit empty-block lineage and join ownership semantics, not only a token plus surviving-text condition.
F2 — High: literal suffix and protected markdown are silently reinterpreted
Repro tests:
literal typed marker suffix survives reopen as text,protected literal suffix ....Evidence: type
^literalintoordinary; save/reopen changes visibleordinary ^literaltoordinaryand invents identityliteral. Four-backtick fence containing three backticks, invalid closing fence with trailing text, indented fenced code, and tab-indented code all cause literal^insideto be stripped on import. Fence detection checks only delimiter character, not length/indentation/closing grammar. A plain markdown text channel needs a defined escaping/ambiguity policy; arbitrary user text cannot share an unescaped reserved syntax without this loss.Rule: marker is never visible/corruptible; text survives save/reopen; files byte-exact except intended changes. Use syntax-tree structural context and reversible literal handling in the sole format owner.
F3 — High: CRLF is not a lossless import/save representation
Repro tests:
CRLF inline identity is private and intended edit preserves bytes,CRLF adjacent metadata preserves owner,protected literal suffix ... CRLF frontmatter.Evidence: parser only splits on LF; inline suffix matching sees trailing CR and fails, adjacent metadata does not end in
-->, and frontmatter boundaries do not equal---. Identity remains editable text or disappears. Additionally the CodeMirror Text projection normalizes CRLF to LF, so original line-ending bytes are not retained by the snapshot model. Test target expectations were corrected to normalized visible text, while disk bytes must remain exact.Rule: private marker, exact files apart from intended change; migration cannot silently reinterpret protected content. Preserve line-ending/trivia data explicitly or apply reversible patches against the original file representation.
F4 — High: empty fenced block metadata drifts to unrelated next paragraph
Repro test:
empty code metadata must conflict instead of relocating to neighbor.Evidence: read('\n
\n\nneighbor') returnsneighborwith IDempty-code, without error. The pending metadata survives both opening and closing fences; it is consumed by the next non-fence row. An external edit deleting the last code content line therefore retargets the block silently.Rule: every ID attached to right text; deletion must never drift to a neighbor; preserve original on ambiguity. Empty structured blocks need a representable structural anchor or explicit conflict.
Integration boundary assessment (confirmed by ADR and source inspection)
No external-action importer/reconciler, file revision guard, persisted epoch admission validator, browser marker-free binding, or cross-note cut receipt implementation exists in this prototype.
Identity.loadis bootstrap-only; it is not a safe API for importing outside changes into an open room. Duplicate disk IDs are rejected byread, which is useful, but does not demonstrate conflict handling with a live room. Changed explicit IDs and removed heading/code metadata while open have no end-to-end tested path. Do not infer these guarantees from replica convergence. Safest integration policy until a real reconciler is tested: preserve both the live room and incoming bytes and surface a conflict for identity renames/removals or stale revisions; do not reload into an active epoch or replace its CRDT text.The native prototype implements only disk/task formats, not the structured Yrs room. A JS-level test cannot prove native schema rejection. A malformed old-peer update must be rejected before Yrs integration, not repaired after merge. These are admitted integration gates, not newly discovered CRDT implementation bugs.
Concurrent cut versus unseen typing is explicitly defined in the ADR as a snapshot move with surviving source insertions. The audit accepts that stated behavior for the narrow test: no unseen text disappears, one ID remains on the moved snapshot. This does not prove object-move semantics or cross-note atomicity. If the product requires concurrent typing to follow a moved block, the ADR's own limitation rules this candidate out without a stable shared content object.
Implementation cost assessment (initial)
The small proof is not a small production implementation. Production needs a visible/raw offset index (UTF-16, IME, Vim, selection and accessibility), logical ownership and alias component indexes, native schema validation, durable epoch/tombstone storage, cross-note receipts and recovery, a lossless Markdown/trivia representation, outside-file three-way reconciliation, and migration of every existing format consumer. Whole-snapshot
lines()callsfind()for every ID;find()scans all content ranges, so snapshot work can be quadratic in identified lines, not merely the O(note size) serialization the ADR describes. The ADR does acknowledge scan-based proof helpers, but production needs indexed resolution for saves too.No simpler model has been demonstrated to meet every fixed rule. Hidden inline markers fail the marker-protection rule, bare relative positions fail deletion/undo ownership, and a sidecar ID-to-line map does not define concurrent structural operations. Stable block objects make cut-versus-typing substantially easier because moving a reference preserves one shared content object, but still require an explicit join/split conflict protocol and flat editor projection. Calling that model a cheap rewrite would be misleading. Retaining a flat sequence is possible only with explicit logical block membership/lifecycle semantics; token order plus text attributes and an LWW owner map are not those semantics by themselves.
F5 — Critical: concurrent join resurrects a deleted ID
Repro test:
concurrent join cannot resurrect a remotely deleted ID as an alias.Base
alpha ^a\nbeta ^b\ngamma ^c(minimal test uses first two lines, third client edits alpha). Client A deletes beta: b resolves null. Client B, offline, joins alpha and beta: b aliases a. Merge with duplicate/reversed update delivery: b resolves at offset 1 on alpha, despite b's token/text being deleted. The alias resolver checks only the root's token/liveness, not the deleted ID's lifecycle.Rule: Delete removes the ID forever; only Undo restores it. A note-scoped owners map retaining reservations is not a deletion tombstone for alias resolution. Aliases need explicit lifecycle/deletion semantics; arbitrary alias paths must not bypass retirement. This is a sync ownership bug, not a missing browser binding.
F6 — Critical: a retained alias token steals unrelated identity in serial edits
Repro test:
retained alias token cannot steal ownership in a later serial join.first ^a\nsecond ^b\nthird ^c.second.firstand b's token. The visible blocks are first (IDs a,b), second (no ID), third (ID c), consistent with the fixed split rule.first, although its text issecondthird.Evidence: expected target(c)
secondthird, actualfirst; the preceding ID partition assertion passes.Rule: Join keeps first ID; ID attached to right text. This requires logical block ownership independent of retained token placement. Choosing a root deterministically for cycles does not solve this serial counterexample.
F7 — High: migration validates footer positions after removing source lines
Repro tests:
legacy footer coordinates refer to original file before adjacent metadata removal(TS) andreview_legacy_coordinate_uses_original_source_lines(Rust).Source: adjacent metadata for heading on physical line 1;
# Titleon line 2;paragraphon line 3; legacy footer naming line 2. read() removes the adjacent metadata line and then applies the footer coordinate to its rows array: legacy ID namesparagraph, not# Title. The test allows rejection of mixed syntax; successful import must never relocate the target. Actual import succeeds with the wrong target.Rule: validate legacy coordinate against that exact file, preserve original on ambiguity, attach to right text. Retain a source-line map or reject mixed metadata formats before stripping them.
F8 — High adoption limitation: ordinary code editing creates an unsaveable anchor
Repro test:
Enter at start of identified code content remains saveable without relocation.Import identified fenced code, then Enter at the start of its first content line. The fixed split rule correctly retains the ID with
content, now the second content line. write() throwsinterior code anchor needs manual migration; do not relocate. This is an ordinary edit of a current-format note, not only a legacy migration corner. The ADR already acknowledges unsupported interior-code targets; the test demonstrates that enabling ordinary edits immediately reaches that limitation. Needs a lossless intra-block representation or a different structural identity definition before adoption.Gate progress
The three-client run completed all 100,000 seeds, 671..100670 inclusive, up to 24 random commands each. Operation counts (insert/type/split/join/delete/cut/copy/undo/redo/type-conversion): [240222,239827,239862,240147,239662,240036,239960,239643,240600,239932]. There were 142 witness-oracle flags; seed 826 is being traced before attributing those flags to model defects. Replica equality alone is not the oracle. Targeted tests: 7 pass, 20 fail, including the independent serial and concurrent counterexamples above. Full verbatim logs will be posted on the issue at completion.
F9 — Medium: ordinary long-line typing reads the entire note twice
Repro test:
ordinary typing in one long line does not reread the entire notein review-cost.test.ts.A proxy counts UTF-16 units demanded through line.text, not wall-clock time. One character typed at the end of a 1,000,000-character ordinary note, with task parsing disabled, requests 2,000,002 units of line text (two full reads including the private token). The command constructs a complete candidate line even when checkbox classification is irrelevant. On a one-line note this is note-size work per keystroke; skip full line materialization for ordinary edits and limit syntax work to semantically affected ranges.
The 1,000- and 10,000-identified-line probes both show visits=1, rangeVisits=1, snapshots=0, full deltas=0 on the edit path. The 10,000-line fixture itself exceeded Bun's default 5-second test timeout on this shared host; its operation assertions passed, and the test timeout was raised to 120 seconds before the final gate. That timeout is harness setup, not a claimed latency regression.
Snapshot range-count probe confirms the earlier source finding: 128 identified lines -> 16,384 content-range visits; 256 -> 65,536. This is quadratic resolution at save, independent of wall-clock scheduling. No VM latency measurements were made.
F10 — High: concurrent join plus prefix typing defeats Enter-at-start ownership
Repro test:
concurrent join and prefix typing cannot steal start-split identity from original text.Base:
prefix\nwords ^id. A joins both lines, then types#at visible start. B presses Enter at the start ofwords(split at its first visible character). C appends!to words. Merge all three, with duplicate updates. Expected ID remains onwords!, as specified by Enter-at-start; actual ID resolves on# prefix. The prefix inserted by A inherits the same lineage as words, and find() chooses the earliest surviving lineage even across B's new boundary. The live token is still with words. A token-liveness guard plus first-lineage selection cannot distinguish the special start-split rule from ordinary first-part ownership.This is an independent small concurrency case prompted by replaying the fuzz's prefix-before-text flags; it is not claimed as a mechanically minimized seed 826.
Fuzz replay assessment
Seed 826 reproduces deterministically with the fixed actor IDs and yields identical replicas whose id4 points to
x# # ````, whileWid4x tailxsurvives on the following line with the live token. Its public delta contains an earlier# ` with id4 lineage, separated by an unlabelled newline from the token and original words. The full trace is in the job directory and will be posted as evidence. This confirms the reported flag is reproducible and identifies earliest-lineage selection as its mechanism. The 142 flags are oracle failures, not 142 independently proved bugs: some interleavings need a stronger semantic oracle for concurrent structural conversions and first-part ownership. The verdict does not depend on interpreting every fuzz flag; F5/F6 and the explicit F10 owner-rule test are independent counterexamples.Final verdict: UNSOUND as specified
Do not build production ownership on this resolution rule. A serial join/split/join can move an ID to unrelated text; a concurrent join can resurrect a deleted ID without Undo; and concurrent start-split plus prefix typing defeats the fixed ownership rule. Disk parsing can also retarget code/migration IDs and mutate literal text. These are contract failures, not merely missing UI tests. The broad ideas of private identity, an editor projection, durable CRDT state, and one format owner remain useful.
A workable next model must explicitly represent ID lifecycle and logical block/range membership. Each ID (including every alias) needs its own durable deletion state; join edges cannot bypass it. Join/split must update or deterministically derive logical membership from structural operations, not physical alias-token order or the earliest arbitrary run of an incarnation. Empty blocks need a real ownership state. Start-split must carry enough causal structure to keep identity with the original content amid concurrent prefix edits. Cut receipts must transfer ownership atomically without cloning the underlying text object if unseen edits are required to follow it. Preserve exact source trivia/line endings and original-coordinate maps in the one disk format; a revision-aware external reconciler must retain originals on ambiguity.
One candidate worth proving is stable block/content objects plus a causally ordered structural join/split/move layer and per-ID lifecycle tombstones. Moves then retain the shared content object, so concurrent edits follow it. Split references stable content ranges, join preserves ordered segments and alias lifecycles, and Undo reverses its own structural events while retaining remote content. The flat editor becomes a projection of those segments. This is a proposed design direction, not a claim that a few Y.Maps implement the missing protocol or that it is already proven. A repaired flat-sequence model could also work, but only after adding equivalent logical membership/lifecycle semantics; that is a substantive model revision.
There is no demonstrated simpler model meeting every rule. The smaller inline, footer, relative-position and sidecar-only alternatives omit lifecycle or marker integrity. The present prototype's small source size understates native-room, editor, persistence, format and reconciliation work. Production is a substantial cross-layer change; a token-only patch or one more regex cannot close these failures.
Completion and reproducibility
Reviewed proposal head:
2e012c4a1b; proposal dev base:26388703. Tests-only review branch: proto/block-identity-review. Review head:4b940361e9(pushed to origin). No product code changes; no merge, deploy, issue closure, main/dev push, or author-comment reading. Worktree clean. Evidence, gate logs, replay trace and native build artifacts remain outside the repository under ~/codex-jobs/tc-design-review.Final gates, all local heavy work serialized through /usr/local/bin/build-slot.sh after sourcing /etc/calternal/env.sh:
Replay commands (inside a build slot from prototypes/block-identity):
bun test tests/review.test.ts,bun test tests/review-cost.test.ts,FUZZ_FROM=826 FUZZ_COUNT=1 bun test tests/review-fuzz.test.ts; full three-client run leaves FUZZ_FROM/FUZZ_COUNT unset. Native target output may be redirected with CARGO_TARGET_DIR to keep artifacts outside the checkout.Finished the independent review. Verdict: UNSOUND as specified. Serial join/split/join retargets an ID to unrelated text; concurrent join resurrects a deleted ID without Undo; concurrent start-split and prefix typing puts identity on the prefix instead of the original words. Disk import also misreads literals, CRLF, empty code metadata and mixed legacy coordinates. A production design needs explicit logical membership and per-ID lifecycle, plus a lossless format and external reconciler. There is no demonstrated cheaper model meeting every owner rule; stable content objects help moves but still need a structural merge protocol.
Tests-only branch: proto/block-identity-review. Head SHA:
4b940361e9. Reviewed proposal head:2e012c4a1b, dev base26388703. The review worktree is clean. Full findings, rule mappings, limitations and implementation cost: review report, also ~/codex-jobs/tc-design-review/findings.md.Original gate: 18 pass, including 20,000 two-client seeds. New regression gate: 7 pass, 21 fail. Cost gate: 4 pass, 1 fail. Native: original 2 pass, new 5 fail. All 100,000 three-client seeds completed with undo/redo and type conversions; 142 witness flags, with seed 826 reproduced. Those flags are not 142 separately proved bugs. Type check, clippy and fmt pass. Heavy local commands held one build slot at a time; cargo used -j3. No product branch changes, merge, deployment or production/perf VM access. The issue remains open.
Gate output follows verbatim. The regression failures are intentional evidence against the proposal.
typecheck gate:
baseline gate:
review gate:
cost gate:
fuzz gate:
native gate:
clippy gate:
fmt gate:
replay gate:
Coordinator note: stopping implementation here.
issue/tasks-create-ids(9acf944d): DO NOT MERGE (5 blockers, comment 66317).2e012c4a): the independent break round (100,000 three-client seeds, branchproto/block-identity-review4b940361) found it unsound (deleted-ID resurrection through a concurrent join, alias theft in serial edits, empty-block and CRLF/fence losses; comment 66376).Same bug class across 5 rounds, so per our rule this goes back to the owner as a scope decision rather than another patch: Block IDs grill round 2 (B1-B4) in the roadmap doc. B1 recommends IDs only on tasks and on linked blocks (Obsidian-style, created on first link). No identity code lands until B1-B4 are answered and a narrower design survives the same break round.
Starting the narrower block identity prototype. Branch: proto/block-identity-2. Base: origin/dev at
2638870392. I will amend ADR 0056, port the independent failures and round 7 probes, and run the requested gates. No merge or deploy. Evidence and logs stay outside the repository.Design finding: B1 removes IDs from never-linked blocks but does not remove linked code or tables. An inline marker inside a fence is code text, and an inline marker in a table cell changes the cell. The amendment will use an ordinary Obsidian marker paragraph after linked code or tables, while text and heading blocks use inline suffixes. The Markdown syntax tree decides these boundaries. Review cases F4 and F8 will target the whole code block, including an empty code block, rather than an interior code line. Mixed old metadata forms are rejected with original bytes preserved (F7). A cold import with duplicated IDs has no proof of an original owner: both texts are preserved and both ambiguous occurrences receive new IDs; the old link remains missing. A revision-checked outside insertion can retain the known original and rekey only the pasted copy.
Additional format finding and correction: an opening fence typed above a linked paragraph swallows a later inline marker as code. A standalone marker cannot escape an unterminated fence. A new regression proves that saving this edit must use something beyond inline markers. The prototype now uses a SHA-256-guarded byte-range map only when inline or standalone markers cannot represent the linked ranges without changing text. The map contains entries only for identified ranges, is outside the Markdown body (after existing YAML frontmatter), and is disk serialization rather than shared CRDT text. Import rejects a stale map instead of moving IDs. This is a documented exception to inline-only storage; B1 still gives never-linked blocks no ID or map entry. The 1000-seed three-client pilot passed, including delete/join races, start splits, retained aliases, cut/copy, concurrent first links, Undo/Redo, conversions, outside pastes and protected CRLF text. The full 100000-seed gate is running.
Harness finding: the original fuzz pilot used low bits from a linear congruential generator while selecting families with seed modulo 12. That kept actor order and some branch choices fixed within a family. The text and lifecycle assertions still passed, but that was less variation than intended. I replaced the generator with xorshift and will rerun all 100000 seeds with varied actor order and deletion endpoints before publication. A further targeted regression checks that Undo of an explicitly identified insertion retains the reservation after room restart. Final cost instrumentation counts three block lookups, one inserted atom index update, zero full-text reads and zero rebuilds, independent of the 1000/10000-line fixture size; the earlier one-block figure counted distinct blocks rather than lookups.
Prototype regression findings corrected: the first TS regression run passed 31 of 33 cases. F3 CRLF adjacent-heading migration and F4 empty-code metadata both lost their IDs on save/reopen because the new writer retained target raw bytes after removing the old metadata row. Migration now invalidates that raw cache and writes the supported marker form; both cases pass. Alias flags are now serialized explicitly when a primary is absent, and the shared TS/Rust corpus includes that case plus the opening-fence and unterminated-code cases. The final non-fuzz gate has 93 passing tests and zero failures; Rust runs the same 19 task cases, 27 disk cases, 4 rejection cases and 5 edited-source cases. Task identity allocation is supplied through a small format-policy interface, not checkbox rules in the CRDT. Native tests, strict clippy, typecheck, formatting and whitespace checks pass. The stronger xorshift three-client run is in progress; full output will follow at completion.
Finished the narrower draft prototype and the local gates. Branch: proto/block-identity-2. Base:
2638870392. Head:14f9a187c4. Draft PR: #720.ADR 0056 is amended in a separate first commit. The prototype ports F1 through F10 and the identity-related round 7 model, format, capture and clipboard probes. All 93 targeted TS tests pass; Rust consumes the same 19 task vectors, 27 disk vectors, 4 rejection vectors and 5 edited-source vectors. The corrected xorshift run completed all 100000 seeds on three clients, 671 through 100670, with 1195919 assertions. Its twelve semantic families have explicit target-text expectations as well as convergence, unique-owner and retirement checks. Actor order, deletion endpoints and delivery order vary. It is bounded regression coverage, not proof over arbitrary histories.
The keystroke probe counts three block lookups, one inserted atom index write, zero text reads and zero rebuilds for both 1000 and 10000 lines and for a million-character ordinary line. No VM latency measurement was made.
The design explains why inline-only storage cannot preserve linked ranges under an opening or unterminated fence. Usual text markers remain inline; code and tables can use standalone marker paragraphs. A validated checksum map is the narrow fallback for identified ranges. Unlinked blocks have no ID or map entry. Literal suffixes and literal metadata comments remain text, and stale maps preserve incoming bytes as conflicts.
This is an isolated candidate for the independent break round. It does not replace the production editor or native room. Concurrent short-ID allocation admission, arbitrary outside-file three-way reconciliation, indexed editor offsets, durable room integration and atomic cross-note receipts remain adoption work. Outside insertion is revision-checked; arbitrary outside rewrites are not implemented by this prototype. Cold ambiguous duplicate IDs preserve both texts and rekey all ambiguous occurrences rather than guessing an original. The code/table review ports now address whole structural blocks, as stated in the ADR and test comments. These gates do not claim that unchanged production browser or native-room probes pass.
The worktree is clean. Only the new branch was pushed. No evidence or artifacts were committed. No merge, deploy, issue closure or prod/perf VM access. All local heavy gates used one build-slot job at a time, with cargo -j3 and the configured environment.
Gate output follows verbatim. Empty-output checks are recorded by their gate exit line.
typecheck
regressions-vectors-cost
native-fmt
native-tests
clippy
fmt-check
diff-check
fuzz-final
Starting independent break round tc-ids-break2. Review worktree /home/agent/wt/tc-ids-break2 detached at
14f9a187c4; proposal dev base2638870392. Tests will be pushed only to new branch proto/block-identity-2-review. Reading ADR 0056 amendment and source without author issue comments or conclusions. Probing prior F1-F6 and four-client identity/lifecycle/outside-file cases; artifacts stay outside the repository.Independent break round findings at
14f9a187, tests/break2.test.ts:Critical, B2: offline first link can survive concurrent deletion on residual text. Four clients start with
original\nneighbor. Actor 5 deletes original while actor 2 links original and actor 8 appends!to original. After duplicate reverse delivery, all replicas resolve the newly published ID to!, expected missing. Deletion records only observed names; it cannot retire the unseen link allocated to the deleted block. Actor ordering matters: deleting actor 2 variant passes. Repro:B2: offline first link versus delete, deleting actor 5.High adoption gap, concurrent allocation: forcing both disconnected allocators to produce abcdef for different blocks publishes two links, then merge moves the left link to right. The ADR explicitly admits missing allocation admission; this confirms why it must be implemented before adoption. Repro:
allocation admission: concurrent equal short IDs must not steal a published target. Expected left, received right.High, byte preservation: block-map import normalizes internal mixed endings and loses exact raw bytes. Repro
mapped mixed line endings survive save and reopen byte-exactly: replace prefix above a linked mixed-ending fence with opening fence, save/reopen/save. Binding end changes 17 to 18 and body hash changes with no edit on reopen.High, plain markdown exactness:
a \^literal and \<tag\nneighbor, prepend!on first line, save. Output drops both original backslashes. Reproplain imported backslashes survive intended unrelated edits byte-exactly. The private literal projection decodes escapes but atom creation uses decoded text rather than original source spelling.Medium adoption cost, O(changed lines): insert one character in first code content line of 10,000-line code block. Counts report 50,009 atom visits/index writes, expected fewer than 100. Existing cost tests only append to ordinary lines and miss the array splice/reindex path. Repro
typing at the start of a multiline code block does work proportional to changed lines. No latency claim; no perf/prod machine touched.Targeted gate so far: 15 pass, 5 fail, 129 expect calls. More probes and the four-client run are pending. These are independent source-and-test findings; author issue comments have not been read.
Critical: Undo of a split discards another client's text
Four-client fuzz seed 702, family 14, at the reviewed head. Client A splits at the end of the identified block, creating an empty right block. After sync, B types REMOTE into that new block and C types into the separate sentinel. After sync, A undoes its split, followed by duplicate/reverse delivery. All replicas converge with no REMOTE anywhere. Expected surviving REMOTE; actual combined text is
W2yqjp1שלום👩🏽💻\nthirdreview sentinelW2yqjp1שלום👩🏽💻. Seed 734 gives the same class.Rule: Undo withdraws only the author's operation and must retain remote insertions. State replay skips the withdrawn split, so its empty right block never exists; the remote type has neither a surviving character handle nor a block to resolve. The implementation preserves withdrawn
typehandles specially, but does not give the same protection to blocks created by split/insert or characters created by replace.Repro test:
Undo retains remote text anchored inside withdrawn empty splitin tests/break2.test.ts; full semantic fuzz replayFUZZ_FROM=702 FUZZ_COUNT=1 bun test tests/break2-fuzz.test.tsinside a build slot. Additional insert/replace variants are queued for targeted confirmation. The full 200,000-seed run is still in progress; this is a witnessed counterexample, not a final count.B4 independent contract assessment: yes, rekeying all cold ambiguous occurrences breaks links to the original. It cannot meet the literal keep-original rule in every case. A last indexed revision can sometimes establish correspondence, and should be consulted durably before declaring a file cold. It cannot always establish correspondence: prior
original ^aand incomingoriginal ^a\noriginal ^afit both prepend-copy and append-copy. Choosing the alignment from a diff algorithm would still be guessing.The prototype's exact-revision insertion API has enough provenance to rekey only the copy; that targeted probe passes. A general watcher/three-way revision reconciler is absent, as the ADR admits. Least harm when correspondence is unprovable: retain both texts and original incoming bytes, reserve the ambiguous ID, and leave its link missing rather than silently redirect it. With a durable live room, preserve the live original and incoming file as a conflict until correspondence can be proved. State the cold-file policy as an ambiguity exception to keep-original, not as an unconditional B4 guarantee.
This boundary assessment does not cause the unsoundness verdict by itself. The witnessed B2 deletion and Undo text-loss cases are independent protocol failures. The final four-client fuzz is at 60,000 of 200,000 seeds and still running.
Confirmed additional findings
Critical — Undo destroys remote insertions into an inserted or empty-split block
Repro:
Undo retains remote text anchored inside withdrawn insertandUndo retains remote text anchored inside withdrawn empty splitin tests/break2.test.ts, four clients. A creates LOCAL in a new inserted block (or an empty right block by end-split). After sync, B types REMOTE there. Sync, then A undoes its own structural command. All replicas contain only original; REMOTE disappears. Rule: remote insertions survive author-local Undo; round 1 text safety. Missing structural tombstones and retained character/block anchors, not a transport convergence failure. The replace variant preserves REMOTE as REMOTEoriginal and passes after correcting an overly strict test expectation; it is not a lost-text finding.High — concurrent whole-block task conversion is silently dropped by deletion
Repro:
late conversion insertions survive concurrent deletion as unlinked text. A deletesoriginal ^linked, B concurrently replaces it with- [ ] REMOTE; four clients merge. ID linked is correctly missing, but REMOTE is absent everywhere. Rule: the ADR says late insertions at deleted blocks survive as unlinked text. replace resolves only live blocks, unlike type, and skips the replacement insertion. If whole-block replacement is intended to have a different delete policy, that must be an explicit contract change; the present API does not state one.High — checksum-map validation can silently change unlinked human text
Repro:
map validation preserves unlinked human text as well as linked ranges. Startordinary\nwords ^linked; replace first block withtyped \^literaland second with an unclosed code block. Saving uses a map. Reopen changes the first block totyped ^literal, silently removing a typed backslash. Rule: literal text/save-reopen preservation, B1 unlinked content safety. readMap parses gaps with read(..., false), which still decodes private escape spellings, while writeMap stored raw human text. Fallback write validation compares linked targets and aliases but never validates the complete human-text projection. This is distinct from merely canonicalizing imported Markdown escapes.High — native protected Markdown recognition disagrees with TS
Shared vector
reference definition is protected, source[target]: ^literal\n\nwords: TS has no identities; native imports ID literal and reduces the definition text to[target]:. Native CommonMark events omit reference definitions, and the format owner does not supply their literal spans. Rule: F2 protected syntax, one format owner with shared TS/Rust behavior, no literal-content reinterpretation. Shared fixture is consumed verbatim by both test suites.Medium — native invalid migration ID validation differs from TS
Shared rejection vectors: adjacent metadata
["^^invalid"], and footer[[1,["^^invalid"]]]. TS rejects both; native accepts and strips every leading caret through trim_start_matches. Rule: invalid migration IDs preserve the original rather than guessing/normalizing; shared behavior contract. Native shared_break2_reject_contract fails with both accepted source strings.High — format-level changed structured rows normalize unrelated line endings
Shared vector
mixed code endings on edit: source code has opening CRLF, internal LF then CRLF; append!to its closing-fence text through the format interface. Both TS and Rust format writers normalize the internal LF to CRLF. The TS model type path retains per-atom endings in its ordinary code-edit regression; the direct format interface does not. Native Line has no per-line endings field. Rule: exact source spans and newline bytes apart from the intended edit. Together with the separately proved no-op mapped-reopen failure, this blocks claiming lossless native serialization.Low / adapter precondition — arbitrary UTF-16 offsets can split a Unicode scalar
Repro
a split inside a Unicode scalar is rejected or retains well-formed text: split👩 ^linkedat UTF-16 offset 1; model accepts and creates two blocks with isolated surrogates. Rule: Unicode and byte-preserving serialization. The public model checks offset bounds, but not scalar boundaries. A browser adapter may avoid such offsets; that binding is absent, so this is an explicit API/integration precondition, not a proved browser failure.Final fuzz assessment
All 200,000 seeds, 671 through 200670 inclusive, were attempted with four active clients and 16 families, 12,500 seeds per family. 3,090,022 assertions. Totals: 532879 types, 58011 splits, 88115 joins, 54701 deletes, 29914 cuts, 29636 copies, 92245 links, 185919 Undos, 154831 Redos, 48435 conversions, 29824 outside insertions. Gate failed: 25,614 witness seeds. Families 0-11 (proposal semantic families extended to four clients) have zero flags. New family 12 has 6246 unseen-link/delete flags, family 14 has 6250 Undo-remote-text flags, family 15 has 12500 mixed-ending map flags. These 24,996 flags reproduce the independently targeted classes, not 24,996 distinct bugs.
Random-history family 13 has 618 flags. Replay of its first witness, seed 1341, deterministically reaches
unrepresentable identity; preserve originalafter splitting between the two UTF-16 code units of an emoji modifier, producing isolated surrogates. A full trace stays in this job directory. Those 618 flags have not all been minimized and must not be claimed as 618 production protocol defects. The generator deliberately uses arbitrary UTF-16 offsets; valid-scalar-boundary admission must be made explicit. The verdict does not rely on interpreting this family. Replays retain seed bounds through FUZZ_FROM/FUZZ_COUNT.Verdict: UNSOUND as implemented
The narrower logical-object direction fixes the earlier F1-F6 regression probes, but this operation protocol still violates delete-wins for IDs allocated offline to the deleted block, and Undo of structural creation can erase another client's text. These are failures of the implemented lifecycle and replay model, independent of the admitted production integration gaps. Serialization additionally changes human text and exact bytes, and native literal/migration behavior diverges from TS.
Changes required before another soundness claim: retire identities by logical-block deletion state including unseen allocations; retain causal block/character anchors when structural operations are withdrawn; define consistent insertion survival for replace; preserve raw source spelling and each newline through all map/format paths; validate the complete human-text projection after fallback serialization; align native protected syntax and ID validation with shared vectors; require scalar-safe edit coordinates; replace linear array reindexing with the production offset/order index. Concurrent short-ID admission, durable checkpoints/epochs, arbitrary outside three-way reconciliation, native room and marker-free editor bindings, and cross-note/crash-safe publication remain explicit adoption gates, not features established by this audit.
B4: the revision-aware exact-insertion path keeps the known original. Rekey-all is the least-harm fail-closed choice only when provenance cannot identify it; it breaks the original link and must be described as an ambiguity exception. A prior revision helps but cannot always distinguish identical prepend and append copies.
Final gate status
All local heavy commands used a single build-slot job at a time after sourcing /etc/calternal/env.sh. No perf, staging or production machine was touched.
The initial targeted gate included one overly strict expectation that Undo of replace must yield exactly original despite preserved REMOTE text. It was corrected to require both original and REMOTE, and the final targeted gate rerun. The fuzz runtime was not changed after its complete run; only a TypeScript definite-assignment annotation changed while it ran. No product code changes are included.
Finished independent break round tc-ids-break2. Verdict: UNSOUND as implemented. Reviewed proposal
14f9a187c4, dev base2638870392. Tests-only branch proto/block-identity-2-review pushed, review heada61bf4179e. Five added test/fixture files, no product changes. Worktree clean. No main/dev/product-branch push, merge, deploy or issue closure. Author issue comments were not read.Existing gates: 93 pass, 0 fail. Final new TS probes: 26 pass, 15 fail. Native original vectors: 4 pass; new shared tests: 2 fail. TypeScript, native Clippy, formatting and diff checks pass. Four-client run attempted all 200,000 seeds: 25,614 witness flags; 24,996 are in the three targeted semantic failure families, and 618 random-history flags are qualified in the findings. Replay 1341 reaches an isolated-surrogate offset; those flags are not all claimed as production defects. The separate replace-Undo probe preserves remote text and passes with the corrected oracle.
Critical failures: unseen first links survive deletion, and Undo of inserted/empty-split blocks erases remote text. Additional findings and the B4 ambiguity exception are in preceding comments. Local report: ~/codex-jobs/tc-ids-break2/findings.md. Evidence and build artifacts remain outside the repository. No perf, staging or production machine was touched. All local heavy commands ran through build-slot.sh, one job at a time; cargo used -j3.
Final gate output follows verbatim. Empty logs are still shown. Failing defensive tests are intentional review evidence.
TypeScript final (exit 0)
Existing regressions and vectors (exit 0)
Final new probes and shared vectors (exit 1)
"
Received + 1
(fail) break2 shared format: map mixed endings no-op [15.69ms]
11 | if (vector.edit) {
12 | const row = rows[vector.edit.index]!
13 | row.text = ('prefix' in vector.edit ? vector.edit.prefix : '') + row.text +
14 | ('suffix' in vector.edit ? vector.edit.suffix : '')
15 | }
16 | if (vector.disk !== undefined) expect(write(rows)).toBe(vector.disk)
^
error: expect(received).toBe(expected)
neighbor"
Received + 1
(fail) break2 shared format: escaped ordinary source spellings on edit [4.92ms]
11 | if (vector.edit) {
12 | const row = rows[vector.edit.index]!
13 | row.text = ('prefix' in vector.edit ? vector.edit.prefix : '') + row.text +
14 | ('suffix' in vector.edit ? vector.edit.suffix : '')
15 | }
16 | if (vector.disk !== undefined) expect(write(rows)).toBe(vector.disk)
^
error: expect(received).toBe(expected)
"```
first
second
"
Received + 1
(fail) mapped mixed line endings survive save and reopen byte-exactly [8.04ms]
163 | const m = note('ordinary\nwords ^linked')
164 | m.replace(m.key(0), 'typed \^literal')
165 | m.replace(m.key(1), '```\nwords')
166 | const saved = m.disk(), r = note(saved)
167 | expect(saved).toContain('calternal:block-map')
168 | expect(r.blocks()[0]!.text).toBe('typed \^literal')
^
error: expect(received).toBe(expected)
Expected: "typed ^literal"
Received: "typed ^literal"
(fail) map validation preserves unlinked human text as well as linked ranges [5.56ms]
172 |
173 | test('plain imported backslashes survive intended unrelated edits byte-exactly', () => {
174 | const source = 'a \^literal and \<tag\nneighbor'
175 | const m = note(source)
176 | m.type(m.key(0), 0, '!')
177 | expect(m.disk()).toBe('!' + source)
^
error: expect(received).toBe(expected)
neighbor"
Received + 1
(fail) plain imported backslashes survive intended unrelated edits byte-exactly [3.80ms]
(pass) native-compatible migration: ordinary inline and both footer layouts keep longer IDs [6.26ms]
(pass) retired aliases do not poison the primary across join Undo and durable restart [4.41ms]
204 | const m = note('
\n' + 'line\n'.repeat(10000) + ''), key = m.key(0)205 | m.resetCounts()
206 | m.type(key, 4, '!')
207 | // Only the first content line changed. An index should avoid rewriting every
208 | // subsequent character's numeric index on each keystroke.
209 | expect(m.state.counts.atoms).toBeLessThan(100)
^
error: expect(received).toBeLessThan(expected)
Expected: < 100
Received: 50009
(fail) typing at the start of a multiline code block does work proportional to changed lines [145.53ms]
220 | const index = operation === 'replace' ? 0 : 1
221 | b.type(b.key(index), operation === 'empty split' ? 0 : 2, 'REMOTE')
222 | sync(a, b, c, d)
223 | a.undo.undo()
224 | sync(a, b, c, d)
225 | expect(a.blocks().map(b => b.text).join('\n')).toContain('REMOTE')
^
error: expect(received).toContain(expected)
Expected to contain: "REMOTE"
Received: "original"
(fail) Undo retains remote text anchored inside withdrawn insert [5.54ms]
(pass) Undo retains remote text anchored inside withdrawn replace [4.86ms]
220 | const index = operation === 'replace' ? 0 : 1
221 | b.type(b.key(index), operation === 'empty split' ? 0 : 2, 'REMOTE')
222 | sync(a, b, c, d)
223 | a.undo.undo()
224 | sync(a, b, c, d)
225 | expect(a.blocks().map(b => b.text).join('\n')).toContain('REMOTE')
^
error: expect(received).toContain(expected)
Expected to contain: "REMOTE"
Received: "original"
(fail) Undo retains remote text anchored inside withdrawn empty split [3.96ms]
233 | const first = a.link(a.key(0)), second = b.link(b.key(0))
234 | a.delete(a.key(0))
235 | c.type(c.key(0), 8, '!')
236 | sync(a, b, c, d)
237 | expect(a.target(first)).toBeNull()
238 | expect(a.target(second)).toBeNull()
^
error: expect(received).toBeNull()
Received: "!"
(fail) B2: delete of first linked ID concurrent with another first link retires both [2.13ms]
243 | const base = note('original ^linked'), a = fork(base, 2), b = fork(base, 3), c = fork(base, 4), d = fork(base, 5)
244 | a.delete(a.key(0))
245 | b.replace(b.key(0), '- [ ] REMOTE', {list:true})
246 | sync(a, b, c, d)
247 | expect(a.target('linked')).toBeNull()
248 | expect(a.blocks().map(b => b.text).join('\n')).toContain('REMOTE')
^
error: expect(received).toContain(expected)
Expected to contain: "REMOTE"
Received: ""
(fail) late conversion insertions survive concurrent deletion as unlinked text [2.31ms]
257 | close(m)
258 | return
259 | }
260 | // In Unicode mode this matches isolated surrogate code points, not a valid
261 | // pair. The adapter must enforce this boundary if the model does not.
262 | expect(m.blocks().every(row => !/[\uD800-\uDFFF]/u.test(row.text))).toBe(true)
^
error: expect(received).toBe(expected)
Expected: true
Received: false
(fail) a split inside a Unicode scalar is rejected or retains well-formed text [1.60ms]
15 tests failed:
(fail) break2 shared format: map mixed endings no-op [15.69ms]
(fail) break2 shared format: escaped ordinary source spellings on edit [4.92ms]
(fail) break2 shared format: mixed code endings on edit [1.67ms]
(fail) B2: offline first link versus delete, deleting actor 5 [4.54ms]
(fail) B2 minimal: first offline link cannot keep a concurrently deleted block live and empty [3.94ms]
(fail) allocation admission: concurrent equal short IDs must not steal a published target [2.07ms]
(fail) mapped mixed line endings survive save and reopen byte-exactly [8.04ms]
(fail) map validation preserves unlinked human text as well as linked ranges [5.56ms]
(fail) plain imported backslashes survive intended unrelated edits byte-exactly [3.80ms]
(fail) typing at the start of a multiline code block does work proportional to changed lines [145.53ms]
(fail) Undo retains remote text anchored inside withdrawn insert [5.54ms]
(fail) Undo retains remote text anchored inside withdrawn empty split [3.96ms]
(fail) B2: delete of first linked ID concurrent with another first link retires both [2.13ms]
(fail) late conversion insertions survive concurrent deletion as unlinked text [2.31ms]
(fail) a split inside a Unicode scalar is rejected or retains well-formed text [1.60ms]
26 pass
15 fail
202 expect() calls
Ran 41 tests across 2 files. [363.00ms]
Native Clippy all targets, -D warnings (exit 0)
Native fmt check (exit 0)
Diff check (exit 0)
Four-client 200000-seed gate (exit 1)
review sentinelW2tqy5yשלום👩🏽💻"
FUZZ WITNESS seed=684 family=12: expect(received).toBeNull()
Received: "!"
FUZZ WITNESS seed=687 family=15: expect(received).toBe(expected)
FUZZ WITNESS seed=700 family=12: expect(received).toBeNull()
Received: "!"
FUZZ WITNESS seed=702 family=14: expect(received).toContain(expected)
Expected to contain: "REMOTE"
Received: "W2yqjp1שלום👩🏽💻\nthirdreview sentinelW2yqjp1שלום👩🏽💻"
FUZZ WITNESS seed=703 family=15: expect(received).toBe(expected)
FUZZ WITNESS seed=716 family=12: expect(received).toBeNull()
Received: "!"
FUZZ WITNESS seed=719 family=15: expect(received).toBe(expected)
FUZZ WITNESS seed=732 family=12: expect(received).toBeNull()
Received: "!"
FUZZ WITNESS seed=734 family=14: expect(received).toContain(expected)
Expected to contain: "REMOTE"
Received: "W339k0jשלום👩🏽💻\nthirdreview sentinelW339k0jשלום👩🏽💻"
FUZZ WITNESS seed=735 family=15: expect(received).toBe(expected)
FUZZ WITNESS seed=748 family=12: expect(received).toBeNull()
Received: "!"
FUZZ progress=10000/200000
FUZZ progress=20000/200000
FUZZ progress=30000/200000
FUZZ progress=40000/200000
FUZZ progress=50000/200000
FUZZ progress=60000/200000
FUZZ progress=70000/200000
FUZZ progress=80000/200000
FUZZ progress=90000/200000
FUZZ progress=100000/200000
FUZZ progress=110000/200000
FUZZ progress=120000/200000
FUZZ progress=130000/200000
FUZZ progress=140000/200000
FUZZ progress=150000/200000
FUZZ progress=160000/200000
FUZZ progress=170000/200000
FUZZ progress=180000/200000
FUZZ progress=190000/200000
FUZZ progress=200000/200000
FUZZ COMPLETE clients=4 seeds=200000 first=671 last=200670 families=[12500,12500,12500,12500,12500,12500,12500,12500,12500,12500,12500,12500,12500,12500,12500,12500] operations={"type":532879,"split":58011,"join":88115,"delete":54701,"cut":29914,"copy":29636,"link":92245,"undo":185919,"redo":154831,"conversion":48435,"outside":29824} failures=25614 failedFamilies=[0,0,0,0,0,0,0,0,0,0,0,0,6246,618,6250,12500] witnesses={"12":684,"13":1341,"14":702,"15":671} oracle=text,lifecycle,unique-owner,byte-preservation delivery=reverse,duplicate undo=author-only
370 | if ((seed - from + 1) % 10000 === 0) console.log(
FUZZ progress=${seed - from + 1}/${count})371 | }
372 | console.log(
373 |
FUZZ COMPLETE clients=4 seeds=${count} first=${from} last=${from + count - 1} families=${JSON.stringify(families)} operations=${JSON.stringify(totals)} failures=${failures} failedFamilies=${JSON.stringify(failedFamilies)} witnesses=${JSON.stringify(witnesses)} oracle=text,lifecycle,unique-owner,byte-preservation delivery=reverse,duplicate undo=author-only374 | )
375 | expect(failures).toBe(0)
^
error: expect(received).toBe(expected)
Expected: 0
Received: 25614
(fail) independent four-client semantic and history fuzz, 200000 seeds [1344549.57ms]
0 pass
1 fail
3090022 expect() calls
Ran 1 test across 1 file. [1344.58s]
FUZZ_EXIT=1
Started tc-ids-simple on branch proto/block-identity-3 in fresh worktree /home/agent/calternal-tc-ids-simple. Base origin/dev:
2638870392. Testing the proposed ordinary Y.Text marker model, especially whether merged text plus a retired-ID set contains enough information for B2. No merge or deploy.Finding: the stated pure normaliser boundary cannot satisfy B2 and first-link creation simultaneously. Executable four-client Yjs 13.6.33 witness: start with unlinked original. A deletes all original characters; B offline appends
^0000in; C inserts!at the start; D inserts?at the start. Duplicate/reverse update delivery converges to!? ^0000in, retired IDs empty (the deleter observed no ID). B2 requires the offline ID to be missing. A separate live history starts with unlinked!?and creates its first link, yielding exactly the same text and empty retired set; its ID must resolve to!?. Any pure function of those inputs returns the same result for both histories. Retaining fails B2; retiring fails a valid first link. The local proof test passes by asserting indistinguishability and opposite required outcomes, not by asserting model compliance. Native Y.UndoManager split-Undo control preserves REMOTE. A focused 200,000-case variation run is next; this is not a port of the full break suites or full requested semantic fuzz. Implementation is limited to the counterexample because no CodeMirror guard or Rust port can restore information absent at this boundary. Additional Yjs causal deletion information could change the interface; this finding does not prove that every Yjs-only design is impossible.Implementation gate blocked by the witnessed contradiction in the specified normaliser interface. No input is being requested: this job will publish the counterexample and ADR amendment as a draft. Strengthened the witness delivery to apply Y.mergeUpdates in one transaction before replaying duplicates. Thus no client needs to see an intermediate empty marker line that could trigger a heuristic retirement. The first focused 200,000-case run completed its assertions but Bun reported its default 5-second test timeout (84.73 seconds actual run); it is not counted as a passing gate. The final run has an explicit 600-second test allowance and checks exact converged marker bytes on all four replicas as well. No full break-suite, Rust, editor-protection, broad semantic fuzz or typing-work gate is claimed.
Finished tc-ids-simple as a disproof of the specified hypothesis. Head:
e78ee75ff3. Branch: proto/block-identity-3. Base:2638870392. Draft PR: #722 (draft true).The merged text
!? ^0000inand empty retired-ID set arise both from deleting an unlinked paragraph concurrently with its first offline link and remote human insertions, and from simply linking a live!?paragraph. The first requires a missing ID under B2; the second requires a live target. The four-client witness coalesces all offline updates, so there is no required intermediate empty marker line. A pure normaliser over the specified inputs cannot meet both obligations. The native Y.UndoManager control preserves REMOTE when undoing the author's split, unlike #720's replay.Final focused gate attempted 200,000 cases, seeds 671 through 200670 inclusive, varying IDs, Yjs actors, input text, update order and local Undo/Redo. All 200,000 reproduced indistinguishable boundary inputs; this is one information-loss class, not 200,000 distinct bugs. The focused test uses four active clients in the deletion history and four replicas in the live-link control. It is not the requested full semantic fuzz. Assertions passing confirm the disproof, not model compliance.
Not implemented or claimed: production normaliser, CodeMirror protections, Rust format/vectors, full F1-F6 or all 41 break2 ports, broad semantic fuzz, or 1,000-line per-keystroke counts. The contradiction blocks those implementation gates for this exact interface. ADR 0056 gives the comparison and production cost. A revised interface using Yjs causal deletion information may still keep Yjs as the only CRDT; this branch introduces no replacement replay protocol.
All local heavy commands used one build slot at a time after sourcing /etc/calternal/env.sh. No perf, staging or production machine touched. No merge, deployment, issue closure or evidence files committed. Clean worktree; git diff --check exit 0. Only proto/block-identity-3 pushed.
Final verbatim gate output (command: WITNESS_COUNT=200000 bun test tests && bun run check inside build-slot.sh):
The preliminary run hit Bun's default timeout despite completing its assertion loop; its failure was disclosed in the earlier comment. The final run has an explicit 600-second allowance and includes the coalesced-update strengthening. No failing preliminary run is counted as a pass.
Coordinator note: pausing identity design jobs pending the owner's answer to B5 in the roadmap doc.
a61bf417.Recommendation put to kayg (B5): the server, which sees every edit in causal order, is the single authority that confirms, retires and re-keys IDs. Devices only propose IDs, by the B1-B4 rules.
Starting adr-0056-r2 on docs/adr-repeats-r2 from PR #700 head
e79e7da442. Dev base:77030f8b1e. I will first merge origin/dev locally, then amend only the ADRs and run the document gate. The job contains conflicting push directions: its hard rule requires a new branch and PR for updates to an open PR, while its last line requests docs/adr-repeats only. I am following the hard rule and will link the new PR from #700. No remote merge, deploy or issue closure.Findings after merging dev locally without conflicts: ADR 0056 resolved block IDs only with the named note and left external moved links missing; its Open section also left hosting undecided. The amendment now makes Home-wide links follow moves and records root-only hosting. Its unconditional join/copy wording and the automatic outside-log marker allocation in 0067/0068 conflicted with B1; 0066 text merging and 0068 latest-edit wording needed the B2 deletion exception. Only the four ADRs are edited. B4 exact roadmap answer was not found in the 306 available #671 comments: comments 66377 and 66707 refer to the roadmap, and 66673 assesses B4 duplicate imports without quoting the accepted answer. As instructed, the ADR says "B4: recommended option accepted, see #671". B5 stays Open with the server-authority recommendation from comment 66707. This is the B4 source gap to carry in the final report.
Finished adr-0056-r2: #728 (docs/adr-repeats-r2 into dev).
Head:
9ca59c8fc7. Remote branch matches. Dev was merged locally first without conflicts. Only ADR 0056, 0066, 0067 and 0068 differ from dev at77030f8b1e; worktree clean. No remote merge, deploy or closure.The hard rule requiring a new branch and PR was followed; docs/adr-repeats and PR #700 remain untouched except for comments. The replacement PR carries #700 plus this amendment.
B4 source gap: the exact accepted roadmap text was not found in #671 comments, so the ADR uses the instructed fallback, "B4: recommended option accepted, see #671". B5 alone remains Open with the server-authority recommendation.
The prior gate script was not available locally. An external Python gate reproduced its published render, links/anchors, YAML, core size, retained repeat/release rules, diff, scope and cleanliness checks, with additional checks for this amendment. Rendered HTML and gate artifacts remain outside the repository.
Gate output verbatim:
B5 decided by kayg, 28 Oct (roadmap doc): the server is the single authority for block IDs, since it keeps the version history. Devices only propose an ID when a link is made; the server confirms, retires or re-keys it on sync by the B1–B4 rules. Offline, a new link works at once and is confirmed on reconnect. ADR 0056 still lists B5 as Open; it gets updated next.
🤖 Generated with Claude Code
Starting the server-authority prototype on proto/block-identity-server, based on origin/dev at
3d0c6e33d5. Reading ADR 0056 and the prior break results before implementing and rerunning the gates. No merge or deployment.First targeted run: 40 of 41 ported break2 probes passed. The retained format parser misclassified
[target]: ^literalas a block ID (vector_03: actual ["literal"], expected []). Fixing the shared grammar using CommonMark reference-definition spans. Offline first-link/delete, author split Undo with remote text, equal proposals, per-owner retired aliases, byte preservation and restart tests passed in that run.Protocol choices: proposals identify the stable private block handle and carry a receipt; equal provisional ID strings on disconnected devices are distinguished by that receipt until server confirmation. No bare confirmed URL can represent two simultaneous identical provisional IDs. Native Yrs updates carry text; server commands are admitted once in session order, with no state-replay text protocol. Under current ADR B2 the deleted block's remote text stays in recoverable history, not as a live block. Ambiguous cold duplicate imports retain incoming bytes as a conflict; revision-checked outside insertions can rekey the known pasted copy without guessing.
All 41 ported break2 probes pass after the reference-definition grammar fix.
New randomized witness seed 713: type T000713_01Z, later create/copy an empty block, then Undo the empty copy. The wrapper recorded a text Undo even though native Yrs created no undo item, so it undid the older typing. Fixed by recording a no-op inverse for an empty creation. The original seed remains reproducible in the harness.
Seed 801 exposed a stale join Undo after a different device changed the joined structure. It refused admission and blocked the outbox. Changed the conditional structural inverse to preserve current text and return a conflict receipt when its original members no longer form the expected group. This does not withdraw or replay remote text. A conflicted structural Undo does not promise to restore the former layout. No passing long-run result is claimed yet; testing continues.
Seed 973 found another ownership bug: a stale proposal naming the second block's existing ID reached the server after a join, and admission mapped its receipt to the first block's primary. A later deletion of the second owner then left that receipt live on the first owner. Fixed by retaining the original ID/owner for an existing proposal; new links created with knowledge of a join choose the known primary's owner. The minimized case is in authority.rs. The 1,000-run smoke test (seeds 671–1670) passed after this fix.
The device typing path now maintains an incremental rope from native Yrs deltas. The 10,000-line code probe checks that a keystroke does not materialize the full block. This is an operation-work check, not a server performance measurement. Draft design notes explicitly retain adoption limits: joined-fragment splitting, legacy note-local namespace collisions, complete structural Undo of empty containers, real room/URL integration, and transactional persistence/performance. The 100,000-run result and workspace gates are still pending.
The first workspace clippy gate caught three prototype lint errors: an identical if/else left after the format byte-preservation fix, a collapsible no-op-map condition, and a large Create command variant. Fixed the first two and boxed the Create row. Workspace tests and the 100,000-run gate continue through the same single build-slot job; final fmt/clippy checks will be rerun after the edits.
The exact-byte Undo check now passes for empty and nonempty creations: native Undo removes the author's text, then server admission conditionally retires the created container only if its text is empty. Remote text keeps the container live. Device-supplied emptiness is only a hint; the server recomputes it. This removes the empty-container limitation mentioned in my preceding comment.
Workspace gate failed in an existing notes durability fixture. Evidence: Bun stderr says
Cannot find module 'y-protocols/sync' from packages/editor/src/sync/protocol.ts; the parent then parses empty stdout and fails withEOF while parsing a valueat history_durability.rs:464. Notes reported 424 passed, 1 failed, 6 ignored. This worktree has not installed its JavaScript workspace dependencies. The block-ID crate's focused tests passed earlier in that workspace run.The 100,000-run break test is now active in the same single build slot. After it finishes I will install the declared dependencies with the frozen lockfile, rerun the failed bridge fixture, and rerun the full workspace gate. No product changes or weakened test conditions are planned for this setup failure. The earlier failed gate remains recorded.
The long break test passed: 100,000 histories, seeds 671–100670, 3,964,744 sync checks. Verbatim result:
No failing seed in this bounded run. Earlier seeds 713, 801 and 973 were fixed and are included. The native suite also passed all 41 ported probes and the additional authority/file/restart tests.
The frozen-lockfile install succeeded, and the previously failing real SyncClient fixture passed. The following workspace attempt stopped at the unrelated auth migration test (migration.rs:86): people.list returned 1 row, expected 2. That test passed in the earlier workspace attempt. No auth product or test code was changed by this branch; rerunning it directly and then the full workspace. Also fixed one remaining clippy warning in the harness's progress logging by using is_multiple_of; the change affects only when progress is printed. All gate attempts remain recorded, including failures.
Finished the server-authority prototype on proto/block-identity-server.
Base:
3d0c6e33d5Head:
0bfaff33baDraft PR: #735 (draft true)
The remote branch matches the head. Clean worktree. Only this branch was pushed. No merge, deployment or issue closure. No evidence or artifacts were committed.
Design: stable private block handles distinguish deletion history from merged text. Devices propose public IDs and keep offline proposal receipts. The server accepts identity decisions once in session order, checks collisions including retired IDs, keeps aliases bound to their original owners and restores IDs only through the author's delete receipt. Native Yrs carries text. Split Undo joins existing fragments without withdrawing remote text. Checkpoints cover server state and device outboxes. The format plugin owns marker parsing/writing and lifecycle; task policy is supplied by its caller. The portable Rust client is not wired to the UI.
Design note:
0bfaff33ba/docs/design/block-ids-server.mdBreak result, verbatim:
All 41 ported break2 probes and 13 additional authority/restart/file tests pass. The port updates obsolete six-character allocation assertions to ADR 0056's 16-character IDs, checks deleted edits in recovery, uses receipts for provisional collision links, and checks full-block materialization for the typing-work probe rather than #720's custom atom counter.
Invariant results within the tested boundary:
Development witnesses and fixes:
No failing seed in the final 100,000-run bounded test.
Remaining adoption gaps: general splitting after joins is refused; imported legacy IDs are reserved Home-wide rather than supporting colliding note-local legacy namespaces; provisional URLs and real editor/room integration, general outside-file correspondence, atomic file placement and durable acknowledgement/performance integration remain. Cold ambiguous duplicate files are retained as conflicts. The range map remains a prototype storage choice. This is not full production compliance or an adoption claim.
Gate output verbatim, including preliminary failures and final reruns:
The first workspace failure was missing y-protocols/sync in this fresh worktree; frozen-lockfile install and the real SyncClient rerun passed. The next workspace attempt hit auth migration.rs:86 (1 person, expected 2); it passed directly and in the full final rerun without auth code changes. Initial prototype lint failures were fixed. Every local heavy command ran through one build-slot job at a time, with Cargo -j3 and the required environment. No perf, staging or production VM was touched.
Independent verification started on branch test/ids-verify3, base
0bfaff33ba. I am deriving my oracle from origin/dev ADR 0056 B1–B5 before reading the PR description or the author's latest results. I will run an independent seeded simulation and record reduced failures. No merge, deployment, or author-branch push.Independent ADR verification: two specification gaps are directly visible in the public implementation at
0bfaff33.The independent harness and detailed counts will follow. These are prototype completeness failures against the requested B1–B5 acceptance criteria; they are also disclosed in the design document.
Independent executable witnesses at
0bfaff33found three additional problems, beyond the disclosed split/legacy gaps:The smoke corpus is independent of the author's test helpers/vectors. A separate random action model checks exact expected rows and per-note file bytes. The final 200,000-seed gate will distinguish those failures from missing redo and whole-file watcher APIs, which cannot be exercised through this prototype. An exploratory outside_paste-as-replacement probe was discarded because that method only promises insertion; it is excluded from final counts.
Another independent split witness fails exact intended edits:
Seed 13, case 13, 5 devices. Sync ABCDEFGH. Device A splits at byte 3. Offline device B inserts X at byte 7 (between G and H). Reconnect. Expected flattened live text ABCDEFGXH; actual ABCXDEFGH. The character survives but moves to a different word position. The split deletes original suffix CRDT items and copies the suffix to another text object, so concurrent edits remain in the wrong fragment.
The first 200,000-seed run completed with 102,072 failed directed/random checks. I am running the final expanded 200,000-seed corpus, including this ordering witness and explicit colliding offline proposal receipts. The random oracle and directed witnesses are separate; counts of checks and unique failing seeds will be reported separately.
Coverage limit: redo, general external-file replacement/marker removal, actual Markdown provisional-link rewriting, and actual UI surfaces have no implementation entry point here. They cannot be verified by this native prototype and are not counted as passing cases.
UNSOUND at author head
0bfaff33ba. The final independent corpus ran 200,000 seeds (0–199999), 100,000 with three devices and 100,000 with five. It found six distinct behavior failures: 95,120 unique failing seeds and 105,148 failed directed/random history checks, with 6,274,766 admission checks. Multiple checks can fail for one seed.The strongest new witnesses are concurrent splits duplicating original text and a concurrent insertion moving away from its original character anchors. Server authority and delete receipts do not repair that structural text copying. The retired-offline-ID, remote split Undo, and joined deletion-provenance probes did not fail in this bounded corpus.
The oracle and executable tests were written before reading the PR description and the author's latest result comment (67037). No author test vectors or helpers are imported. Every seed runs a separately modeled random history of 12–24 actions and a directed concurrent regression. Transport drops, duplicates and reorders packets, retries lost replies, checks rejected admissions for atomicity, restarts the server from checkpoints, and drains fairly for convergence. Independent expected rows and per-note bytes are checked for composed edits; token, multiplicity and position oracles cover concurrent edits.
Minimal reproductions and final directed counts:
Separately composed random histories failed 25,148 times, reproducing the joined-fragment editing/splitting limitations. These overlap the directed failure counts and are not additional distinct defects.
The author already discloses the joined-split and legacy namespace gaps. The duplication, character-position error, visible suffix edit refusal, and create marker exposure are executable observations beyond those two disclosed gaps.
Coverage is blocked for actual redo chains, general external-file replacement/ID-marker removal, provisional Markdown-link rewriting, and actual UI/source/search/accessibility surfaces: this prototype has no entry points for them. Known-revision outside insertions with duplicate markers are tested. Receipt links are tested; bare provisional URLs are not. No passing claim is made for missing integration. An early exploratory replacement passed to outside_paste violated that insertion-only contract and was removed before the final corpus; it is excluded from final counts.
Gate output follows verbatim. All local heavy commands used build-slot.sh; Cargo used -j3. The independent test's exit 101 is the expected red gate for the counterexamples. The first clippy attempt rejected std::fs::write for the optional diagnostic artifact; a documented test-only allowance was added, and final clippy passes.
Test harness: branch test/ids-verify3, head
0679f34929, base0bfaff33ba. Only the independent tests are committed. findings.md and all gate/report artifacts remain uncommitted; the issue comments retain the evidence. No merge, deploy, issue closure, or author-branch push.Harness source:
0679f34929/crates/block-ids/tests/verify3.rsStarting block-ids-v7 on proto/block-identity-v7, base
d83e54dbe5(origin/dev). I will write the one-text design first, implement the prototype, and run the independent verify3 oracle and required gates. No merge or deploy.Finding: verify3's adapter observes private block handles, immutable ID owners, joined-owner retirement and exact file bytes, in addition to native text. Its directed cases 3/5/7/8/13 cover the reported joined-edit, joined-split, concurrent-split, create-marker and character-anchor failures. I fetched origin/test/ids-verify3 and retained its oracle.rs, scenarios.rs and invariant checks unchanged. The design is now in docs/design/block-ids-v7.md. The implementation will use relative positions into one note text; no per-block Yrs texts or suffix copies on split.
Finding from the unchanged 200-seed verify3 smoke run: server confirmation can insert a marker while a device has an unacknowledged join. Deleting the newline then makes a suffix such as " ^id" touch the next block's words. Parsing that combined suffix as a new ID can consume human text. Seed 2's composed random history reproduces this after an empty linked block joins its neighbor. I added CRDT-relative spans for server-written marker bytes so reconciliation removes only known syntax before deriving ranges. This is still a failing prototype; no pass claim.
Progress: the unchanged verify3 oracle/scenarios/invariants now pass the 200-seed smoke run: VERIFY3 runs=200 failed_checks=0 failed_seeds=0 failure_classes=0 admission_checks=6516. This is only a smoke result, not the required 200,000-seed gate. Recovery now derives a native snapshot with retirement tombstones excluded, instead of maintaining a text object per block or copying suffixes. Next are the 41 probes, redo and outside-file APIs, typing-path checks, and the full gate.
Finding: the unchanged 41-probe suite is now at 39 passed, 2 failed. The remaining failures are checksum_corruption_does_not_change_room (expects the old block-map envelope after a malformed fence edit) and map_preserves_unlinked_text (the format parser merges ranges when a fence edit changes Markdown structure). The typing probe large_code_typing_preserves_rest now passes after a native-delta rope cache was added. Undo of an empty split at EOF also now preserves another device's text; marker relocation is excluded from native Undo so it cannot restore a stale marker next to those words. The 1,000-seed verify3 smoke run passed before the latest EOF fix; broader runs are next. These probe failures remain release blockers; no checks were weakened.
Progress: the latest 10,000-seed verify3 sample passed unchanged checks: VERIFY3 runs=10000 failed_checks=0 failed_seeds=0 failure_classes=0 admission_checks=332605. This is not the final gate. The new API checks also pass for native file contents, redo, marker removal and stale outside revisions. Outside whole-file edits conservatively reject changed block counts, duplicate claims and changed owners before mutation; those incoming bytes must remain a conflict. Known remaining limits include the two fence-edit probes, application UI integration, and the server prototype's whole-document admission clone, which still needs performance work before integration.
Integration is blocked by known failing checks, and I am continuing through the full gates unattended. The current 10,000-seed independent sample has 0 failures and 332,605 admission checks; authority tests are 13/13 and the six added entry-point checks pass. However, the unchanged 41 probes remain 39/41, and the older author stress test random.rs fails seed 672 because recovery cannot find token T000672_14Z after concurrent moves. The token-loss check is still enabled. The final run now includes workspace clippy, workspace tests, the 41 probes, new API checks, and 200,000 verify3 seeds. I will publish actual counts and keep the PR draft if any gate fails.
The implementation is committed at
c7d5a6cdc5. Final workspace fmt and workspace clippy with -D warnings pass. Workspace tests are still running, with the full 200,000-seed run queued after them in the same build-slot job. The branch keeps the fetched verify3 oracle, scenarios, invariants, 41 probes and vectors; comparison found formatting changes only. No evidence files are committed. Remaining integration coverage is explicitly limited: no UI/source/search/accessibility wiring, no browser UTF-16 adapter or bare provisional URL rewriting, conservative whole-file conflict handling, and no perf-VM measurements. The server admission clone and broad index refresh still need performance work.The final 200,000-seed run has found a counterexample at seed 10469 with five devices. Case 100's independent visible oracle expects six rows, including empty linked block Key(2, 3), but the actual projection has five rows and omits that block after a composed history of moves, splits and joins. The 10,000-seed sample did not include this seed. At 20,000 seeds the run is still continuing; I am not reporting a final count yet. This head therefore fails the independent gate as well as the two fence probes and the older concurrent stress test. It will remain a failed draft, with full final output attached in issue comments.
A second final-corpus failure category appeared at seed 63819. The independent file oracle expects the other note to contain an unlinked empty row followed by the linked empty row: "\n ^00027qwv7gww61tg\n". The actual file is " ^00027qwv7gww61tg\n\n", placing that marker on the preceding empty row. This follows a composed sequence of splits, joins, moves and edits. The full run has processed 70,000 seeds so far and is continuing; aggregate failure counts are not final yet. No test or source changes are being made during this gate run.
A third failure category appeared at seed 87738: the composed random history returns "unknown edit target" for a block the independent oracle still considers live. The witness includes copies, splits, joins, deletes and a local edit/Undo. At the failure, the oracle retains an empty linked row Key(3, 3). The run has now processed 100,000 seeds and is continuing at unchanged head
c7d5a6cdc5. Final counts are still pending.Final gate output, part 1 of 4. Head
c7d5a6cdc5.Final gate output, part 2 of 4. Head
c7d5a6cdc5.Final gate output, part 3 of 4. Head
c7d5a6cdc5.Final gate output, part 4 of 4. Head
c7d5a6cdc5.Finished the prototype and all requested gates at head
c7d5a6cdc5. Draft PR: #741.The requested pass condition was not achieved. The independent run has 31 failing seeds out of 200,000 and 31 failed checks. The 41 probes have 39 passed and 2 failed. Workspace tests fail in the block-ID break2 and random targets. Formatting, workspace clippy with -D warnings, all 13 authority tests and all six new API checks pass. No checks were disabled or weakened. No issue was closed, and no merge or deploy was performed.
Known failures are empty-block ownership after composed edits, malformed-fence ownership, and recovery after concurrent moves. Outside whole-file edits remain conservative conflicts for changed boundaries or ambiguous claims. The new redo and outside-file APIs have supplemental directed checks, not independent generated coverage. UI/source/search/accessibility, browser UTF-16, bare provisional URL rewriting, persisted undo/redo, move undo chains and Home-scale performance remain unverified. The whole-document admission clone and broad index refresh are known performance work before integration.
Gate status output, verbatim:
Full gate output: #671 (comment), #671 (comment), #671 (comment), #671 (comment).
Final independent report counts and first witnesses:
Starting block-ids-v7b from proto/block-identity-v7 at
c7d5a6cdc5. I will group the remaining verify3 failures by cause, reproduce the two fence probes and workspace failures, and keep the oracle and invariants unchanged. The hard rule about open PR branches takes precedence over the requested same-branch push: any update will use a new branch and a new PR, with a reference on #741. No merge or deploy.Failure groups before fixes: the prior 200,000-seed report has 26 visible mismatches, one file mismatch and four edit refusals. The first witnesses in each category involve empty linked rows. Internal anchor tracing of seed 10469 shows Key(2,3) acquiring the same native position as the new empty split Key(6,6), so reindex merges two independent owners. Anchoring empty rows to their terminating newline instead of marker syntax makes that witness pass; the full corpus is now running to test the cause across all seeds. This first implementation still needs the typing path copy budget checked.
The unchanged 41 probes reproduce at 39/41. checksum_corruption_does_not_change_room expects a block map after a fence edit; no map is emitted. map_preserves_unlinked_text loses the intended linked row boundary after a fence edit. Both concern the native-edit path bypassing the existing format writer's map fallback.
The older concurrent stress target also fails. A fresh run first failed at seed 676 with “original text lost: gamma”. Random identifiers change the transport history, so this witness differs from the prior seed 672 token loss. I am tracing the move/delete history separately. No oracle or invariant changes have been made.
The empty-row corpus has passed 90,000 seeds with zero failures, including all three first witnesses from the previous report (10469, 63819, 87738). The root cause is a span anchored to replaceable marker syntax after joining empty linked rows. A subsequent split can then give two independent owners the same position. The fix anchors empty rows to the surviving native newline; ordinary typing uses the cached rope rather than reading the full note.
The concurrent history investigation shows that a cross-note cut changes the live anchor but does not preserve a queryable source anchor. An offline insertion still exists as a native CRDT item at the old location, yet recovery only reads the destination. I am testing immutable source/destination anchor provenance and native move tombstones for recovery, without merging versions into live text or storing block text copies.
The empty-row fix alone completed the unchanged verify3 corpus: 200,000 seeds, zero failed checks, zero failed seeds, and 6,651,414 admission checks in 714.38 seconds. This is an intermediate result, not the final combined-head gate. The combined changes have passed all 41 probes and the supplemental checks, including mapped-note typing without a whole-note copy and all six delivery orders of two concurrent moves plus an offline source edit.
The older workspace stress target exposes several separate causes once earlier failures are fixed. Evidence and changes so far:
No oracle, scenarios, invariants or existing probes have been changed. The older stress test and the final workspace/full-corpus gates are still in progress; no pass is claimed for them yet. Evidence stays outside the repository.
Further cause groups from the unchanged workspace stress test:
A new directed test confirms that Undo on already retired typing removes only its own history items; its baseline failed. Another confirms that an offline edit arriving after creation Undo remains in recovery while its link stays retired. The active run is checking the whole 1,000-seed older stress target again. The independent oracle, probes and existing tests remain unchanged.
Final combined-head gates now pass for formatting, workspace clippy over all targets with -D warnings, the full workspace tests, all 41 release probes and all 16 supplemental checks. The workspace includes the unchanged 1,000-seed older stress target. The 10,000-seed release smoke run has zero failures and 332,605 admission checks. The final 200,000-seed release run has started; it is the remaining gate.
The added mapped-fence workflow first failed on Delete Undo after a split and join. Native restoration events included both a new metadata header and restored human text; treating the header as the first restoration range left the owner attached to a word fragment. Format-owned metadata is now excluded from those ranges, restoration rebinds native human insertions, and structural/save/sync boundaries refresh map offsets from native ranges. A format flag skips map maintenance for ordinary notes. The final workflow passes split, join, delete and Undo while keeping the linked word and one shared text per note.
Final fmt gate output, part 1 of 1. Head
2c3083949d. Output follows verbatim.Final clippy gate output, part 1 of 1. Head
2c3083949d. Output follows verbatim.Final smoke gate output, part 1 of 1. Head
2c3083949d. Output follows verbatim.Final workspace gate output, part 1 of 4. Head
2c3083949d. Output follows verbatim.Final workspace gate output, part 2 of 4. Head
2c3083949d. Output follows verbatim.Final workspace gate output, part 3 of 4. Head
2c3083949d. Output follows verbatim.Final workspace gate output, part 4 of 4. Head
2c3083949d. Output follows verbatim.Final probes gate output, part 1 of 1. Head
2c3083949d. Output follows verbatim.Final supplemental gate output, part 1 of 1. Head
2c3083949d. Output follows verbatim.Final verify3 gate output, part 1 of 1. Head
2c3083949d. Output follows verbatim.Finished block-ids-v7b at head
2c3083949don proto/block-identity-v7b. Replacement draft PR: #743. PR #741 now points to the replacement. No merge, deployment, main/dev push, issue closure, or evidence commit was performed.The requested independent gate passes: 200,000 seeds, with 100,000 three-device seeds and 100,000 five-device seeds; zero failed checks; zero failing seeds; 6,651,414 admission checks. All 41 probes pass, all 16 supplemental checks pass, and workspace tests pass, including the 1,000-seed older stress target. The oracle and existing checks are unchanged.
The additional mapped-fence workflow exposed stale ownership metadata after split/join and restoration. Maps now refresh from causal native ranges at structural/save/sync boundaries, and restoration distinguishes native human insertions from a refreshed metadata header. The final combined head passes that workflow in one shared text. Known integration limits remain: the prototype is isolated from UI/source/search/accessibility; no Home-scale perf VM measurement was run; broad server admission/index work remains.
Gate status output, verbatim:
Verbatim gate output: #671 (comment), #671 (comment), #671 (comment), #671 (comment), #671 (comment), #671 (comment), #671 (comment), #671 (comment), #671 (comment), #671 (comment).
Final independent report:
Independent verification started on test/ids-verify4, base
2c3083949d. I am deriving the specification and test oracles from origin/dev ADR 0056 B1–B5 and ADR 0018 before reading the author’s conclusions. I will use an independent seeded harness, including server admission properties, and report seeds, minimal reproductions and gate output. No merge or deployment.Performance gate currently blocked:
timeout 25 ssh -o BatchMode=yes -o ConnectTimeout=10 10by32-01-std ...exits 255 withssh: Could not resolve hostname 10by32-01-std: No address associated with hostname. I will check the configured network for this same host; no local perf run or production VM access will substitute for the required perf VM and perf-lock.Independent finding F1: splitting a linked code fence makes the ID marker visible inside code and duplicates it on sync. Minimal sequence on
2c308394: load "rs\na\nb\n\n\nend\n"; sync; link first block; sync; split at byte 6; sync. Before split, the marker is after the closing fence. After split, visible() includes "rs\n\n\n^<id>\na\nb\n" and exported bytes also gain a second marker after the fence. No concurrency is needed. This directly violates ADR 0056 marker invisibility and B3, and changes human text beyond the requested newline. Probe command: build-slot.sh cargo test -p calternal-block-ids --test verify4_probe -j3 -- --nocapture. Independent fixed-ID and seeded regressions follow.Independent finding F2: splitting a linked GFM table damages public block ranges and strands marker text. Minimal sequence: load "| a | b |\n| - | - |\n| x | y |\n\nend\n"; sync; link first block; sync; split at byte 17; sync. visible() reports only "| a | b |" and "| - |" for the two split parts; the file contains remaining table bytes plus a stranded marker line. Sync adds another copy of the same ID to the heading row. Probe gate prints the before/after strings. This violates B3, marker invisibility and block/text ownership. Random marker spelling has no effect. Precise regressions and seeded counts follow.
Performance gate remains blocked. Required host 10by32-01-std has no DNS result. The configured Tailscale client reports BackendState=NeedsLogin and Health=["Tailscale is stopped."], with no peer route for that host. I will leave p95 explicitly unmeasured, rather than run the forbidden local substitute or touch production.
Independent finding F3, seed 11 (3 devices): an accepted outside marker corruption loses exact source bytes. Load "ABCD\nTAIL\n", link first block with 000000000093800b, sync. At the exact current server revision, outside_edit(..., "note", "ABCD ^000000000093800b!\nTAIL\n") returns Ok. Sync exports "ABCD!\nTAIL\n", silently deleting the corrupted marker prefix from the incoming file. The old marker range is stripped even though the outside app turned it into literal source. This violates exact file-byte preservation; it is not an ambiguous import rejected for conflict retention. A separate B4 gap: a duplicate marker added to a second block in a current-revision whole-file edit is refused with "ambiguous outside duplicate; preserve incoming bytes", rather than quietly rekeyed. I count that as a missing behavior separately from the corruption cases.
Independent finding F4 confirmed by a fixed-ID regression: load "| a | b |\n| --- | --- |\n| x | y |\n\nTAIL\n"; link the table and the empty block; join table + empty; sync. The table link now resolves to "| a | b |\n| --- | --- |\n| x | y |\nTAIL", absorbing the unrelated following block. The requested join did not include TAIL. Gate: build-slot.sh cargo test --release -p calternal-block-ids --test verify4_regressions -j3. Correction to my earlier exploratory F2 report: that probe split at byte 14 (half of its 29-byte table body), not 17. The independent seeded table split failure also has a simpler fixed case: the table above split at byte 1 strands marker syntax and violates the literal newline-only byte oracle. Fence Undo across sync also remains corrupt (seed 8).
Independent verification 4
Base:
2c3083949d. Branch: test/ids-verify4.Specification derived from origin/dev ADR 0056 and ADR 0018 before reading PR descriptions, issue comments 68042/68187, design conclusions, or verify3 sources.
Independent specification checklist
Independent verification plan
Use a new seeded generator and an operation-intent oracle, not verify3 code. Partition at least 300,000 seeded runs across 3, 5 and 8 replicas. Use literal unique text sentinels and saved before/after strings as the byte and positional oracle. Bias input toward fences, tables, headings, lists, empty blocks, line-start split, cross-note competing moves, pasted equal text, external marker corruption, legacy IDs, undo/redo across sync and offline delete/edit. Perturb the message queue independently of edit generation; final anti-entropy must converge. Exercise the server admission API separately with valid adversarial proposals and keep a ledger of accepted ownership, aliases and retirements across restarts. Add deterministic minimal regressions independently of random findings. Measure actual native marker path and report frontend integration limits if this is a prototype only.
This checklist and plan were written before examining design conclusions or any verify3 sources. The new harness uses its own congruential seeded generator, literal edit expectations and a separate authority reservation/deletion ledger. No verify3 generator, scenario or oracle code has been opened or reused.
Independent verdict: UNSOUND
Reviewed product head:
2c3083949d(PR #743, proto/block-identity-v7b).Harness head:
a314fc5179, branch test/ids-verify4. Only test code is committed. Findings and logs remain outside the repository history.300,000 independent seeded runs, seeds 0 through 299999: 249,495 passed, 50,505 failed. Of the failures, 31,755 are text or identity property failures; 18,750 are B4 whole-file duplicate imports being refused instead of quietly rekeyed. The refused imports preserve live text and require the caller to retain the incoming conflict; I do not count those as observed text corruption.
Failing scenario families: split 5,160/18,750; join 3,125/18,750; outside duplicate B4 behavior 18,750/18,750; split Undo across sync 4,720/18,750; outside marker corruption 18,750/18,750. Each of the 16 families ran 18,750 seeds. The generator covers all six structural templates separately for each device count. Long offline runs include up to 96 unsynchronized edits per device. Delivery attempts are duplicated, reordered and dropped, with eventual outbox retry and server restart before acknowledgement.
Four small independent regressions all fail:
rs\na\nb\n\n\nend\n", link the first block, sync, split at byte 6, sync. Marker bytes become visible code text, and a second marker is written after the closing fence. Seed 1 shows the same class. Seed 8 shows corruption after split, remote edit and Undo across sync; seed 104 loses the original tail as an editable target.The seed-7 B4 gap is separate: adding the original marker to a second block in an exact-current-revision whole-file edit returns "ambiguous outside duplicate; preserve incoming bytes". Pasting with explicit provenance does quietly rekey and passes the separate contract test.
The independent server-only checks pass 2,000 sequences (45,000 admissions total), including a separate randomized ownership/deletion ledger, reserved-ID collisions, retirements, Undo and restart retries. Eight additional contract tests pass, including competing moves routing to the actual marker file, both delete/edit admission orders, task copy, Enter at line start, live join-alias collisions, outside paste, delete redo, and durable outbox retry. The existing authority and v7 suites pass 13 and 16 tests respectively. Those passes do not repair the four counterexamples.
The independent checklist and plan were written from origin/dev ADR 0056 and ADR 0018 before reading the design note. No verify3 generator, scenario or oracle source was opened or reused. Expected human text comes from literal inputs and edit intentions; server decisions are checked against a separate reservation/deletion ledger.
Performance gate: BLOCKED, p95 unmeasured. The required host 10by32-01-std cannot be resolved; the configured Tailscale client reports NeedsLogin and stopped, with no peer route. The ignored 10,000-line benchmark is ready to run on that host under perf-lock. No local perf substitute ran. UI/source-editing/accessibility hiding, browser UTF-16 integration and production link rewriting remain outside this isolated crate's integration coverage.
The gates ran in one build-slot job. Environment was sourced from /etc/calternal/env.sh. Release overrides were CARGO_PROFILE_RELEASE_LTO=false and CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16. Campaign environment was IDS_VERIFY4_RUNS=300000, IDS_VERIFY4_START=0, IDS_VERIFY4_RESULT pointing outside repository history. Commands inside the slot:
Verbatim gate output follows.
campaign.log
regressions-final.log
baseline-final.log
contracts-final.log
gate-status.txt
Starting block-ids-v7c on branch proto/block-identity-v7c, base
2c3083949d. I will define structured-block marker anchors in the format module, address the second verifier findings, and run the required gates and both unchanged independent harnesses. No merge or deployment.Confirmed in code: split moves the suffix to the cursor unconditionally (client_edit.rs), including into protected fence/table source. Join removes the separator without recording the structural boundary. strip_markers deletes old causal ranges without checking whether they are still valid marker syntax, explaining loss of the corrupted marker's human bytes. Whole-file import explicitly refuses duplicate claims before mutation. I retrieved the unchanged second verifier from origin/test/ids-verify4; the requested remote findings file is temporarily unreachable (Netbird SSH connection to 10.69.69.16:22 timed out). I will use the checked-in independent regressions and campaign as evidence and keep their oracle and invariants unchanged.
The four fixed verify4 regressions pass, and the first verify4 smoke run passed 300/300 seeds, 1,000 directed authority cases and 40,000 randomized authority admissions. Added product tests exercise every split position in fences, tables, list continuations, quotes, ATX headings and setext headings through sync, Undo and Redo. They exposed two more issues: Undo needed the union of both native ranges, and putting a suffix on a setext underline changed its grammar. Both are fixed. Whole-file duplicate handling now also supports pure inserted copies using retained byte positions, without choosing owners by equal words. Both independent harness trees are byte-for-byte unchanged from their origin branches. The 41 break2 probes pass. Full gates and campaigns are next.
The unchanged 1,000-seed stress suite now passes, with 39,786 sync checks, and verify3 smoke passes 200 seeds. Extending the format parser to list continuations briefly exposed a join boundary regression in verify4 seeds 50 and related task cases: a one-space empty marker line was being treated as an indented continuation. Continuations now require the item's content indentation. The final targeted run passes 300/300 verify4 seeds, all four independent fixed regressions, and all five added structured/outside tests. These include every split position through sync/Undo/Redo for six block forms and a whole-file inserted duplicate. Full gates are running. Perf measurement remains blocked: the required short hostname does not resolve and its Netbird SSH route timed out; no local benchmark substitute ran.
Workspace formatting and clippy passed. The workspace test run hit an unrelated fsio test failure before the full campaigns started: tests::a_private_directory_is_invisible_until_exclusive_publication panicked at crates/fsio/src/tests.rs:530 when create_dir(Notes) returned AlreadyExists (OS error 17). Its helper names temporary directories with process ID plus SystemTime nanoseconds; concurrent test cases can collide on the clock's resolution. I am rerunning the unchanged workspace tests with --test-threads=1, keeping cargo -j3 and the single build-slot limit. No fsio code or tests are being changed. The previous failure log is retained outside the repository.
Final source is committed locally as
863b8bf1c0. Workspace fmt, clippy over all targets with -D warnings, and all workspace tests now pass. The test run uses --test-threads=1 to avoid the unrelated timestamp-based temporary-directory collision reported above; no unrelated test was changed. Verify4's driver has only narrow lint annotations and explanatory comments added for workspace clippy; its scenarios, oracle, authority checks and invariants are unchanged. Verify3 is unchanged. Full campaigns are now running sequentially in the same build slot: verify3 with 200,000 seeds, then verify4 with 300,000 seeds and 3/5/8 devices. No branch has been pushed yet.Verify3 completed on head
863b8bf1c0with the unchanged harness and full 200,000 seeds. Verbatim result:Verify4's 300,000-seed campaign is now running. Its 1,000 directed authority sequences and 40,000 randomized authority admissions also passed. Complete final gate logs will follow after the campaign and fixed regressions finish.
Final gate evidence for block-ids-v7c, head
863b8bf1c0. format: command completed with no output.Final gate evidence for block-ids-v7c, head
863b8bf1c0. clippy, part 1/1. Output below is verbatim.Final gate evidence for block-ids-v7c, head
863b8bf1c0. workspace, part 1/4. Output below is verbatim.Final gate evidence for block-ids-v7c, head
863b8bf1c0. workspace, part 2/4. Output below is verbatim.Final gate evidence for block-ids-v7c, head
863b8bf1c0. workspace, part 3/4. Output below is verbatim.Final gate evidence for block-ids-v7c, head
863b8bf1c0. workspace, part 4/4. Output below is verbatim.Final gate evidence for block-ids-v7c, head
863b8bf1c0. verify3, part 1/1. Output below is verbatim.Final gate evidence for block-ids-v7c, head
863b8bf1c0. verify4, part 1/1. Output below is verbatim.Final gate evidence for block-ids-v7c, head
863b8bf1c0. regressions, part 1/1. Output below is verbatim.Finished block-ids-v7c. Head:
863b8bf1c0. Pushed only proto/block-identity-v7c and opened draft PR #745: #745 (base dev). No merge or deployment. Issue remains open.Both full independent campaigns pass with zero failures: verify3 200,000 seeds (3/5 devices) and verify4 300,000 seeds (3/5/8 devices). Verify4 totals are 100,032 seeds on three devices, 100,032 on five and 99,936 on eight; all have zero failures. Both independent oracles, scenarios and invariants are unchanged. The verify4 driver has only lint annotations and comments added for the workspace lint gate.
All four fixed regressions and 41/41 probes pass, as do the eight independent contracts and six added structured/outside tests. Workspace formatting, clippy over all targets with -D warnings, and workspace tests pass. Workspace tests used one test thread after the unrelated fsio temporary-directory collision recorded above. Campaigns ran in release mode with CARGO_PROFILE_RELEASE_LTO=false and CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16. All local heavy commands used build-slot.sh and cargo -j3, with at most one slot job held.
Verbatim campaign, regression and gate status output:
Complete verbatim gate logs:
The required perf host is still unreachable, so p95 measurements remain blocked and no local substitute ran. This prototype has no production UI, accessibility or browser UTF-16 integration coverage. The repository commit contains only product code, tests and the lasting design note; no evidence or artifacts were committed.
Starting independent verification 5 on branch test/ids-verify5, base
863b8bf1c0. Wrote a checklist from origin/dev ADR 0056 B1–B5 and ADR 0018 before reading earlier conclusions. Will use an independent admission-order reference model and grammar generator, export/import and outside-editor round trips, 300,000 seeded runs across 3, 5 and 8 devices, and perf-VM keystroke measurements. Evidence remains outside commits.Perf gate currently blocked by VM access. The requested command
netbird ssh agent@perf-test-03.vpn.kayg.orgfails:lookup perf-test-03.vpn.kayg.org on 127.0.0.53:53: no such host. That host is absent from the current NetBird peer list. The explicitly permitted fallback 10by32-01-std is listed as 10.69.69.73, but NetBird SSH to both its name and IP timed out (30s/25s); ordinary SSH cannot resolve its name either. No performance number is claimed. No production VM was accessed. Continuing the correctness work and preparing a reproducible perf harness so the measurement can run if connectivity becomes available.Independent verifier 5 finding: a quoted fenced block exposes its block marker. Seed 7 (grammar kind 7), minimized to a single device: load
> quote\n> ```\n> code\n> ```\n, sync, link the first visible block with0000000000000001, sync. BeforeDevice::visible()returns> quote\n> ```\n> code\n> ````; afterward it returns> quote\n>\n> code\n>^0000000000000001. The marker is now part of projected human text. ADR 0056 says markers are never visible. The independent contract testa_link_on_a_quote_containing_a_fence_is_invisible` fails on863b8bf1. The format parser protects the nested closing fence as literal code while the authority writes a suffix on it. This is outside the earlier top-level fence/table coverage.Independent verifier 5 finding: an app export does not survive app re-import for a linked setext heading. Minimal source:
heading\n===\n. Load, sync, link the heading with0000000000000001, sync, calldisk_note("note"), then load/sync those exact exported bytes in a fresh server/device. Before export the visible block isheading\n===; after re-import its visible text is empty. The export uses a v3 block-map comment with a binding from 0 to 12 and the correct body hash, followed by the unchanged heading bytes. No outside editor or normalization is needed. Testa_setext_heading_can_be_linked_and_exportedfails on863b8bf1. The native create path anchors at the inserted metadata rather than the mapped human range. Broader two-heading cases also return stale-map/invalid-range errors or panic with Unicode; those are being minimized separately. This violates the requested exact export/re-import and stable linked-target contract.Independent verifier 5 finding: a cross-note move followed by an offline edit retargets the original link to the next block's words. Minimal two-device source:
first\nsecond. Device A loads/syncs, links the first block with0000000000000001, syncs. Device B connects. A moves the first block to noteotherand syncs. B, still offline, appendsXat byte 5 of the first block and syncs.Server::target_text("0000000000000001")returnsXsecond, where the contract requiresfirstX. The linked block has acquired the neighbor's words. Testmoving_a_block_keeps_its_words_and_its_offline_edit_togetherfails on863b8bf1. This directly violates B3 move identity and the no-text-moved invariant. The broader admission-order model also finds this with ASCII text, so it does not depend on Unicode or Markdown parsing.Independent verifier 5 finding: valid literal source inside a list's fenced code is stripped when the file uses CR line endings. Minimal input is
- list\r\r ```\r code ^literal\r ```\r.format::projectreturns- list\r\r ```\r code\r ```\r, deleting the human^literalfrom the code. No link, sync or duplicate ID is involved. Testcr_line_endings_do_not_turn_code_literals_into_idsfails. This extends the grammar coverage beyond top-level fences and beyond LF. CR is an additional CommonMark coverage case alongside the requested CRLF and mixed endings; it is reported separately so it is not confused with the required CRLF results.Independent verifier 5 interoperability finding: an outside editor cannot normalize line endings in an exported linked setext heading. Source
heading\r\n===\r\n; load, sync, link, sync, export, replace CRLF with LF in the complete exported file, then calloutside_editagainst the exact current revision. It refuses withstale block map; preserve original and incoming bytes. Testline_ending_normalization_of_an_exported_map_keeps_the_linkfails. This is a safe refusal, not evidence that these incoming bytes were silently lost. It nevertheless fails the requested normal whole-file rewrite round trip because the map hashes exact human bytes and stores byte ranges. Unlike the export/re-import bug, this case requires the external rewrite.Independent verifier 5 finding: app export/re-import can panic on a UTF-8 boundary. Source
👩💻 👨👩👧\n===\n\nsecond\n---\n; load, sync, link the first block, sync, export, load those bytes into a fresh server/device, sync. Testmultiple_setext_headings_with_emoji_can_reimport_their_exportpanics at crates/block-ids/src/text.rs:101:35:end byte index 318 is not a char boundary; it is inside '👨' (bytes 316..320 of string). The same family appeared at grammar seed 34. This is an unchecked range into human source after map import, distinct from the single ASCII heading's empty target.Independent verifier 5 finding: Unicode typing can edit a different block even before sync. Minimal fixture: five identical lines
é👩💻אב(combining acute, emoji ZWJ, Hebrew). Load/sync, link the first two lines with distinct 16-character IDs and sync each, connect a fresh device, thentype_atthe fourth block atword.len()withX. Its visible fourth block is still the unchangedé👩💻אב, rather thané👩💻אבX. Testunicode_typing_stays_in_the_requested_blockfails locally. The ASCII control with five one-letter blocks passes. In admission-order model seed 1, appendingd2 العربيةto the fourth block instead inserts it into the fifth block afterblock4, proving the text moves across block ownership. This affects the cached fast typing path independently of the setext import panic.Independent verifier 5 keystroke-path finding from source inspection (not a timing result): typing
^, backtick,~,|, Enter or CR bypasses the cached path in client_edit.rs:10. The fallback immediately callsself.visible()at lines 41–42, which eagerly materializes every live block (server.rs:350–356). Everytext::getcallsbounds, which materializes the whole note and parses its ranges (text.rs:76–80), then materializes it again (line 100). Thus a single such keystroke does full-note copies/parses per block before locating its target, followed by more parsing/index refresh work. This conflicts with the binding no-extra-note-passes-per-keystroke requirement. Ordinary-letter-only timing would miss this path. I cannot translate this source-level cost into the requested added p95 milliseconds: the requested perf host still does not resolve, and the permitted fallback still times out on SSH. The <=1 ms gate remains unmeasured, not passed or numerically failed.Independent verifier 5 finding: B2 delete-wins depends on admission order. Minimal source
first\nsecond; device A loads, links the first block, and syncs. Device B connects. While disconnected, A deletes the first block and B appendsXto it. Admit B's edit first, then A's delete. The remaining visible text is["Xsecond"], where it must be["second"]; the losing offline edit has moved into the neighbor.delete_wins_when_the_offline_edit_is_admitted_firstfails on863b8bf1. The reverse admission-order control, deleting before receiving the edit, passes. This isolates the model's ASCII delete/edit failures without Unicode, a third writer or ambiguous split boundaries. B2 requires delete-wins in both orders, with the edit confined to recoverable history.Verdict: UNSOUND for prototype head
863b8bf1c0(PR #745).Independent verifier 5 completed 300,000 seeded sessions, seeds 0–299999: exactly 100,000 sessions each with 3, 5 and 8 real Device replicas and the real Server/Yrs implementation. 202,840 sessions failed at least one model or round-trip assertion. The two suites recorded 169,044 model first failures and 80,310 grammar/interop first failures, including 235 native UTF-8 panics. A session can fail both suites; these are session/assertion counts, not independent bug counts.
The checklist was written from origin/dev ADR 0056 B1–B5 and ADR 0018, at dev head
d83e54dbe5, before reading earlier reviewer conclusions. Neither earlier generator nor oracle was read or reused. The reference model is a plain list of blocks, text, ownership and links, updated in admission order and checked after every sync. Markdown source bytes come from independently constructed grammar cases, composed inside lists and quotes, with Unicode and line-ending variants. Export/re-import and whole-file normalization use the original constructed human bytes as the oracle. Each suite stops at its first violation in a session, then the other suite and later seeds continue. Excluding additional CR-only and footnote-like grammar cases still leaves 192,097 failing sessions. Safe refusals count as failed requested round trips and are distinguished from corruption; the verdict also follows from the model failures alone.Eight small failing reproductions are in the harness:
Xsecondin the next block. The reverse admission-order control passes. This violates B2.firstto another note, then receiving its offline append, makes its original link targetXsecondinstead offirstX.^literalto be stripped. This is additional CommonMark coverage.Nine small controls pass, including ordinary/task copies, join primary/alias behavior, splits, offline collision rekeying, invalid proposal rekeying, legacy note-local IDs, outside duplicate preservation, retirement/undo and ASCII typing. The prototype is not wired to the app UI; visible-projection checks do not certify rendered source editing, search, clipboard or accessibility.
Keystroke p95: BLOCKED / UNMEASURED. origin/dev p95 = unavailable; prototype p95 = unavailable; added p95 = unavailable. The requested perf-test-03.vpn.kayg.org does not resolve and is absent from the peer list. NetBird SSH and ordinary SSH to the permitted 10by32-01-std fallback at 10.69.69.73 time out. Retries had the same result. The 10,000-line / 500-linked-block benchmark could not run; the <=1 ms gate is not passed. No local or production timing was substituted. Source inspection separately shows that
^, backtick,~,|and Enter bypass the cache and eagerly copy/parse the full note per block, so ordinary-letter-only timing would miss that path.Harness pushed to test/ids-verify5, head fcf99a0a48779a1eba49d82229c567fa47441296. The commit contains only five test source files; no evidence or artifacts were committed.
Checklist and findings, complete gate output, raw per-seed reports, summary and runner. Evidence archive SHA256:
0042bf23a490ed4cf16dd82cc57280586e7031ec529f06f62906fa1e23232b06.Gate output, verbatim:
Reproduce a seed on the harness branch:
Starting v7d on branch proto/block-identity-v7d, base
863b8bf1c0. I will reproduce verify5 findings, fix the underlying causes, and run the requested gates. No merge or deploy.Finding: the B2 failure is reproducible unchanged: verify5_contracts::delete_wins_when_the_offline_edit_is_admitted_first returned ["Xsecond"] rather than ["second"]. The deletion packet only tombstones items it has seen. The server now captures the admitted owner's causal interval and retires surviving concurrent items inside it into native history. All six verify5 contract tests and all 11 verify5 regression tests pass in the targeted run, including both admission-order controls.
Finding: Yrs sticky indexes mix native UTF-16 item clocks with byte offsets inside Unicode items. The adapter now uses UTF-16 internally, converts the public byte API at the text boundary, and uses rope conversions for cached typing. The unchanged Unicode and emoji setext regressions pass.
Finding: suffix placement on quoted fences changes the grammar; map imports anchored the metadata rather than the human range; CR-only parser offsets disagreed with physical line scanning; newline normalization invalidated exact map hashes and offsets. The format owner now handles these rules and authenticates normalized newline ranges. Three added format unit tests pass. Full seeded gates are still pending; empty split/Undo and cached map transition regressions found during broader testing are being addressed.
Finding: queued native map rewrites can race the authority's map rewrite and leave two reserved map headers. The old reader interpreted the second header as human text on reimport. A format-owned cleanup now removes duplicate reserved headers before refreshing causal bindings. The focused mapped grammar reimport test passes; the subsequent 300-session verify5 smoke has zero grammar failures.
Finding: an offline append can upload an end anchor from before a split. In map mode that old end overlapped the new right-hand owner's range. The server now reconciles ranges using distinct causal owner starts, so stale ends neither swallow the split child nor exclude its appended text.
Current gate evidence: 41/41 probes, 16/16 v7 tests, and all six then-current cached-key regressions pass. Verify5's 300-session smoke is now zero failures. Verify3 and verify4 still expose competing-move and structured Redo cases, so the complete gate is not passed yet. I am replacing moved-text byte translation with persistent causal boundary anchors and fixing the Redo metadata boundary. Evidence stays out of the repository.
Finding: insertion provenance must follow later structural ownership. An append admitted under an original block may now belong to its split child; deleting the original must not remove that child's insert. Native insertion ranges are now filtered against the current causal owner. Added split-child and pre-join deletion regressions pass, and verify3's first missing-character reproduction (seed 7) passes.
Finding: deferred map normalization before capturing a packet's state vector produced syntax edits that were never transported. Create and move boundaries now capture the vector first. The added create/move convergence regression passes. Another compatibility export issue came from concatenating separately hashed maps from different notes; the format owner now serializes the combined logical ranges as one map.
Finding: an empty moved note may have no native Yrs items to transmit. Resolving its root-relative anchor before materializing the named note returned no position. The text boundary now materializes that root before resolution. The empty-note move regression passes. A related structural conversion indexed a plain EOF sentinel absent from the new map; it now preserves the EOF owner explicitly and never indexes unchecked.
Full workspace clippy with all targets and warnings denied passes. Tests outside the block-ID prototype pass. The current 1,000-session verify4 and verify5 smoke runs have zero failures; the full campaigns are still pending. Added actor-order coverage exposed another move routing cause: a higher actor's LWW anchor can hide that an edit arrived in the old note. I am fixing classification by native provenance rather than trusting the merged anchor.
The release smoke gate completed verify3 at 10,000 sessions and verify4 at 10,000 sessions with zero failures. Verify5's model also had zero failures; 80 grammar sessions found one tab-indented continuation rule. Its minimized regression now passes after the format owner conservatively preserves suffixes on tab-indented apparent code, including quoted containers. The independent oracle and invariants are unchanged.
A read-only review found another malformed-input panic: a standalone code marker truncated blank rows but left stale physical-row offsets for a legacy footer. The new regression first reproduced the out-of-bounds panic at format/mod.rs:200, then passed after pruning removed offsets and checking the footer row lookup. The reproducer is now a curated fuzz seed.
The older randomized history test also exposed overlapping map bindings at an empty owner: binding [11,12] followed by another starting at 11. Map serialization now caps newline extension at the next owner's start, preserving a real zero-length binding. Seed 883 passes after this correction. Longer gates are still in progress; no performance claim is made from this build host.
Finding: the caret path still copied and parsed a whole atomic block when a single typed caret completed a suffix before an existing word. A counter covering rope materialization (not just native raw-text copies) measured 189,972 copied bytes in the 10,000-line regression. The new format-owned typing rule treats one typed caret as literal human text and uses the prepared cached map; complete multi-character pasted suffixes retain their import behavior. The regression now reports zero raw-note copies and zero block materialization, and the pasted-ID controls pass. The benchmark checks both counters for every requested key class.
Finding: Join Undo could resurrect old inline marker items after map conversion. Marker removal now runs as syntax maintenance before deleting the native separator; only the separator enters Undo. The minimized regression and seed 1011 pass. Join adjacency validation is read-only before any deferred normalization, so a refused join cannot create untransmitted native syntax dependencies.
Additional B2 coverage found an empty offline deletion had no Yrs delete set: if another device filled and linked that block first, its text survived on disk. Empty deletions now carry an explicit native receipt, and authority retires the concurrent fill into history. Restoring that receipt inserts retained text without overwriting a surviving neighbor. Both admission orders, link retirement, history recovery and neighbor-preserving Undo pass in the new regression. The full gates are not yet claimed.
The broader history gate found a metadata boundary error after Undo: two empty owners resolve to the same human-text start, but one resolves before the saved header and the other after it. Partitioning raw source offsets subtracts the header newline and creates an invalid owner inside metadata (seed 1198, offset 1152 inside 0..1153). A focused unit reproduces it. The fix keeps range partitioning in the format module after converting both offsets to human-text coordinates; no native IDs are clamped or reassigned.
The current gate passes all 41 probes. A focused joined-owner restoration test found another Undo defect: after deleting a joined block, admitting a late edit, and undoing deletion, both links retained their text but resolved to separate owners. Recovery reconstructed the shared text while moving only one owner anchor. The fix will reanchor the existing deletion receipt cohort to the reconstructed native interval; identity remains determined by native boundaries, with no special-case ID reassignment.
The full workspace gate reached the unchanged three-device history test and found seed 1256 failing admission with "missing move source" at its final batch. Formatting, workspace Clippy, all 41 probes and the focused new regressions passed before this failure. Investigation is tracing the move receipt and native owner anchors; the large campaigns are pending until this workspace failure is fixed.
Seed 1256 is a stale Move admitted after deletion. Evidence: the authoritative block is live=false with parts=[] and its native source bounds collapse to (0,0) in a metadata-only note. Move handling still attempted to create a live redirect from that deleted source. The fix applies B2 history-only admission to the copied native items, including a previously absent destination note, and skips live redirect construction for the retired block.
The new move/deletion regression also checks the reverse admission order. With Move admitted first, a stale Delete carries deletion IDs for source items that the Move already tombstoned. The merged document therefore reports no new deletion IDs, and the old identity-only check wrongly discards the authoritative destination cut, leaving LATEfirst in archive. Recognition must use the native cut receipt and moved scalar provenance, while true identity-only packets must keep their existing behavior. Both admission orders are being fixed and tested together.
The remaining unchanged random history run passed seeds 1256 through 1327, then seed 1328 failed "marker visible in projection" after an Undo at step 23. The replay is deterministic. Investigation is following native Undo capture and marker provenance; no oracle or invariant has changed.
A separate focused control confirmed a related stale-Move data loss case: join first+second; admit an offline deletion of only pre-join first; then admit an older move of the joined pair. Before the move the live rows include second and neighbor; afterward only neighbor remains. The retired-owner path must preserve the native text of surviving receipt members at their authoritative location while retiring the deleted member copy. The regression is deterministic and is being fixed before the final gates.
Seed 1328 trace identifies the marker source: an earlier Undo of Delete restores a hidden marker together with human text. The original Delete recorded both in one native Undo action; the restored marker gains new native IDs and sits directly before a later neighbor, so it becomes visible text. The fix removes hidden syntax in a separate syntax transaction before recording the human deletion, as already required for Join. The later Undo merely exposes this earlier contamination.
Two additional boundary causes are confirmed by focused tests. A mapped pre-join deletion leaves the surviving owner anchored at native zero ahead of the hidden header; resolving that endpoint as body zero preserves second and its link. That regression now passes. An EOF Undo can restore gamma directly beside a newer REMOTE_neighbor; recovery currently expands its causal interval to the whole physical line, incorrectly recovering gammaREMOTE_neighbor. Recovery is being changed to use the owner’s exact native interval plus only insertions declared for that owner. Hidden syntax IDs are also excluded from recoverable tombstones; Unicode and metadata-only controls pass.
Seed 1414 is traced to Move destination correction. Before correction the destination contains T001414_16ZT001414_04Zbeta; afterward T001414_16Z has disappeared. The copied block landed beside existing text, but correction expanded its receipt to the whole parsed row and reused an equal text prefix from beta. The fix will edit only the exact copied native receipt and place it at the authoritative block boundary, preserving the existing beta items. This is separate from Undo; no Undo occurs in this history.
The exact-copy Move repair passes seed 1414 and both actor orders of a concurrent foreign-suffix control. Preserving the destination’s existing authoritative native spans also keeps its full prefix with beta. A queued edit against the client’s retired copy then exposes a same-note redirect gap: matching note names do not prove matching native ownership. The new regression remains red until the redirect recognizes that old copied lineage while leaving fresh destination edits in place.
Correction to the queued-copy diagnostic: that new control forked Server state, admitted different work on both forks, and then merged updates carrying conflicting server actor-1 clocks. That violates the single-authority contract, so its failure is not valid product evidence. The test is being replaced with one authority: the mover queues an append before admission, another device admits the destination prefix, then the mover sends Move and Typing in order. The seed-1414 and foreign-owner failures were independent of this invalid control and remain fixed.
The replacement single-authority queued-move tests pass in both actor orders. Adding a real fresh device edit before the queued append found a valid second issue: a stale same-note anchor excluded the fresh prefix even though its native items remained live. Admission now expands the owner interval only through connected insertions declared for that owner, using UTF-16 native positions without copying or parsing note text. Both the fresh prefix and queued append survive, and beta remains unchanged.
The repeated-character control confirmed that text diffing loses the causal edit boundary. Starting from aa, moving it, inserting destination-only X between the two original characters, then admitting an old-source insertion of a at the start produced aXaa instead of aaXa. The source edit is being compared by native scalar IDs, so repeated text cannot turn a prefix insertion into an append. The independent harnesses remain unchanged.
The latest focused gate passes 20 unit tests, 13 cache tests, 5 deletion tests, mapped deletion, 8 move-boundary tests (including aaXa), 2 move-placement tests, and 6 structural tests. It found three v7 and two Undo regressions: recovery appends duplicate newline-suffixed versions such as ABREMOTECD twice; a mapped restored word becomes rds; redo creates human followed by an unwanted newline, and a second deletion Undo restores empty text. These are being fixed at recovery and native boundary handling before the final campaigns. No independent oracle changed.
The remaining history range now reaches seed 1454, which returns "missing repaired copy correspondence". Its moved handle is an empty split child, while the stale copy includes beta from an older joined cohort. Beta’s exact native scalar ID already has a valid correspondence under a different handle after a prior move. Copy registration is being changed to find that globally unique scalar correspondence when its per-handle lookup is absent, preferring a live native target. No text matching is involved.
Seed 1454 now passes. Besides the per-handle lookup gap, its reconstructed history contained a previously deleted text ghost; walking offsets in that history selected the wrong scalar. Copy registration now filters by the actual Move cut’s native scalar IDs before mapping them. The remaining run next fails at seed 1458 with "marker visible in projection"; that deterministic leak is under investigation. Focused suites remain green.
Seed 1458 is a linked empty Move copying only hidden marker bytes. Client Move now copies human content through the format module; the command and identity ledger carry IDs. The replay passes and new empty/literal controls pass. Broader controls exposed a concurrent header inserted inside the destination owner’s prefix. Repair is using native packet insertion IDs and the pre-existing owner’s native interval to remove only the new copy/header items, preserving every foreign scalar. Retired format syntax must stay tombstoned in history.
Seed 1506 is a Restore extent error. The newly restored Gamma span is 546..551, but reconstruction used physical row end 562 and deleted the neighboring T11 suffix. Replacement now uses only the exact causal interval. A smaller regression demonstrates the remaining ownership problem: delete gamma from left/gamma/right, join left+right, then undo gamma. Native Undo inserts gamma inside the joined owner. Cold Restore placement must preserve leftright and revive gamma as its separate identity, rather than splitting or absorbing that foreign owner.
Two dependency causes are fixed. Seed 1573 recovery failed because Yrs snapshot encoding stopped at a native Skip and omitted later items still referenced by other actors. History reconstruction now preserves the complete native update and substitutes only a verified historical deletion set; a sparse-clock regression and the replay pass. Seed 1587 traced to a failed empty-EOF Move that had already changed native state. Recognizing the valid mapped EOF interval makes that Move succeed and transport its edits, eliminating the unpublished clock gap. Focused gates pass; the final older-history range is running.
Seed 1619 passes after grouping restored receipt members by their identical native human interval before placement. Previously local Undo treated aliases as independent roots, failed "missing restore order" after mutating native state, and left unpublished clocks. A focused joined-receipt/foreign-join test passes. A final copy regression is being fixed: known mapped human text literal ^claimword must be copied as human content, not reparsed as imported suffix syntax.
The fresh workspace run found one remaining failure among the 41 authority probes: b2_independent_deletes_need_both_undos returned an empty target instead of original!. The first Undo was still blocked by another author’s deletion, but its temporary native copy replaced the authoritative historical span. Admission now keeps that original span until both deletions are undone. The unchanged probe passes in isolation. A separate regression confirms that a stale editing deletion remains effective after Undo (ABCD becomes ACD). Full workspace gates and all three unchanged campaigns are being rerun before publication.
The fresh workspace run passes all 41 authority probes after the independent-delete fix. It then stops in the existing seeded_three_device_histories test at seed 698: random.rs:240 unwraps Err("missing causal text dependency"). The full campaigns have not started. I am tracing the native update dependency and will rerun the workspace gate after fixing the cause.
Seed 698 traces to an Undo that changed native text and then returned “missing restore order” for a retired alias absent from the derived order. Its unsent changes caused the later dependency error. Restoration now falls back to the actual native collision boundary beside the surviving whole cohort. A focused regression also exposed duplicate neighbor text when a stale deletion of right followed a concurrent gamma+right join: Undo restored gammaright instead of right. Restoration now resolves the immutable deletion receipt’s native span through move provenance. The regression passes with gammaNEIGHBOR unchanged and right restored exactly. Focused gates and the existing 1,000-seed history range are running next.
The next workspace-history failure is seed 875: Restore reports “incomplete original restore lineage.” The incoming immutable human span was correct (five gamma characters), but the same packet also inserted a metadata header. Admission inspected only the first inserted range, selected the header, and overwrote the correct human scope. The fix checks containment across every inserted range in the note. No harness oracle or invariant is changed.
A focused move-boundary control reproduced another exact ownership error: after joining A+B, moving it, explicitly deleting B’s character, moving A again, then delivering a stale Delete B and Undo, the removed B incorrectly restored A. A boundary-only native correspondence had lost its Before/After association and shifted onto the preceding character. Scalar correspondences retain the original endpoint side; collapsed boundary correspondences now retain the mapped boundary’s association. The strict regression checks that A remains A and B stays empty.
Seed 881 is a stale joined deletion spanning owners whose authoritative notes differ after a move. Undo received one joined native copy but needed to restore beta in note and gamma in archive. A transient native-ID partition now routes each original human rank to its authoritative note and retains combined lineage for edits still naming the old joined cohort. Two strict controls pass: Undo alone preserves exact beta/gamma text and their notes; an append queued before Undo sync reaches gammaREMOTE in archive while beta remains beta. The existing seeded-history sweep will be rerun after the focused gates.
The next seeded-history failure is 694, initially reported as a missing restoration footprint for a zero-character receipt. Tracing found an earlier Move fast-path bug: the server’s actual joined cohort included an alias absent from the offline sender’s cohort. State moved that alias to the destination note, but the native fast path left its anchor in the source. A focused control reproduces the mismatch (the second linked target becomes empty instead of firstsecond after moving the first member). The fix reanchors every authoritative receiver-side cohort member to the repaired destination span; empty restoration then uses its own native boundary.
Seed 804 exposed a second anchor overwrite path: an imported Create refreshed stale anchors for an unrelated block that had already moved to another note. Admission now preserves the authority’s note assignment for existing owners, while Move remains the explicit operation allowed to change it. Seed 804 passes with 34 sync checks. A public-API regression confirms the moved target stays first in archive after the stale imported creation; the full 1,000-seed history sweep is running again.
The seeded-history sweep now passes seeds 671 through 989 and stops at 990: admission reports “redirected native scalar has no live owner” (random.rs:277). The source is the native move/restore correspondence owner lookup. I am tracing whether the destination was retired or a boundary mapping lost its owner; the full campaigns remain pending.
Seed 990’s missing-live-owner error traces to an empty moved block, not a retired destination. Generic boundary construction attached its correspondence to the metadata header’s preceding newline. A later header refresh tombstoned that newline, resolving the point at offset zero while the actual empty owner remained at its live body anchor. Empty source/destination correspondences are being changed to use the owner’s native span anchor; a focused empty-Move/metadata-refresh/offline-fill control is being added.
The remaining history sweep passes seeds 990 through 1109 and stops at 1110. An empty moved alias shares a causal boundary ID with gamma’s first character. The restoration scope resolver followed that foreign boundary-only correspondence for gamma.start, while gamma.end correctly stayed in the original note. No gamma scalar had moved. Boundary-only correspondences are being restricted to their recorded owner/cohort; shared scalar provenance remains usable. A strict empty-peer Move plus gamma Undo control is being added.
The remaining history sweep passes through seed 1276. Seed 1277 loses token T001277_10Z in a client Join before server admission: the precheck uses a stale map and sees adjacent rows, then normalize_maps exposes a foreign token row between the actual owners. Join deletes across that row. The fix validates adjacency against a read-only normalized prospective view before any live syntax mutation, preserving transport clocks if Join must be refused. A focused stale-checksum/foreign-row regression is being added.
The history sweep passes seeds 1277 through 1528 after the normalized-Join guard. Seed 1529 now reports “missing causal text dependency” during admission (random.rs:277). I am tracing the client operation that may have changed native state before returning without a transported packet. Full campaigns remain pending until the workspace history gate is clean.
Seed 1529 is fixed: foreign-owner capture rejected a valid mapped synthetic EOF empty owner after Undo had already emitted native changes. Capture now accepts the exact zero-length EOF interval already supported by text::bounds. The new unit reproduced the rejection and now verifies start=end at EOF without capturing neighboring text. Seed 1529 passes 36 sync checks; focused lib/Move/restoration/split-note/note-assignment controls pass. The final 142 history seeds are running.
Fresh staged-tree gates pass formatting, Clippy, all 41 authority probes, and the full existing 1,000-seed three-device history test. Workspace then stops in unchanged verify3: VERIFY3 runs=1000 failed_checks=84 failed_seeds=84 failure_classes=1 admission_checks=32531. First case100 seed6 expects ZRX0Z but gets ZZRX0 after Undo/Redo and moves; other examples include seed186 unknown edit target and seed253 stale file text. I am tracing these linear-model failures before the full campaigns. No oracle or invariant has changed.
Two verify3 causes are fixed with strict regressions. Seed6 cached a mapped root-relative start as byte zero and appended into the header; cold cache refresh now uses canonical body coordinates, and seed6 passes 28 admissions. Seed8 merged a tombstoned Undo-prefix anchor at zero into a valid incoming envelope, later making its owner disappear when the header changed; the merge now excludes that deleted zero boundary, retaining declared owned insertions without a note scan. Seed8 passes 33 admissions. Correction to my earlier wording: verify3’s op9 is a temporary type followed by Undo, not Redo. Seed186’s unknown edit target is being traced next.
Verify3 smoke is now clean: VERIFY3 runs=1000 failed_checks=0 failed_seeds=0 failure_classes=0 admission_checks=33068. The remaining seed186 cause was concurrent map headers being classified as human insertion history; all reserved headers are now excluded. Native insertion-envelope tests cover deleted and partially surviving inserted units, and all focused controls pass. The format helper is being consolidated so reserved-header discovery uses one structural scan per distinct affected note. Verify4/verify5 smoke and a fresh frozen-tree workspace run follow before the full campaigns.
The fresh final-tree workspace run passes formatting, Clippy and all 41 probes, but the full old history range stops at seed1504 with “incomplete original restore lineage” (random.rs:277). This appears after the newer surviving-insertion/all-header corrections; the earlier broader historical envelope masked it. I am tracing the exact native cut/copy ranks and will rerun the full gates after fixing the cause. The three independent 1,000-run smoke checks were zero before this fresh workspace run.
Seed1504 is fixed with a strict regression. Its original DeleteExtent contains zero human units, but Undo restores a physical separator. The client returned early for zero-unit receipts, and admission expanded the stale empty anchor to include that LF as human text; lineage correctly rejected the extra unit. Zero-unit Undo now rebinds the fresh separator as start=end. The regression deletes an empty row, joins its left/right neighbors, then undoes: leftright remains exact and the restored owner stays empty. Seed1504 passes37 sync checks; late-range and harness smoke gates are running.
The frozen-tree workspace gate is fully green: FMT_EXIT=0, CLIPPY_EXIT=0, WORKSPACE_EXIT=0, and test result: ok. 41 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out. The full existing 1,000-seed history test and all three independent 1,000-run smoke checks pass in that workspace run. Full campaigns are now starting under the same single build slot: verify3 200,000, verify4 300,000, verify5 300,000, then the new marker/import target for 1,800 fuzz seconds. Source tree remains frozen.
Full verify4 passed unchanged: VERIFY4 runs=300000 passed=300000 failed=0 elapsed_s=196.851. Its test result is 3 passed; 0 failed, including independent authority checks. Verify3 200,000 and verify5 300,000 are now running beside the 1,800-second marker/import fuzz target, all prebuilt and within the same single build slot.
Fuzzing found a reproducible resource failure before 30 minutes: a roughly300-byte input timed out after34 seconds (limit30), with no Rust panic reported. The saved stack is grammar::structure -> map::metadata_candidates -> text::bounds -> State::reindex -> Server::receive -> Device::sync. The input contains many empty lines; repeated whole-note parsing per imported owner is being investigated. Raw output and both saved timeout/slow inputs are attached. Verify4 completed300,000 with zero failures; verify3 (~90k) and verify5 (~190k) had no reported failures when I stopped only this job’s recorded timeout PIDs to release the slot. The frozen-tree gates will be rerun after the cause is fixed.
The fuzz resource cause is fixed with shared per-note native boundary lookup and format-owned batched marker writes. The generated80-empty-owner control reduces reindex from246 grammar calls to3 and one source copy, preserving exact order/export; reconciliation has a matching parser-byte/copy budget control. Profiling clarified fixed-file libFuzzer runs the target twice: the final41s replay is ~20.6s per input, versus the original first-input timeout32s. A real fuzz-mode run seeded with the ignored timeout case passed8 runs in123s under the unchanged timeout30/max_len4096. Clippy, focused controls, and all three1,000-run smokes pass. Full frozen-tree workspace/800k/30m gates are restarting, including the prior fuzz and resource-smoke corpora.
On the final frozen tree, unchanged verify5 completed cleanly: VERIFY5 runs=300000 seed_start=0 devices=3,5,8 failed_runs=0 model_failures=0 grammar_failures=0 categories={}. Full verify4 also completed300,000/300,000 with zero failures. Verify3 is past130,000 without a reported failure; the30-minute fuzz gate remains active without a panic or timeout after replaying the original resource input.
Finished v7d on branch
proto/block-identity-v7d.Head:
fdfe99766ab8f65f4393fbcafac8fa58ef19617f.Draft PR: #758 (supersedes draft #745).
The three independent harnesses retain their original oracles and invariants. Gate output follows verbatim:
The attached archive contains complete gate stdout, raw reports, run commands, the verified tree, head SHA and fuzz corpora. Evidence and generated artifacts are outside the commit.
Coordinator: please run the keystroke benchmark from this checkout on
10by32-01-std; perf VMs are not reachable from this build host:It uses 10,000 lines and 500 linked blocks, includes x, caret, backtick, tilde, pipe, newline and Enter, reports first conversion separately, and compares steady-state native/cached p95 latency. The perf-VM latency gate remains for the coordinator.
Download gate evidence.
Starting long-note performance investigation on proto/block-identity-v7d at
fdfe99766a(perf-test-03). I will measure load, sync and first delimiter conversion independently, fix the measured cause, and run the required gates. No merge or deployment.Initial release measurements on perf-test-03 under perf-run.sh, with the benchmark shape scaled at one link per 20 lines:
The 4000-line measurement is still running. Sync dominates and grows much faster than quadratic. I added temporary timing spans around admission, marker stripping, reindexing and reconciliation to identify the exact cause. The existing typing benchmark has not been changed.
Completed baseline scaling (release, perf-run.sh).
Sync has an empirical power exponent of 3.71 over all sizes, 4.34 over 1000–4000 lines. Load is roughly quadratic; first conversion becomes roughly cubic as retained native history grows.
No perf executable is installed, so I profiled an unoptimized debug build using temporary timing spans. At 1000 lines, sync took 1056.9 ms: reconcile 345.4 ms, strip_markers 301.4 ms, marker_spans 227.5 ms, reindex 89.6 ms, candidate cloning 59.5 ms. Reconcile includes 176.1 ms writing patches, 106.1 ms resolving owners and 61.1 ms resolving boundaries.
Exact cause: Server::receive strips every known marker on every packet, then reconcile inserts them again. With skip_gc enabled this retains a quadratic number of deleted marker items. Yrs StickyIndex::get_offset walks left through those items, and TextRef::get_string walks all items. The byte-oriented Note::sticky_index and text::offset wrappers copy a full note on each marker lookup, multiplying the cost. Device::load also refreshes projection and reindexes after every row and import claim.
The new non-ignored 2000-line regression test failed on the original implementation: load+sync took 7.966486236s, budget 100ms. I am fixing marker churn and redundant boundary work while retaining the existing typing bounds and harnesses.
The fix now combines two changes: marker retirement preserves intervals still recognized by the format, and fresh append-only imports share one admission refresh after verifying their ordinary Create/Import packet sequence, complete source and native owner envelopes. Other sequences use individual admission. Bootstrap appends reuse the existing insertion rules without reparsing the preceding row.
Release scaling after the fix, on perf-test-03 under perf-run.sh:
The same benchmark shape is used before and after: first n/20 rows linked, remaining tail fenced as in cached_keys.rs. Through 4000 lines, load is approximately linear and sync is mildly superlinear; the remaining one-time owner/index work grows with owner count. The 10000-line setup is under the requested 200 ms. The non-ignored 2000-line regression passes (100 ms release bound, 2 s debug bound). Added tests compare batched and individual admission and exercise restart, edits, delete and Undo. Full gates and the unchanged typing benchmark are still running.
Starting the Enter and Undo scaling investigation on branch proto/block-identity-v7d at base SHA
11cb088615. Correctness and diagnostic timing runs will use this build host; timing results will be labeled build host, not a perf VM number. No perf-test hosts will be used.Finding: Enter already uses cached native insertion, but Undo normalizes mapped metadata before the native undo and again during send, then reindexes and refreshes the whole note. map_refresh resolves every owner through text::offset, copying the note at each endpoint. It also replaces the changed map header, accumulating retained syntax tombstones. Initial release diagnostics (build host, not a perf VM number):
Implementing bounded Undo for an immediately preceding mapped cached split, invalidated by any intervening command, sync or pull. The existing history path remains the fallback. The specific task instruction to push only proto/block-identity-v7d takes precedence over the general new-branch rule; I will push only that branch and report the resulting remote SHA.
The bounded immediate mapped-split Undo path now restores causal owner intervals and updates only the affected owner group. It defers map serialization to save/sync, as cached typing already does. Intervening commands, attempted edits, sync and pull invalidate the receipt. Native Undo scope discovery now resolves the branch directly without copying note text.
First patched release diagnostics (build host, not a perf VM number):
The new comparison tests caught and corrected a member-order difference after repeated split/Undo/Redo. The optimized state now matches ordinary history, including member precedence. Both history tests pass; the non-ignored load budget and repeated Enter/Undo zero-materialization regression also pass. The unchanged 10000-line benchmark and full gates are next.
Second finding: the unchanged 240-cycle benchmark exposes another cost after fixing map churn. Each Undo leaves a joined native owner handle. cached_split then resolves identical native endpoints separately for every joined handle. Release build-host results: x/^/`/~/|/newline added p95 0.220/0.248/0.251/0.272/0.273/0.296 ms; Enter added p95 8.242 ms. These are build host, not a perf VM number.
I am sharing native endpoint resolution and serialized spans across joined members, writing the bindings in one transaction. All owner handles and causal semantics remain present. Both immediate Undo and cached typing use the same text-layer batch helper. The benchmark oracle and 1 ms bound remain unchanged.
All seven key classes now pass the unchanged 1 ms p95 assertion. This is a build host, not a perf VM number.
The final improvement caches byte positions with the observed note version and avoids duplicate split validation unless map conversion changed positions. Any native text delta invalidates the byte positions; validation then resolves the causal anchors. Targeted Undo/Redo, atomic fenced/table, Unicode, sync and repeated zero-materialization tests pass. The final full campaigns and a 960-second fuzz run have started in one sequential build-slot job. Performance acceptance on the perf VM remains with the coordinator.
Starting the remaining Enter and Undo scaling work on branch proto/block-identity-v7d, base
a842fbbbc7. I will run the requested correctness gates on the build host and label measurements as build host, not a perf VM number. The task-specific instructions require pushing only this branch; they take precedence over the generic new-branch instruction.Review finding:
a842fbbbalready contains the bounded immediate mapped-split Undo path and shared native interval writes. Ordinary Undo rebuilt the note map and resolved every owner; the immediate path restores only the split owner group and defers map serialization to save/sync. Joined members share endpoint resolution and span serialization. Projection byte positions are guarded by the observed native note version, so equal UTF-16-length edits with different UTF-8 widths invalidate cached bytes. Existing comparison tests check the optimized path against ordinary Undo through repeated Undo/Redo and sync, including Unicode, fences and tables. Fresh formatting and Clippy gates have passed; the release correctness campaigns are running. No further product change is justified until those results are available.Fresh measurements on
a842fbbbc7. These are build host, not a perf VM number.The unchanged 10,000-line, 500-link benchmark passes every key class, including the 240 split/Undo cycles. Verbatim output:
Formatting, Clippy with warnings denied, all block-ID tests including the non-ignored scaling tests, VERIFY3 (200000 sessions), VERIFY4 (300000 sessions), and VERIFY5 (300000 sessions) pass with zero failures. The remaining gate is the 960-second fuzz campaign, now started in the same build slot. No further product changes were needed after reviewing the saved fix.
Finished validation of the saved Enter and Undo fix on branch proto/block-identity-v7d. Head:
a842fbbbc7. No additional product changes were needed. The working tree is clean, and the branch push is verified in the attached push log.All requested build-host gates pass: formatting, Clippy with warnings denied, the complete block-ID release suite including non-ignored load scaling and unit tests, all three full independent harnesses with zero failures, all seven typing key classes, and fuzzing for 962 seconds without a panic or timeout.
These timings are build host, not a perf VM number. The coordinator still owns final perf-VM measurement.
Gate output follows verbatim; complete stdout and run commands are attached.
kayg, 29 Oct (re-confirmed): block links support every block type from the start; no simple-blocks-only limit. v7d (#758) met the gates: 800,000 sessions with 0 failures, fuzzing, Enter at 10,000 lines adds 0.935 ms p95 (≤ 1 ms).
🤖 Generated with Claude Code
Perf VM re-measure — PASS (head
b9397f92; built on 6by32-compute01; run on perf-test-03 under perf-run.sh; coordinator, 30 Oct 00:40 IST).cached_keys ten_thousand_lines_five_hundred_links_all_keys: okenter_undo_scaling(perf VM):load_and_first_conversion_scale_near_linearly: ok — load+sync ratio 3.95, first conversion 3.37 (limit 5.5 for 4× lines).🤖 Generated with Claude Code
Design plan opened: #768 — Plan: Undo with block IDs (#671), targeting
proto/block-identity-v7dfrom57724c04.docs/plans/0671-undo.mdcompares all three options and chooses server-validated structural inverse operations with stable boundary receipts and one central normaliser; native Undo remains for human text. It defines the invariant checker, concurrent Undo/B5 behavior, O(edited region) work, preserved perf-VM bounds, shared checks in all three harnesses plus semantic fuzzing, existing reproducers, and five likely failures.Documentation only on
docs/undo-block-ids-planat2f1ac759636dedfb4679a1117f094b8725114cb8. Checked whitespace and three-page A4 layout at 11-point body text; no product tests or deployments. This is a design proposal for review, not a claim that the two remaining Undo defects are fixed.kayg referenced this issue2026-11-05 23:21:12 +00:00