Files slice 1: Home identity, joined index, and reconcile #1010

Closed
kayg wants to merge 0 commits from feat/files-s1-identity into dev
Owner

Status (2026-11-10, head 5517ce595)

  • Design: one schema transaction; folder-stamp check at restart plus one full walk once the Home is quiet; Files walks only while quiet; Files-only side tables, so Notes rows keep #970's bytes. Details in the simpler design and round 4 / round 5 notes.
  • Gates: fmt, clippy -D warnings, workspace tests and the 1M listing gate pass.
  • Perf: #1010-share flat (ABAB ×5 with #970, head-copy and dev-copy arms). Head vs dev is red only where #970 alone is red, so this waits for #970's cold fix and is not READY.

Plan

Implement Files slice 1 as a backend Home identity layer over the two real Home roots selected by amended ADR 0062. Each root keeps the same relative folders and its own files; the resolver joins their listings and refuses to serve or reconcile when either expected root is missing, mismatched, or unmounted. No overlay, symlink, hard-link, or content-addressed storage is involved.

Reuse the accepted #641 folder marker contract: .calternal-id carries a canonical UUIDv7 through folder renames and moves. Marker collisions are resolved deterministically and recorded; an ambiguous path keeps both real entries. Markdown IDs remain in calternal-id frontmatter. Other file IDs use an app-managed row plus a portable hidden marker, with no content-hash-only identity inference. Reuse the Notes event/index and watcher behavior through shared APIs where it fits; do not create a second copy of those implementations.

The per-user index is rebuildable from durable markers and stores both roots in one logical namespace. First-page listing uses a composite B-tree key and keyset cursor: O(log N + page size). Normal ID and parent lookup is O(log N); a single-row update is O(log N). Reconciliation is O(N) only in background batches with bounded working memory. No request sorts a directory or loads the whole Home.

Failure table

Failure Effect Detection Recovery Test
Either root is missing or has the wrong installation identity The joined Home is incomplete Validate both mounted roots and role/installation markers before serving Fail closed without creating a root or deleting index rows; remount and reconcile Hide each root in turn, then restore it and compare IDs
Watch queue overflows or a watch cannot be installed Some outside changes are not delivered Overflow/error event or watch-limit result Retire stale watch state and enqueue paged reconciliation Inject overflow and constrained watch installation; verify convergence
A folder or file marker is copied, malformed, or duplicated Two entries may claim one ID Compare marker ownership with indexed identity and path Preserve the established ID; assign and durably record a fresh ID for the copy; keep ambiguous bytes Copy, corrupt, and delete markers, including after restart
Startup or reconciliation stops mid-page Index may lag the real trees Persisted scan generation/cursor and root validation Restart the page walk idempotently; publish only committed rows Restart between pages, then compare the joined tree and IDs

Required gates

Gate Required evidence Status
Identity Rename, move, copy, restart, missing-root, and watcher-overflow tests preserve the specified IDs Pending
Listing scale First page on a 1M-entry metadata fixture; p50/p99 plus peak memory Pending
Notes hot paths ABAB ×5 at one perf epoch for save, startup, and index, with both perf locks and a dev-vs-dev control Pending
Build and checks Workspace cargo test, clippy, and web checks Pending

The account envelope stays 50 million files and 1 PiB logical size. The first-page target remains under 100 ms. Scale fixtures contain metadata only and sparse logical sizes. Results and benchmark artifacts will be posted in PR comments per ADR 0003.

<!-- files-1010-status --> ## Status (2026-11-10, head `5517ce595`) - **Design:** one schema transaction; folder-stamp check at restart plus one full walk once the Home is quiet; Files walks only while quiet; Files-only side tables, so Notes rows keep #970's bytes. Details in [the simpler design](https://git.kayg.org/kayg/calternal/pulls/1010#issuecomment-89027) and [round 4](https://git.kayg.org/kayg/calternal/pulls/1010#issuecomment-89287) / [round 5](https://git.kayg.org/kayg/calternal/pulls/1010#issuecomment-89423) notes. - **Gates:** fmt, clippy `-D warnings`, workspace tests and the 1M listing gate pass. - **Perf:** [#1010-share flat](https://git.kayg.org/kayg/calternal/pulls/1010#issuecomment-89523) (ABAB ×5 with #970, head-copy and dev-copy arms). Head vs dev is red only where #970 alone is red, so this waits for #970's cold fix and is not READY. <!-- files-1010-status --> ## Plan Implement Files slice 1 as a backend Home identity layer over the two real Home roots selected by amended ADR 0062. Each root keeps the same relative folders and its own files; the resolver joins their listings and refuses to serve or reconcile when either expected root is missing, mismatched, or unmounted. No overlay, symlink, hard-link, or content-addressed storage is involved. Reuse the accepted #641 folder marker contract: `.calternal-id` carries a canonical UUIDv7 through folder renames and moves. Marker collisions are resolved deterministically and recorded; an ambiguous path keeps both real entries. Markdown IDs remain in `calternal-id` frontmatter. Other file IDs use an app-managed row plus a portable hidden marker, with no content-hash-only identity inference. Reuse the Notes event/index and watcher behavior through shared APIs where it fits; do not create a second copy of those implementations. The per-user index is rebuildable from durable markers and stores both roots in one logical namespace. First-page listing uses a composite B-tree key and keyset cursor: O(log N + page size). Normal ID and parent lookup is O(log N); a single-row update is O(log N). Reconciliation is O(N) only in background batches with bounded working memory. No request sorts a directory or loads the whole Home. ## Failure table | Failure | Effect | Detection | Recovery | Test | |---|---|---|---|---| | Either root is missing or has the wrong installation identity | The joined Home is incomplete | Validate both mounted roots and role/installation markers before serving | Fail closed without creating a root or deleting index rows; remount and reconcile | Hide each root in turn, then restore it and compare IDs | | Watch queue overflows or a watch cannot be installed | Some outside changes are not delivered | Overflow/error event or watch-limit result | Retire stale watch state and enqueue paged reconciliation | Inject overflow and constrained watch installation; verify convergence | | A folder or file marker is copied, malformed, or duplicated | Two entries may claim one ID | Compare marker ownership with indexed identity and path | Preserve the established ID; assign and durably record a fresh ID for the copy; keep ambiguous bytes | Copy, corrupt, and delete markers, including after restart | | Startup or reconciliation stops mid-page | Index may lag the real trees | Persisted scan generation/cursor and root validation | Restart the page walk idempotently; publish only committed rows | Restart between pages, then compare the joined tree and IDs | ## Required gates | Gate | Required evidence | Status | |---|---|---| | Identity | Rename, move, copy, restart, missing-root, and watcher-overflow tests preserve the specified IDs | Pending | | Listing scale | First page on a 1M-entry metadata fixture; p50/p99 plus peak memory | Pending | | Notes hot paths | ABAB ×5 at one perf epoch for save, startup, and index, with both perf locks and a dev-vs-dev control | Pending | | Build and checks | Workspace `cargo test`, clippy, and web checks | Pending | The account envelope stays 50 million files and 1 PiB logical size. The first-page target remains under 100 ms. Scale fixtures contain metadata only and sparse logical sizes. Results and benchmark artifacts will be posted in PR comments per ADR 0003.
Author
Owner

Namespace overlap and implementation path

Reviewing #970 showed that it already owns the shared Files current namespace and the three-root storage contract. The current #1010 draft added a separate HomeIndex under Notes metadata and modeled the SSD Home plus state as its two roots, so that draft duplicates the index and does not match ADR 0062.

I will make this branch build on #970's calternal-files::Namespace history and remove the separate HomeIndex. The Files resolver will validate SSD Home, HDD Home, and SSD app state, store its index under app state, and reconcile the two Home trees through the same current namespace. #1010 remains targeted at dev; until #970 lands, its commits are ancestors of this branch, so the shared implementation has one source in Git history and the dependent diff can shrink after #970 merges.

The current gate table remains pending until this combined implementation has exact-head results. I will keep the existing Notes watcher/index paths shared and report any touched Notes hot-path deltas with the required locked ABAB comparison.

## Namespace overlap and implementation path Reviewing #970 showed that it already owns the shared Files current namespace and the three-root storage contract. The current #1010 draft added a separate `HomeIndex` under Notes metadata and modeled the SSD Home plus state as its two roots, so that draft duplicates the index and does not match ADR 0062. I will make this branch build on #970's `calternal-files::Namespace` history and remove the separate `HomeIndex`. The Files resolver will validate SSD Home, HDD Home, and SSD app state, store its index under app state, and reconcile the two Home trees through the same current namespace. #1010 remains targeted at `dev`; until #970 lands, its commits are ancestors of this branch, so the shared implementation has one source in Git history and the dependent diff can shrink after #970 merges. The current gate table remains pending until this combined implementation has exact-head results. I will keep the existing Notes watcher/index paths shared and report any touched Notes hot-path deltas with the required locked ABAB comparison.
Author
Owner

Takeover status (head 46faabb28, merged with dev d4b32af94; Rust identical to d00b48b6e)

Previous agent stopped on a usage cap. State found: branch had no conflicts with #970 beyond one in crates/perf/src/scenarios/cold.rs (kept both functions).

Fixed a real startup bug (commit afb3d29b6): WatchEvents::recv could report the queue closed while a rescan was still pending (the last sender is dropped right after it sends the startup rescan when no watcher is installed). The startup scan then never ran and scan.wait hung. This was the cause of shutdown_settlement_state_machine failing ~3 of 4 runs on this branch (0 of 3 on dev). Test rescan_sent_just_before_the_inbox_drops_is_delivered (2,000 iterations) added. After the fix: 6 of 6 runs pass.

New test #1015 waits on: legacy_attachment_ids_survive_every_retry_boundary (crates/notes/src/home_files/tests.rs): files written before identity existed get one ID each on first scan, kept after a repeated scan, a restart and a rename.

Gate Command (on calternal-dev-01-compute02, via ~/bin/slot) Result
fmt cargo fmt --all --check pass
clippy cargo clippy --workspace --all-targets --locked -j4 -- -D warnings pass
tests cargo test --workspace --locked -j4 --no-fail-fast all pass (131 test binaries ok)
settlement flake shutdown_settlement_state_machine x6 on fixed head 6/6 pass

Leftover predecessor unit files-s1-full-test-3-1af2 was stopped (no files-s1* units remain on the perf VMs). One load-only timeout in calternal-contacts-actions crash_after_trash_move_... did not reproduce in 5 isolated runs nor in the next full run (flaky rule: no block).

Perf: fresh release binaries (head d00b48b6e, dev d4b32af94, sha256 checked) staged on perf-01; queued behind Mail/p928/Photos on perf-01 with a blocking perf-lock, then perf-02. Plan: 1M listing gate, ABAB x5 (dev legacy layout vs head joined layout) with a dev-copy control each cycle, inside both locks. Results follow in a comment.

## Takeover status (head `46faabb28`, merged with dev `d4b32af94`; Rust identical to `d00b48b6e`) Previous agent stopped on a usage cap. State found: branch had no conflicts with #970 beyond one in `crates/perf/src/scenarios/cold.rs` (kept both functions). **Fixed a real startup bug** (commit `afb3d29b6`): `WatchEvents::recv` could report the queue closed while a rescan was still pending (the last sender is dropped right after it sends the startup rescan when no watcher is installed). The startup scan then never ran and `scan.wait` hung. This was the cause of `shutdown_settlement_state_machine` failing ~3 of 4 runs on this branch (0 of 3 on dev). Test `rescan_sent_just_before_the_inbox_drops_is_delivered` (2,000 iterations) added. After the fix: 6 of 6 runs pass. **New test #1015 waits on**: `legacy_attachment_ids_survive_every_retry_boundary` (`crates/notes/src/home_files/tests.rs`): files written before identity existed get one ID each on first scan, kept after a repeated scan, a restart and a rename. | Gate | Command (on `calternal-dev-01-compute02`, via `~/bin/slot`) | Result | |---|---|---| | fmt | `cargo fmt --all --check` | pass | | clippy | `cargo clippy --workspace --all-targets --locked -j4 -- -D warnings` | pass | | tests | `cargo test --workspace --locked -j4 --no-fail-fast` | all pass (131 test binaries ok) | | settlement flake | `shutdown_settlement_state_machine` x6 on fixed head | 6/6 pass | Leftover predecessor unit `files-s1-full-test-3-1af2` was stopped (no `files-s1*` units remain on the perf VMs). One load-only timeout in `calternal-contacts-actions` `crash_after_trash_move_...` did not reproduce in 5 isolated runs nor in the next full run (flaky rule: no block). Perf: fresh release binaries (head `d00b48b6e`, dev `d4b32af94`, sha256 checked) staged on perf-01; queued behind Mail/p928/Photos on perf-01 with a blocking `perf-lock`, then perf-02. Plan: 1M listing gate, ABAB x5 (dev legacy layout vs head joined layout) with a dev-copy control each cycle, inside both locks. Results follow in a comment.
Author
Owner

Perf: ABAB x5 + control, inside both perf locks (perf-01 then perf-02), session 2026-11-09 06:54–07:55Z

Head d00b48b6e (Rust identical to PR head 46faabb28) vs dev d4b32af94, release builds, sha256 checked. Dev runs the legacy single-root layout, head runs the joined three-root layout (SSD Home, HDD Home, app state). Per cycle: A1 dev, B1 head, A2 dev, B2 head, then a dev-copy control (same dev binary, copied). 5 cycles, same boot (7a65f072), sizes 1k/10k/100k, --runs 1 --cold-runs 1 --hot-only --gate. Medians of per-arm p50/p95 (n = 10 dev, 10 head, 5 control). Locks released at 07:55Z.

Control (dev vs dev-copy) is within about 1% on the cold metrics, so the cold deltas below are not noise.

Scale gate (1M entries, files-listing-bench, page 50)

cold_first_us=104 p50_us=59 p99_us=99 active_map_bytes=53085308 peak_rss_kib=56460. The plan's gate is a first page under 100 ms: pass (about 0.1 ms).

Regressions vs dev (they block merge under the no-regression rule)

Metric 1k 10k 100k
cold.first_page p50 +30% (435 → 568 ms) +115% (333 → 714 ms) +168% (2.72 → 7.28 s)
cold.index +25% +23% +19% (22.9 → 27.1 s)
cold.notes_per_s -20% -19% -16%
cold.disk_written +3% +6% +17% (1.92 → 2.24 GB)
startup.healthz +43% +43% +25% (7.3 → 9.2 ms)
home.page_big p50 -1% +2% +48% (19.0 → 28.2 ms), p95 +57%
open.api_get p95 +11% +1% +345% (14.8 → 65.9 ms)
notes.append.first +6% +77% (104 → 183 ms; control also +150%, noisy) -79% (better)
notes.append p50 -2% -8% +9% (p95 +13%)
open.note -7% +4% +10% (p95 +18%)

cold.* runs once per arm, so these are medians of 10 arms; the control's median stays within about 1% of dev.

Improvements

home.first_page 1k -37%; notes.append.first 100k -79%; sync.save_ack p95 100k -41%; sync.round_trip 100k -19%; memory flat to -7%.

Flat (inside control noise)

home.page, home.page_next, home.page_tag, home.page_title, search.*, sync.durable_write, shutdown, open.api_get.warm, mem.*.

Likely cause (not verified)

The cold open now reads and writes the shared current namespace (joined-tree reconcile plus bounded 8,192-row commits) in addition to the Notes discovery dev does, so the first page waits behind extra index writes (+17% bytes written at 100k). startup.healthz +2 ms is the extra root validation and resolver open.

State

Not READY FOR MERGE under the no-perf-regression rule: the cold-path, home.page_big and open.api_get p95 deltas need a fix or kayg's explicit waiver. Everything else is green: fmt, clippy -D warnings, full workspace tests, scale gate, legacy-attachment ID test, settlement flake fixed.

Full table (all metrics)
size metric unit | dev p50 | head p50 d% | ctl p50 d% | dev p95 | head p95 d% | n(dev/head/ctl)
1000 cold.disk_written MB | 18.813 | 19.419 +3.2% | 18.784 -0.2% | 18.813 | 19.419 +3.2% | 10 10 5
1000 cold.first_page ms | 435.473 | 567.589 +30.3% | 432.892 -0.6% | 435.473 | 567.589 +30.3% | 10 10 5
1000 cold.index s | 0.538 | 0.669 +24.5% | 0.535 -0.5% | 0.538 | 0.669 +24.5% | 10 10 5
1000 cold.mem_peak MB | 45.088 | 47.998 +6.5% | 46.273 +2.6% | 45.088 | 47.998 +6.5% | 10 10 5
1000 cold.notes_per_s notes/s | 1859.29 | 1493.762 -19.7% | 1868.279 +0.5% | 1859.29 | 1493.762 -19.7% | 10 10 5
1000 cold.startup ms | 20.349 | 22.157 +8.9% | 23.192 +14.0% | 20.349 | 22.157 +8.9% | 10 10 5
1000 home.first_page ms | 2.787 | 1.769 -36.5% | 2.126 -23.7% | 2.787 | 1.769 -36.5% | 10 10 5
1000 home.page ms | 0.678 | 0.727 +7.3% | 0.672 -0.9% | 1.222 | 1.408 +15.2% | 10 10 5
1000 home.page_big ms | 8.938 | 8.826 -1.2% | 8.897 -0.5% | 8.938 | 8.826 -1.2% | 10 10 5
1000 home.page_next ms | 0.714 | 0.719 +0.7% | 0.695 -2.7% | 0.803 | 0.792 -1.3% | 10 10 5
1000 home.page_tag ms | 1.247 | 1.272 +2.0% | 1.21 -3.0% | 1.446 | 1.494 +3.3% | 10 10 5
1000 home.page_title ms | 0.611 | 0.61 -0.2% | 0.57 -6.7% | 0.715 | 0.713 -0.3% | 10 10 5
1000 mem.after_first_page MB | 21.34 | 20.857 -2.3% | 21.668 +1.5% | 21.34 | 20.857 -2.3% | 10 10 5
1000 mem.after_opens MB | 34.705 | 35.404 +2.0% | 35.336 +1.8% | 34.705 | 35.404 +2.0% | 10 10 5
1000 mem.after_search MB | 47.57 | 48.371 +1.7% | 47.777 +0.4% | 47.57 | 48.371 +1.7% | 10 10 5
1000 mem.idle MB | 18.232 | 19.148 +5.0% | 18.77 +2.9% | 18.232 | 19.148 +5.0% | 10 10 5
1000 notes.append ms | 5.336 | 5.231 -2.0% | 5.277 -1.1% | 13.402 | 13.103 -2.2% | 10 10 5
1000 notes.append.first ms | 21.315 | 22.6 +6.0% | 24.109 +13.1% | 21.315 | 22.6 +6.0% | 10 10 5
1000 open.api_get ms | 7.488 | 7.515 +0.4% | 7.518 +0.4% | 13.772 | 15.316 +11.2% | 10 10 5
1000 open.api_get.warm ms | 0.162 | 0.164 +1.4% | 0.17 +5.3% | 0.209 | 0.207 -1.2% | 10 10 5
1000 open.long_note ms | 15.102 | 15.582 +3.2% | 15.884 +5.2% | 15.102 | 15.582 +3.2% | 10 10 5
1000 open.note ms | 0.701 | 0.651 -7.2% | 0.663 -5.5% | 2.266 | 2.121 -6.4% | 10 10 5
1000 search.catch_up s | 2.003 | 2.003 +0.0% | 2.003 +0.0% | 2.003 | 2.003 +0.0% | 10 10 5
1000 search.first_query ms | 27.772 | 31.144 +12.1% | 30.12 +8.5% | 27.772 | 31.144 +12.1% | 10 10 5
1000 search.query ms | 1.149 | 1.167 +1.5% | 1.161 +1.0% | 2.137 | 2.238 +4.7% | 10 10 5
1000 shutdown ms | 43.058 | 43.031 -0.1% | 42.175 -2.0% | 43.058 | 43.031 -0.1% | 10 10 5
1000 startup.healthz ms | 4.968 | 7.109 +43.1% | 4.899 -1.4% | 4.968 | 7.109 +43.1% | 10 10 5
1000 sync.durable_write ms | 24.98 | 24.951 -0.1% | 25.116 +0.5% | 33.142 | 31.43 -5.2% | 10 10 5
1000 sync.round_trip ms | 0.214 | 0.209 -2.6% | 0.208 -3.1% | 0.343 | 0.352 +2.6% | 10 10 5
1000 sync.save_ack ms | 3.696 | 3.717 +0.6% | 3.668 -0.7% | 5.504 | 5.71 +3.7% | 10 10 5
10000 cold.disk_written MB | 150.252 | 159.322 +6.0% | 150.569 +0.2% | 150.252 | 159.322 +6.0% | 10 10 5
10000 cold.first_page ms | 332.798 | 713.989 +114.5% | 325.348 -2.2% | 332.798 | 713.989 +114.5% | 10 10 5
10000 cold.index s | 1.697 | 2.086 +22.9% | 1.676 -1.2% | 1.697 | 2.086 +22.9% | 10 10 5
10000 cold.mem_peak MB | 143.535 | 145.127 +1.1% | 143.309 -0.2% | 143.535 | 145.127 +1.1% | 10 10 5
10000 cold.notes_per_s notes/s | 5894.999 | 4794.997 -18.7% | 5965.417 +1.2% | 5894.999 | 4794.997 -18.7% | 10 10 5
10000 cold.startup ms | 19.833 | 21.198 +6.9% | 18.787 -5.3% | 19.833 | 21.198 +6.9% | 10 10 5
10000 home.first_page ms | 2.36 | 2.351 -0.4% | 2.622 +11.1% | 2.36 | 2.351 -0.4% | 10 10 5
10000 home.page ms | 0.76 | 0.831 +9.3% | 0.816 +7.4% | 1.312 | 1.07 -18.5% | 10 10 5
10000 home.page_big ms | 16.733 | 17.087 +2.1% | 16.519 -1.3% | 17.715 | 19.529 +10.2% | 10 10 5
10000 home.page_next ms | 0.688 | 0.71 +3.2% | 0.7 +1.8% | 0.808 | 0.924 +14.4% | 10 10 5
10000 home.page_tag ms | 5.363 | 5.433 +1.3% | 5.382 +0.4% | 7.117 | 7.254 +1.9% | 10 10 5
10000 home.page_title ms | 0.644 | 0.69 +7.2% | 0.679 +5.6% | 0.773 | 1.272 +64.6% | 10 10 5
10000 mem.after_first_page MB | 21.277 | 21.504 +1.1% | 21.367 +0.4% | 21.277 | 21.504 +1.1% | 10 10 5
10000 mem.after_opens MB | 40.227 | 41.617 +3.5% | 40.938 +1.8% | 40.227 | 41.617 +3.5% | 10 10 5
10000 mem.after_search MB | 74.918 | 74.867 -0.1% | 75.184 +0.4% | 74.918 | 74.867 -0.1% | 10 10 5
10000 mem.idle MB | 18.775 | 19.283 +2.7% | 18.609 -0.9% | 18.775 | 19.283 +2.7% | 10 10 5
10000 notes.append ms | 5.492 | 5.062 -7.8% | 5.274 -4.0% | 14.713 | 14.445 -1.8% | 10 10 5
10000 notes.append.first ms | 103.797 | 183.348 +76.6% | 259.36 +149.9% | 103.797 | 183.348 +76.6% | 10 10 5
10000 open.api_get ms | 7.686 | 7.703 +0.2% | 7.613 -0.9% | 13.7 | 13.808 +0.8% | 10 10 5
10000 open.api_get.warm ms | 0.164 | 0.165 +0.2% | 0.159 -2.9% | 0.216 | 0.211 -2.0% | 10 10 5
10000 open.long_note ms | 15.951 | 15.942 -0.1% | 16.012 +0.4% | 15.951 | 15.942 -0.1% | 10 10 5
10000 open.note ms | 0.61 | 0.633 +3.7% | 0.594 -2.7% | 1.294 | 1.283 -0.9% | 10 10 5
10000 search.catch_up s | 4.012 | 4.011 -0.0% | 4.014 +0.1% | 4.012 | 4.011 -0.0% | 10 10 5
10000 search.first_query ms | 29.406 | 27.417 -6.8% | 27.438 -6.7% | 29.406 | 27.417 -6.8% | 10 10 5
10000 search.query ms | 1.603 | 1.509 -5.9% | 1.808 +12.7% | 6.255 | 7.799 +24.7% | 10 10 5
10000 shutdown ms | 43.114 | 43.135 +0.0% | 43.056 -0.1% | 43.114 | 43.135 +0.0% | 10 10 5
10000 startup.healthz ms | 4.931 | 7.039 +42.7% | 5.084 +3.1% | 4.931 | 7.039 +42.7% | 10 10 5
10000 sync.durable_write ms | 24.99 | 24.963 -0.1% | 24.941 -0.2% | 31.052 | 30.264 -2.5% | 10 10 5
10000 sync.round_trip ms | 0.207 | 0.214 +3.5% | 0.213 +3.2% | 0.349 | 0.348 -0.4% | 10 10 5
10000 sync.save_ack ms | 3.729 | 3.702 -0.7% | 3.713 -0.4% | 6.279 | 6.824 +8.7% | 10 10 5
100000 cold.disk_written MB | 1919.152 | 2237.45 +16.6% | 1919.189 +0.0% | 1919.152 | 2237.45 +16.6% | 10 10 5
100000 cold.first_page ms | 2720.993 | 7283.372 +167.7% | 2751.979 +1.1% | 2720.993 | 7283.372 +167.7% | 10 10 5
100000 cold.index s | 22.859 | 27.114 +18.6% | 22.966 +0.5% | 22.859 | 27.114 +18.6% | 10 10 5
100000 cold.mem_peak MB | 286.926 | 282.439 -1.6% | 289.355 +0.8% | 286.926 | 282.439 -1.6% | 10 10 5
100000 cold.notes_per_s notes/s | 4375.476 | 3688.112 -15.7% | 4354.334 -0.5% | 4375.476 | 3688.112 -15.7% | 10 10 5
100000 cold.startup ms | 20.303 | 21.906 +7.9% | 19.937 -1.8% | 20.303 | 21.906 +7.9% | 10 10 5
100000 home.first_page ms | 3.315 | 3.491 +5.3% | 3.224 -2.7% | 3.315 | 3.491 +5.3% | 10 10 5
100000 home.page ms | 0.961 | 0.892 -7.2% | 0.972 +1.2% | 1.828 | 1.207 -33.9% | 10 10 5
100000 home.page_big ms | 18.997 | 28.183 +48.4% | 18.969 -0.2% | 24.504 | 38.57 +57.4% | 10 10 5
100000 home.page_next ms | 0.764 | 0.841 +10.0% | 0.766 +0.2% | 1.314 | 1.034 -21.3% | 10 10 5
100000 home.page_tag ms | 52.733 | 51.903 -1.6% | 52.917 +0.3% | 59.835 | 55.278 -7.6% | 10 10 5
100000 home.page_title ms | 0.814 | 0.811 -0.4% | 0.903 +10.9% | 1.056 | 1.028 -2.6% | 10 10 5
100000 mem.after_first_page MB | 22.367 | 22.172 -0.9% | 22.715 +1.6% | 22.367 | 22.172 -0.9% | 10 10 5
100000 mem.after_opens MB | 98.402 | 96.197 -2.2% | 94.48 -4.0% | 98.402 | 96.197 -2.2% | 10 10 5
100000 mem.after_search MB | 101.928 | 94.588 -7.2% | 98.484 -3.4% | 101.928 | 94.588 -7.2% | 10 10 5
100000 mem.idle MB | 19.318 | 19.02 -1.5% | 19.855 +2.8% | 19.318 | 19.02 -1.5% | 10 10 5
100000 notes.append ms | 5.713 | 6.236 +9.2% | 6.045 +5.8% | 19.235 | 21.69 +12.8% | 10 10 5
100000 notes.append.first ms | 889.959 | 186.333 -79.1% | 449.07 -49.5% | 889.959 | 186.333 -79.1% | 10 10 5
100000 open.api_get ms | 8.059 | 8.204 +1.8% | 8.28 +2.7% | 14.807 | 65.915 +345.2% | 10 10 5
100000 open.api_get.warm ms | 0.166 | 0.172 +3.9% | 0.173 +4.5% | 0.21 | 0.217 +3.3% | 10 10 5
100000 open.long_note ms | 96.605 | 100.05 +3.6% | 96.335 -0.3% | 96.605 | 100.05 +3.6% | 10 10 5
100000 open.note ms | 6.221 | 6.822 +9.7% | 7.457 +19.9% | 20.602 | 24.318 +18.0% | 10 10 5
100000 search.catch_up s | 58.136 | 59.138 +1.7% | 58.142 +0.0% | 58.136 | 59.138 +1.7% | 10 10 5
100000 search.first_query ms | 29.39 | 32.264 +9.8% | 27.632 -6.0% | 29.39 | 32.264 +9.8% | 10 10 5
100000 search.query ms | 2.373 | 2.41 +1.6% | 2.284 -3.7% | 23.516 | 24.248 +3.1% | 10 10 5
100000 shutdown ms | 43.336 | 43.299 -0.1% | 43.401 +0.1% | 43.336 | 43.299 -0.1% | 10 10 5
100000 startup.healthz ms | 7.338 | 9.154 +24.7% | 7.272 -0.9% | 7.338 | 9.154 +24.7% | 10 10 5
100000 sync.durable_write ms | 29.645 | 27.86 -6.0% | 29.389 -0.9% | 44.856 | 46.599 +3.9% | 10 10 5
100000 sync.round_trip ms | 0.336 | 0.273 -18.7% | 0.327 -2.8% | 0.579 | 0.46 -20.5% | 10 10 5
100000 sync.save_ack ms | 4.502 | 3.982 -11.5% | 4.639 +3.0% | 67.179 | 39.298 -41.5% | 10 10 5

## Perf: ABAB x5 + control, inside both perf locks (perf-01 then perf-02), session 2026-11-09 06:54–07:55Z Head `d00b48b6e` (Rust identical to PR head `46faabb28`) vs dev `d4b32af94`, release builds, sha256 checked. Dev runs the legacy single-root layout, head runs the joined three-root layout (SSD Home, HDD Home, app state). Per cycle: A1 dev, B1 head, A2 dev, B2 head, then a dev-copy control (same dev binary, copied). 5 cycles, same boot (`7a65f072`), sizes 1k/10k/100k, `--runs 1 --cold-runs 1 --hot-only --gate`. Medians of per-arm p50/p95 (n = 10 dev, 10 head, 5 control). Locks released at 07:55Z. **Control (dev vs dev-copy) is within about 1% on the cold metrics**, so the cold deltas below are not noise. ### Scale gate (1M entries, `files-listing-bench`, page 50) `cold_first_us=104 p50_us=59 p99_us=99 active_map_bytes=53085308 peak_rss_kib=56460`. The plan's gate is a first page under 100 ms: pass (about 0.1 ms). ### Regressions vs dev (they block merge under the no-regression rule) | Metric | 1k | 10k | 100k | |---|---|---|---| | `cold.first_page` p50 | +30% (435 → 568 ms) | +115% (333 → 714 ms) | **+168% (2.72 → 7.28 s)** | | `cold.index` | +25% | +23% | +19% (22.9 → 27.1 s) | | `cold.notes_per_s` | -20% | -19% | -16% | | `cold.disk_written` | +3% | +6% | +17% (1.92 → 2.24 GB) | | `startup.healthz` | +43% | +43% | +25% (7.3 → 9.2 ms) | | `home.page_big` p50 | -1% | +2% | **+48% (19.0 → 28.2 ms)**, p95 +57% | | `open.api_get` p95 | +11% | +1% | **+345% (14.8 → 65.9 ms)** | | `notes.append.first` | +6% | +77% (104 → 183 ms; control also +150%, noisy) | -79% (better) | | `notes.append` p50 | -2% | -8% | +9% (p95 +13%) | | `open.note` | -7% | +4% | +10% (p95 +18%) | `cold.*` runs once per arm, so these are medians of 10 arms; the control's median stays within about 1% of dev. ### Improvements `home.first_page` 1k -37%; `notes.append.first` 100k -79%; `sync.save_ack` p95 100k -41%; `sync.round_trip` 100k -19%; memory flat to -7%. ### Flat (inside control noise) `home.page`, `home.page_next`, `home.page_tag`, `home.page_title`, `search.*`, `sync.durable_write`, `shutdown`, `open.api_get.warm`, `mem.*`. ### Likely cause (not verified) The cold open now reads and writes the shared current namespace (joined-tree reconcile plus bounded 8,192-row commits) in addition to the Notes discovery dev does, so the first page waits behind extra index writes (+17% bytes written at 100k). `startup.healthz` +2 ms is the extra root validation and resolver open. ### State Not READY FOR MERGE under the no-perf-regression rule: the cold-path, `home.page_big` and `open.api_get` p95 deltas need a fix or kayg's explicit waiver. Everything else is green: fmt, clippy `-D warnings`, full workspace tests, scale gate, legacy-attachment ID test, settlement flake fixed. <details><summary>Full table (all metrics)</summary> ``` size metric unit | dev p50 | head p50 d% | ctl p50 d% | dev p95 | head p95 d% | n(dev/head/ctl) 1000 cold.disk_written MB | 18.813 | 19.419 +3.2% | 18.784 -0.2% | 18.813 | 19.419 +3.2% | 10 10 5 1000 cold.first_page ms | 435.473 | 567.589 +30.3% | 432.892 -0.6% | 435.473 | 567.589 +30.3% | 10 10 5 1000 cold.index s | 0.538 | 0.669 +24.5% | 0.535 -0.5% | 0.538 | 0.669 +24.5% | 10 10 5 1000 cold.mem_peak MB | 45.088 | 47.998 +6.5% | 46.273 +2.6% | 45.088 | 47.998 +6.5% | 10 10 5 1000 cold.notes_per_s notes/s | 1859.29 | 1493.762 -19.7% | 1868.279 +0.5% | 1859.29 | 1493.762 -19.7% | 10 10 5 1000 cold.startup ms | 20.349 | 22.157 +8.9% | 23.192 +14.0% | 20.349 | 22.157 +8.9% | 10 10 5 1000 home.first_page ms | 2.787 | 1.769 -36.5% | 2.126 -23.7% | 2.787 | 1.769 -36.5% | 10 10 5 1000 home.page ms | 0.678 | 0.727 +7.3% | 0.672 -0.9% | 1.222 | 1.408 +15.2% | 10 10 5 1000 home.page_big ms | 8.938 | 8.826 -1.2% | 8.897 -0.5% | 8.938 | 8.826 -1.2% | 10 10 5 1000 home.page_next ms | 0.714 | 0.719 +0.7% | 0.695 -2.7% | 0.803 | 0.792 -1.3% | 10 10 5 1000 home.page_tag ms | 1.247 | 1.272 +2.0% | 1.21 -3.0% | 1.446 | 1.494 +3.3% | 10 10 5 1000 home.page_title ms | 0.611 | 0.61 -0.2% | 0.57 -6.7% | 0.715 | 0.713 -0.3% | 10 10 5 1000 mem.after_first_page MB | 21.34 | 20.857 -2.3% | 21.668 +1.5% | 21.34 | 20.857 -2.3% | 10 10 5 1000 mem.after_opens MB | 34.705 | 35.404 +2.0% | 35.336 +1.8% | 34.705 | 35.404 +2.0% | 10 10 5 1000 mem.after_search MB | 47.57 | 48.371 +1.7% | 47.777 +0.4% | 47.57 | 48.371 +1.7% | 10 10 5 1000 mem.idle MB | 18.232 | 19.148 +5.0% | 18.77 +2.9% | 18.232 | 19.148 +5.0% | 10 10 5 1000 notes.append ms | 5.336 | 5.231 -2.0% | 5.277 -1.1% | 13.402 | 13.103 -2.2% | 10 10 5 1000 notes.append.first ms | 21.315 | 22.6 +6.0% | 24.109 +13.1% | 21.315 | 22.6 +6.0% | 10 10 5 1000 open.api_get ms | 7.488 | 7.515 +0.4% | 7.518 +0.4% | 13.772 | 15.316 +11.2% | 10 10 5 1000 open.api_get.warm ms | 0.162 | 0.164 +1.4% | 0.17 +5.3% | 0.209 | 0.207 -1.2% | 10 10 5 1000 open.long_note ms | 15.102 | 15.582 +3.2% | 15.884 +5.2% | 15.102 | 15.582 +3.2% | 10 10 5 1000 open.note ms | 0.701 | 0.651 -7.2% | 0.663 -5.5% | 2.266 | 2.121 -6.4% | 10 10 5 1000 search.catch_up s | 2.003 | 2.003 +0.0% | 2.003 +0.0% | 2.003 | 2.003 +0.0% | 10 10 5 1000 search.first_query ms | 27.772 | 31.144 +12.1% | 30.12 +8.5% | 27.772 | 31.144 +12.1% | 10 10 5 1000 search.query ms | 1.149 | 1.167 +1.5% | 1.161 +1.0% | 2.137 | 2.238 +4.7% | 10 10 5 1000 shutdown ms | 43.058 | 43.031 -0.1% | 42.175 -2.0% | 43.058 | 43.031 -0.1% | 10 10 5 1000 startup.healthz ms | 4.968 | 7.109 +43.1% | 4.899 -1.4% | 4.968 | 7.109 +43.1% | 10 10 5 1000 sync.durable_write ms | 24.98 | 24.951 -0.1% | 25.116 +0.5% | 33.142 | 31.43 -5.2% | 10 10 5 1000 sync.round_trip ms | 0.214 | 0.209 -2.6% | 0.208 -3.1% | 0.343 | 0.352 +2.6% | 10 10 5 1000 sync.save_ack ms | 3.696 | 3.717 +0.6% | 3.668 -0.7% | 5.504 | 5.71 +3.7% | 10 10 5 10000 cold.disk_written MB | 150.252 | 159.322 +6.0% | 150.569 +0.2% | 150.252 | 159.322 +6.0% | 10 10 5 10000 cold.first_page ms | 332.798 | 713.989 +114.5% | 325.348 -2.2% | 332.798 | 713.989 +114.5% | 10 10 5 10000 cold.index s | 1.697 | 2.086 +22.9% | 1.676 -1.2% | 1.697 | 2.086 +22.9% | 10 10 5 10000 cold.mem_peak MB | 143.535 | 145.127 +1.1% | 143.309 -0.2% | 143.535 | 145.127 +1.1% | 10 10 5 10000 cold.notes_per_s notes/s | 5894.999 | 4794.997 -18.7% | 5965.417 +1.2% | 5894.999 | 4794.997 -18.7% | 10 10 5 10000 cold.startup ms | 19.833 | 21.198 +6.9% | 18.787 -5.3% | 19.833 | 21.198 +6.9% | 10 10 5 10000 home.first_page ms | 2.36 | 2.351 -0.4% | 2.622 +11.1% | 2.36 | 2.351 -0.4% | 10 10 5 10000 home.page ms | 0.76 | 0.831 +9.3% | 0.816 +7.4% | 1.312 | 1.07 -18.5% | 10 10 5 10000 home.page_big ms | 16.733 | 17.087 +2.1% | 16.519 -1.3% | 17.715 | 19.529 +10.2% | 10 10 5 10000 home.page_next ms | 0.688 | 0.71 +3.2% | 0.7 +1.8% | 0.808 | 0.924 +14.4% | 10 10 5 10000 home.page_tag ms | 5.363 | 5.433 +1.3% | 5.382 +0.4% | 7.117 | 7.254 +1.9% | 10 10 5 10000 home.page_title ms | 0.644 | 0.69 +7.2% | 0.679 +5.6% | 0.773 | 1.272 +64.6% | 10 10 5 10000 mem.after_first_page MB | 21.277 | 21.504 +1.1% | 21.367 +0.4% | 21.277 | 21.504 +1.1% | 10 10 5 10000 mem.after_opens MB | 40.227 | 41.617 +3.5% | 40.938 +1.8% | 40.227 | 41.617 +3.5% | 10 10 5 10000 mem.after_search MB | 74.918 | 74.867 -0.1% | 75.184 +0.4% | 74.918 | 74.867 -0.1% | 10 10 5 10000 mem.idle MB | 18.775 | 19.283 +2.7% | 18.609 -0.9% | 18.775 | 19.283 +2.7% | 10 10 5 10000 notes.append ms | 5.492 | 5.062 -7.8% | 5.274 -4.0% | 14.713 | 14.445 -1.8% | 10 10 5 10000 notes.append.first ms | 103.797 | 183.348 +76.6% | 259.36 +149.9% | 103.797 | 183.348 +76.6% | 10 10 5 10000 open.api_get ms | 7.686 | 7.703 +0.2% | 7.613 -0.9% | 13.7 | 13.808 +0.8% | 10 10 5 10000 open.api_get.warm ms | 0.164 | 0.165 +0.2% | 0.159 -2.9% | 0.216 | 0.211 -2.0% | 10 10 5 10000 open.long_note ms | 15.951 | 15.942 -0.1% | 16.012 +0.4% | 15.951 | 15.942 -0.1% | 10 10 5 10000 open.note ms | 0.61 | 0.633 +3.7% | 0.594 -2.7% | 1.294 | 1.283 -0.9% | 10 10 5 10000 search.catch_up s | 4.012 | 4.011 -0.0% | 4.014 +0.1% | 4.012 | 4.011 -0.0% | 10 10 5 10000 search.first_query ms | 29.406 | 27.417 -6.8% | 27.438 -6.7% | 29.406 | 27.417 -6.8% | 10 10 5 10000 search.query ms | 1.603 | 1.509 -5.9% | 1.808 +12.7% | 6.255 | 7.799 +24.7% | 10 10 5 10000 shutdown ms | 43.114 | 43.135 +0.0% | 43.056 -0.1% | 43.114 | 43.135 +0.0% | 10 10 5 10000 startup.healthz ms | 4.931 | 7.039 +42.7% | 5.084 +3.1% | 4.931 | 7.039 +42.7% | 10 10 5 10000 sync.durable_write ms | 24.99 | 24.963 -0.1% | 24.941 -0.2% | 31.052 | 30.264 -2.5% | 10 10 5 10000 sync.round_trip ms | 0.207 | 0.214 +3.5% | 0.213 +3.2% | 0.349 | 0.348 -0.4% | 10 10 5 10000 sync.save_ack ms | 3.729 | 3.702 -0.7% | 3.713 -0.4% | 6.279 | 6.824 +8.7% | 10 10 5 100000 cold.disk_written MB | 1919.152 | 2237.45 +16.6% | 1919.189 +0.0% | 1919.152 | 2237.45 +16.6% | 10 10 5 100000 cold.first_page ms | 2720.993 | 7283.372 +167.7% | 2751.979 +1.1% | 2720.993 | 7283.372 +167.7% | 10 10 5 100000 cold.index s | 22.859 | 27.114 +18.6% | 22.966 +0.5% | 22.859 | 27.114 +18.6% | 10 10 5 100000 cold.mem_peak MB | 286.926 | 282.439 -1.6% | 289.355 +0.8% | 286.926 | 282.439 -1.6% | 10 10 5 100000 cold.notes_per_s notes/s | 4375.476 | 3688.112 -15.7% | 4354.334 -0.5% | 4375.476 | 3688.112 -15.7% | 10 10 5 100000 cold.startup ms | 20.303 | 21.906 +7.9% | 19.937 -1.8% | 20.303 | 21.906 +7.9% | 10 10 5 100000 home.first_page ms | 3.315 | 3.491 +5.3% | 3.224 -2.7% | 3.315 | 3.491 +5.3% | 10 10 5 100000 home.page ms | 0.961 | 0.892 -7.2% | 0.972 +1.2% | 1.828 | 1.207 -33.9% | 10 10 5 100000 home.page_big ms | 18.997 | 28.183 +48.4% | 18.969 -0.2% | 24.504 | 38.57 +57.4% | 10 10 5 100000 home.page_next ms | 0.764 | 0.841 +10.0% | 0.766 +0.2% | 1.314 | 1.034 -21.3% | 10 10 5 100000 home.page_tag ms | 52.733 | 51.903 -1.6% | 52.917 +0.3% | 59.835 | 55.278 -7.6% | 10 10 5 100000 home.page_title ms | 0.814 | 0.811 -0.4% | 0.903 +10.9% | 1.056 | 1.028 -2.6% | 10 10 5 100000 mem.after_first_page MB | 22.367 | 22.172 -0.9% | 22.715 +1.6% | 22.367 | 22.172 -0.9% | 10 10 5 100000 mem.after_opens MB | 98.402 | 96.197 -2.2% | 94.48 -4.0% | 98.402 | 96.197 -2.2% | 10 10 5 100000 mem.after_search MB | 101.928 | 94.588 -7.2% | 98.484 -3.4% | 101.928 | 94.588 -7.2% | 10 10 5 100000 mem.idle MB | 19.318 | 19.02 -1.5% | 19.855 +2.8% | 19.318 | 19.02 -1.5% | 10 10 5 100000 notes.append ms | 5.713 | 6.236 +9.2% | 6.045 +5.8% | 19.235 | 21.69 +12.8% | 10 10 5 100000 notes.append.first ms | 889.959 | 186.333 -79.1% | 449.07 -49.5% | 889.959 | 186.333 -79.1% | 10 10 5 100000 open.api_get ms | 8.059 | 8.204 +1.8% | 8.28 +2.7% | 14.807 | 65.915 +345.2% | 10 10 5 100000 open.api_get.warm ms | 0.166 | 0.172 +3.9% | 0.173 +4.5% | 0.21 | 0.217 +3.3% | 10 10 5 100000 open.long_note ms | 96.605 | 100.05 +3.6% | 96.335 -0.3% | 96.605 | 100.05 +3.6% | 10 10 5 100000 open.note ms | 6.221 | 6.822 +9.7% | 7.457 +19.9% | 20.602 | 24.318 +18.0% | 10 10 5 100000 search.catch_up s | 58.136 | 59.138 +1.7% | 58.142 +0.0% | 58.136 | 59.138 +1.7% | 10 10 5 100000 search.first_query ms | 29.39 | 32.264 +9.8% | 27.632 -6.0% | 29.39 | 32.264 +9.8% | 10 10 5 100000 search.query ms | 2.373 | 2.41 +1.6% | 2.284 -3.7% | 23.516 | 24.248 +3.1% | 10 10 5 100000 shutdown ms | 43.336 | 43.299 -0.1% | 43.401 +0.1% | 43.336 | 43.299 -0.1% | 10 10 5 100000 startup.healthz ms | 7.338 | 9.154 +24.7% | 7.272 -0.9% | 7.338 | 9.154 +24.7% | 10 10 5 100000 sync.durable_write ms | 29.645 | 27.86 -6.0% | 29.389 -0.9% | 44.856 | 46.599 +3.9% | 10 10 5 100000 sync.round_trip ms | 0.336 | 0.273 -18.7% | 0.327 -2.8% | 0.579 | 0.46 -20.5% | 10 10 5 100000 sync.save_ack ms | 4.502 | 3.982 -11.5% | 4.639 +3.0% | 67.179 | 39.298 -41.5% | 10 10 5 ``` </details>
Author
Owner

Perf fix design (round 1): why head was slower than dev, and the fix

Profiled on compute02 (directional; the perf VMs decide) with release builds of dev d4b32af94 (legacy layout), #970 head 381ce6750 (joined layout) and this PR's head 46faabb28 (joined layout), 10k cold runs, strace on the server.

Root cause per metric

Metric Cause found Evidence
cold.first_page, cold.index, cold.notes_per_s, cold.disk_written Every Notes row written by the cold scan now updates five B-trees in files/current.db instead of #970's two: current_files PK, current_files_by_path, the new full current_files_by_scan_generation, the new current_children table and its (parent_key, name_key, id) index. UUIDv7-keyed inserts into extra trees dirty many more pages per 8,192-row commit. In the first-page window head did 21,335 pwrite + 19,717 pread on current.db vs 4,500 + 3,169 for #970 (same 10k Home, same scan code). All other syscall counts (statx, openat, read) matched within 1%.
open.api_get p95, home.page_big (100k, hot restart) Home::reconcile_files takes self.index() once and holds the Home's index mutex for the whole Files walk, including every getdents/statx/marker read over both trees. Any request needing index() (note open, path_of, list validation) waits behind it. At 100k the walk is seconds long, so a few requests in each run land on it (p95, not p50). Code path (home_files.rs reconcile_files/reconcile_files_paths); matches the shape (p50 flat, p95 4×).
startup.healthz Not reproduced between #970 and this PR at 10k on compute02 (same syscall counts up to listen). Measured in the fixed head vs dev in the locked ABAB; if it stays above dev it gets its own round.

Fix

  1. Listing reads the path index, not a second child table. page_children range-scans current_files_by_path(path_key, id) from <parent>/; when it meets a descendant <parent>/<child>/… it seeks once past that child's whole subtree. current_children (and its backfill + namespace_schema) is dropped; a database from the earlier draft has them removed once on open.
  2. Scan cursor index covers Files-walk rows only. current_files_by_scan_generation becomes a partial index WHERE path <> 'Notes' AND path NOT GLOB 'Notes/*' — exactly the predicate of the stale-row query, so the walk still uses it, and Notes writes never touch it. The stale query reads scan_generation < ? (walk generations only grow), a true range.
  3. One transaction per walk page. Rows, inode evidence and the seen mark commit together (Namespace::commit_scan_page): one WAL sync per page instead of three, and a crash leaves the whole page or none. Unchanged inode evidence is not rewritten.
  4. The walk never holds the index lock across I/O. It borrows the index per lookup and per page commit (home_files/access.rs). Safe because the walk is the only writer of non-Notes rows and runs one at a time from the watcher loop, while Notes writes only touch Notes/*.md rows that the walk skips.

The first Notes page already comes from meta.db and never waits for identity assignment; the Files walk starts only after the Notes scan, so nothing here moves onto the first-page path.

Big-O, before → after (N = rows in the user's namespace, P = page size, W = rows in one walk page = 256)

Operation Before After
Notes row write (cold scan, save, rename) 5 B-tree updates, O(5 log N) 2 B-tree updates, O(2 log N) (same as #970)
Folder page (page_children) O(log N + P) O(P · log N) worst case (one extra seek per child folder with descendants), O(log N + P) for flat folders
Walk page commit 3 transactions / 3 syncs, O(W log N) 1 transaction / 1 sync, O(W log N)
Stale-row sweep full scan of a whole-table index, O(N) per call range read of a partial index, O(log N + stale)
Request latency during a walk blocked for the whole walk, O(total walk) blocked for at most one lookup or one page commit, O(W log N)

Identity guarantees are unchanged: IDs, markers, inode evidence and the collision journal are written by the same code in the same order; only lock scope and transaction grouping change. Gates to re-run: identity tests (incl. 2,000-iteration rescan, legacy_attachment_ids_survive_every_retry_boundary), workspace tests/clippy/fmt, the 1M listing gate, and the locked ABAB ×5 with a dev-copy control.

## Perf fix design (round 1): why head was slower than dev, and the fix Profiled on compute02 (directional; the perf VMs decide) with release builds of dev `d4b32af94` (legacy layout), #970 head `381ce6750` (joined layout) and this PR's head `46faabb28` (joined layout), 10k cold runs, strace on the server. ### Root cause per metric | Metric | Cause found | Evidence | |---|---|---| | `cold.first_page`, `cold.index`, `cold.notes_per_s`, `cold.disk_written` | Every Notes row written by the cold scan now updates **five** B-trees in `files/current.db` instead of #970's two: `current_files` PK, `current_files_by_path`, the new full `current_files_by_scan_generation`, the new `current_children` table and its `(parent_key, name_key, id)` index. UUIDv7-keyed inserts into extra trees dirty many more pages per 8,192-row commit. | In the first-page window head did 21,335 `pwrite` + 19,717 `pread` on `current.db` vs 4,500 + 3,169 for #970 (same 10k Home, same scan code). All other syscall counts (statx, openat, read) matched within 1%. | | `open.api_get` p95, `home.page_big` (100k, hot restart) | `Home::reconcile_files` takes `self.index()` once and holds the Home's index mutex for the **whole** Files walk, including every `getdents`/`statx`/marker read over both trees. Any request needing `index()` (note open, `path_of`, list validation) waits behind it. At 100k the walk is seconds long, so a few requests in each run land on it (p95, not p50). | Code path (`home_files.rs` `reconcile_files`/`reconcile_files_paths`); matches the shape (p50 flat, p95 4×). | | `startup.healthz` | Not reproduced between #970 and this PR at 10k on compute02 (same syscall counts up to listen). Measured in the fixed head vs dev in the locked ABAB; if it stays above dev it gets its own round. | | ### Fix 1. **Listing reads the path index, not a second child table.** `page_children` range-scans `current_files_by_path(path_key, id)` from `<parent>/`; when it meets a descendant `<parent>/<child>/…` it seeks once past that child's whole subtree. `current_children` (and its backfill + `namespace_schema`) is dropped; a database from the earlier draft has them removed once on open. 2. **Scan cursor index covers Files-walk rows only.** `current_files_by_scan_generation` becomes a partial index `WHERE path <> 'Notes' AND path NOT GLOB 'Notes/*'` — exactly the predicate of the stale-row query, so the walk still uses it, and Notes writes never touch it. The stale query reads `scan_generation < ?` (walk generations only grow), a true range. 3. **One transaction per walk page.** Rows, inode evidence and the seen mark commit together (`Namespace::commit_scan_page`): one WAL sync per page instead of three, and a crash leaves the whole page or none. Unchanged inode evidence is not rewritten. 4. **The walk never holds the index lock across I/O.** It borrows the index per lookup and per page commit (`home_files/access.rs`). Safe because the walk is the only writer of non-Notes rows and runs one at a time from the watcher loop, while Notes writes only touch `Notes/*.md` rows that the walk skips. The first Notes page already comes from `meta.db` and never waits for identity assignment; the Files walk starts only after the Notes scan, so nothing here moves onto the first-page path. ### Big-O, before → after (N = rows in the user's namespace, P = page size, W = rows in one walk page = 256) | Operation | Before | After | |---|---|---| | Notes row write (cold scan, save, rename) | 5 B-tree updates, O(5 log N) | 2 B-tree updates, O(2 log N) (same as #970) | | Folder page (`page_children`) | O(log N + P) | O(P · log N) worst case (one extra seek per child folder with descendants), O(log N + P) for flat folders | | Walk page commit | 3 transactions / 3 syncs, O(W log N) | 1 transaction / 1 sync, O(W log N) | | Stale-row sweep | full scan of a whole-table index, O(N) per call | range read of a partial index, O(log N + stale) | | Request latency during a walk | blocked for the whole walk, O(total walk) | blocked for at most one lookup or one page commit, O(W log N) | Identity guarantees are unchanged: IDs, markers, inode evidence and the collision journal are written by the same code in the same order; only lock scope and transaction grouping change. Gates to re-run: identity tests (incl. 2,000-iteration rescan, `legacy_attachment_ids_survive_every_retry_boundary`), workspace tests/clippy/fmt, the 1M listing gate, and the locked ABAB ×5 with a dev-copy control.
Author
Owner

Perf round 3: ABAB ×5 with a #970 arm and a dev-copy control (both perf locks, FIFO turn)

Session 2026-11-09 15:56–16:56Z (21:26–22:26 IST), boot 7a65f072 (same epoch as the earlier sessions), perf-01 lock via perf-turn files-1010 then perf-02's lock, both released at the end. Per cycle: dev (legacy layout), head (joined layout), #970 381ce6750 (joined), dev, head, dev-copy control. Sizes 1k/10k/100k, --runs 1 --cold-runs 1 --hot-only --gate; medians of per-arm p50/p95, n = 10 dev, 10 head, 5 #970, 5 control. All 30 arms exited 0. sha256 checked at turn time.

  • head = PR head 0c99d74e9 (release built from 9520d6fed; the two differ only in a #[cfg(test)] module)
  • dev = d4b32af94 (the merge base)
  • Change from earlier sessions: head arms now run the server binary directly. The earlier sessions ran it through a bash wrapper, which forked bash before every server start. That wrapper was the constant +2 ms in startup.healthz: with it gone, healthz is flat at 1k and 100k.

1M listing gate

files_listing entries=1000000 page_size=50 cold_first_us=99 p50_us=58 p99_us=85 active_map_bytes=53085308 rss_after_open_kib=56548 peak_rss_kib=56548

First page under 100 ms: pass (0.099 ms).

Full table

size metric dev p50 head p50 Δ head #970 p50 Δ #970 ctl Δ dev p95 head p95 Δ head p95 Δ #970 p95 ctl Δ p95 n dev/head/970/ctl
1000 cold.disk_written (MB) 18.8 19.1 +1.7% 19 +0.9% +0.5% 18.8 19.1 +1.7% +0.9% +0.5% 10/10/5/5
1000 cold.first_page (ms) 406 491 +20.9% 441 +8.5% +0.5% 406 491 +20.9% +8.5% +0.5% 10/10/5/5
1000 cold.index (s) 0.509 0.593 +16.6% 0.543 +6.7% +0.3% 0.509 0.593 +16.6% +6.7% +0.3% 10/10/5/5
1000 cold.mem_peak (MB) 46 48.2 +4.8% 47.8 +4.0% +1.6% 46 48.2 +4.8% +4.0% +1.6% 10/10/5/5
1000 cold.notes_per_s (notes/s) 1.97e+03 1.69e+03 -14.2% 1.84e+03 -6.3% -0.3% 1.97e+03 1.69e+03 -14.2% -6.3% -0.3% 10/10/5/5
1000 cold.startup (ms) 19.8 19.8 +0.0% 19.8 -0.1% +0.6% 19.8 19.8 +0.0% -0.1% +0.6% 10/10/5/5
1000 home.first_page (ms) 1.75 2.33 +33.4% 2.66 +52.6% +4.5% 1.75 2.33 +33.4% +52.6% +4.5% 10/10/5/5
1000 home.page (ms) 0.68 0.713 +4.8% 0.72 +5.8% -5.6% 1.21 1.91 +57.1% +5.8% -1.8% 10/10/5/5
1000 home.page_big (ms) 8.66 8.88 +2.5% 8.86 +2.2% -1.7% 8.66 8.88 +2.5% +2.2% -1.7% 10/10/5/5
1000 home.page_next (ms) 0.726 0.736 +1.4% 0.727 +0.1% +1.3% 0.815 0.816 +0.1% +4.7% -2.4% 10/10/5/5
1000 home.page_tag (ms) 1.24 1.29 +3.7% 1.23 -1.1% -0.6% 1.45 1.4 -3.1% +2.4% -7.6% 10/10/5/5
1000 home.page_title (ms) 0.597 0.602 +0.8% 0.587 -1.8% -0.5% 0.707 0.707 -0.0% -7.8% -2.3% 10/10/5/5
1000 mem.after_first_page (MB) 20.9 20.8 -0.1% 21.3 +1.9% +2.9% 20.9 20.8 -0.1% +1.9% +2.9% 10/10/5/5
1000 mem.after_opens (MB) 34.6 35.4 +2.4% 34.6 +0.1% -0.1% 34.6 35.4 +2.4% +0.1% -0.1% 10/10/5/5
1000 mem.after_search (MB) 47.7 48.3 +1.3% 48 +0.7% +0.3% 47.7 48.3 +1.3% +0.7% +0.3% 10/10/5/5
1000 mem.idle (MB) 18.3 18.8 +2.4% 18.8 +2.3% +1.5% 18.3 18.8 +2.4% +2.3% +1.5% 10/10/5/5
1000 notes.append (ms) 4.84 4.78 -1.2% 4.86 +0.4% +0.0% 12 12.5 +4.5% +6.6% +2.2% 10/10/5/5
1000 notes.append.first (ms) 22.4 17 -24.0% 15.8 -29.4% -25.6% 22.4 17 -24.0% -29.4% -25.6% 10/10/5/5
1000 open.api_get (ms) 7.5 7.42 -1.1% 7.21 -3.9% -1.0% 11.8 11.3 -4.5% +7.9% +15.5% 10/10/5/5
1000 open.api_get.warm (ms) 0.163 0.164 +0.8% 0.166 +2.1% +0.1% 0.213 0.209 -1.9% -2.3% +0.6% 10/10/5/5
1000 open.long_note (ms) 15.1 15.2 +0.9% 14.8 -1.4% +3.3% 15.1 15.2 +0.9% -1.4% +3.3% 10/10/5/5
1000 open.note (ms) 0.66 0.656 -0.5% 0.674 +2.2% +4.4% 2.26 2.21 -2.2% -5.1% -3.2% 10/10/5/5
1000 search.catch_up (s) 2 2 +0.0% 2 +0.0% +0.0% 2 2 +0.0% +0.0% +0.0% 10/10/5/5
1000 search.first_query (ms) 28.1 26.7 -4.9% 26.4 -6.2% -3.3% 28.1 26.7 -4.9% -6.2% -3.3% 10/10/5/5
1000 search.query (ms) 1.25 1.23 -1.5% 1.23 -1.8% -9.5% 2.34 2.17 -7.2% -6.4% -10.2% 10/10/5/5
1000 shutdown (ms) 43.1 43.1 -0.1% 43.1 -0.0% -0.1% 43.1 43.1 -0.1% -0.0% -0.1% 10/10/5/5
1000 startup.healthz (ms) 4.94 4.96 +0.4% 4.84 -2.0% +3.8% 4.94 4.96 +0.4% -2.0% +3.8% 10/10/5/5
1000 sync.durable_write (ms) 24.9 24.7 -0.8% 24.8 -0.4% +0.5% 30 28.2 -5.9% -5.0% +13.0% 10/10/5/5
1000 sync.round_trip (ms) 0.201 0.206 +2.4% 0.198 -1.4% +6.9% 0.325 0.339 +4.5% -2.4% +6.9% 10/10/5/5
1000 sync.save_ack (ms) 3.66 3.65 -0.3% 3.74 +2.3% +0.5% 4.78 5.04 +5.4% +10.8% +5.0% 10/10/5/5
10000 cold.disk_written (MB) 150 152 +1.4% 152 +1.4% -0.1% 150 152 +1.4% +1.4% -0.1% 10/10/5/5
10000 cold.first_page (ms) 331 518 +56.3% 459 +38.6% -7.3% 331 518 +56.3% +38.6% -7.3% 10/10/5/5
10000 cold.index (s) 1.48 1.7 +14.5% 1.7 +14.5% -2.5% 1.48 1.7 +14.5% +14.5% -2.5% 10/10/5/5
10000 cold.mem_peak (MB) 143 145 +1.4% 145 +1.1% +0.3% 143 145 +1.4% +1.1% +0.3% 10/10/5/5
10000 cold.notes_per_s (notes/s) 6.75e+03 5.9e+03 -12.7% 5.9e+03 -12.7% +2.5% 6.75e+03 5.9e+03 -12.7% -12.7% +2.5% 10/10/5/5
10000 cold.startup (ms) 20 19.9 -0.6% 17.9 -10.4% -0.3% 20 19.9 -0.6% -10.4% -0.3% 10/10/5/5
10000 home.first_page (ms) 2.46 2.54 +3.0% 2.28 -7.4% -3.9% 2.46 2.54 +3.0% -7.4% -3.9% 10/10/5/5
10000 home.page (ms) 0.759 0.766 +1.0% 0.852 +12.2% +10.3% 1.79 1.27 -29.2% -43.9% +111.6% 10/10/5/5
10000 home.page_big (ms) 16.9 17 +0.7% 16.7 -0.9% -1.3% 18 18.1 +0.7% -0.6% -1.1% 10/10/5/5
10000 home.page_next (ms) 0.7 0.733 +4.7% 0.713 +1.9% -0.2% 0.821 0.897 +9.2% +8.4% +5.4% 10/10/5/5
10000 home.page_tag (ms) 5.32 5.57 +4.8% 5.55 +4.3% -0.7% 7.53 7.94 +5.5% -2.7% +1.5% 10/10/5/5
10000 home.page_title (ms) 0.634 0.724 +14.3% 0.746 +17.7% +3.6% 0.833 1.4 +68.6% +14.7% +7.0% 10/10/5/5
10000 mem.after_first_page (MB) 21.4 21.4 +0.4% 21.4 -0.0% -0.1% 21.4 21.4 +0.4% -0.0% -0.1% 10/10/5/5
10000 mem.after_opens (MB) 39.9 40.2 +0.7% 39.9 -0.0% +0.9% 39.9 40.2 +0.7% -0.0% +0.9% 10/10/5/5
10000 mem.after_search (MB) 75.3 75.6 +0.4% 74.7 -0.8% +0.2% 75.3 75.6 +0.4% -0.8% +0.2% 10/10/5/5
10000 mem.idle (MB) 18.5 19.3 +4.0% 18.9 +1.7% +0.1% 18.5 19.3 +4.0% +1.7% +0.1% 10/10/5/5
10000 notes.append (ms) 4.9 4.9 +0.0% 4.98 +1.6% +4.9% 12 11.8 -1.8% +3.5% +3.5% 10/10/5/5
10000 notes.append.first (ms) 55.8 52.1 -6.6% 48.5 -13.2% -8.7% 55.8 52.1 -6.6% -13.2% -8.7% 10/10/5/5
10000 open.api_get (ms) 7.45 7.34 -1.5% 7.39 -0.8% -2.9% 13.3 12.2 -8.4% +17.6% -4.5% 10/10/5/5
10000 open.api_get.warm (ms) 0.171 0.16 -6.2% 0.165 -3.5% -5.1% 0.215 0.206 -4.2% +0.7% -2.3% 10/10/5/5
10000 open.long_note (ms) 16.2 16.6 +2.0% 16.4 +0.8% +3.1% 16.2 16.6 +2.0% +0.8% +3.1% 10/10/5/5
10000 open.note (ms) 0.661 0.633 -4.3% 0.625 -5.5% -8.0% 1.37 1.3 -5.8% +3.9% -6.6% 10/10/5/5
10000 search.catch_up (s) 4.02 4.01 -0.0% 4.01 -0.1% -0.1% 4.02 4.01 -0.0% -0.1% -0.1% 10/10/5/5
10000 search.first_query (ms) 28.4 29.3 +3.2% 27.5 -2.9% -3.4% 28.4 29.3 +3.2% -2.9% -3.4% 10/10/5/5
10000 search.query (ms) 1.35 2.29 +69.1% 1.35 -0.1% +24.2% 10.6 11.5 +8.7% -34.0% -11.9% 10/10/5/5
10000 shutdown (ms) 43.1 43.2 +0.1% 43 -0.2% +0.0% 43.1 43.2 +0.1% -0.2% +0.0% 10/10/5/5
10000 startup.healthz (ms) 4.92 5.61 +14.0% 4.85 -1.4% -1.0% 4.92 5.61 +14.0% -1.4% -1.0% 10/10/5/5
10000 sync.durable_write (ms) 24.9 24.8 -0.2% 24.3 -2.1% -2.2% 28.7 29 +1.0% +2.3% +0.9% 10/10/5/5
10000 sync.round_trip (ms) 0.208 0.206 -0.9% 0.212 +2.0% -6.7% 0.345 0.344 -0.1% -2.2% -3.6% 10/10/5/5
10000 sync.save_ack (ms) 3.66 3.66 -0.1% 3.67 +0.2% -0.4% 5.45 5.27 -3.3% -2.4% -2.2% 10/10/5/5
100000 cold.disk_written (MB) 1.92e+03 2.06e+03 +7.5% 2.06e+03 +7.3% -0.0% 1.92e+03 2.06e+03 +7.5% +7.3% -0.0% 10/10/5/5
100000 cold.first_page (ms) 1.82e+03 4.15e+03 +128.1% 4.35e+03 +139.5% -2.1% 1.82e+03 4.15e+03 +128.1% +139.5% -2.1% 10/10/5/5
100000 cold.index (s) 15.6 18 +15.6% 17.9 +14.9% -0.0% 15.6 18 +15.6% +14.9% -0.0% 10/10/5/5
100000 cold.mem_peak (MB) 292 286 -2.2% 287 -1.7% +0.1% 292 286 -2.2% -1.7% +0.1% 10/10/5/5
100000 cold.notes_per_s (notes/s) 6.41e+03 5.55e+03 -13.5% 5.58e+03 -13.0% +0.0% 6.41e+03 5.55e+03 -13.5% -13.0% +0.0% 10/10/5/5
100000 cold.startup (ms) 20.8 19.9 -4.7% 19.8 -4.8% -3.8% 20.8 19.9 -4.7% -4.8% -3.8% 10/10/5/5
100000 home.first_page (ms) 3.21 3.19 -0.7% 3.1 -3.3% -4.9% 3.21 3.19 -0.7% -3.3% -4.9% 10/10/5/5
100000 home.page (ms) 0.952 0.957 +0.5% 0.95 -0.3% -7.9% 1.2 1.35 +12.5% +125.4% -0.8% 10/10/5/5
100000 home.page_big (ms) 18.9 28.1 +49.1% 29.5 +56.4% -0.5% 28.9 37.6 +30.0% +45.0% +0.3% 10/10/5/5
100000 home.page_next (ms) 0.725 0.807 +11.3% 0.769 +6.0% -2.3% 1.05 1.02 -2.5% -9.1% +42.1% 10/10/5/5
100000 home.page_tag (ms) 52.4 52.5 +0.3% 52.5 +0.1% +0.3% 57.3 56.1 -2.2% -4.8% +4.1% 10/10/5/5
100000 home.page_title (ms) 0.859 0.858 -0.2% 0.783 -8.9% -4.0% 1.08 1.06 -2.2% -15.3% -7.6% 10/10/5/5
100000 mem.after_first_page (MB) 22.6 22.1 -1.9% 22 -2.4% +0.2% 22.6 22.1 -1.9% -2.4% +0.2% 10/10/5/5
100000 mem.after_opens (MB) 95.7 95.6 -0.0% 97.4 +1.8% -0.0% 95.7 95.6 -0.0% +1.8% -0.0% 10/10/5/5
100000 mem.after_search (MB) 103 91.4 -11.1% 93.6 -9.0% -2.9% 103 91.4 -11.1% -9.0% -2.9% 10/10/5/5
100000 mem.idle (MB) 18.4 18.8 +2.0% 18.7 +1.9% +0.8% 18.4 18.8 +2.0% +1.9% +0.8% 10/10/5/5
100000 notes.append (ms) 6.56 6.58 +0.4% 6.55 -0.1% +7.7% 20.8 19 -8.2% -9.8% -14.2% 10/10/5/5
100000 notes.append.first (ms) 990 1.15e+03 +15.7% 1.26e+03 +27.0% -3.5% 990 1.15e+03 +15.7% +27.0% -3.5% 10/10/5/5
100000 open.api_get (ms) 7.71 8.79 +14.1% 7.55 -2.0% -1.1% 14 32.1 +128.4% +76.5% -8.5% 10/10/5/5
100000 open.api_get.warm (ms) 0.165 0.165 +0.2% 0.171 +3.7% +5.9% 0.212 0.21 -1.1% +1.1% +4.1% 10/10/5/5
100000 open.long_note (ms) 68.8 67.3 -2.3% 74.9 +8.8% +2.5% 68.8 67.3 -2.3% +8.8% +2.5% 10/10/5/5
100000 open.note (ms) 1.47 0.905 -38.5% 0.896 -39.1% +21.2% 4.85 4.1 -15.5% -13.2% +40.7% 10/10/5/5
100000 search.catch_up (s) 46.1 46.1 -0.0% 46.1 -0.1% -0.0% 46.1 46.1 -0.0% -0.1% -0.0% 10/10/5/5
100000 search.first_query (ms) 27.4 26.7 -2.3% 27.4 -0.0% +1.6% 27.4 26.7 -2.3% -0.0% +1.6% 10/10/5/5
100000 search.query (ms) 2.51 1.92 -23.4% 1.97 -21.5% -29.8% 25.4 20.2 -20.3% -19.3% -24.3% 10/10/5/5
100000 shutdown (ms) 43.1 43.1 -0.0% 43.1 -0.1% -0.2% 43.1 43.1 -0.0% -0.1% -0.2% 10/10/5/5
100000 startup.healthz (ms) 4.86 4.99 +2.7% 4.86 -0.1% +1.3% 4.86 4.99 +2.7% -0.1% +1.3% 10/10/5/5
100000 sync.durable_write (ms) 24.8 25 +0.7% 24.8 -0.2% -0.3% 32.5 31.8 -2.4% -3.2% +4.7% 10/10/5/5
100000 sync.round_trip (ms) 0.216 0.208 -3.4% 0.217 +0.6% -3.1% 0.337 0.344 +2.1% +3.3% +5.6% 10/10/5/5
100000 sync.save_ack (ms) 3.7 3.67 -1.0% 3.73 +0.8% -1.3% 5.29 4.46 -15.7% -7.1% -5.7% 10/10/5/5
## Perf round 3: ABAB ×5 with a #970 arm and a dev-copy control (both perf locks, FIFO turn) Session 2026-11-09 15:56–16:56Z (21:26–22:26 IST), boot `7a65f072` (same epoch as the earlier sessions), perf-01 lock via `perf-turn files-1010` then perf-02's lock, both released at the end. Per cycle: dev (legacy layout), head (joined layout), #970 `381ce6750` (joined), dev, head, dev-copy control. Sizes 1k/10k/100k, `--runs 1 --cold-runs 1 --hot-only --gate`; medians of per-arm p50/p95, n = 10 dev, 10 head, 5 #970, 5 control. All 30 arms exited 0. sha256 checked at turn time. - head = PR head `0c99d74e9` (release built from `9520d6fed`; the two differ only in a `#[cfg(test)]` module) - dev = `d4b32af94` (the merge base) - **Change from earlier sessions:** head arms now run the server binary directly. The earlier sessions ran it through a bash wrapper, which forked bash before every server start. That wrapper was the constant +2 ms in `startup.healthz`: with it gone, healthz is flat at 1k and 100k. ### 1M listing gate `files_listing entries=1000000 page_size=50 cold_first_us=99 p50_us=58 p99_us=85 active_map_bytes=53085308 rss_after_open_kib=56548 peak_rss_kib=56548` First page under 100 ms: **pass** (0.099 ms). ### Full table | size | metric | dev p50 | head p50 | Δ head | #970 p50 | Δ #970 | ctl Δ | dev p95 | head p95 | Δ head p95 | Δ #970 p95 | ctl Δ p95 | n dev/head/970/ctl | |---|---|---|---|---|---|---|---|---|---|---|---|---|---| | 1000 | cold.disk_written (MB) | 18.8 | 19.1 | +1.7% | 19 | +0.9% | +0.5% | 18.8 | 19.1 | +1.7% | +0.9% | +0.5% | 10/10/5/5 | | 1000 | cold.first_page (ms) | 406 | 491 | +20.9% | 441 | +8.5% | +0.5% | 406 | 491 | +20.9% | +8.5% | +0.5% | 10/10/5/5 | | 1000 | cold.index (s) | 0.509 | 0.593 | +16.6% | 0.543 | +6.7% | +0.3% | 0.509 | 0.593 | +16.6% | +6.7% | +0.3% | 10/10/5/5 | | 1000 | cold.mem_peak (MB) | 46 | 48.2 | +4.8% | 47.8 | +4.0% | +1.6% | 46 | 48.2 | +4.8% | +4.0% | +1.6% | 10/10/5/5 | | 1000 | cold.notes_per_s (notes/s) | 1.97e+03 | 1.69e+03 | -14.2% | 1.84e+03 | -6.3% | -0.3% | 1.97e+03 | 1.69e+03 | -14.2% | -6.3% | -0.3% | 10/10/5/5 | | 1000 | cold.startup (ms) | 19.8 | 19.8 | +0.0% | 19.8 | -0.1% | +0.6% | 19.8 | 19.8 | +0.0% | -0.1% | +0.6% | 10/10/5/5 | | 1000 | home.first_page (ms) | 1.75 | 2.33 | +33.4% | 2.66 | +52.6% | +4.5% | 1.75 | 2.33 | +33.4% | +52.6% | +4.5% | 10/10/5/5 | | 1000 | home.page (ms) | 0.68 | 0.713 | +4.8% | 0.72 | +5.8% | -5.6% | 1.21 | 1.91 | +57.1% | +5.8% | -1.8% | 10/10/5/5 | | 1000 | home.page_big (ms) | 8.66 | 8.88 | +2.5% | 8.86 | +2.2% | -1.7% | 8.66 | 8.88 | +2.5% | +2.2% | -1.7% | 10/10/5/5 | | 1000 | home.page_next (ms) | 0.726 | 0.736 | +1.4% | 0.727 | +0.1% | +1.3% | 0.815 | 0.816 | +0.1% | +4.7% | -2.4% | 10/10/5/5 | | 1000 | home.page_tag (ms) | 1.24 | 1.29 | +3.7% | 1.23 | -1.1% | -0.6% | 1.45 | 1.4 | -3.1% | +2.4% | -7.6% | 10/10/5/5 | | 1000 | home.page_title (ms) | 0.597 | 0.602 | +0.8% | 0.587 | -1.8% | -0.5% | 0.707 | 0.707 | -0.0% | -7.8% | -2.3% | 10/10/5/5 | | 1000 | mem.after_first_page (MB) | 20.9 | 20.8 | -0.1% | 21.3 | +1.9% | +2.9% | 20.9 | 20.8 | -0.1% | +1.9% | +2.9% | 10/10/5/5 | | 1000 | mem.after_opens (MB) | 34.6 | 35.4 | +2.4% | 34.6 | +0.1% | -0.1% | 34.6 | 35.4 | +2.4% | +0.1% | -0.1% | 10/10/5/5 | | 1000 | mem.after_search (MB) | 47.7 | 48.3 | +1.3% | 48 | +0.7% | +0.3% | 47.7 | 48.3 | +1.3% | +0.7% | +0.3% | 10/10/5/5 | | 1000 | mem.idle (MB) | 18.3 | 18.8 | +2.4% | 18.8 | +2.3% | +1.5% | 18.3 | 18.8 | +2.4% | +2.3% | +1.5% | 10/10/5/5 | | 1000 | notes.append (ms) | 4.84 | 4.78 | -1.2% | 4.86 | +0.4% | +0.0% | 12 | 12.5 | +4.5% | +6.6% | +2.2% | 10/10/5/5 | | 1000 | notes.append.first (ms) | 22.4 | 17 | -24.0% | 15.8 | -29.4% | -25.6% | 22.4 | 17 | -24.0% | -29.4% | -25.6% | 10/10/5/5 | | 1000 | open.api_get (ms) | 7.5 | 7.42 | -1.1% | 7.21 | -3.9% | -1.0% | 11.8 | 11.3 | -4.5% | +7.9% | +15.5% | 10/10/5/5 | | 1000 | open.api_get.warm (ms) | 0.163 | 0.164 | +0.8% | 0.166 | +2.1% | +0.1% | 0.213 | 0.209 | -1.9% | -2.3% | +0.6% | 10/10/5/5 | | 1000 | open.long_note (ms) | 15.1 | 15.2 | +0.9% | 14.8 | -1.4% | +3.3% | 15.1 | 15.2 | +0.9% | -1.4% | +3.3% | 10/10/5/5 | | 1000 | open.note (ms) | 0.66 | 0.656 | -0.5% | 0.674 | +2.2% | +4.4% | 2.26 | 2.21 | -2.2% | -5.1% | -3.2% | 10/10/5/5 | | 1000 | search.catch_up (s) | 2 | 2 | +0.0% | 2 | +0.0% | +0.0% | 2 | 2 | +0.0% | +0.0% | +0.0% | 10/10/5/5 | | 1000 | search.first_query (ms) | 28.1 | 26.7 | -4.9% | 26.4 | -6.2% | -3.3% | 28.1 | 26.7 | -4.9% | -6.2% | -3.3% | 10/10/5/5 | | 1000 | search.query (ms) | 1.25 | 1.23 | -1.5% | 1.23 | -1.8% | -9.5% | 2.34 | 2.17 | -7.2% | -6.4% | -10.2% | 10/10/5/5 | | 1000 | shutdown (ms) | 43.1 | 43.1 | -0.1% | 43.1 | -0.0% | -0.1% | 43.1 | 43.1 | -0.1% | -0.0% | -0.1% | 10/10/5/5 | | 1000 | startup.healthz (ms) | 4.94 | 4.96 | +0.4% | 4.84 | -2.0% | +3.8% | 4.94 | 4.96 | +0.4% | -2.0% | +3.8% | 10/10/5/5 | | 1000 | sync.durable_write (ms) | 24.9 | 24.7 | -0.8% | 24.8 | -0.4% | +0.5% | 30 | 28.2 | -5.9% | -5.0% | +13.0% | 10/10/5/5 | | 1000 | sync.round_trip (ms) | 0.201 | 0.206 | +2.4% | 0.198 | -1.4% | +6.9% | 0.325 | 0.339 | +4.5% | -2.4% | +6.9% | 10/10/5/5 | | 1000 | sync.save_ack (ms) | 3.66 | 3.65 | -0.3% | 3.74 | +2.3% | +0.5% | 4.78 | 5.04 | +5.4% | +10.8% | +5.0% | 10/10/5/5 | | 10000 | cold.disk_written (MB) | 150 | 152 | +1.4% | 152 | +1.4% | -0.1% | 150 | 152 | +1.4% | +1.4% | -0.1% | 10/10/5/5 | | 10000 | cold.first_page (ms) | 331 | 518 | +56.3% | 459 | +38.6% | -7.3% | 331 | 518 | +56.3% | +38.6% | -7.3% | 10/10/5/5 | | 10000 | cold.index (s) | 1.48 | 1.7 | +14.5% | 1.7 | +14.5% | -2.5% | 1.48 | 1.7 | +14.5% | +14.5% | -2.5% | 10/10/5/5 | | 10000 | cold.mem_peak (MB) | 143 | 145 | +1.4% | 145 | +1.1% | +0.3% | 143 | 145 | +1.4% | +1.1% | +0.3% | 10/10/5/5 | | 10000 | cold.notes_per_s (notes/s) | 6.75e+03 | 5.9e+03 | -12.7% | 5.9e+03 | -12.7% | +2.5% | 6.75e+03 | 5.9e+03 | -12.7% | -12.7% | +2.5% | 10/10/5/5 | | 10000 | cold.startup (ms) | 20 | 19.9 | -0.6% | 17.9 | -10.4% | -0.3% | 20 | 19.9 | -0.6% | -10.4% | -0.3% | 10/10/5/5 | | 10000 | home.first_page (ms) | 2.46 | 2.54 | +3.0% | 2.28 | -7.4% | -3.9% | 2.46 | 2.54 | +3.0% | -7.4% | -3.9% | 10/10/5/5 | | 10000 | home.page (ms) | 0.759 | 0.766 | +1.0% | 0.852 | +12.2% | +10.3% | 1.79 | 1.27 | -29.2% | -43.9% | +111.6% | 10/10/5/5 | | 10000 | home.page_big (ms) | 16.9 | 17 | +0.7% | 16.7 | -0.9% | -1.3% | 18 | 18.1 | +0.7% | -0.6% | -1.1% | 10/10/5/5 | | 10000 | home.page_next (ms) | 0.7 | 0.733 | +4.7% | 0.713 | +1.9% | -0.2% | 0.821 | 0.897 | +9.2% | +8.4% | +5.4% | 10/10/5/5 | | 10000 | home.page_tag (ms) | 5.32 | 5.57 | +4.8% | 5.55 | +4.3% | -0.7% | 7.53 | 7.94 | +5.5% | -2.7% | +1.5% | 10/10/5/5 | | 10000 | home.page_title (ms) | 0.634 | 0.724 | +14.3% | 0.746 | +17.7% | +3.6% | 0.833 | 1.4 | +68.6% | +14.7% | +7.0% | 10/10/5/5 | | 10000 | mem.after_first_page (MB) | 21.4 | 21.4 | +0.4% | 21.4 | -0.0% | -0.1% | 21.4 | 21.4 | +0.4% | -0.0% | -0.1% | 10/10/5/5 | | 10000 | mem.after_opens (MB) | 39.9 | 40.2 | +0.7% | 39.9 | -0.0% | +0.9% | 39.9 | 40.2 | +0.7% | -0.0% | +0.9% | 10/10/5/5 | | 10000 | mem.after_search (MB) | 75.3 | 75.6 | +0.4% | 74.7 | -0.8% | +0.2% | 75.3 | 75.6 | +0.4% | -0.8% | +0.2% | 10/10/5/5 | | 10000 | mem.idle (MB) | 18.5 | 19.3 | +4.0% | 18.9 | +1.7% | +0.1% | 18.5 | 19.3 | +4.0% | +1.7% | +0.1% | 10/10/5/5 | | 10000 | notes.append (ms) | 4.9 | 4.9 | +0.0% | 4.98 | +1.6% | +4.9% | 12 | 11.8 | -1.8% | +3.5% | +3.5% | 10/10/5/5 | | 10000 | notes.append.first (ms) | 55.8 | 52.1 | -6.6% | 48.5 | -13.2% | -8.7% | 55.8 | 52.1 | -6.6% | -13.2% | -8.7% | 10/10/5/5 | | 10000 | open.api_get (ms) | 7.45 | 7.34 | -1.5% | 7.39 | -0.8% | -2.9% | 13.3 | 12.2 | -8.4% | +17.6% | -4.5% | 10/10/5/5 | | 10000 | open.api_get.warm (ms) | 0.171 | 0.16 | -6.2% | 0.165 | -3.5% | -5.1% | 0.215 | 0.206 | -4.2% | +0.7% | -2.3% | 10/10/5/5 | | 10000 | open.long_note (ms) | 16.2 | 16.6 | +2.0% | 16.4 | +0.8% | +3.1% | 16.2 | 16.6 | +2.0% | +0.8% | +3.1% | 10/10/5/5 | | 10000 | open.note (ms) | 0.661 | 0.633 | -4.3% | 0.625 | -5.5% | -8.0% | 1.37 | 1.3 | -5.8% | +3.9% | -6.6% | 10/10/5/5 | | 10000 | search.catch_up (s) | 4.02 | 4.01 | -0.0% | 4.01 | -0.1% | -0.1% | 4.02 | 4.01 | -0.0% | -0.1% | -0.1% | 10/10/5/5 | | 10000 | search.first_query (ms) | 28.4 | 29.3 | +3.2% | 27.5 | -2.9% | -3.4% | 28.4 | 29.3 | +3.2% | -2.9% | -3.4% | 10/10/5/5 | | 10000 | search.query (ms) | 1.35 | 2.29 | +69.1% | 1.35 | -0.1% | +24.2% | 10.6 | 11.5 | +8.7% | -34.0% | -11.9% | 10/10/5/5 | | 10000 | shutdown (ms) | 43.1 | 43.2 | +0.1% | 43 | -0.2% | +0.0% | 43.1 | 43.2 | +0.1% | -0.2% | +0.0% | 10/10/5/5 | | 10000 | startup.healthz (ms) | 4.92 | 5.61 | +14.0% | 4.85 | -1.4% | -1.0% | 4.92 | 5.61 | +14.0% | -1.4% | -1.0% | 10/10/5/5 | | 10000 | sync.durable_write (ms) | 24.9 | 24.8 | -0.2% | 24.3 | -2.1% | -2.2% | 28.7 | 29 | +1.0% | +2.3% | +0.9% | 10/10/5/5 | | 10000 | sync.round_trip (ms) | 0.208 | 0.206 | -0.9% | 0.212 | +2.0% | -6.7% | 0.345 | 0.344 | -0.1% | -2.2% | -3.6% | 10/10/5/5 | | 10000 | sync.save_ack (ms) | 3.66 | 3.66 | -0.1% | 3.67 | +0.2% | -0.4% | 5.45 | 5.27 | -3.3% | -2.4% | -2.2% | 10/10/5/5 | | 100000 | cold.disk_written (MB) | 1.92e+03 | 2.06e+03 | +7.5% | 2.06e+03 | +7.3% | -0.0% | 1.92e+03 | 2.06e+03 | +7.5% | +7.3% | -0.0% | 10/10/5/5 | | 100000 | cold.first_page (ms) | 1.82e+03 | 4.15e+03 | +128.1% | 4.35e+03 | +139.5% | -2.1% | 1.82e+03 | 4.15e+03 | +128.1% | +139.5% | -2.1% | 10/10/5/5 | | 100000 | cold.index (s) | 15.6 | 18 | +15.6% | 17.9 | +14.9% | -0.0% | 15.6 | 18 | +15.6% | +14.9% | -0.0% | 10/10/5/5 | | 100000 | cold.mem_peak (MB) | 292 | 286 | -2.2% | 287 | -1.7% | +0.1% | 292 | 286 | -2.2% | -1.7% | +0.1% | 10/10/5/5 | | 100000 | cold.notes_per_s (notes/s) | 6.41e+03 | 5.55e+03 | -13.5% | 5.58e+03 | -13.0% | +0.0% | 6.41e+03 | 5.55e+03 | -13.5% | -13.0% | +0.0% | 10/10/5/5 | | 100000 | cold.startup (ms) | 20.8 | 19.9 | -4.7% | 19.8 | -4.8% | -3.8% | 20.8 | 19.9 | -4.7% | -4.8% | -3.8% | 10/10/5/5 | | 100000 | home.first_page (ms) | 3.21 | 3.19 | -0.7% | 3.1 | -3.3% | -4.9% | 3.21 | 3.19 | -0.7% | -3.3% | -4.9% | 10/10/5/5 | | 100000 | home.page (ms) | 0.952 | 0.957 | +0.5% | 0.95 | -0.3% | -7.9% | 1.2 | 1.35 | +12.5% | +125.4% | -0.8% | 10/10/5/5 | | 100000 | home.page_big (ms) | 18.9 | 28.1 | +49.1% | 29.5 | +56.4% | -0.5% | 28.9 | 37.6 | +30.0% | +45.0% | +0.3% | 10/10/5/5 | | 100000 | home.page_next (ms) | 0.725 | 0.807 | +11.3% | 0.769 | +6.0% | -2.3% | 1.05 | 1.02 | -2.5% | -9.1% | +42.1% | 10/10/5/5 | | 100000 | home.page_tag (ms) | 52.4 | 52.5 | +0.3% | 52.5 | +0.1% | +0.3% | 57.3 | 56.1 | -2.2% | -4.8% | +4.1% | 10/10/5/5 | | 100000 | home.page_title (ms) | 0.859 | 0.858 | -0.2% | 0.783 | -8.9% | -4.0% | 1.08 | 1.06 | -2.2% | -15.3% | -7.6% | 10/10/5/5 | | 100000 | mem.after_first_page (MB) | 22.6 | 22.1 | -1.9% | 22 | -2.4% | +0.2% | 22.6 | 22.1 | -1.9% | -2.4% | +0.2% | 10/10/5/5 | | 100000 | mem.after_opens (MB) | 95.7 | 95.6 | -0.0% | 97.4 | +1.8% | -0.0% | 95.7 | 95.6 | -0.0% | +1.8% | -0.0% | 10/10/5/5 | | 100000 | mem.after_search (MB) | 103 | 91.4 | -11.1% | 93.6 | -9.0% | -2.9% | 103 | 91.4 | -11.1% | -9.0% | -2.9% | 10/10/5/5 | | 100000 | mem.idle (MB) | 18.4 | 18.8 | +2.0% | 18.7 | +1.9% | +0.8% | 18.4 | 18.8 | +2.0% | +1.9% | +0.8% | 10/10/5/5 | | 100000 | notes.append (ms) | 6.56 | 6.58 | +0.4% | 6.55 | -0.1% | +7.7% | 20.8 | 19 | -8.2% | -9.8% | -14.2% | 10/10/5/5 | | 100000 | notes.append.first (ms) | 990 | 1.15e+03 | +15.7% | 1.26e+03 | +27.0% | -3.5% | 990 | 1.15e+03 | +15.7% | +27.0% | -3.5% | 10/10/5/5 | | 100000 | open.api_get (ms) | 7.71 | 8.79 | +14.1% | 7.55 | -2.0% | -1.1% | 14 | 32.1 | +128.4% | +76.5% | -8.5% | 10/10/5/5 | | 100000 | open.api_get.warm (ms) | 0.165 | 0.165 | +0.2% | 0.171 | +3.7% | +5.9% | 0.212 | 0.21 | -1.1% | +1.1% | +4.1% | 10/10/5/5 | | 100000 | open.long_note (ms) | 68.8 | 67.3 | -2.3% | 74.9 | +8.8% | +2.5% | 68.8 | 67.3 | -2.3% | +8.8% | +2.5% | 10/10/5/5 | | 100000 | open.note (ms) | 1.47 | 0.905 | -38.5% | 0.896 | -39.1% | +21.2% | 4.85 | 4.1 | -15.5% | -13.2% | +40.7% | 10/10/5/5 | | 100000 | search.catch_up (s) | 46.1 | 46.1 | -0.0% | 46.1 | -0.1% | -0.0% | 46.1 | 46.1 | -0.0% | -0.1% | -0.0% | 10/10/5/5 | | 100000 | search.first_query (ms) | 27.4 | 26.7 | -2.3% | 27.4 | -0.0% | +1.6% | 27.4 | 26.7 | -2.3% | -0.0% | +1.6% | 10/10/5/5 | | 100000 | search.query (ms) | 2.51 | 1.92 | -23.4% | 1.97 | -21.5% | -29.8% | 25.4 | 20.2 | -20.3% | -19.3% | -24.3% | 10/10/5/5 | | 100000 | shutdown (ms) | 43.1 | 43.1 | -0.0% | 43.1 | -0.1% | -0.2% | 43.1 | 43.1 | -0.0% | -0.1% | -0.2% | 10/10/5/5 | | 100000 | startup.healthz (ms) | 4.86 | 4.99 | +2.7% | 4.86 | -0.1% | +1.3% | 4.86 | 4.99 | +2.7% | -0.1% | +1.3% | 10/10/5/5 | | 100000 | sync.durable_write (ms) | 24.8 | 25 | +0.7% | 24.8 | -0.2% | -0.3% | 32.5 | 31.8 | -2.4% | -3.2% | +4.7% | 10/10/5/5 | | 100000 | sync.round_trip (ms) | 0.216 | 0.208 | -3.4% | 0.217 | +0.6% | -3.1% | 0.337 | 0.344 | +2.1% | +3.3% | +5.6% | 10/10/5/5 | | 100000 | sync.save_ack (ms) | 3.7 | 3.67 | -1.0% | 3.73 | +0.8% | -1.3% | 5.29 | 4.46 | -15.7% | -7.1% | -5.7% | 10/10/5/5 |
Author
Owner

Verdict after 3 rounds, and a simpler design (stopping the patching here per the 3-round rule)

What the three rounds fixed (in this PR)

Round Problem found Fix Effect (100k unless noted)
1 Every Notes row wrote 5 B-trees (child table + its index + a whole-table scan index) listing via the path index, child table dropped, partial scan index (1dae71c03) cold.disk_written +16.6% → +7.5% (now = #970)
1 The Files walk held the Home's index lock across all directory I/O per-call index borrow, one transaction per walk page (86f2411ba) open.api_get p95 +345% → +128%
2 Every walk stat'ed all SSD Notes/*.md only to skip them skip from the listed type before stat (0c99d74e9) fewer hot-start stats
2 Bash wrapper in the perf harness dropped (measurement artifact) startup.healthz flat at 1k/100k

What still fails, and whose it is

Metric head vs dev #970 vs dev Owner
cold.first_page 100k +128% +140% #970: identity commits on the cold path (13 × 8,192-row random-key commits; see #970 comment)
cold.index, cold.notes_per_s 10k/100k +14.5–15.6% / −12.7–13.5% same #970
cold.disk_written 100k +7.5% +7.3% #970 (WAL rewrite of the identity table)
home.page_big p50 100k +49% +56% #970
notes.append.first 100k +16% +27% #970
cold.first_page 1k/10k +21% / +56% +8.5% / +39% ~50 ms is #1010's: the Home open now runs ~7 more schema statements, each its own fsync'd autocommit (synchronous=FULL), on the first-page path
cold.index 1k +16.6% +6.7% #1010 (same cause)
open.api_get p95 100k +128% +77% both; #1010's share is the hot-start Files walk overlapping requests
startup.healthz 10k +14% −1% likely noise (1k/100k flat); recheck

Because #1010 is stacked on #970, it can't be ≤ dev on the cold metrics until #970 is. The remaining #1010-only costs are both fixed costs at Home open and start, so the simpler design removes them instead of tuning them:

Simpler design for the rest of #1010

  1. One schema transaction. Create every namespace table and index in a single BEGIN … COMMIT (one fsync per Home open instead of ~9; also below #970's 2). Expected: the ~50 ms at 1k/10k goes away, cold.first_page/cold.index at small sizes ≤ #970.
  2. No full walk at hot start. Persist each folder's (mtime, ctime, inode) from the last completed walk. At start, stat folders only: a folder whose stamp is unchanged keeps its rows without being listed. Cost goes from O(entries) to O(folders) (the 100k-note fixture has a handful). Watchers cover changes while running, the 15-minute reconcile stays the safety net, and overflow still forces a full walk. This mirrors the Notes warm scan (scan-state.tsv), which already makes hot start cheap.
  3. Start-up walk off the request path. Any walk that must run (first ever, overflow, a folder stamp changed) starts only after the Home has had no requests for ~2 s, and yields between 256-row pages. Requests never queue behind it.
  4. Identity guarantees are unchanged: markers, inode evidence and the collision journal keep the same code. Only when a folder is re-listed changes, and a changed folder is always re-listed.

Big-O after: Home open O(1) fsyncs. Hot start O(folders) stats plus O(changed folders × entries). Request latency is independent of Home size while idle detection holds.

Gates for that round: identity tests (incl. the 2,000-iteration rescan and legacy_attachment_ids_survive_every_retry_boundary), a new test that an unchanged folder is not re-listed and a changed one is, workspace fmt/clippy/tests, the 1M listing gate, and the same ABAB ×5 with #970 and control arms.

Dependency: #970 needs its cold identity-load fix (ID-ordered bulk load and/or deferred checkpoint, evidence linked above) before #1010 can be ≤ dev on cold.* and home.page_big.

## Verdict after 3 rounds, and a simpler design (stopping the patching here per the 3-round rule) ### What the three rounds fixed (in this PR) | Round | Problem found | Fix | Effect (100k unless noted) | |---|---|---|---| | 1 | Every Notes row wrote 5 B-trees (child table + its index + a whole-table scan index) | listing via the path index, child table dropped, partial scan index (`1dae71c03`) | `cold.disk_written` +16.6% → +7.5% (now = #970) | | 1 | The Files walk held the Home's index lock across all directory I/O | per-call index borrow, one transaction per walk page (`86f2411ba`) | `open.api_get` p95 +345% → +128% | | 2 | Every walk stat'ed all SSD `Notes/*.md` only to skip them | skip from the listed type before `stat` (`0c99d74e9`) | fewer hot-start stats | | 2 | Bash wrapper in the perf harness | dropped (measurement artifact) | `startup.healthz` flat at 1k/100k | ### What still fails, and whose it is | Metric | head vs dev | #970 vs dev | Owner | |---|---|---|---| | `cold.first_page` 100k | +128% | +140% | **#970**: identity commits on the cold path (13 × 8,192-row random-key commits; see [#970 comment](https://git.kayg.org/kayg/calternal/pulls/970#issuecomment-88985)) | | `cold.index`, `cold.notes_per_s` 10k/100k | +14.5–15.6% / −12.7–13.5% | same | **#970** | | `cold.disk_written` 100k | +7.5% | +7.3% | **#970** (WAL rewrite of the identity table) | | `home.page_big` p50 100k | +49% | +56% | **#970** | | `notes.append.first` 100k | +16% | +27% | **#970** | | `cold.first_page` 1k/10k | +21% / +56% | +8.5% / +39% | ~50 ms is **#1010's**: the Home open now runs ~7 more schema statements, each its own fsync'd autocommit (`synchronous=FULL`), on the first-page path | | `cold.index` 1k | +16.6% | +6.7% | **#1010** (same cause) | | `open.api_get` p95 100k | +128% | +77% | both; #1010's share is the hot-start Files walk overlapping requests | | `startup.healthz` 10k | +14% | −1% | likely noise (1k/100k flat); recheck | Because #1010 is stacked on #970, it can't be ≤ dev on the cold metrics until #970 is. The remaining #1010-only costs are both fixed costs at Home open and start, so the simpler design removes them instead of tuning them: ### Simpler design for the rest of #1010 1. **One schema transaction.** Create every namespace table and index in a single `BEGIN … COMMIT` (one fsync per Home open instead of ~9; also below #970's 2). Expected: the ~50 ms at 1k/10k goes away, `cold.first_page`/`cold.index` at small sizes ≤ #970. 2. **No full walk at hot start.** Persist each folder's `(mtime, ctime, inode)` from the last completed walk. At start, `stat` folders only: a folder whose stamp is unchanged keeps its rows without being listed. Cost goes from O(entries) to O(folders) (the 100k-note fixture has a handful). Watchers cover changes while running, the 15-minute reconcile stays the safety net, and overflow still forces a full walk. This mirrors the Notes warm scan (`scan-state.tsv`), which already makes hot start cheap. 3. **Start-up walk off the request path.** Any walk that must run (first ever, overflow, a folder stamp changed) starts only after the Home has had no requests for ~2 s, and yields between 256-row pages. Requests never queue behind it. 4. Identity guarantees are unchanged: markers, inode evidence and the collision journal keep the same code. Only *when* a folder is re-listed changes, and a changed folder is always re-listed. Big-O after: Home open O(1) fsyncs. Hot start O(folders) stats plus O(changed folders × entries). Request latency is independent of Home size while idle detection holds. Gates for that round: identity tests (incl. the 2,000-iteration rescan and `legacy_attachment_ids_survive_every_retry_boundary`), a new test that an unchanged folder is not re-listed and a changed one is, workspace fmt/clippy/tests, the 1M listing gate, and the same ABAB ×5 with #970 and control arms. **Dependency:** #970 needs its cold identity-load fix (ID-ordered bulk load and/or deferred checkpoint, evidence linked above) before #1010 can be ≤ dev on `cold.*` and `home.page_big`.
Author
Owner

Round 4: the simpler design is built (head 018a90d00)

Commits since round 3:

  • 69ec4addb perf(files): create the namespace schema in one transaction. One WAL sync per new Home instead of ~9 on the first-page path; none on an up-to-date database.
  • 7c7586f87 feat(files): restart trusts folder stamps; Files walks run only while quiet.
    • Each full walk records file stamps (size, mtime, ctime, device, inode) and, before listing each folder, that folder's stamp. Unchanged stamps are not rewritten.
    • At restart: stat every stamped folder (O(folders), no listing). If none changed since the last completed walk, listings are complete at once.
    • Correctness rule (owner's correction): folder stamps can't see a file edited in place, so they only stand in for listing names. A full walk always follows each restart, and every other walk (overflow, changed path, periodic) runs on one Files task per Home. It starts after 2 s with no requests and pauses whenever one arrives (each 1,024 entries, each folder, each page commit). The Notes watcher loop no longer waits on Files walks.
    • Racy timestamps: a folder changed within 2 s of its stamp gets a stamp that never matches, as git does for its index. A change in the same timestamp tick (a few ms on ext4/tmpfs, up to 1–2 s elsewhere) can't pass as "unchanged". A test caught this case by timing.
    • Listing completeness is one flag: proven by the restart check or a finished walk, cleared by any watcher report, overflow or poll. Before either proof, a restarted Home's listing says incomplete.
  • 018a90d00 merges #970's head 381ce6750 (no content change), so the #970 perf arm is an exact ancestor.

Tests added (all pass, 10/10 repeats of the restart set on a loaded host):

  • in-place edit while stopped: names judged current, then the quiet walk updates size and ctime, same ID;
  • rename within a folder while stopped: check refuses, walk keeps the ID under the new name;
  • delete in a subfolder while stopped: check refuses, walk drops the row;
  • the restart check needs a completed walk;
  • a just-changed folder's stamp is never trusted;
  • the walk waits for quiet;
  • folder stamps page in order and retire with their walk.

Gates on compute02 at 018a90d00:

Gate Result
cargo fmt --all --check pass
cargo clippy -j4 --workspace --all-targets --locked -- -D warnings pass
cargo test -j4 --workspace --locked --no-fail-fast pass
commit 69ec4addb alone: cargo test -p calternal-files pass

The 1M listing gate and the ABAB ×5 (dev, head, #970, dev-copy control) run in the next perf-turn slot (queued behind tiering-v3).

## Round 4: the simpler design is built (head `018a90d00`) Commits since round 3: - `69ec4addb` **perf(files): create the namespace schema in one transaction**. One WAL sync per new Home instead of ~9 on the first-page path; none on an up-to-date database. - `7c7586f87` **feat(files): restart trusts folder stamps; Files walks run only while quiet.** - Each full walk records file stamps (size, mtime, ctime, device, inode) and, *before* listing each folder, that folder's stamp. Unchanged stamps are not rewritten. - At restart: `stat` every stamped folder (O(folders), no listing). If none changed since the last completed walk, listings are complete at once. - **Correctness rule (owner's correction):** folder stamps can't see a file edited in place, so they only stand in for listing names. A full walk always follows each restart, and every other walk (overflow, changed path, periodic) runs on one Files task per Home. It starts after 2 s with no requests and pauses whenever one arrives (each 1,024 entries, each folder, each page commit). The Notes watcher loop no longer waits on Files walks. - **Racy timestamps:** a folder changed within 2 s of its stamp gets a stamp that never matches, as git does for its index. A change in the same timestamp tick (a few ms on ext4/tmpfs, up to 1–2 s elsewhere) can't pass as "unchanged". A test caught this case by timing. - Listing completeness is one flag: proven by the restart check or a finished walk, cleared by any watcher report, overflow or poll. Before either proof, a restarted Home's listing says incomplete. - `018a90d00` merges #970's head `381ce6750` (no content change), so the #970 perf arm is an exact ancestor. Tests added (all pass, 10/10 repeats of the restart set on a loaded host): - in-place edit while stopped: names judged current, then the quiet walk updates size and ctime, same ID; - rename within a folder while stopped: check refuses, walk keeps the ID under the new name; - delete in a subfolder while stopped: check refuses, walk drops the row; - the restart check needs a completed walk; - a just-changed folder's stamp is never trusted; - the walk waits for quiet; - folder stamps page in order and retire with their walk. Gates on compute02 at `018a90d00`: | Gate | Result | |---|---| | `cargo fmt --all --check` | pass | | `cargo clippy -j4 --workspace --all-targets --locked -- -D warnings` | pass | | `cargo test -j4 --workspace --locked --no-fail-fast` | pass | | commit `69ec4addb` alone: `cargo test -p calternal-files` | pass | The 1M listing gate and the ABAB ×5 (dev, head, #970, dev-copy control) run in the next `perf-turn` slot (queued behind tiering-v3).
Author
Owner

Perf round 4a: ABAB ×5, dev / head / #970 / dev-copy control (head 018a90d00)

Session 2026-11-09 19:41–20:37Z (01:11–02:07 IST), boot 7a65f072 (same epoch as rounds 1–3). Plain perf-turn files-1010 (FIFO) took perf-01's lock, then the control host took perf-02's; both released at the end. Per cycle: dev d4b32af94 (legacy), head, #970 381ce6750 (joined, an exact ancestor of head), dev, head, dev-copy control. Sizes 1k/10k/100k, --runs 1 --cold-runs 1 --hot-only --gate, fixtures generated from the same seed and verified by sha256. Medians of per-arm p50/p95. All 30 arms exited 0.

1M listing gate: files_listing entries=1000000 page_size=50 cold_first_us=101 p50_us=60 p99_us=91. Pass (first page 0.10 ms ≤ 100 ms).

#1010 share (head vs #970):

  • Cold path is flat: cold.first_page −1.0% / −1.1% / −0.4%, cold.index −0.9% / −0.3% / +1.6%, cold.disk_written +0.2% / −0.1% / +0.1% (1k/10k/100k). The one-transaction schema removed round 3's ~50 ms at 1k/10k.
  • Unresolved, list path: home.page_big p50 @100k +16% (p95 −5.6%) and home.page p50 +6–12%. Per-arm ranges overlap (page_big head 23.6–36.8 ms, #970 22.2–27.0 ms; rank test p≈0.06). The same #970 binary measured page_big at 29.5 ms in round 3 and 25.5 ms here, a swing larger than the share. These requests run in the first seconds after start under continuous load, when the deferred Files walk is still waiting for quiet. The dev-copy control can't size joined-layout noise, so round 4b adds a head-copy control and a second #970 arm per cycle (#970 n=10).
  • Healthz moves ±19% with a ±19% control: noise.

Head vs dev stays red on the cold path and on home.page_big @100k. Those match #970 alone (cold.first_page @100k +105% vs #970 +106%), so #1010 cannot go READY before #970 is ≤ dev. Status: #1010-share flat on cold; list path pending round 4b.

size metric dev p50 head p50 head vs dev #970 vs dev #1010 share (head vs #970) control vs dev head vs dev p95 #1010 share p95 control p95
1000 cold.disk_written (MB) 18.8 19 +1.2% +1.0% +0.2% -0.2% +1.2% +0.2% -0.2%
1000 cold.first_page (ms) 418 443 +6.1% +7.2% -1.0% +3.6% +6.1% -1.0% +3.6%
1000 cold.index (s) 0.52 0.545 +4.9% +5.8% -0.9% +3.0% +4.9% -0.9% +3.0%
1000 cold.mem_peak (MB) 46.4 47.7 +2.7% +4.0% -1.3% -0.2% +2.7% -1.3% -0.2%
1000 cold.notes_per_s (notes/s) 1.92e+03 1.83e+03 -4.7% -5.5% +0.9% -2.9% -4.7% +0.9% -2.9%
1000 cold.startup (ms) 19.8 20.5 +3.3% +0.6% +2.6% +4.0% +3.3% +2.6% +4.0%
1000 home.first_page (ms) 2.46 1.95 -20.6% -28.4% +10.9% -27.5% -20.6% +10.9% -27.5%
1000 home.page (ms) 0.68 0.779 +14.7% +7.4% +6.8% -3.0% +16.7% -2.0% +4.4%
1000 home.page_big (ms) 8.95 8.81 -1.6% -2.6% +1.1% -2.5% -1.6% +1.1% -2.5%
1000 home.page_next (ms) 0.74 0.726 -1.8% -2.6% +0.7% +0.1% -4.0% +3.5% -0.3%
1000 home.page_tag (ms) 1.27 1.25 -1.5% -4.0% +2.6% -4.3% -7.8% +0.4% -10.6%
1000 home.page_title (ms) 0.617 0.609 -1.2% -2.6% +1.4% -1.9% +7.3% +6.7% +0.6%
1000 mem.after_first_page (MB) 21.2 21 -0.9% -1.6% +0.7% +2.3% -0.9% +0.7% +2.3%
1000 mem.after_opens (MB) 34.7 35 +1.0% -0.1% +1.1% +0.2% +1.0% +1.1% +0.2%
1000 mem.after_search (MB) 48.1 48.1 +0.2% -0.4% +0.6% -0.3% +0.2% +0.6% -0.3%
1000 mem.idle (MB) 18.3 18.9 +3.3% +3.3% +0.0% +9.8% +3.3% +0.0% +9.8%
1000 notes.append (ms) 4.88 4.92 +0.8% +0.8% -0.0% -0.4% +0.3% +1.4% +0.3%
1000 notes.append.first (ms) 17 15.5 -8.6% +11.6% -18.1% +18.5% -8.6% -18.1% +18.5%
1000 open.api_get (ms) 7.45 7.31 -1.9% -3.0% +1.2% +0.5% -1.2% -9.8% +6.8%
1000 open.api_get.warm (ms) 0.165 0.17 +3.0% -1.6% +4.7% +4.5% -1.5% +1.7% +0.9%
1000 open.long_note (ms) 15.5 15.4 -0.8% -0.7% -0.1% -1.2% -0.8% -0.1% -1.2%
1000 open.note (ms) 0.707 0.679 -3.9% -4.5% +0.6% -6.1% -6.6% -1.4% -6.9%
1000 search.catch_up (s) 2 2 -0.0% -0.0% +0.0% +0.0% -0.0% +0.0% +0.0%
1000 search.first_query (ms) 27 26.8 -0.5% -2.4% +1.9% +19.5% -0.5% +1.9% +19.5%
1000 search.query (ms) 1.15 1.23 +6.9% +0.5% +6.4% +7.8% +6.4% +5.8% +9.3%
1000 shutdown (ms) 43.1 43 -0.2% -49.0% +95.5% -48.8% -0.2% +95.5% -48.8%
1000 startup.healthz (ms) 4.92 5.76 +17.2% -1.9% +19.5% +19.3% +17.2% +19.5% +19.3%
1000 sync.durable_write (ms) 24.6 24.7 +0.5% +0.7% -0.1% -2.4% +0.2% -11.6% -4.8%
1000 sync.round_trip (ms) 0.211 0.202 -4.5% -4.4% -0.1% -4.1% -5.4% -1.1% -10.1%
1000 sync.save_ack (ms) 3.68 3.68 -0.1% +0.6% -0.6% -2.2% -2.7% -8.9% +2.6%
10000 cold.disk_written (MB) 150 152 +1.4% +1.5% -0.1% +0.1% +1.4% -0.1% +0.1%
10000 cold.first_page (ms) 331 475 +43.3% +44.9% -1.1% -2.0% +43.3% -1.1% -2.0%
10000 cold.index (s) 1.47 1.63 +10.7% +11.0% -0.3% +0.1% +10.7% -0.3% +0.1%
10000 cold.mem_peak (MB) 144 145 +0.9% +0.7% +0.2% -0.2% +0.9% +0.2% -0.2%
10000 cold.notes_per_s (notes/s) 6.81e+03 6.15e+03 -9.6% -9.9% +0.3% -0.1% -9.6% +0.3% -0.1%
10000 cold.startup (ms) 20 20.3 +1.6% -0.1% +1.6% +0.9% +1.6% +1.6% +0.9%
10000 home.first_page (ms) 2.25 2.47 +9.7% +0.8% +8.8% +9.0% +9.7% +8.8% +9.0%
10000 home.page (ms) 0.745 0.89 +19.5% +12.5% +6.2% +1.4% -33.2% +11.9% -0.1%
10000 home.page_big (ms) 16.5 16.3 -1.3% -1.0% -0.3% +0.9% +1.1% +2.9% +1.6%
10000 home.page_next (ms) 0.696 0.724 +4.1% +4.8% -0.7% +1.7% +13.7% -5.7% -0.3%
10000 home.page_tag (ms) 5.26 5.47 +3.8% +1.8% +2.0% +1.1% +12.6% +10.4% +9.6%
10000 home.page_title (ms) 0.653 0.73 +11.9% +12.0% -0.1% -0.2% +75.2% +39.9% +7.5%
10000 mem.after_first_page (MB) 21.6 21.4 -0.9% -0.3% -0.5% -1.7% -0.9% -0.5% -1.7%
10000 mem.after_opens (MB) 40.7 40.5 -0.7% -1.7% +1.0% -0.4% -0.7% +1.0% -0.4%
10000 mem.after_search (MB) 75.4 75.6 +0.3% -1.1% +1.3% +0.3% +0.3% +1.3% +0.3%
10000 mem.idle (MB) 19.3 18.8 -2.8% -0.8% -2.0% -3.4% -2.8% -2.0% -3.4%
10000 notes.append (ms) 5.07 5.02 -1.0% -1.0% -0.0% -4.0% -3.1% +2.9% +1.7%
10000 notes.append.first (ms) 57 52.6 -7.7% -18.9% +13.8% -16.6% -7.7% +13.8% -16.6%
10000 open.api_get (ms) 7.47 7.49 +0.2% -4.4% +4.9% -0.2% -1.6% -8.2% -4.0%
10000 open.api_get.warm (ms) 0.163 0.166 +1.5% +0.8% +0.7% -0.8% +3.7% +5.4% +3.5%
10000 open.long_note (ms) 16.1 16.2 +1.0% +3.0% -2.0% +0.7% +1.0% -2.0% +0.7%
10000 open.note (ms) 0.615 0.614 -0.1% +1.1% -1.2% +3.0% -1.9% -0.4% -7.1%
10000 search.catch_up (s) 4.01 4.01 +0.1% +0.1% -0.1% +0.0% +0.1% -0.1% +0.0%
10000 search.first_query (ms) 28 28.4 +1.4% -3.9% +5.5% -4.3% +1.4% +5.5% -4.3%
10000 search.query (ms) 1.43 1.49 +4.4% +14.7% -9.0% -0.1% +62.2% -8.2% +79.9%
10000 shutdown (ms) 43.1 43.4 +0.6% -0.3% +0.8% -0.3% +0.6% +0.8% -0.3%
10000 startup.healthz (ms) 4.99 4.9 -1.7% +21.3% -19.0% -1.6% -1.7% -19.0% -1.6%
10000 sync.durable_write (ms) 24.2 24.6 +1.6% +1.0% +0.5% +0.9% -6.5% -4.4% +3.6%
10000 sync.round_trip (ms) 0.204 0.204 +0.1% +0.4% -0.2% +6.5% +1.6% +0.7% +2.8%
10000 sync.save_ack (ms) 3.63 3.71 +2.1% -0.2% +2.3% +2.3% +0.7% +8.0% -4.8%
100000 cold.disk_written (MB) 1.92e+03 2.06e+03 +7.5% +7.3% +0.1% -0.0% +7.5% +0.1% -0.0%
100000 cold.first_page (ms) 2.12e+03 4.35e+03 +105.1% +105.9% -0.4% -1.4% +105.1% -0.4% -1.4%
100000 cold.index (s) 15.5 17.8 +15.3% +13.5% +1.6% -0.2% +15.3% +1.6% -0.2%
100000 cold.mem_peak (MB) 293 285 -2.5% -1.0% -1.5% +0.2% -2.5% -1.5% +0.2%
100000 cold.notes_per_s (notes/s) 6.46e+03 5.61e+03 -13.3% -11.9% -1.5% +0.2% -13.3% -1.5% +0.2%
100000 cold.startup (ms) 20 19.9 -0.3% +0.0% -0.3% -0.7% -0.3% -0.3% -0.7%
100000 home.first_page (ms) 3.19 2.92 -8.4% -8.1% -0.4% +64.6% -8.4% -0.4% +64.6%
100000 home.page (ms) 0.898 0.973 +8.3% -3.0% +11.7% +17.0% -1.3% -0.3% +186.2%
100000 home.page_big (ms) 18.9 29.6 +56.8% +35.1% +16.1% +2.3% +63.2% -5.6% +11.1%
100000 home.page_next (ms) 0.745 0.854 +14.6% +16.0% -1.2% -0.6% -11.3% +15.6% -27.1%
100000 home.page_tag (ms) 52.7 51.8 -1.7% -1.5% -0.2% -0.7% -3.2% +2.6% +4.4%
100000 home.page_title (ms) 0.838 0.85 +1.4% -9.6% +12.1% +3.2% +8.7% +4.7% +8.8%
100000 mem.after_first_page (MB) 22.9 22.2 -3.1% -4.3% +1.2% +3.4% -3.1% +1.2% +3.4%
100000 mem.after_opens (MB) 98.4 98.9 +0.6% -1.5% +2.1% -2.3% +0.6% +2.1% -2.3%
100000 mem.after_search (MB) 98.8 95.6 -3.2% -3.4% +0.2% +1.3% -3.2% +0.2% +1.3%
100000 mem.idle (MB) 18.9 18.8 -0.4% -1.1% +0.7% +5.0% -0.4% +0.7% +5.0%
100000 notes.append (ms) 4.88 5.04 +3.2% +0.1% +3.1% +1.6% +1.3% -2.8% +5.4%
100000 notes.append.first (ms) 1.23e+03 1.21e+03 -1.9% -8.9% +7.7% +14.4% -1.9% +7.7% +14.4%
100000 open.api_get (ms) 7.6 7.73 +1.8% -3.0% +4.9% -0.7% +135.1% +6.3% -4.4%
100000 open.api_get.warm (ms) 0.168 0.169 +0.9% +0.1% +0.8% -2.0% +2.4% +4.7% -2.3%
100000 open.long_note (ms) 68.2 67 -1.8% -2.4% +0.6% -4.3% -1.8% +0.6% -4.3%
100000 open.note (ms) 0.794 0.903 +13.7% +18.5% -4.1% -4.8% +8.4% -10.1% -4.2%
100000 search.catch_up (s) 47.1 46.1 -2.1% -2.1% -0.0% -2.1% -2.1% -0.0% -2.1%
100000 search.first_query (ms) 27.5 27.6 +0.4% -1.4% +1.8% -0.4% +0.4% +1.8% -0.4%
100000 search.query (ms) 2 1.98 -0.7% +5.2% -5.7% +98.6% +7.0% +46.8% -2.0%
100000 shutdown (ms) 85.3 85.4 +0.1% +0.0% +0.1% +0.1% +0.1% +0.1% +0.1%
100000 startup.healthz (ms) 4.9 5.07 +3.4% -1.5% +5.0% +15.2% +3.4% +5.0% +15.2%
100000 sync.durable_write (ms) 24.6 24.9 +1.2% +3.9% -2.6% +0.6% -5.0% +13.7% +2.5%
100000 sync.round_trip (ms) 0.221 0.215 -2.5% -2.4% -0.1% +2.2% -1.3% -0.9% +3.7%
100000 sync.save_ack (ms) 3.72 3.68 -1.0% -0.1% -1.0% -1.6% -2.1% +0.0% -5.5%
## Perf round 4a: ABAB ×5, dev / head / #970 / dev-copy control (head `018a90d00`) Session 2026-11-09 19:41–20:37Z (01:11–02:07 IST), boot `7a65f072` (same epoch as rounds 1–3). Plain `perf-turn files-1010` (FIFO) took perf-01's lock, then the control host took perf-02's; both released at the end. Per cycle: dev `d4b32af94` (legacy), head, #970 `381ce6750` (joined, an exact ancestor of head), dev, head, dev-copy control. Sizes 1k/10k/100k, `--runs 1 --cold-runs 1 --hot-only --gate`, fixtures generated from the same seed and verified by sha256. Medians of per-arm p50/p95. All 30 arms exited 0. **1M listing gate:** `files_listing entries=1000000 page_size=50 cold_first_us=101 p50_us=60 p99_us=91`. Pass (first page 0.10 ms ≤ 100 ms). **#1010 share (head vs #970):** - **Cold path is flat:** `cold.first_page` −1.0% / −1.1% / −0.4%, `cold.index` −0.9% / −0.3% / +1.6%, `cold.disk_written` +0.2% / −0.1% / +0.1% (1k/10k/100k). The one-transaction schema removed round 3's ~50 ms at 1k/10k. - **Unresolved, list path:** `home.page_big` p50 @100k +16% (p95 −5.6%) and `home.page` p50 +6–12%. Per-arm ranges overlap (page_big head 23.6–36.8 ms, #970 22.2–27.0 ms; rank test p≈0.06). The same #970 binary measured page_big at 29.5 ms in round 3 and 25.5 ms here, a swing larger than the share. These requests run in the first seconds after start under continuous load, when the deferred Files walk is still waiting for quiet. The dev-copy control can't size joined-layout noise, so round 4b adds a **head-copy control** and a second #970 arm per cycle (#970 n=10). - Healthz moves ±19% with a ±19% control: noise. **Head vs dev** stays red on the cold path and on `home.page_big` @100k. Those match #970 alone (cold.first_page @100k +105% vs #970 +106%), so #1010 cannot go READY before #970 is ≤ dev. Status: **#1010-share flat on cold; list path pending round 4b.** | size | metric | dev p50 | head p50 | head vs dev | #970 vs dev | **#1010 share** (head vs #970) | control vs dev | head vs dev p95 | #1010 share p95 | control p95 | |---|---|---|---|---|---|---|---|---|---|---| | 1000 | cold.disk_written (MB) | 18.8 | 19 | +1.2% | +1.0% | +0.2% | -0.2% | +1.2% | +0.2% | -0.2% | | 1000 | cold.first_page (ms) | 418 | 443 | +6.1% | +7.2% | -1.0% | +3.6% | +6.1% | -1.0% | +3.6% | | 1000 | cold.index (s) | 0.52 | 0.545 | +4.9% | +5.8% | -0.9% | +3.0% | +4.9% | -0.9% | +3.0% | | 1000 | cold.mem_peak (MB) | 46.4 | 47.7 | +2.7% | +4.0% | -1.3% | -0.2% | +2.7% | -1.3% | -0.2% | | 1000 | cold.notes_per_s (notes/s) | 1.92e+03 | 1.83e+03 | -4.7% | -5.5% | +0.9% | -2.9% | -4.7% | +0.9% | -2.9% | | 1000 | cold.startup (ms) | 19.8 | 20.5 | +3.3% | +0.6% | +2.6% | +4.0% | +3.3% | +2.6% | +4.0% | | 1000 | home.first_page (ms) | 2.46 | 1.95 | -20.6% | -28.4% | +10.9% | -27.5% | -20.6% | +10.9% | -27.5% | | 1000 | home.page (ms) | 0.68 | 0.779 | +14.7% | +7.4% | +6.8% | -3.0% | +16.7% | -2.0% | +4.4% | | 1000 | home.page_big (ms) | 8.95 | 8.81 | -1.6% | -2.6% | +1.1% | -2.5% | -1.6% | +1.1% | -2.5% | | 1000 | home.page_next (ms) | 0.74 | 0.726 | -1.8% | -2.6% | +0.7% | +0.1% | -4.0% | +3.5% | -0.3% | | 1000 | home.page_tag (ms) | 1.27 | 1.25 | -1.5% | -4.0% | +2.6% | -4.3% | -7.8% | +0.4% | -10.6% | | 1000 | home.page_title (ms) | 0.617 | 0.609 | -1.2% | -2.6% | +1.4% | -1.9% | +7.3% | +6.7% | +0.6% | | 1000 | mem.after_first_page (MB) | 21.2 | 21 | -0.9% | -1.6% | +0.7% | +2.3% | -0.9% | +0.7% | +2.3% | | 1000 | mem.after_opens (MB) | 34.7 | 35 | +1.0% | -0.1% | +1.1% | +0.2% | +1.0% | +1.1% | +0.2% | | 1000 | mem.after_search (MB) | 48.1 | 48.1 | +0.2% | -0.4% | +0.6% | -0.3% | +0.2% | +0.6% | -0.3% | | 1000 | mem.idle (MB) | 18.3 | 18.9 | +3.3% | +3.3% | +0.0% | +9.8% | +3.3% | +0.0% | +9.8% | | 1000 | notes.append (ms) | 4.88 | 4.92 | +0.8% | +0.8% | -0.0% | -0.4% | +0.3% | +1.4% | +0.3% | | 1000 | notes.append.first (ms) | 17 | 15.5 | -8.6% | +11.6% | -18.1% | +18.5% | -8.6% | -18.1% | +18.5% | | 1000 | open.api_get (ms) | 7.45 | 7.31 | -1.9% | -3.0% | +1.2% | +0.5% | -1.2% | -9.8% | +6.8% | | 1000 | open.api_get.warm (ms) | 0.165 | 0.17 | +3.0% | -1.6% | +4.7% | +4.5% | -1.5% | +1.7% | +0.9% | | 1000 | open.long_note (ms) | 15.5 | 15.4 | -0.8% | -0.7% | -0.1% | -1.2% | -0.8% | -0.1% | -1.2% | | 1000 | open.note (ms) | 0.707 | 0.679 | -3.9% | -4.5% | +0.6% | -6.1% | -6.6% | -1.4% | -6.9% | | 1000 | search.catch_up (s) | 2 | 2 | -0.0% | -0.0% | +0.0% | +0.0% | -0.0% | +0.0% | +0.0% | | 1000 | search.first_query (ms) | 27 | 26.8 | -0.5% | -2.4% | +1.9% | +19.5% | -0.5% | +1.9% | +19.5% | | 1000 | search.query (ms) | 1.15 | 1.23 | +6.9% | +0.5% | +6.4% | +7.8% | +6.4% | +5.8% | +9.3% | | 1000 | shutdown (ms) | 43.1 | 43 | -0.2% | -49.0% | +95.5% | -48.8% | -0.2% | +95.5% | -48.8% | | 1000 | startup.healthz (ms) | 4.92 | 5.76 | +17.2% | -1.9% | +19.5% | +19.3% | +17.2% | +19.5% | +19.3% | | 1000 | sync.durable_write (ms) | 24.6 | 24.7 | +0.5% | +0.7% | -0.1% | -2.4% | +0.2% | -11.6% | -4.8% | | 1000 | sync.round_trip (ms) | 0.211 | 0.202 | -4.5% | -4.4% | -0.1% | -4.1% | -5.4% | -1.1% | -10.1% | | 1000 | sync.save_ack (ms) | 3.68 | 3.68 | -0.1% | +0.6% | -0.6% | -2.2% | -2.7% | -8.9% | +2.6% | | 10000 | cold.disk_written (MB) | 150 | 152 | +1.4% | +1.5% | -0.1% | +0.1% | +1.4% | -0.1% | +0.1% | | 10000 | cold.first_page (ms) | 331 | 475 | +43.3% | +44.9% | -1.1% | -2.0% | +43.3% | -1.1% | -2.0% | | 10000 | cold.index (s) | 1.47 | 1.63 | +10.7% | +11.0% | -0.3% | +0.1% | +10.7% | -0.3% | +0.1% | | 10000 | cold.mem_peak (MB) | 144 | 145 | +0.9% | +0.7% | +0.2% | -0.2% | +0.9% | +0.2% | -0.2% | | 10000 | cold.notes_per_s (notes/s) | 6.81e+03 | 6.15e+03 | -9.6% | -9.9% | +0.3% | -0.1% | -9.6% | +0.3% | -0.1% | | 10000 | cold.startup (ms) | 20 | 20.3 | +1.6% | -0.1% | +1.6% | +0.9% | +1.6% | +1.6% | +0.9% | | 10000 | home.first_page (ms) | 2.25 | 2.47 | +9.7% | +0.8% | +8.8% | +9.0% | +9.7% | +8.8% | +9.0% | | 10000 | home.page (ms) | 0.745 | 0.89 | +19.5% | +12.5% | +6.2% | +1.4% | -33.2% | +11.9% | -0.1% | | 10000 | home.page_big (ms) | 16.5 | 16.3 | -1.3% | -1.0% | -0.3% | +0.9% | +1.1% | +2.9% | +1.6% | | 10000 | home.page_next (ms) | 0.696 | 0.724 | +4.1% | +4.8% | -0.7% | +1.7% | +13.7% | -5.7% | -0.3% | | 10000 | home.page_tag (ms) | 5.26 | 5.47 | +3.8% | +1.8% | +2.0% | +1.1% | +12.6% | +10.4% | +9.6% | | 10000 | home.page_title (ms) | 0.653 | 0.73 | +11.9% | +12.0% | -0.1% | -0.2% | +75.2% | +39.9% | +7.5% | | 10000 | mem.after_first_page (MB) | 21.6 | 21.4 | -0.9% | -0.3% | -0.5% | -1.7% | -0.9% | -0.5% | -1.7% | | 10000 | mem.after_opens (MB) | 40.7 | 40.5 | -0.7% | -1.7% | +1.0% | -0.4% | -0.7% | +1.0% | -0.4% | | 10000 | mem.after_search (MB) | 75.4 | 75.6 | +0.3% | -1.1% | +1.3% | +0.3% | +0.3% | +1.3% | +0.3% | | 10000 | mem.idle (MB) | 19.3 | 18.8 | -2.8% | -0.8% | -2.0% | -3.4% | -2.8% | -2.0% | -3.4% | | 10000 | notes.append (ms) | 5.07 | 5.02 | -1.0% | -1.0% | -0.0% | -4.0% | -3.1% | +2.9% | +1.7% | | 10000 | notes.append.first (ms) | 57 | 52.6 | -7.7% | -18.9% | +13.8% | -16.6% | -7.7% | +13.8% | -16.6% | | 10000 | open.api_get (ms) | 7.47 | 7.49 | +0.2% | -4.4% | +4.9% | -0.2% | -1.6% | -8.2% | -4.0% | | 10000 | open.api_get.warm (ms) | 0.163 | 0.166 | +1.5% | +0.8% | +0.7% | -0.8% | +3.7% | +5.4% | +3.5% | | 10000 | open.long_note (ms) | 16.1 | 16.2 | +1.0% | +3.0% | -2.0% | +0.7% | +1.0% | -2.0% | +0.7% | | 10000 | open.note (ms) | 0.615 | 0.614 | -0.1% | +1.1% | -1.2% | +3.0% | -1.9% | -0.4% | -7.1% | | 10000 | search.catch_up (s) | 4.01 | 4.01 | +0.1% | +0.1% | -0.1% | +0.0% | +0.1% | -0.1% | +0.0% | | 10000 | search.first_query (ms) | 28 | 28.4 | +1.4% | -3.9% | +5.5% | -4.3% | +1.4% | +5.5% | -4.3% | | 10000 | search.query (ms) | 1.43 | 1.49 | +4.4% | +14.7% | -9.0% | -0.1% | +62.2% | -8.2% | +79.9% | | 10000 | shutdown (ms) | 43.1 | 43.4 | +0.6% | -0.3% | +0.8% | -0.3% | +0.6% | +0.8% | -0.3% | | 10000 | startup.healthz (ms) | 4.99 | 4.9 | -1.7% | +21.3% | -19.0% | -1.6% | -1.7% | -19.0% | -1.6% | | 10000 | sync.durable_write (ms) | 24.2 | 24.6 | +1.6% | +1.0% | +0.5% | +0.9% | -6.5% | -4.4% | +3.6% | | 10000 | sync.round_trip (ms) | 0.204 | 0.204 | +0.1% | +0.4% | -0.2% | +6.5% | +1.6% | +0.7% | +2.8% | | 10000 | sync.save_ack (ms) | 3.63 | 3.71 | +2.1% | -0.2% | +2.3% | +2.3% | +0.7% | +8.0% | -4.8% | | 100000 | cold.disk_written (MB) | 1.92e+03 | 2.06e+03 | +7.5% | +7.3% | +0.1% | -0.0% | +7.5% | +0.1% | -0.0% | | 100000 | cold.first_page (ms) | 2.12e+03 | 4.35e+03 | +105.1% | +105.9% | -0.4% | -1.4% | +105.1% | -0.4% | -1.4% | | 100000 | cold.index (s) | 15.5 | 17.8 | +15.3% | +13.5% | +1.6% | -0.2% | +15.3% | +1.6% | -0.2% | | 100000 | cold.mem_peak (MB) | 293 | 285 | -2.5% | -1.0% | -1.5% | +0.2% | -2.5% | -1.5% | +0.2% | | 100000 | cold.notes_per_s (notes/s) | 6.46e+03 | 5.61e+03 | -13.3% | -11.9% | -1.5% | +0.2% | -13.3% | -1.5% | +0.2% | | 100000 | cold.startup (ms) | 20 | 19.9 | -0.3% | +0.0% | -0.3% | -0.7% | -0.3% | -0.3% | -0.7% | | 100000 | home.first_page (ms) | 3.19 | 2.92 | -8.4% | -8.1% | -0.4% | +64.6% | -8.4% | -0.4% | +64.6% | | 100000 | home.page (ms) | 0.898 | 0.973 | +8.3% | -3.0% | +11.7% | +17.0% | -1.3% | -0.3% | +186.2% | | 100000 | home.page_big (ms) | 18.9 | 29.6 | +56.8% | +35.1% | +16.1% | +2.3% | +63.2% | -5.6% | +11.1% | | 100000 | home.page_next (ms) | 0.745 | 0.854 | +14.6% | +16.0% | -1.2% | -0.6% | -11.3% | +15.6% | -27.1% | | 100000 | home.page_tag (ms) | 52.7 | 51.8 | -1.7% | -1.5% | -0.2% | -0.7% | -3.2% | +2.6% | +4.4% | | 100000 | home.page_title (ms) | 0.838 | 0.85 | +1.4% | -9.6% | +12.1% | +3.2% | +8.7% | +4.7% | +8.8% | | 100000 | mem.after_first_page (MB) | 22.9 | 22.2 | -3.1% | -4.3% | +1.2% | +3.4% | -3.1% | +1.2% | +3.4% | | 100000 | mem.after_opens (MB) | 98.4 | 98.9 | +0.6% | -1.5% | +2.1% | -2.3% | +0.6% | +2.1% | -2.3% | | 100000 | mem.after_search (MB) | 98.8 | 95.6 | -3.2% | -3.4% | +0.2% | +1.3% | -3.2% | +0.2% | +1.3% | | 100000 | mem.idle (MB) | 18.9 | 18.8 | -0.4% | -1.1% | +0.7% | +5.0% | -0.4% | +0.7% | +5.0% | | 100000 | notes.append (ms) | 4.88 | 5.04 | +3.2% | +0.1% | +3.1% | +1.6% | +1.3% | -2.8% | +5.4% | | 100000 | notes.append.first (ms) | 1.23e+03 | 1.21e+03 | -1.9% | -8.9% | +7.7% | +14.4% | -1.9% | +7.7% | +14.4% | | 100000 | open.api_get (ms) | 7.6 | 7.73 | +1.8% | -3.0% | +4.9% | -0.7% | +135.1% | +6.3% | -4.4% | | 100000 | open.api_get.warm (ms) | 0.168 | 0.169 | +0.9% | +0.1% | +0.8% | -2.0% | +2.4% | +4.7% | -2.3% | | 100000 | open.long_note (ms) | 68.2 | 67 | -1.8% | -2.4% | +0.6% | -4.3% | -1.8% | +0.6% | -4.3% | | 100000 | open.note (ms) | 0.794 | 0.903 | +13.7% | +18.5% | -4.1% | -4.8% | +8.4% | -10.1% | -4.2% | | 100000 | search.catch_up (s) | 47.1 | 46.1 | -2.1% | -2.1% | -0.0% | -2.1% | -2.1% | -0.0% | -2.1% | | 100000 | search.first_query (ms) | 27.5 | 27.6 | +0.4% | -1.4% | +1.8% | -0.4% | +0.4% | +1.8% | -0.4% | | 100000 | search.query (ms) | 2 | 1.98 | -0.7% | +5.2% | -5.7% | +98.6% | +7.0% | +46.8% | -2.0% | | 100000 | shutdown (ms) | 85.3 | 85.4 | +0.1% | +0.0% | +0.1% | +0.1% | +0.1% | +0.1% | +0.1% | | 100000 | startup.healthz (ms) | 4.9 | 5.07 | +3.4% | -1.5% | +5.0% | +15.2% | +3.4% | +5.0% | +15.2% | | 100000 | sync.durable_write (ms) | 24.6 | 24.9 | +1.2% | +3.9% | -2.6% | +0.6% | -5.0% | +13.7% | +2.5% | | 100000 | sync.round_trip (ms) | 0.221 | 0.215 | -2.5% | -2.4% | -0.1% | +2.2% | -1.3% | -0.9% | +3.7% | | 100000 | sync.save_ack (ms) | 3.72 | 3.68 | -1.0% | -0.1% | -1.0% | -1.6% | -2.1% | +0.0% | -5.5% |
Author
Owner

Round 4b result and round 5 (head 5517ce595)

Round 4b (2026-11-10 00:52–01:47Z, 06:22–07:17 IST; same epoch; plain perf-turn; 30/30 arms exit 0) added a head-copy control (the same head binary run twice) and a second #970 arm per cycle. 1M listing gate: cold_first_us=101 p50_us=60 p99_us=78, pass.

  • Joined-layout noise is large. Two runs of the same head binary differ by up to +10.5% on home.page_big @100k, −15% on home.page @10k and −33% on startup.healthz @100k. Round 4a's "+16% page_big share" is inside that band; 4b measured +3.9% (p95 −3.2%).
  • Pooling 4a+4b (head n=20 vs #970 n=15, rank test) left a few small shares that are statistically real: cold.index @100k +2.5%, cold.first_page @100k +2.9%, cold.disk_written @100k +0.1% (p≤0.01), and search.* / open.api_get.warm @1k +2–6% (p≈0.03–0.08). home.page_big @100k +11% at p=0.08 is not established.

Round 5, aimed at those shares:

  • 549871e17 perf(files): Notes rows keep #970's table bytes. #1010 had added kind and scan_generation columns to #970's shared current_files, so every Notes row carried two extra fields through every WAL rewrite. Those move to a Files-only current_walk_rows(id, kind, seen) (indexed by (seen, id) for the sweep); readers take kind from a LEFT JOIN. Notes puts, cold scans and deletes of Notes-owned rows never touch the side tables. The sweep now excludes exactly the rows Notes owns (SSD Notes/*.md), so a deleted non-Markdown file below Notes/ is swept too. A draft database migrates once.
  • 5517ce595 perf(notes): only requests and typing mark a Home busy. Home::index() no longer marks activity: it was a CAS loop plus a clock read on every index call, including the cold scan's hot loop. mark() is now a relaxed load and a store at most every 5 ms.

Gates on compute02 at 5517ce595:

Gate Result
cargo fmt --all --check pass
cargo clippy -j4 --workspace --all-targets --locked -- -D warnings pass
cargo test -j4 --workspace --locked --no-fail-fast pass
release build pass

One first-run failure in an unrelated SyncClient durability test passed 10/10 on rerun; filed as #1049 (flaky rule, non-blocking).

Round 5's ABAB (dev, head, #970, head-copy, #970, dev-copy, ×5) is queued on perf-turn. Status remains #1010-share: cold flat within noise; small shares being re-measured. Head vs dev stays red on what #970 alone costs, so #1010 can't be READY before #970 is ≤ dev.

## Round 4b result and round 5 (head `5517ce595`) **Round 4b** (2026-11-10 00:52–01:47Z, 06:22–07:17 IST; same epoch; plain `perf-turn`; 30/30 arms exit 0) added a **head-copy control** (the same head binary run twice) and a second #970 arm per cycle. 1M listing gate: `cold_first_us=101 p50_us=60 p99_us=78`, pass. - **Joined-layout noise is large.** Two runs of the same head binary differ by up to +10.5% on `home.page_big` @100k, −15% on `home.page` @10k and −33% on `startup.healthz` @100k. Round 4a's "+16% page_big share" is inside that band; 4b measured +3.9% (p95 −3.2%). - **Pooling 4a+4b** (head n=20 vs #970 n=15, rank test) left a few small shares that are statistically real: `cold.index` @100k +2.5%, `cold.first_page` @100k +2.9%, `cold.disk_written` @100k +0.1% (p≤0.01), and `search.*` / `open.api_get.warm` @1k +2–6% (p≈0.03–0.08). `home.page_big` @100k +11% at p=0.08 is not established. **Round 5**, aimed at those shares: - `549871e17` **perf(files): Notes rows keep #970's table bytes.** #1010 had added `kind` and `scan_generation` columns to #970's shared `current_files`, so every Notes row carried two extra fields through every WAL rewrite. Those move to a Files-only `current_walk_rows(id, kind, seen)` (indexed by `(seen, id)` for the sweep); readers take kind from a `LEFT JOIN`. Notes puts, cold scans and deletes of Notes-owned rows never touch the side tables. The sweep now excludes exactly the rows Notes owns (SSD `Notes/*.md`), so a deleted non-Markdown file below `Notes/` is swept too. A draft database migrates once. - `5517ce595` **perf(notes): only requests and typing mark a Home busy.** `Home::index()` no longer marks activity: it was a CAS loop plus a clock read on every index call, including the cold scan's hot loop. `mark()` is now a relaxed load and a store at most every 5 ms. Gates on compute02 at `5517ce595`: | Gate | Result | |---|---| | `cargo fmt --all --check` | pass | | `cargo clippy -j4 --workspace --all-targets --locked -- -D warnings` | pass | | `cargo test -j4 --workspace --locked --no-fail-fast` | pass | | release build | pass | One first-run failure in an unrelated SyncClient durability test passed 10/10 on rerun; filed as #1049 (flaky rule, non-blocking). Round 5's ABAB (dev, head, #970, head-copy, #970, dev-copy, ×5) is queued on `perf-turn`. Status remains **#1010-share: cold flat within noise; small shares being re-measured**. Head vs dev stays red on what #970 alone costs, so #1010 can't be READY before #970 is ≤ dev.
Author
Owner

Perf round 5: #1010-share flat (head 5517ce595)

Session 2026-11-10 10:09–11:05Z (15:39–16:35 IST), boot 7a65f072 (same epoch as every earlier round). Plain perf-turn files-1010 (FIFO) took perf-01's lock, then the control host took perf-02's; both released at the end. Per cycle: dev d4b32af94 (legacy), head, #970 381ce6750 (an exact ancestor), head-copy, #970, dev-copy; ×5; 1k/10k/100k; --hot-only --gate; same seed-1 fixtures as rounds 4a/4b. All 30 arms exited 0.

1M listing gate: files_listing entries=1000000 page_size=50 cold_first_us=130 p50_us=69 p99_us=101. Pass (first page 0.13 ms ≤ 100 ms).

#1010 share (head vs #970), what round 5 targeted:

  • cold.index @100k +0.8% (pooled 4a/4b had +2.5%, p≤0.01), cold.disk_written @100k +0.0% (was +0.1%), cold.first_page @100k +3.6% (head-copy band −4.4%), home.page_big @100k −6.3%.
  • Rank test of every metric (head + head-copy n=10 vs #970 n=10, p50 and p95, ~120 comparisons): 13 have a worse median at p<0.1, about the ~12 chance alone predicts. They are scattered and none repeats the round-4 flags. Bimodal metrics explain the large ones: open.long_note @10k is ~16 ms or ~47 ms in every arm, dev included; search.query @100k swings +100% between dev and dev-copy.
  • startup.healthz: +0.4% / −1.9% / +0.7% share at 1k/10k/100k.

Head vs dev stays red only where #970 alone is red (cold.first_page @100k +107% vs #970 +100%; cold.index, cold.disk_written, home.page_big and open.note @100k track #970).

Status: #1010-share flat. Not READY: #1010 can only be READY once #970 is ≤ dev (its cold identity-load fix is in progress on the tiering lane). When that lands, I'll merge #970's head and re-run this ABAB.

Round 5 table (medians of per-arm p50/p95)

n arms: dev 5, head 5, head-copy 5, #970 10, dev-copy 5

size metric dev p50 head p50 head vs dev #970 vs dev #1010 share (head vs #970) control vs dev head-copy vs head head vs dev p95 #1010 share p95 head-copy vs head p95
1000 cold.disk_written (MB) 18.8 19 +1.4% +1.2% +0.2% +0.2% -0.1% +1.4% +0.2% -0.1%
1000 cold.first_page (ms) 408 437 +7.1% +8.5% -1.3% -4.9% +0.0% +7.1% -1.3% +0.0%
1000 cold.index (s) 0.51 0.539 +5.7% +6.8% -1.0% -3.9% +0.0% +5.7% -1.0% +0.0%
1000 cold.mem_peak (MB) 46.4 47.1 +1.5% +2.0% -0.5% -1.4% +1.8% +1.5% -0.5% +1.8%
1000 cold.notes_per_s (notes/s) 1.96e+03 1.86e+03 -5.4% -6.4% +1.0% +4.0% -0.0% -5.4% +1.0% -0.0%
1000 cold.startup (ms) 19.7 19.8 +0.5% +2.8% -2.2% +0.7% +0.8% +0.5% -2.2% +0.8%
1000 home.first_page (ms) 1.72 1.92 +11.3% +0.9% +10.3% -7.0% -5.8% +11.3% +10.3% -5.8%
1000 home.page (ms) 0.706 0.7 -0.8% +6.6% -7.0% -4.4% +3.8% -1.4% -14.6% -5.4%
1000 home.page_big (ms) 8.51 8.34 -1.9% +0.7% -2.6% -0.5% +4.0% -1.9% -2.6% +4.0%
1000 home.page_next (ms) 0.726 0.71 -2.2% -1.5% -0.7% -3.1% +1.3% -5.3% -3.2% +4.7%
1000 home.page_tag (ms) 1.23 1.22 -1.3% -0.6% -0.7% -0.4% +0.3% -6.3% -1.1% +5.9%
1000 home.page_title (ms) 0.594 0.577 -2.9% -1.4% -1.5% +1.6% -0.8% -3.2% +0.1% +5.2%
1000 mem.after_first_page (MB) 21.3 20.7 -2.8% -2.6% -0.2% -1.2% +0.0% -2.8% -0.2% +0.0%
1000 mem.after_opens (MB) 34.8 35.5 +2.1% +0.1% +2.0% +0.3% -1.3% +2.1% +2.0% -1.3%
1000 mem.after_search (MB) 47.5 48.2 +1.3% +0.7% +0.6% +1.0% +0.0% +1.3% +0.6% +0.0%
1000 mem.idle (MB) 18.5 18.9 +2.3% +1.6% +0.7% +1.2% -1.0% +2.3% +0.7% -1.0%
1000 notes.append (ms) 4.95 4.84 -2.3% -2.3% +0.0% -2.4% +0.8% +1.0% -1.1% +0.7%
1000 notes.append.first (ms) 24 15.6 -34.8% -3.5% -32.4% +0.4% +0.2% -34.8% -32.4% +0.2%
1000 open.api_get (ms) 7.48 7.3 -2.3% -2.6% +0.3% -1.5% -0.1% +8.0% +23.1% -2.5%
1000 open.api_get.warm (ms) 0.165 0.161 -2.4% -1.6% -0.8% -2.0% +1.7% +0.5% -0.7% +3.7%
1000 open.long_note (ms) 15 15.2 +1.5% -0.7% +2.2% -0.4% -0.5% +1.5% +2.2% -0.5%
1000 open.note (ms) 0.65 0.674 +3.8% -0.5% +4.3% +2.3% -0.3% -7.8% +0.1% +1.1%
1000 search.catch_up (s) 2 2 -0.0% +0.0% -0.0% +0.0% +0.0% -0.0% -0.0% +0.0%
1000 search.first_query (ms) 27.5 27.3 -0.8% -1.9% +1.1% +2.8% -2.6% -0.8% +1.1% -2.6%
1000 search.query (ms) 1.15 1.16 +1.3% +0.2% +1.1% -3.5% -0.2% +2.3% +5.2% +0.2%
1000 shutdown (ms) 21.9 43.1 +96.4% +96.0% +0.2% +95.1% -0.0% +96.4% +0.2% -0.0%
1000 startup.healthz (ms) 5.33 4.84 -9.1% -7.7% -1.5% -8.8% +0.9% -9.1% -1.5% +0.9%
1000 sync.durable_write (ms) 24.5 24.8 +0.9% +0.3% +0.6% -0.6% -1.3% +5.1% -1.3% -0.4%
1000 sync.round_trip (ms) 0.205 0.209 +1.8% +2.4% -0.5% +0.6% -2.1% -2.1% +0.7% -8.3%
1000 sync.save_ack (ms) 3.65 3.66 +0.2% +1.1% -0.9% -0.2% +0.3% -0.6% +3.7% -13.5%
10000 cold.disk_written (MB) 151 152 +1.1% +1.0% +0.0% -0.0% +0.2% +1.1% +0.0% +0.2%
10000 cold.first_page (ms) 323 463 +43.5% +43.6% -0.1% +3.9% +0.1% +43.5% -0.1% +0.1%
10000 cold.index (s) 1.48 1.62 +9.9% +9.6% +0.3% -0.4% -0.8% +9.9% +0.3% -0.8%
10000 cold.mem_peak (MB) 144 144 +0.4% +0.5% -0.1% -0.3% +0.7% +0.4% -0.1% +0.7%
10000 cold.notes_per_s (notes/s) 6.78e+03 6.17e+03 -9.0% -8.7% -0.3% +0.4% +0.8% -9.0% -0.3% +0.8%
10000 cold.startup (ms) 19.9 19.9 -0.1% +0.3% -0.4% +0.7% +0.0% -0.1% -0.4% +0.0%
10000 home.first_page (ms) 1.97 2.74 +39.5% +22.8% +13.6% +3.8% -1.7% +39.5% +13.6% -1.7%
10000 home.page (ms) 0.713 0.773 +8.4% +16.4% -6.9% +7.6% +5.1% +10.6% -19.3% +25.3%
10000 home.page_big (ms) 16.4 16.2 -1.1% -1.3% +0.2% +3.2% -1.6% +2.5% +4.2% -4.4%
10000 home.page_next (ms) 0.67 0.711 +6.1% +4.3% +1.7% +5.9% -0.5% +23.5% +3.8% -5.4%
10000 home.page_tag (ms) 5.2 5.22 +0.4% +5.6% -5.0% -0.8% +2.3% +1.5% -3.7% -3.0%
10000 home.page_title (ms) 0.652 0.709 +8.6% +7.6% +1.0% -0.6% +0.8% +15.3% -29.0% +9.3%
10000 mem.after_first_page (MB) 21.7 21.5 -1.0% -1.7% +0.7% -1.8% -0.8% -1.0% +0.7% -0.8%
10000 mem.after_opens (MB) 40.9 40.4 -1.2% -1.3% +0.1% -0.6% +2.2% -1.2% +0.1% +2.2%
10000 mem.after_search (MB) 75.3 75.7 +0.6% -0.2% +0.8% +0.8% -0.9% +0.6% +0.8% -0.9%
10000 mem.idle (MB) 19 18.7 -1.3% -0.4% -0.9% -1.8% -0.7% -1.3% -0.9% -0.7%
10000 notes.append (ms) 4.88 4.86 -0.4% -0.5% +0.1% -0.3% +1.2% +6.2% -3.7% +8.1%
10000 notes.append.first (ms) 47.7 23 -51.8% +6.4% -54.7% +0.5% +103.8% -51.8% -54.7% +103.8%
10000 open.api_get (ms) 7.48 7.29 -2.5% -1.2% -1.3% -2.5% +1.1% -4.9% -16.2% +18.7%
10000 open.api_get.warm (ms) 0.17 0.161 -5.7% -5.6% -0.1% -3.1% +2.3% -8.8% -7.4% +9.8%
10000 open.long_note (ms) 15.9 45.3 +185.5% +3.2% +176.6% +2.8% +1.3% +185.5% +176.6% +1.3%
10000 open.note (ms) 0.643 0.627 -2.6% -6.0% +3.6% -5.6% -3.7% +3.7% +3.3% -4.1%
10000 search.catch_up (s) 4.01 4.02 +0.2% +0.0% +0.1% -0.0% -0.1% +0.2% +0.1% -0.1%
10000 search.first_query (ms) 29.7 26.8 -9.6% -9.6% -0.0% -7.1% +1.5% -9.6% -0.0% +1.5%
10000 search.query (ms) 1.34 1.48 +10.2% -0.0% +10.3% +28.0% +16.6% +9.2% +32.9% -12.5%
10000 shutdown (ms) 43.1 43.1 +0.1% +0.1% +0.1% -0.1% -0.1% +0.1% +0.1% -0.1%
10000 startup.healthz (ms) 5.22 4.85 -7.1% -5.3% -1.8% -6.6% -0.2% -7.1% -1.8% -0.2%
10000 sync.durable_write (ms) 24.2 24.6 +1.8% +2.3% -0.4% +6.7% +0.0% -4.4% -7.1% +6.2%
10000 sync.round_trip (ms) 0.21 0.21 +0.0% +0.8% -0.8% -4.9% +3.8% -4.0% -3.5% +4.1%
10000 sync.save_ack (ms) 3.62 3.71 +2.4% +3.0% -0.6% +3.1% +1.4% +7.6% +0.9% +7.2%
100000 cold.disk_written (MB) 1.92e+03 2.06e+03 +7.4% +7.4% +0.0% -0.0% -0.0% +7.4% +0.0% -0.0%
100000 cold.first_page (ms) 2.08e+03 4.31e+03 +106.8% +99.7% +3.6% -3.2% -4.4% +106.8% +3.6% -4.4%
100000 cold.index (s) 15.4 17.6 +14.2% +13.3% +0.8% -0.8% -1.2% +14.2% +0.8% -1.2%
100000 cold.mem_peak (MB) 292 289 -1.0% -3.0% +2.0% +1.3% -0.2% -1.0% +2.0% -0.2%
100000 cold.notes_per_s (notes/s) 6.48e+03 5.68e+03 -12.4% -11.7% -0.8% +0.8% +1.2% -12.4% -0.8% +1.2%
100000 cold.startup (ms) 20 22.5 +12.7% +3.9% +8.6% +0.1% -10.7% +12.7% +8.6% -10.7%
100000 home.first_page (ms) 2.88 2.86 -0.6% +23.7% -19.6% +0.6% +5.4% -0.6% -19.6% +5.4%
100000 home.page (ms) 0.972 0.913 -6.1% -3.3% -2.9% +2.4% +5.1% -8.8% +8.7% -7.8%
100000 home.page_big (ms) 18.2 28.1 +54.6% +65.0% -6.3% -0.2% -4.9% +83.7% -9.4% -6.0%
100000 home.page_next (ms) 0.699 0.862 +23.3% +18.4% +4.2% +4.0% -0.3% -32.3% -3.1% +0.1%
100000 home.page_tag (ms) 51 51.7 +1.4% +2.8% -1.3% +2.2% -1.0% -2.2% -2.6% +0.8%
100000 home.page_title (ms) 0.869 0.825 -5.0% -8.0% +3.3% -10.7% -5.9% +8.5% +15.5% -16.4%
100000 mem.after_first_page (MB) 22.6 22.1 -2.1% -2.3% +0.3% +0.8% -0.9% -2.1% +0.3% -0.9%
100000 mem.after_opens (MB) 98.4 96.7 -1.8% -1.4% -0.3% -0.9% -1.5% -1.8% -0.3% -1.5%
100000 mem.after_search (MB) 99 97.5 -1.5% -4.3% +3.0% +2.5% -4.1% -1.5% +3.0% -4.1%
100000 mem.idle (MB) 19.7 18.9 -3.8% -3.3% -0.5% -4.1% -0.0% -3.8% -0.5% -0.0%
100000 notes.append (ms) 4.92 4.79 -2.7% +1.7% -4.3% -3.9% -0.4% -37.8% -39.0% +64.9%
100000 notes.append.first (ms) 1.29e+03 1.33e+03 +2.6% -9.2% +13.0% +4.5% +5.6% +2.6% +13.0% +5.6%
100000 open.api_get (ms) 7.36 7.52 +2.2% +2.0% +0.3% +2.4% +0.9% +93.8% -10.4% +1.6%
100000 open.api_get.warm (ms) 0.159 0.156 -1.6% +3.4% -4.9% +5.1% +7.7% +7.3% -2.5% +3.4%
100000 open.long_note (ms) 67.3 63.5 -5.6% -0.3% -5.3% -6.2% +4.9% -5.6% -5.3% +4.9%
100000 open.note (ms) 0.766 0.943 +23.0% +22.4% +0.5% +0.4% -4.0% +1.6% -19.0% +28.1%
100000 search.catch_up (s) 46.1 46.2 +0.1% -0.0% +0.2% +0.0% -0.1% +0.1% +0.2% -0.1%
100000 search.first_query (ms) 27 27.6 +2.2% -0.0% +2.2% +0.6% -1.8% +2.2% +2.2% -1.8%
100000 search.query (ms) 2.03 2.92 +43.6% -8.8% +57.4% +100.1% +39.2% -32.6% -28.8% +120.1%
100000 shutdown (ms) 84.4 85.4 +1.1% -23.8% +32.7% +1.0% -24.5% +1.1% +32.7% -24.5%
100000 startup.healthz (ms) 4.9 4.96 +1.3% +0.5% +0.7% -0.4% -0.3% +1.3% +0.7% -0.3%
100000 sync.durable_write (ms) 25.1 24.4 -2.9% -2.2% -0.8% -1.3% +0.4% -7.0% -10.1% +3.5%
100000 sync.round_trip (ms) 0.218 0.213 -2.1% +4.7% -6.5% +4.3% +7.3% -1.4% -0.2% -2.1%
100000 sync.save_ack (ms) 3.7 3.68 -0.5% -0.4% -0.2% -0.0% +0.5% -5.7% -0.8% +4.6%
## Perf round 5: #1010-share flat (head `5517ce595`) Session 2026-11-10 10:09–11:05Z (15:39–16:35 IST), boot `7a65f072` (same epoch as every earlier round). Plain `perf-turn files-1010` (FIFO) took perf-01's lock, then the control host took perf-02's; both released at the end. Per cycle: dev `d4b32af94` (legacy), head, #970 `381ce6750` (an exact ancestor), head-copy, #970, dev-copy; ×5; 1k/10k/100k; `--hot-only --gate`; same seed-1 fixtures as rounds 4a/4b. All 30 arms exited 0. **1M listing gate:** `files_listing entries=1000000 page_size=50 cold_first_us=130 p50_us=69 p99_us=101`. Pass (first page 0.13 ms ≤ 100 ms). **#1010 share (head vs #970), what round 5 targeted:** - `cold.index` @100k +0.8% (pooled 4a/4b had +2.5%, p≤0.01), `cold.disk_written` @100k +0.0% (was +0.1%), `cold.first_page` @100k +3.6% (head-copy band −4.4%), `home.page_big` @100k −6.3%. - **Rank test of every metric** (head + head-copy n=10 vs #970 n=10, p50 and p95, ~120 comparisons): 13 have a worse median at p<0.1, about the ~12 chance alone predicts. They are scattered and none repeats the round-4 flags. Bimodal metrics explain the large ones: `open.long_note` @10k is ~16 ms or ~47 ms in every arm, dev included; `search.query` @100k swings +100% between dev and dev-copy. - `startup.healthz`: +0.4% / −1.9% / +0.7% share at 1k/10k/100k. **Head vs dev** stays red only where #970 alone is red (`cold.first_page` @100k +107% vs #970 +100%; `cold.index`, `cold.disk_written`, `home.page_big` and `open.note` @100k track #970). **Status: #1010-share flat.** Not READY: #1010 can only be READY once #970 is ≤ dev (its cold identity-load fix is in progress on the tiering lane). When that lands, I'll merge #970's head and re-run this ABAB. ### Round 5 table (medians of per-arm p50/p95) n arms: dev 5, head 5, head-copy 5, #970 10, dev-copy 5 | size | metric | dev p50 | head p50 | head vs dev | #970 vs dev | **#1010 share** (head vs #970) | control vs dev | head-copy vs head | head vs dev p95 | #1010 share p95 | head-copy vs head p95 | |---|---|---|---|---|---|---|---|---|---|---|---| | 1000 | cold.disk_written (MB) | 18.8 | 19 | +1.4% | +1.2% | +0.2% | +0.2% | -0.1% | +1.4% | +0.2% | -0.1% | | 1000 | cold.first_page (ms) | 408 | 437 | +7.1% | +8.5% | -1.3% | -4.9% | +0.0% | +7.1% | -1.3% | +0.0% | | 1000 | cold.index (s) | 0.51 | 0.539 | +5.7% | +6.8% | -1.0% | -3.9% | +0.0% | +5.7% | -1.0% | +0.0% | | 1000 | cold.mem_peak (MB) | 46.4 | 47.1 | +1.5% | +2.0% | -0.5% | -1.4% | +1.8% | +1.5% | -0.5% | +1.8% | | 1000 | cold.notes_per_s (notes/s) | 1.96e+03 | 1.86e+03 | -5.4% | -6.4% | +1.0% | +4.0% | -0.0% | -5.4% | +1.0% | -0.0% | | 1000 | cold.startup (ms) | 19.7 | 19.8 | +0.5% | +2.8% | -2.2% | +0.7% | +0.8% | +0.5% | -2.2% | +0.8% | | 1000 | home.first_page (ms) | 1.72 | 1.92 | +11.3% | +0.9% | +10.3% | -7.0% | -5.8% | +11.3% | +10.3% | -5.8% | | 1000 | home.page (ms) | 0.706 | 0.7 | -0.8% | +6.6% | -7.0% | -4.4% | +3.8% | -1.4% | -14.6% | -5.4% | | 1000 | home.page_big (ms) | 8.51 | 8.34 | -1.9% | +0.7% | -2.6% | -0.5% | +4.0% | -1.9% | -2.6% | +4.0% | | 1000 | home.page_next (ms) | 0.726 | 0.71 | -2.2% | -1.5% | -0.7% | -3.1% | +1.3% | -5.3% | -3.2% | +4.7% | | 1000 | home.page_tag (ms) | 1.23 | 1.22 | -1.3% | -0.6% | -0.7% | -0.4% | +0.3% | -6.3% | -1.1% | +5.9% | | 1000 | home.page_title (ms) | 0.594 | 0.577 | -2.9% | -1.4% | -1.5% | +1.6% | -0.8% | -3.2% | +0.1% | +5.2% | | 1000 | mem.after_first_page (MB) | 21.3 | 20.7 | -2.8% | -2.6% | -0.2% | -1.2% | +0.0% | -2.8% | -0.2% | +0.0% | | 1000 | mem.after_opens (MB) | 34.8 | 35.5 | +2.1% | +0.1% | +2.0% | +0.3% | -1.3% | +2.1% | +2.0% | -1.3% | | 1000 | mem.after_search (MB) | 47.5 | 48.2 | +1.3% | +0.7% | +0.6% | +1.0% | +0.0% | +1.3% | +0.6% | +0.0% | | 1000 | mem.idle (MB) | 18.5 | 18.9 | +2.3% | +1.6% | +0.7% | +1.2% | -1.0% | +2.3% | +0.7% | -1.0% | | 1000 | notes.append (ms) | 4.95 | 4.84 | -2.3% | -2.3% | +0.0% | -2.4% | +0.8% | +1.0% | -1.1% | +0.7% | | 1000 | notes.append.first (ms) | 24 | 15.6 | -34.8% | -3.5% | -32.4% | +0.4% | +0.2% | -34.8% | -32.4% | +0.2% | | 1000 | open.api_get (ms) | 7.48 | 7.3 | -2.3% | -2.6% | +0.3% | -1.5% | -0.1% | +8.0% | +23.1% | -2.5% | | 1000 | open.api_get.warm (ms) | 0.165 | 0.161 | -2.4% | -1.6% | -0.8% | -2.0% | +1.7% | +0.5% | -0.7% | +3.7% | | 1000 | open.long_note (ms) | 15 | 15.2 | +1.5% | -0.7% | +2.2% | -0.4% | -0.5% | +1.5% | +2.2% | -0.5% | | 1000 | open.note (ms) | 0.65 | 0.674 | +3.8% | -0.5% | +4.3% | +2.3% | -0.3% | -7.8% | +0.1% | +1.1% | | 1000 | search.catch_up (s) | 2 | 2 | -0.0% | +0.0% | -0.0% | +0.0% | +0.0% | -0.0% | -0.0% | +0.0% | | 1000 | search.first_query (ms) | 27.5 | 27.3 | -0.8% | -1.9% | +1.1% | +2.8% | -2.6% | -0.8% | +1.1% | -2.6% | | 1000 | search.query (ms) | 1.15 | 1.16 | +1.3% | +0.2% | +1.1% | -3.5% | -0.2% | +2.3% | +5.2% | +0.2% | | 1000 | shutdown (ms) | 21.9 | 43.1 | +96.4% | +96.0% | +0.2% | +95.1% | -0.0% | +96.4% | +0.2% | -0.0% | | 1000 | startup.healthz (ms) | 5.33 | 4.84 | -9.1% | -7.7% | -1.5% | -8.8% | +0.9% | -9.1% | -1.5% | +0.9% | | 1000 | sync.durable_write (ms) | 24.5 | 24.8 | +0.9% | +0.3% | +0.6% | -0.6% | -1.3% | +5.1% | -1.3% | -0.4% | | 1000 | sync.round_trip (ms) | 0.205 | 0.209 | +1.8% | +2.4% | -0.5% | +0.6% | -2.1% | -2.1% | +0.7% | -8.3% | | 1000 | sync.save_ack (ms) | 3.65 | 3.66 | +0.2% | +1.1% | -0.9% | -0.2% | +0.3% | -0.6% | +3.7% | -13.5% | | 10000 | cold.disk_written (MB) | 151 | 152 | +1.1% | +1.0% | +0.0% | -0.0% | +0.2% | +1.1% | +0.0% | +0.2% | | 10000 | cold.first_page (ms) | 323 | 463 | +43.5% | +43.6% | -0.1% | +3.9% | +0.1% | +43.5% | -0.1% | +0.1% | | 10000 | cold.index (s) | 1.48 | 1.62 | +9.9% | +9.6% | +0.3% | -0.4% | -0.8% | +9.9% | +0.3% | -0.8% | | 10000 | cold.mem_peak (MB) | 144 | 144 | +0.4% | +0.5% | -0.1% | -0.3% | +0.7% | +0.4% | -0.1% | +0.7% | | 10000 | cold.notes_per_s (notes/s) | 6.78e+03 | 6.17e+03 | -9.0% | -8.7% | -0.3% | +0.4% | +0.8% | -9.0% | -0.3% | +0.8% | | 10000 | cold.startup (ms) | 19.9 | 19.9 | -0.1% | +0.3% | -0.4% | +0.7% | +0.0% | -0.1% | -0.4% | +0.0% | | 10000 | home.first_page (ms) | 1.97 | 2.74 | +39.5% | +22.8% | +13.6% | +3.8% | -1.7% | +39.5% | +13.6% | -1.7% | | 10000 | home.page (ms) | 0.713 | 0.773 | +8.4% | +16.4% | -6.9% | +7.6% | +5.1% | +10.6% | -19.3% | +25.3% | | 10000 | home.page_big (ms) | 16.4 | 16.2 | -1.1% | -1.3% | +0.2% | +3.2% | -1.6% | +2.5% | +4.2% | -4.4% | | 10000 | home.page_next (ms) | 0.67 | 0.711 | +6.1% | +4.3% | +1.7% | +5.9% | -0.5% | +23.5% | +3.8% | -5.4% | | 10000 | home.page_tag (ms) | 5.2 | 5.22 | +0.4% | +5.6% | -5.0% | -0.8% | +2.3% | +1.5% | -3.7% | -3.0% | | 10000 | home.page_title (ms) | 0.652 | 0.709 | +8.6% | +7.6% | +1.0% | -0.6% | +0.8% | +15.3% | -29.0% | +9.3% | | 10000 | mem.after_first_page (MB) | 21.7 | 21.5 | -1.0% | -1.7% | +0.7% | -1.8% | -0.8% | -1.0% | +0.7% | -0.8% | | 10000 | mem.after_opens (MB) | 40.9 | 40.4 | -1.2% | -1.3% | +0.1% | -0.6% | +2.2% | -1.2% | +0.1% | +2.2% | | 10000 | mem.after_search (MB) | 75.3 | 75.7 | +0.6% | -0.2% | +0.8% | +0.8% | -0.9% | +0.6% | +0.8% | -0.9% | | 10000 | mem.idle (MB) | 19 | 18.7 | -1.3% | -0.4% | -0.9% | -1.8% | -0.7% | -1.3% | -0.9% | -0.7% | | 10000 | notes.append (ms) | 4.88 | 4.86 | -0.4% | -0.5% | +0.1% | -0.3% | +1.2% | +6.2% | -3.7% | +8.1% | | 10000 | notes.append.first (ms) | 47.7 | 23 | -51.8% | +6.4% | -54.7% | +0.5% | +103.8% | -51.8% | -54.7% | +103.8% | | 10000 | open.api_get (ms) | 7.48 | 7.29 | -2.5% | -1.2% | -1.3% | -2.5% | +1.1% | -4.9% | -16.2% | +18.7% | | 10000 | open.api_get.warm (ms) | 0.17 | 0.161 | -5.7% | -5.6% | -0.1% | -3.1% | +2.3% | -8.8% | -7.4% | +9.8% | | 10000 | open.long_note (ms) | 15.9 | 45.3 | +185.5% | +3.2% | +176.6% | +2.8% | +1.3% | +185.5% | +176.6% | +1.3% | | 10000 | open.note (ms) | 0.643 | 0.627 | -2.6% | -6.0% | +3.6% | -5.6% | -3.7% | +3.7% | +3.3% | -4.1% | | 10000 | search.catch_up (s) | 4.01 | 4.02 | +0.2% | +0.0% | +0.1% | -0.0% | -0.1% | +0.2% | +0.1% | -0.1% | | 10000 | search.first_query (ms) | 29.7 | 26.8 | -9.6% | -9.6% | -0.0% | -7.1% | +1.5% | -9.6% | -0.0% | +1.5% | | 10000 | search.query (ms) | 1.34 | 1.48 | +10.2% | -0.0% | +10.3% | +28.0% | +16.6% | +9.2% | +32.9% | -12.5% | | 10000 | shutdown (ms) | 43.1 | 43.1 | +0.1% | +0.1% | +0.1% | -0.1% | -0.1% | +0.1% | +0.1% | -0.1% | | 10000 | startup.healthz (ms) | 5.22 | 4.85 | -7.1% | -5.3% | -1.8% | -6.6% | -0.2% | -7.1% | -1.8% | -0.2% | | 10000 | sync.durable_write (ms) | 24.2 | 24.6 | +1.8% | +2.3% | -0.4% | +6.7% | +0.0% | -4.4% | -7.1% | +6.2% | | 10000 | sync.round_trip (ms) | 0.21 | 0.21 | +0.0% | +0.8% | -0.8% | -4.9% | +3.8% | -4.0% | -3.5% | +4.1% | | 10000 | sync.save_ack (ms) | 3.62 | 3.71 | +2.4% | +3.0% | -0.6% | +3.1% | +1.4% | +7.6% | +0.9% | +7.2% | | 100000 | cold.disk_written (MB) | 1.92e+03 | 2.06e+03 | +7.4% | +7.4% | +0.0% | -0.0% | -0.0% | +7.4% | +0.0% | -0.0% | | 100000 | cold.first_page (ms) | 2.08e+03 | 4.31e+03 | +106.8% | +99.7% | +3.6% | -3.2% | -4.4% | +106.8% | +3.6% | -4.4% | | 100000 | cold.index (s) | 15.4 | 17.6 | +14.2% | +13.3% | +0.8% | -0.8% | -1.2% | +14.2% | +0.8% | -1.2% | | 100000 | cold.mem_peak (MB) | 292 | 289 | -1.0% | -3.0% | +2.0% | +1.3% | -0.2% | -1.0% | +2.0% | -0.2% | | 100000 | cold.notes_per_s (notes/s) | 6.48e+03 | 5.68e+03 | -12.4% | -11.7% | -0.8% | +0.8% | +1.2% | -12.4% | -0.8% | +1.2% | | 100000 | cold.startup (ms) | 20 | 22.5 | +12.7% | +3.9% | +8.6% | +0.1% | -10.7% | +12.7% | +8.6% | -10.7% | | 100000 | home.first_page (ms) | 2.88 | 2.86 | -0.6% | +23.7% | -19.6% | +0.6% | +5.4% | -0.6% | -19.6% | +5.4% | | 100000 | home.page (ms) | 0.972 | 0.913 | -6.1% | -3.3% | -2.9% | +2.4% | +5.1% | -8.8% | +8.7% | -7.8% | | 100000 | home.page_big (ms) | 18.2 | 28.1 | +54.6% | +65.0% | -6.3% | -0.2% | -4.9% | +83.7% | -9.4% | -6.0% | | 100000 | home.page_next (ms) | 0.699 | 0.862 | +23.3% | +18.4% | +4.2% | +4.0% | -0.3% | -32.3% | -3.1% | +0.1% | | 100000 | home.page_tag (ms) | 51 | 51.7 | +1.4% | +2.8% | -1.3% | +2.2% | -1.0% | -2.2% | -2.6% | +0.8% | | 100000 | home.page_title (ms) | 0.869 | 0.825 | -5.0% | -8.0% | +3.3% | -10.7% | -5.9% | +8.5% | +15.5% | -16.4% | | 100000 | mem.after_first_page (MB) | 22.6 | 22.1 | -2.1% | -2.3% | +0.3% | +0.8% | -0.9% | -2.1% | +0.3% | -0.9% | | 100000 | mem.after_opens (MB) | 98.4 | 96.7 | -1.8% | -1.4% | -0.3% | -0.9% | -1.5% | -1.8% | -0.3% | -1.5% | | 100000 | mem.after_search (MB) | 99 | 97.5 | -1.5% | -4.3% | +3.0% | +2.5% | -4.1% | -1.5% | +3.0% | -4.1% | | 100000 | mem.idle (MB) | 19.7 | 18.9 | -3.8% | -3.3% | -0.5% | -4.1% | -0.0% | -3.8% | -0.5% | -0.0% | | 100000 | notes.append (ms) | 4.92 | 4.79 | -2.7% | +1.7% | -4.3% | -3.9% | -0.4% | -37.8% | -39.0% | +64.9% | | 100000 | notes.append.first (ms) | 1.29e+03 | 1.33e+03 | +2.6% | -9.2% | +13.0% | +4.5% | +5.6% | +2.6% | +13.0% | +5.6% | | 100000 | open.api_get (ms) | 7.36 | 7.52 | +2.2% | +2.0% | +0.3% | +2.4% | +0.9% | +93.8% | -10.4% | +1.6% | | 100000 | open.api_get.warm (ms) | 0.159 | 0.156 | -1.6% | +3.4% | -4.9% | +5.1% | +7.7% | +7.3% | -2.5% | +3.4% | | 100000 | open.long_note (ms) | 67.3 | 63.5 | -5.6% | -0.3% | -5.3% | -6.2% | +4.9% | -5.6% | -5.3% | +4.9% | | 100000 | open.note (ms) | 0.766 | 0.943 | +23.0% | +22.4% | +0.5% | +0.4% | -4.0% | +1.6% | -19.0% | +28.1% | | 100000 | search.catch_up (s) | 46.1 | 46.2 | +0.1% | -0.0% | +0.2% | +0.0% | -0.1% | +0.1% | +0.2% | -0.1% | | 100000 | search.first_query (ms) | 27 | 27.6 | +2.2% | -0.0% | +2.2% | +0.6% | -1.8% | +2.2% | +2.2% | -1.8% | | 100000 | search.query (ms) | 2.03 | 2.92 | +43.6% | -8.8% | +57.4% | +100.1% | +39.2% | -32.6% | -28.8% | +120.1% | | 100000 | shutdown (ms) | 84.4 | 85.4 | +1.1% | -23.8% | +32.7% | +1.0% | -24.5% | +1.1% | +32.7% | -24.5% | | 100000 | startup.healthz (ms) | 4.9 | 4.96 | +1.3% | +0.5% | +0.7% | -0.4% | -0.3% | +1.3% | +0.7% | -0.3% | | 100000 | sync.durable_write (ms) | 25.1 | 24.4 | -2.9% | -2.2% | -0.8% | -1.3% | +0.4% | -7.0% | -10.1% | +3.5% | | 100000 | sync.round_trip (ms) | 0.218 | 0.213 | -2.1% | +4.7% | -6.5% | +4.3% | +7.3% | -1.4% | -0.2% | -2.1% | | 100000 | sync.save_ack (ms) | 3.7 | 3.68 | -0.5% | -0.4% | -0.2% | -0.0% | +0.5% | -5.7% | -0.8% | +4.6% |
Author
Owner

Dev port plan

I read the landed v4 plan on #1069. It selects the existing dev identity records and list/search indexes; it explicitly drops the v3 files/current.db projection, its backfill, and request-path reconciliation.

The current #1010 head is based on #970 through merge 018a90d00 and imports calternal-files::Namespace / current.db into Notes. I am mapping the minimal Home identity and reconcile behavior onto dev's existing identity path, excluding the v3 namespace and database. The result will keep the Home behavior compatible with a later optional location bit in the existing identity record. I will post the final gates and perf table here if they pass; otherwise I will report the first exact failing metric or gate.

## Dev port plan I read the landed v4 plan on #1069. It selects the existing dev identity records and list/search indexes; it explicitly drops the v3 `files/current.db` projection, its backfill, and request-path reconciliation. The current #1010 head is based on #970 through merge `018a90d00` and imports `calternal-files::Namespace` / `current.db` into Notes. I am mapping the minimal Home identity and reconcile behavior onto dev's existing identity path, excluding the v3 namespace and database. The result will keep the Home behavior compatible with a later optional location bit in the existing identity record. I will post the final gates and perf table here if they pass; otherwise I will report the first exact failing metric or gate.
Author
Owner

Dev-native implementation plan

Scope: extend the existing notes/ids.jsonl reader/writer and in-memory ID/path map with Home-scoped file/folder rows, then port the root validation and bounded reconcile behavior. Legacy records remain Notes-relative and keep their current serialized form. New Home records carry a scope, kind, and optional hdd location bit, so the v4 lane can add root selection without a second identity log. No files/current.db, v3 namespace projection, startup database/backfill, or Notes-row side tables.

Cost: log recovery stays one O(N + L) pass; identity lookup/update stays expected O(1), with append-only writes. A full Files reconcile is O(N) in bounded background batches and removes stale IDs only after a complete walk. No Files walk holds the Notes index lock over filesystem I/O or runs on a request path.

Failure Effect Detection Recovery Test
Missing or mismatched Home root Joined listing may be incomplete Validate all configured roots before serving or reconciling Fail closed; restore the matching root and rescan Hide/swap each root, then restore and compare IDs
Malformed or duplicate marker Two paths may claim one ID Compare marker with the durable path mapping Preserve bytes, keep the established identity, write a fresh marker for the copy Copy/corrupt/remove markers across restart
Watcher overflow or partial coverage Outside changes may be missed Watch error/overflow marks the view incomplete Queue a full bounded rescan Inject overflow and failed watch installation
Crash during a walk or torn log tail The index may lag the trees Walk completion is not published; log reader skips a torn final record Re-run idempotent scan; delete stale rows only after full completion Crash between pages and repeat startup

Gates: fmt, clippy -D warnings, workspace tests, release build, Files e2e coverage, identity/move crash cases, and cold/warm ABAB ×5 at 1k/10k/100k with dev-copy control bounds. Every measured metric must be at or below its dev-copy bound.

## Dev-native implementation plan **Scope:** extend the existing `notes/ids.jsonl` reader/writer and in-memory ID/path map with Home-scoped file/folder rows, then port the root validation and bounded reconcile behavior. Legacy records remain Notes-relative and keep their current serialized form. New Home records carry a scope, kind, and optional `hdd` location bit, so the v4 lane can add root selection without a second identity log. No `files/current.db`, v3 namespace projection, startup database/backfill, or Notes-row side tables. **Cost:** log recovery stays one O(N + L) pass; identity lookup/update stays expected O(1), with append-only writes. A full Files reconcile is O(N) in bounded background batches and removes stale IDs only after a complete walk. No Files walk holds the Notes index lock over filesystem I/O or runs on a request path. | Failure | Effect | Detection | Recovery | Test | |---|---|---|---|---| | Missing or mismatched Home root | Joined listing may be incomplete | Validate all configured roots before serving or reconciling | Fail closed; restore the matching root and rescan | Hide/swap each root, then restore and compare IDs | | Malformed or duplicate marker | Two paths may claim one ID | Compare marker with the durable path mapping | Preserve bytes, keep the established identity, write a fresh marker for the copy | Copy/corrupt/remove markers across restart | | Watcher overflow or partial coverage | Outside changes may be missed | Watch error/overflow marks the view incomplete | Queue a full bounded rescan | Inject overflow and failed watch installation | | Crash during a walk or torn log tail | The index may lag the trees | Walk completion is not published; log reader skips a torn final record | Re-run idempotent scan; delete stale rows only after full completion | Crash between pages and repeat startup | **Gates:** fmt, clippy `-D warnings`, workspace tests, release build, Files e2e coverage, identity/move crash cases, and cold/warm ABAB ×5 at 1k/10k/100k with dev-copy control bounds. Every measured metric must be at or below its dev-copy bound.
Author
Owner

Dev-based port status: feat/files-s1-dev-v4 is pushed at 4ff4df48677b87d7074e307a562ac9c7f2790bc6, based directly on dev 437f9ec8923b3d380506f48a77eb11493ef66fb0. The worktree is clean and the diff has no whitespace errors.

The dev-01 gate run is active. fmt passed; clippy is waiting for a shared build slot. I have not started the perf turn or taken either perf lock. I will post the full gate/perf table here and mark READY only if every requested gate passes and every perf metric is within the dev-copy bound.

Dev-based port status: `feat/files-s1-dev-v4` is pushed at `4ff4df48677b87d7074e307a562ac9c7f2790bc6`, based directly on `dev` `437f9ec8923b3d380506f48a77eb11493ef66fb0`. The worktree is clean and the diff has no whitespace errors. The dev-01 gate run is active. `fmt` passed; clippy is waiting for a shared build slot. I have not started the perf turn or taken either perf lock. I will post the full gate/perf table here and mark READY only if every requested gate passes and every perf metric is within the dev-copy bound.
Author
Owner

Dev-port gate result: not READY

The pushed dev-based candidate is feat/files-s1-dev-v4 at 4ff4df48677b87d7074e307a562ac9c7f2790bc6 (base dev 437f9ec8923b3d380506f48a77eb11493ef66fb0).

Gate Result
cargo fmt --all -- --check pass
Home identity tests (cargo test -p calternal-notes --lib tests::home_files:: --locked -j4) pass, 4 tests
cargo clippy --workspace --all-targets --locked -j4 -- -D warnings fail, 3 lints below

Clippy failures:

  • crates/notes/src/home_files/identity.rs:76: clippy::too_many_arguments, file_id has 9 arguments (limit 7).
  • crates/notes/src/home_files/scan.rs:151: clippy::manual_is_multiple_of; replace state.visited % PAGE_SIZE == 0 with state.visited.is_multiple_of(PAGE_SIZE).
  • crates/notes/src/index.rs:474: clippy::too_many_arguments, set_home has 11 arguments (limit 7).

These are clippy diagnostics promoted to errors by -D warnings. I stopped the runner at this first failed gate as requested. The interrupted-scan crash test, notes_crash, workspace tests, release build, Files e2e specs, and perf ABAB were not completed; I took no perf locks and did not open a replacement PR. No READY.

## Dev-port gate result: not READY The pushed dev-based candidate is `feat/files-s1-dev-v4` at `4ff4df48677b87d7074e307a562ac9c7f2790bc6` (base `dev` `437f9ec8923b3d380506f48a77eb11493ef66fb0`). | Gate | Result | |---|---| | `cargo fmt --all -- --check` | pass | | Home identity tests (`cargo test -p calternal-notes --lib tests::home_files:: --locked -j4`) | pass, 4 tests | | `cargo clippy --workspace --all-targets --locked -j4 -- -D warnings` | **fail**, 3 lints below | Clippy failures: - `crates/notes/src/home_files/identity.rs:76`: `clippy::too_many_arguments`, `file_id` has 9 arguments (limit 7). - `crates/notes/src/home_files/scan.rs:151`: `clippy::manual_is_multiple_of`; replace `state.visited % PAGE_SIZE == 0` with `state.visited.is_multiple_of(PAGE_SIZE)`. - `crates/notes/src/index.rs:474`: `clippy::too_many_arguments`, `set_home` has 11 arguments (limit 7). These are clippy diagnostics promoted to errors by `-D warnings`. I stopped the runner at this first failed gate as requested. The interrupted-scan crash test, `notes_crash`, workspace tests, release build, Files e2e specs, and perf ABAB were not completed; I took no perf locks and did not open a replacement PR. No READY.
Author
Owner

Tier-neutral identity correction (head a8770c1ab)

I read the updated v5 proposal on #1069. It explicitly keeps tier/location out of identity records and per-row state, so this Files port no longer carries the earlier optional hdd bit.

The Home log, in-memory Home row, and scan rows now contain no tier field; the existing legacy Notes row encoding remains unchanged. A regression check verifies serialized Home rows contain no hdd key. Dev-01 lint, crash, workspace, release, and Files e2e gates are next; no perf locks are held.

## Tier-neutral identity correction (head a8770c1ab) I read the updated v5 proposal on #1069. It explicitly keeps tier/location out of identity records and per-row state, so this Files port no longer carries the earlier optional hdd bit. The Home log, in-memory Home row, and scan rows now contain no tier field; the existing legacy Notes row encoding remains unchanged. A regression check verifies serialized Home rows contain no hdd key. Dev-01 lint, crash, workspace, release, and Files e2e gates are next; no perf locks are held.
Author
Owner

Workspace gate failure at head 4920ab0b5

The completed first full workspace run reported 576 passed, 6 failed, 6 ignored. Five failures were in existing metadata-retry tests waiting for the Home to release its databases; the sixth was the outside-move lookup timing out. The retry failures are consistent with the new idle Home Files scan loop holding a strong Home reference while it waits, forming a cycle with Home's own background task set.

I added a focused owner-drop regression test at 4920ab0b5 and queued its RED run on dev-01. I am fixing the task ownership at its source, then will rerun the final-head gates. Not READY.

## Workspace gate failure at head 4920ab0b5 The completed first full workspace run reported 576 passed, 6 failed, 6 ignored. Five failures were in existing metadata-retry tests waiting for the Home to release its databases; the sixth was the outside-move lookup timing out. The retry failures are consistent with the new idle Home Files scan loop holding a strong Home reference while it waits, forming a cycle with Home's own background task set. I added a focused owner-drop regression test at 4920ab0b5 and queued its RED run on dev-01. I am fixing the task ownership at its source, then will rerun the final-head gates. Not READY.
Author
Owner

Home scan ownership fix pushed (head 3a1c144ba)

The Files scan task now holds a Weak while waiting on the shared reconcile notification and upgrades only for an active scan. This removes the self-reference between Home's background task set and its idle scanner. The focused regression remains queued on dev-01 against the prior 4920ab0b5 head, so verification is still pending.

## Home scan ownership fix pushed (head 3a1c144ba) The Files scan task now holds a Weak<Home> while waiting on the shared reconcile notification and upgrades only for an active scan. This removes the self-reference between Home's background task set and its idle scanner. The focused regression remains queued on dev-01 against the prior 4920ab0b5 head, so verification is still pending.
Author
Owner

Final-head gate progress (3a1c144ba)

On dev-01, cargo fmt --all -- --check and cargo clippy --workspace --all-targets --locked -j4 -- -D warnings pass. The interrupted Home-scan recovery test and storage_crash::kill9_after_ack_during_split_hdd_save_recovers_exact_text also pass. The focused idle scanner owner-drop regression passes.

The previously failing tests::missing::a_move_outside_is_found_and_relink_repoints_the_links reproduces alone on this head and times out waiting for Moved after 5 seconds. I am checking the same case on a dev control and tracing the root-watcher route before changing code. Workspace tests, release, Files e2e, and perf are pending; no perf turn or lock has been taken. Not READY.

## Final-head gate progress (3a1c144ba) On dev-01, `cargo fmt --all -- --check` and `cargo clippy --workspace --all-targets --locked -j4 -- -D warnings` pass. The interrupted Home-scan recovery test and `storage_crash::kill9_after_ack_during_split_hdd_save_recovers_exact_text` also pass. The focused idle scanner owner-drop regression passes. The previously failing `tests::missing::a_move_outside_is_found_and_relink_repoints_the_links` reproduces alone on this head and times out waiting for `Moved` after 5 seconds. I am checking the same case on a dev control and tracing the root-watcher route before changing code. Workspace tests, release, Files e2e, and perf are pending; no perf turn or lock has been taken. Not READY.
Author
Owner

Outside-move fix queued (candidate 6ed3a765a)

The standalone outside-move test failed at 9b81a4cd4, waiting for Moved after 5 seconds. The root watcher routes a new folder under Notes/ only to the Home Files scan; the Notes reconciler receives Markdown paths but not that directory. A move into a just-created folder can therefore miss its destination event while recursive watch installation catches up.

The existing Notes reconciler already walks a changed directory, so 6ed3a765a routes a newly created Notes folder through that path while retaining the Home Files reconcile. Targeted red/green verification is queued on dev-01, together with the clean dev control test. The perf p99 regression test is also queued red at 9b81a4cd4; no perf turn or lock has been taken. Not READY.

## Outside-move fix queued (candidate `6ed3a765a`) The standalone outside-move test failed at `9b81a4cd4`, waiting for `Moved` after 5 seconds. The root watcher routes a new folder under `Notes/` only to the Home Files scan; the Notes reconciler receives Markdown paths but not that directory. A move into a just-created folder can therefore miss its destination event while recursive watch installation catches up. The existing Notes reconciler already walks a changed directory, so `6ed3a765a` routes a newly created Notes folder through that path while retaining the Home Files reconcile. Targeted red/green verification is queued on dev-01, together with the clean dev control test. The perf p99 regression test is also queued red at `9b81a4cd4`; no perf turn or lock has been taken. Not READY.
Author
Owner

Queue status (2026-11-11 16:15Z)

The dev-01 train is still active. The expected-red p99 summary test and dev-control outside-move test remain queued through ~/bin/slot; neither has produced test output yet. I am preserving their queue position and continuing with the remaining preparation. This candidate is not READY.

## Queue status (2026-11-11 16:15Z) The dev-01 train is still active. The expected-red p99 summary test and dev-control outside-move test remain queued through `~/bin/slot`; neither has produced test output yet. I am preserving their queue position and continuing with the remaining preparation. This candidate is not READY.
Author
Owner

Queue follow-up (2026-11-11 16:42Z)

The dev-01 train remains active. The expected-red p99 summary test, expected-red --hot-only parser test, and dev-control outside-move test are still waiting through ~/bin/slot; no test output has started beyond Nix setup warnings. Candidate feat/files-s1-dev-v4 is at ec015478d and is not READY.

## Queue follow-up (2026-11-11 16:42Z) The dev-01 train remains active. The expected-red p99 summary test, expected-red `--hot-only` parser test, and dev-control outside-move test are still waiting through `~/bin/slot`; no test output has started beyond Nix setup warnings. Candidate `feat/files-s1-dev-v4` is at `ec015478d` and is not READY.
Author
Owner

p99 reporting fix (candidate a30929b09)

The queued expected-red run on 9b81a4cd4 failed at stats::tests::medians_of_runs_and_pooled_singles: serialized p99 was None, expected Some(101.0). I added p99 to Summary JSON and the Markdown report in a30929b09. The green rerun is pending; the separate --hot-only expected-red run still uses the ec015478d worktree. Not READY.

## p99 reporting fix (candidate `a30929b09`) The queued expected-red run on `9b81a4cd4` failed at `stats::tests::medians_of_runs_and_pooled_singles`: serialized `p99` was `None`, expected `Some(101.0)`. I added p99 to `Summary` JSON and the Markdown report in `a30929b09`. The green rerun is pending; the separate `--hot-only` expected-red run still uses the `ec015478d` worktree. Not READY.
Author
Owner

Dev-native continuation (candidate head 492aca339)

feat/files-s1-dev-v4 is based directly on dev 437f9ec89. The port does not need #970's files/current.db or namespace projection: it extends dev's Notes identity and index structures with Home-scoped rows and bounded reconciliation. The identity record stays tier-neutral, matching #1069; a later lane can add its location bit without coupling this slice to tiering.

The reported clippy cases are addressed by grouping file metadata into the existing scan entry, passing a Home row to set_home, and using .is_multiple_of(); no lint allowance was added for them. The focused perf mode and p99 output are pushed for the requested cold/warm measurements.

Final-head gates are being rerun on dev-01 at 492aca339. This candidate is not READY until the crash/workspace/release/e2e gates and the dev-copy-bounded perf matrix are complete.

## Dev-native continuation (candidate head `492aca339`) `feat/files-s1-dev-v4` is based directly on dev `437f9ec89`. The port does not need #970's `files/current.db` or namespace projection: it extends dev's Notes identity and index structures with Home-scoped rows and bounded reconciliation. The identity record stays tier-neutral, matching #1069; a later lane can add its location bit without coupling this slice to tiering. The reported clippy cases are addressed by grouping file metadata into the existing scan entry, passing a Home row to `set_home`, and using `.is_multiple_of()`; no lint allowance was added for them. The focused perf mode and p99 output are pushed for the requested cold/warm measurements. Final-head gates are being rerun on dev-01 at `492aca339`. This candidate is not READY until the crash/workspace/release/e2e gates and the dev-copy-bounded perf matrix are complete.
Author
Owner

Final-head Rust gates (candidate 492aca339)

All Rust gates passed on dev-01 at this exact head:

Gate Command/result
fmt cargo fmt --all -- --check — pass
clippy cargo clippy --workspace --all-targets --locked -j4 -- -D warnings — pass
Perf harness unit tests cargo test --locked -j4 -p calternal-perf --bin calternal-perf -- --test-threads=1 — 8 passed
Files identity/reconcile cargo test --locked -j4 -p calternal-notes --lib tests::home_files:: -- --test-threads=1 — 5 passed
Notes kill/replay crash tests — 7 passed
storage SIGKILL recovery — 1 passed
capture/undo journal SIGKILL — 1 passed
Workspace cargo test --workspace --locked -j4 --no-fail-fast -- --test-threads=2 — 128 test binaries, 1,742 passed, 22 ignored, 0 failed
Release server cargo build --release --locked -j4 --bin calternal — pass; SHA-256 5623dd637980aa550c3d10e21b805ccd06b68afe6f16eb8992585462485ac4ce

The four-project Files Playwright gate and perf ABAB with dev-copy controls are still pending. This is not READY yet.

## Final-head Rust gates (candidate `492aca339`) All Rust gates passed on dev-01 at this exact head: | Gate | Command/result | |---|---| | fmt | `cargo fmt --all -- --check` — pass | | clippy | `cargo clippy --workspace --all-targets --locked -j4 -- -D warnings` — pass | | Perf harness unit tests | `cargo test --locked -j4 -p calternal-perf --bin calternal-perf -- --test-threads=1` — 8 passed | | Files identity/reconcile | `cargo test --locked -j4 -p calternal-notes --lib tests::home_files:: -- --test-threads=1` — 5 passed | | Notes kill/replay crash tests | — 7 passed | | storage SIGKILL recovery | — 1 passed | | capture/undo journal SIGKILL | — 1 passed | | Workspace | `cargo test --workspace --locked -j4 --no-fail-fast -- --test-threads=2` — 128 test binaries, 1,742 passed, 22 ignored, 0 failed | | Release server | `cargo build --release --locked -j4 --bin calternal` — pass; SHA-256 `5623dd637980aa550c3d10e21b805ccd06b68afe6f16eb8992585462485ac4ce` | The four-project Files Playwright gate and perf ABAB with dev-copy controls are still pending. This is not READY yet.
Author
Owner

Final-head verification progress (candidate cde28967)

The candidate is directly based on dev 1a14e9f10f9776c0002e3be8a38bcf77670537f5. It uses dev's Notes identity/index structures with Home rows and quiet reconciliation; it contains no current.db, namespace projection, tier bit, or split-root dependency. I also read the current tiering plan issue (#1069); this Files slice remains independent of its v5 work.

Fresh dev-01 results at cde28967ffbcd9d95d2aeaa3b85d2eeac570346c:

  • fmt and clippy -D warnings: pass
  • perf harness tests: 8 passed
  • Files identity/reconcile: 5 passed
  • crash filters: 7 + 1 + 1 passed
  • workspace: 128 test binaries, 1,742 passed, 22 ignored, 0 failed
  • debug calternal build and release calternal + calternal-perf build: pass

Files Playwright specs across all four projects and the perf ABAB ×5 remain pending. This candidate is not READY yet.

## Final-head verification progress (candidate `cde28967`) The candidate is directly based on dev `1a14e9f10f9776c0002e3be8a38bcf77670537f5`. It uses dev's Notes identity/index structures with Home rows and quiet reconciliation; it contains no `current.db`, namespace projection, tier bit, or split-root dependency. I also read the current tiering plan issue (#1069); this Files slice remains independent of its v5 work. Fresh dev-01 results at `cde28967ffbcd9d95d2aeaa3b85d2eeac570346c`: - fmt and clippy `-D warnings`: pass - perf harness tests: 8 passed - Files identity/reconcile: 5 passed - crash filters: 7 + 1 + 1 passed - workspace: 128 test binaries, 1,742 passed, 22 ignored, 0 failed - debug `calternal` build and release `calternal` + `calternal-perf` build: pass Files Playwright specs across all four projects and the perf ABAB ×5 remain pending. This candidate is not READY yet.
Author
Owner

Status update: feat/files-s1-dev-v4 is rebased directly on current dev 7d6774e44c at b30f900589. The rebase preserves dev archive/hidden fixture parameters alongside the focused Home perf mode. Fresh Rust/crash/workspace/release gates and the four Files Playwright projects are queued/running on dev-01. Perf-01 still has an earlier FIFO lane ahead; no perf locks have been taken. Not READY.

Status update: feat/files-s1-dev-v4 is rebased directly on current dev 7d6774e44c200a5a5fe0c514b92ecaf3b29bda95 at b30f900589fd9835b38eab9bcb1cd21216fe6d22. The rebase preserves dev archive/hidden fixture parameters alongside the focused Home perf mode. Fresh Rust/crash/workspace/release gates and the four Files Playwright projects are queued/running on dev-01. Perf-01 still has an earlier FIFO lane ahead; no perf locks have been taken. Not READY.
Author
Owner

Queue update (candidate b30f900589fd9835b38eab9bcb1cd21216fe6d22): the dev-01 train train-1112a is active, so the queued Rust gates, Files e2e setup, and dev-control release build have not passed their first ~/bin/slot command yet. Their worktrees and scripts are intact; no perf turn or lock has been taken. I will resume as soon as the train releases the slots.

Queue update (candidate `b30f900589fd9835b38eab9bcb1cd21216fe6d22`): the dev-01 train `train-1112a` is active, so the queued Rust gates, Files e2e setup, and dev-control release build have not passed their first `~/bin/slot` command yet. Their worktrees and scripts are intact; no perf turn or lock has been taken. I will resume as soon as the train releases the slots.
Author
Owner

Runner recovery: the original Rust and e2e systemd units reached their 3-hour runtime cap while still waiting at ~/bin/slot; neither executed a gate. The trap exit markers are not pass evidence (the required ALL RUST GATES PASS marker is absent). I restarted Rust, e2e, and the dev-control build with unlimited unit lifetimes; e2e now waits for the replacement Rust unit. The dev-01 train lock is still valid. No perf turn or lock has been taken.

Runner recovery: the original Rust and e2e systemd units reached their 3-hour runtime cap while still waiting at `~/bin/slot`; neither executed a gate. The trap exit markers are not pass evidence (the required `ALL RUST GATES PASS` marker is absent). I restarted Rust, e2e, and the dev-control build with unlimited unit lifetimes; e2e now waits for the replacement Rust unit. The dev-01 train lock is still valid. No perf turn or lock has been taken.
Author
Owner

Dev-native gate progress (candidate b30f900589fd9835b38eab9bcb1cd21216fe6d22)

The candidate is the clean feat/files-s1-dev-v4 branch directly based on dev 7d6774e44c200a5a5fe0c514b92ecaf3b29bda95. The three reported clippy findings are addressed in this port: file_id receives a borrowed scan entry, set_home receives &HomeEntry, and the page cadence uses .is_multiple_of(); the hot path adds no allocation and there are no lint allowances. The implementation has no current.db, namespace projection, tier bit, or split-root dependency, so it stays separate from the tiering v5 lane.

Fresh dev-01 Rust gates, the four-project Files e2e runner, and the dev control release build are waiting behind the still-active train-1112a lock. The replacement units are running, but no gate output has started yet; earlier trap exit markers are not being counted as passes. This candidate is not READY. Perf binaries/fixtures have not been staged and no perf turn or lock has been taken.

## Dev-native gate progress (candidate `b30f900589fd9835b38eab9bcb1cd21216fe6d22`) The candidate is the clean `feat/files-s1-dev-v4` branch directly based on dev `7d6774e44c200a5a5fe0c514b92ecaf3b29bda95`. The three reported clippy findings are addressed in this port: `file_id` receives a borrowed scan entry, `set_home` receives `&HomeEntry`, and the page cadence uses `.is_multiple_of()`; the hot path adds no allocation and there are no lint allowances. The implementation has no `current.db`, namespace projection, tier bit, or split-root dependency, so it stays separate from the tiering v5 lane. Fresh dev-01 Rust gates, the four-project Files e2e runner, and the dev control release build are waiting behind the still-active `train-1112a` lock. The replacement units are running, but no gate output has started yet; earlier trap exit markers are not being counted as passes. This candidate is not READY. Perf binaries/fixtures have not been staged and no perf turn or lock has been taken.
Author
Owner

Dev-01 queue recheck (2026-11-12 09:12 IST)

The train-1112a lock released at 08:36 IST. Since then all six ~/bin/slot holders have remained occupied by other active test/build jobs; the Files Rust runner is still waiting at its first cargo fmt slot call. The control release build is also queued, and the e2e runner is waiting on Rust. There is no new gate output yet, so this is still not READY. Disk and inode headroom remain above the required floors. I am keeping the runner alive and waiting for a slot.

## Dev-01 queue recheck (2026-11-12 09:12 IST) The `train-1112a` lock released at 08:36 IST. Since then all six `~/bin/slot` holders have remained occupied by other active test/build jobs; the Files Rust runner is still waiting at its first `cargo fmt` slot call. The control release build is also queued, and the e2e runner is waiting on Rust. There is no new gate output yet, so this is still not READY. Disk and inode headroom remain above the required floors. I am keeping the runner alive and waiting for a slot.
Author
Owner

Dev-01 gate progress (candidate b30f900589fd9835b38eab9bcb1cd21216fe6d22)

Fmt, strict workspace Clippy, perf harness tests, Files identity/reconcile tests, and the targeted Notes/storage/capture crash tests have passed. The workspace suite is running now. The dev control release build passed; its SHA-256 is 31fa62913465c7e154e1a5485499bf1ac796313f5708374cc05ebda2bd9bb9e3. The four Files Playwright projects are waiting on the Rust pass marker.

No perf binaries or fixtures are staged, and no perf turn or locks are held. The current origin/dev has advanced from this candidate's base by a single perf-budget-only commit; I will use the current dev comparator for final measurements. This candidate is not READY.

## Dev-01 gate progress (candidate `b30f900589fd9835b38eab9bcb1cd21216fe6d22`) Fmt, strict workspace Clippy, perf harness tests, Files identity/reconcile tests, and the targeted Notes/storage/capture crash tests have passed. The workspace suite is running now. The dev control release build passed; its SHA-256 is `31fa62913465c7e154e1a5485499bf1ac796313f5708374cc05ebda2bd9bb9e3`. The four Files Playwright projects are waiting on the Rust pass marker. No perf binaries or fixtures are staged, and no perf turn or locks are held. The current `origin/dev` has advanced from this candidate's base by a single perf-budget-only commit; I will use the current dev comparator for final measurements. This candidate is not READY.
Author
Owner

Rust gates passed (candidate b30f900589fd9835b38eab9bcb1cd21216fe6d22)

Gate Result
cargo fmt --all -- --check pass
cargo clippy --workspace --all-targets --locked -j4 -- -D warnings pass
Perf harness unit tests 9 passed
Files identity/reconcile tests 5 passed
Notes kill/replay crash filters 7 passed
Storage SIGKILL recovery 1 passed
Capture/undo journal SIGKILL 1 passed
Workspace 130 test binaries; 1,803 passed, 22 ignored, 0 failed
Debug calternal build pass; SHA-256 b8f686cb9c7b5bcc74406adc4cd2011236a0c4a08fce4bbf87f79bc3e7d810f0
Release calternal + calternal-perf pass; SHA-256 33ab381d595a8c2d193a002af4f3ab9e345af39ea7e102a64259d52a34b872a3 / 59fcf39ac13ce40177baa4db4ce2d8fe01eb26350eca16e679d9dfe24d69e2d7

The Files Playwright sequence has started with chromium-1440; the other three projects are pending. Perf is not staged or run yet. This candidate is not READY.

## Rust gates passed (candidate `b30f900589fd9835b38eab9bcb1cd21216fe6d22`) | Gate | Result | |---|---| | `cargo fmt --all -- --check` | pass | | `cargo clippy --workspace --all-targets --locked -j4 -- -D warnings` | pass | | Perf harness unit tests | 9 passed | | Files identity/reconcile tests | 5 passed | | Notes kill/replay crash filters | 7 passed | | Storage SIGKILL recovery | 1 passed | | Capture/undo journal SIGKILL | 1 passed | | Workspace | 130 test binaries; 1,803 passed, 22 ignored, 0 failed | | Debug `calternal` build | pass; SHA-256 `b8f686cb9c7b5bcc74406adc4cd2011236a0c4a08fce4bbf87f79bc3e7d810f0` | | Release `calternal` + `calternal-perf` | pass; SHA-256 `33ab381d595a8c2d193a002af4f3ab9e345af39ea7e102a64259d52a34b872a3` / `59fcf39ac13ce40177baa4db4ce2d8fe01eb26350eca16e679d9dfe24d69e2d7` | The Files Playwright sequence has started with `chromium-1440`; the other three projects are pending. Perf is not staged or run yet. This candidate is not READY.
Author
Owner

Files e2e queue update: the Rust pass marker released the runner, but chromium-1440 is still waiting at ~/bin/slot on dev-01; no browser project has emitted results yet. Other Chromium/WebKit work remains active on that VM. I am keeping this run in the shared queue. No perf turn or lock is held. Not READY.

Files e2e queue update: the Rust pass marker released the runner, but `chromium-1440` is still waiting at `~/bin/slot` on dev-01; no browser project has emitted results yet. Other Chromium/WebKit work remains active on that VM. I am keeping this run in the shared queue. No perf turn or lock is held. Not READY.
Author
Owner

Another queue check: as of 11:08 IST, the candidate e2e runner is still at its first chromium-1440 slot request, with no spec output or failure. Dev-01 has active browser workers and no train lock. Rust gates remain green; perf binaries and script are staged, but fixtures are not yet generated and no perf turn/lock is held. Not READY.

Another queue check: as of 11:08 IST, the candidate e2e runner is still at its first `chromium-1440` slot request, with no spec output or failure. Dev-01 has active browser workers and no train lock. Rust gates remain green; perf binaries and script are staged, but fixtures are not yet generated and no perf turn/lock is held. Not READY.
Author
Owner

E2E has now waited about an hour for the first chromium-1440 slot request on dev-01. The unit remains active with no test output or failure; other browser workers are still active. I am keeping the queued run intact. Fixture generation and perf-turn entry remain pending; no perf lock is held. Not READY.

E2E has now waited about an hour for the first `chromium-1440` slot request on dev-01. The unit remains active with no test output or failure; other browser workers are still active. I am keeping the queued run intact. Fixture generation and perf-turn entry remain pending; no perf lock is held. Not READY.
Author
Owner

The independent candidate is now directly rebased onto current origin/dev d37e52d84 as feat/files-s1-dev-v4 at e8a60f185. I read tiering issue #1069: the v5 plan adds no tier metadata and stays out of the Notes index; this Files branch has no current.db, namespace projection, tier bit, or split-root logic. The queued four-project e2e run on the previous snapshot is active; I will rerun the Files specs on the rebased head, then finish the remaining gates and dev-copy ABAB. Not READY yet.

The independent candidate is now directly rebased onto current origin/dev `d37e52d84` as `feat/files-s1-dev-v4` at `e8a60f185`. I read tiering issue #1069: the v5 plan adds no tier metadata and stays out of the Notes index; this Files branch has no `current.db`, namespace projection, tier bit, or split-root logic. The queued four-project e2e run on the previous snapshot is active; I will rerun the Files specs on the rebased head, then finish the remaining gates and dev-copy ABAB. Not READY yet.
Author
Owner

Final-head checkpoint (e8a60f185b5114a8aa5844a7261487dcd4a94a9e): fmt, strict Clippy, the Files identity/reconcile tests, all three crash filters, workspace tests (1,803 passed, 22 ignored, 0 failed), and the release build passed on dev-01. The Files E2E run passed all four projects: Chromium 1440/390 and WebKit 1440/390; E2E_FINAL_EXIT=0. The release fixture-generator build also passed. I am staging seed-1 fixtures and will post the perf ABAB ×5 table next. Not READY until the dev-copy-bounded perf gate completes.

Final-head checkpoint (`e8a60f185b5114a8aa5844a7261487dcd4a94a9e`): fmt, strict Clippy, the Files identity/reconcile tests, all three crash filters, workspace tests (1,803 passed, 22 ignored, 0 failed), and the release build passed on dev-01. The Files E2E run passed all four projects: Chromium 1440/390 and WebKit 1440/390; `E2E_FINAL_EXIT=0`. The release fixture-generator build also passed. I am staging seed-1 fixtures and will post the perf ABAB ×5 table next. Not READY until the dev-copy-bounded perf gate completes.
Author
Owner

Perf round status (2026-11-12, candidate e8a60f185)

The perf-01 ABAB ×5 completed all 20 arms at 10:17 IST: dev, candidate A, dev-copy, candidate B at 1k/10k/100k. The paired perf-02 hold files-s1-perf02-e8a60f-r2-lock.service has been stopped and is inactive; the perf-01 run unit is also inactive.

The comparison is not green yet. My initial paired-bound analysis reports candidate-over-control failures; I am validating the aggregation and control spread before treating individual tail quantiles as regressions. The same 100k home.page_tag p95 budget is exceeded on dev and candidate, so the per-arm absolute --gate exits are not the dev-copy comparison. Not READY; no replacement PR opened.

## Perf round status (2026-11-12, candidate e8a60f185) The perf-01 ABAB ×5 completed all 20 arms at 10:17 IST: dev, candidate A, dev-copy, candidate B at 1k/10k/100k. The paired perf-02 hold files-s1-perf02-e8a60f-r2-lock.service has been stopped and is inactive; the perf-01 run unit is also inactive. The comparison is not green yet. My initial paired-bound analysis reports candidate-over-control failures; I am validating the aggregation and control spread before treating individual tail quantiles as regressions. The same 100k home.page_tag p95 budget is exceeded on dev and candidate, so the per-arm absolute --gate exits are not the dev-copy comparison. Not READY; no replacement PR opened.
Author
Owner

Recovery and perf status (2026-11-12)

The candidate was rebased from be968d9 onto current origin/dev 5fba675, producing head 65464c4ed5955369176c77683fde3d10c6853a2e. The tiering v5 issue #1069 is read; the Files candidate keeps the current identity/index path and adds no tier metadata.

The only dev-01 gate job lost in the reboot was the earlier Clippy run. Its partial result was discarded, and the post-boot Clippy rerun passed on c8688c0. I am rerunning the requested gate set on rebased head 65464c4 through ~/bin/slot; new logs and temp data are in the candidate worktree.

No valid perf arms have started and no paired perf-02 lock is held. The previous attempt verified its staged hashes, then failed before ARM_BEGIN because perf-01 could not NetBird SSH to perf-02; those partial logs are not being used. The FIFO currently reports oldest ticket 1794326090-2524256-codex-tiering-cold6-resume-20261110 as alive, but PID 2524256 now identifies as [kworker/0:2-wg-crypt-wt0]. PID reuse leaves that dead ticket ahead of the queue. I am keeping the Files measurement behind the FIFO and will start the perf-02 partner lock only once the paired run begins.

## Recovery and perf status (2026-11-12) The candidate was rebased from `be968d9` onto current `origin/dev` `5fba675`, producing head `65464c4ed5955369176c77683fde3d10c6853a2e`. The tiering v5 issue #1069 is read; the Files candidate keeps the current identity/index path and adds no tier metadata. The only dev-01 gate job lost in the reboot was the earlier Clippy run. Its partial result was discarded, and the post-boot Clippy rerun passed on `c8688c0`. I am rerunning the requested gate set on rebased head `65464c4` through `~/bin/slot`; new logs and temp data are in the candidate worktree. No valid perf arms have started and no paired perf-02 lock is held. The previous attempt verified its staged hashes, then failed before `ARM_BEGIN` because perf-01 could not NetBird SSH to perf-02; those partial logs are not being used. The FIFO currently reports oldest ticket `1794326090-2524256-codex-tiering-cold6-resume-20261110` as alive, but PID `2524256` now identifies as `[kworker/0:2-wg-crypt-wt0]`. PID reuse leaves that dead ticket ahead of the queue. I am keeping the Files measurement behind the FIFO and will start the perf-02 partner lock only once the paired run begins.
Author
Owner

Post-rebase gate update (2026-11-12)

Candidate branch codex/files-s1-gates-20261112 is now at 65464c4ed5955369176c77683fde3d10c6853a2e, directly on current origin/dev 5fba67585db3cb9c7934d7d83f9143a0f64dcf63. The only intervening dev commit adds preview scripts; the released candidate, dev comparator and perf harness hashes remain unchanged. The candidate stays compatible with tiering v5: no current.db, namespace projection or tier metadata.

Gate Result
cargo fmt --all -- --check through ~/bin/slot PASS
cargo clippy --workspace --all-targets --locked -j4 -- -D warnings through ~/bin/slot PASS
Files identity/reconcile and crash filters through ~/bin/slot PASS, all 9 filters
cargo test --workspace --locked -j4 through ~/bin/slot PASS, final run on the same head
cargo build -p calternal --bin calternal --locked -j4 through ~/bin/slot PASS
cargo build --workspace --release --locked -j4 through ~/bin/slot PASS
Files specs across Chromium 1440/390 and WebKit 1440/390 PASS, 30 passed, 14 skipped

The first workspace attempt used a TMPDIR whose Nix-generated nix-shell.* suffix made the admin Unix-socket fallback exceed SUN_LEN. The final workspace run used a short detached Git worktree and set TMPDIR inside the Nix shell; the suite passed. Gate logs and temp data remain in the two candidate worktrees.

Perf has not started: no perf arms are valid and no perf-02 lock is held. The previous attempt stopped before ARM_BEGIN because perf-01 could not NetBird SSH to perf-02. The fresh driver now waits for the control host to acquire and confirm the paired lock after perf-turn grants the FIFO turn. The queue still has oldest ticket 1794326090-2524256-codex-tiering-cold6-resume-20261110 listed as alive, but PID 2524256 currently identifies as [kworker/0:2-wg-crypt-wt0]; PID reuse keeps that dead Tiering ticket ahead of the line. The Tiering lane owner/orchestrator needs to clear that stale entry for the FIFO to advance. Files is not READY until the dev-copy-bounded ABAB finishes.

## Post-rebase gate update (2026-11-12) Candidate branch `codex/files-s1-gates-20261112` is now at `65464c4ed5955369176c77683fde3d10c6853a2e`, directly on current `origin/dev` `5fba67585db3cb9c7934d7d83f9143a0f64dcf63`. The only intervening dev commit adds preview scripts; the released candidate, dev comparator and perf harness hashes remain unchanged. The candidate stays compatible with tiering v5: no `current.db`, namespace projection or tier metadata. | Gate | Result | |---|---| | `cargo fmt --all -- --check` through `~/bin/slot` | PASS | | `cargo clippy --workspace --all-targets --locked -j4 -- -D warnings` through `~/bin/slot` | PASS | | Files identity/reconcile and crash filters through `~/bin/slot` | PASS, all 9 filters | | `cargo test --workspace --locked -j4` through `~/bin/slot` | PASS, final run on the same head | | `cargo build -p calternal --bin calternal --locked -j4` through `~/bin/slot` | PASS | | `cargo build --workspace --release --locked -j4` through `~/bin/slot` | PASS | | Files specs across Chromium 1440/390 and WebKit 1440/390 | PASS, 30 passed, 14 skipped | The first workspace attempt used a TMPDIR whose Nix-generated `nix-shell.*` suffix made the admin Unix-socket fallback exceed `SUN_LEN`. The final workspace run used a short detached Git worktree and set TMPDIR inside the Nix shell; the suite passed. Gate logs and temp data remain in the two candidate worktrees. Perf has not started: no perf arms are valid and no perf-02 lock is held. The previous attempt stopped before `ARM_BEGIN` because perf-01 could not NetBird SSH to perf-02. The fresh driver now waits for the control host to acquire and confirm the paired lock after perf-turn grants the FIFO turn. The queue still has oldest ticket `1794326090-2524256-codex-tiering-cold6-resume-20261110` listed as alive, but PID `2524256` currently identifies as `[kworker/0:2-wg-crypt-wt0]`; PID reuse keeps that dead Tiering ticket ahead of the line. The Tiering lane owner/orchestrator needs to clear that stale entry for the FIFO to advance. Files is not READY until the dev-copy-bounded ABAB finishes.
Author
Owner

Post-reboot gate and perf update (2026-11-12)

Candidate branch codex/files-s1-gates-20261112 is now at ec0b1043ff26f66e2556d53bb58f927fb10942ca, directly based on origin/dev 5fba67585db3cb9c7934d7d83f9143a0f64dcf63. The only commit after implementation head 65464c4 adds the Files Playwright regression spec; the measured server binary is unchanged.

The Clippy job interrupted by the dev-01 outage had no final marker, so its partial output is discarded. The fresh rerun passed. Fmt, strict Clippy, crash tests, debug and release builds, and the full workspace retry (CARGO_EXIT=0, GATE_EXIT=0) all pass. The correct Files e2e spec now exercises an external Home note move and browser read; it passed 4/4 across Chromium 1440/390 and WebKit 1440/390. The earlier 30-pass/14-skip run selected unrelated Notes specs and is not being counted as the Files e2e gate.

Perf ticket 1794514975-3786136-files-s1-c8688c-abab-postboot-r1 completed all 20 arms (dev, candidate A, dev-copy, candidate B ×5) at 1k/10k/100k; every arm and the driver exited 0. The paired perf-02 unit is stopped. I am comparing every measured metric against the same-session dev-copy control bounds now; no READY decision until that table is complete.

## Post-reboot gate and perf update (2026-11-12) Candidate branch `codex/files-s1-gates-20261112` is now at `ec0b1043ff26f66e2556d53bb58f927fb10942ca`, directly based on `origin/dev` `5fba67585db3cb9c7934d7d83f9143a0f64dcf63`. The only commit after implementation head `65464c4` adds the Files Playwright regression spec; the measured server binary is unchanged. The Clippy job interrupted by the dev-01 outage had no final marker, so its partial output is discarded. The fresh rerun passed. Fmt, strict Clippy, crash tests, debug and release builds, and the full workspace retry (`CARGO_EXIT=0`, `GATE_EXIT=0`) all pass. The correct Files e2e spec now exercises an external Home note move and browser read; it passed 4/4 across Chromium 1440/390 and WebKit 1440/390. The earlier 30-pass/14-skip run selected unrelated Notes specs and is not being counted as the Files e2e gate. Perf ticket `1794514975-3786136-files-s1-c8688c-abab-postboot-r1` completed all 20 arms (dev, candidate A, dev-copy, candidate B ×5) at 1k/10k/100k; every arm and the driver exited 0. The paired perf-02 unit is stopped. I am comparing every measured metric against the same-session dev-copy control bounds now; no READY decision until that table is complete.
Author
Owner

Files slice 1 r6 verdict: FAIL

PR #1010 is still based on dev at head 5517ce595a09a8f949d2b33aff970e373c9d150e. The measured candidate source was 1609d3c54dc8b341846f9d68addc362784c7e2b7 and remains unpushed. Its release binary SHA-256 is 5fe8790e40bdbaa7ead6bc6a9014360ba1837a81d2ca01d96f6a4a40a0d5c18b.

Recorded functional gates on the candidate:

  • cargo fmt --all -- --check: exit 0.
  • cargo clippy --workspace --all-targets --locked -j4 -- -D warnings: exit 0.
  • Crash tests: cargo test -p calternal --test notes_crash --locked -j4 and cargo test -p calternal-notes --lib interrupted_home_scan_keeps_stale_rows_for_restart_reconcile --locked -j4: exit 0.
  • Clean workspace run: cargo test --workspace --locked -j4 --no-fail-fast -- --test-threads=2: exit 0.
  • cargo build --workspace --release --locked -j4: exit 0.
  • bunx playwright test e2e/home-files-identity.spec.ts --project=chromium-1440 --project=chromium-390 --project=webkit-1440 --project=webkit-390 --workers=1: 4 passed.

Perf r6: ~/bin/perf-turn completed five paired ABAB rounds at 1k, 10k and 100k. All arm invocations exited 0, with no Failed: markers. The candidate upper 95% bootstrap bound had to be at or below the dev-copy upper bound for every metric and quantile. The comparison used 20,000 bootstrap resamples and 10 candidate / 5 control ratio samples. Lower is better; cold.notes_per_s is inverted.

Notes Over-bound comparisons Examples, candidate U95 vs dev-copy U95
1k 29 / 96 cold.disk_written p50/p95/p99: 1.0030 vs 0.9977; open.note p50: 1.2207 vs 1.0545; sync.save_ack p99: 1.5450 vs 1.2118
10k 38 / 96 cold.disk_written p50/p95/p99: 1.0016 vs 1.0013; open.api_get p95: 1.2532 vs 1.2011; sync.save_ack p99: 2.6767 vs 1.7143
100k 44 / 96 cold.index p50/p95/p99: 1.0223 vs 1.0119; home.page_big p95/p99: 1.3982 vs 0.8835; search.prefix p99: 4.4292 vs 2.1253; search.query p95: 3.4167 vs 1.5882
Total 111 / 288 FAIL

The leading cause to investigate is contention from the initial Home identity scan: startup launches the scan and it enumerates Home entries while the benchmark exercises search, Home pages, open and save paths. The measured results do not isolate that scan as the sole cause, so this is a hypothesis rather than a confirmed attribution.

The perf-02 r6 hold is inactive. The FIFO currently has an nfa-fc1 ticket alive, so no r7 or further Files perf ticket was queued. This candidate is not READY because the perf gate failed; no push was made.

Full r6 comparison table
Notes Metric Quantile Candidate ratio gmean Candidate upper 95% Dev-copy ratio gmean Dev-copy upper 95% Gate
1000 cold.disk_written p50 1.0008 1.0030 0.9964 0.9977 FAIL
1000 cold.disk_written p95 1.0008 1.0030 0.9964 0.9977 FAIL
1000 cold.disk_written p99 1.0008 1.0030 0.9964 0.9976 FAIL
1000 cold.first_page p50 1.0086 1.0293 1.0737 1.1313 pass
1000 cold.first_page p95 1.0086 1.0293 1.0737 1.1313 pass
1000 cold.first_page p99 1.0086 1.0293 1.0737 1.1313 pass
1000 cold.index p50 1.0075 1.0246 1.0598 1.1066 pass
1000 cold.index p95 1.0075 1.0246 1.0598 1.1066 pass
1000 cold.index p99 1.0075 1.0246 1.0598 1.1066 pass
1000 cold.mem_peak p50 1.0067 1.0145 0.9983 1.0085 FAIL
1000 cold.mem_peak p95 1.0067 1.0145 0.9983 1.0085 FAIL
1000 cold.mem_peak p99 1.0067 1.0145 0.9983 1.0085 FAIL
1000 cold.notes_per_s p50 1.0075 1.0246 1.0598 1.1066 pass
1000 cold.notes_per_s p95 1.0075 1.0246 1.0598 1.1066 pass
1000 cold.notes_per_s p99 1.0075 1.0246 1.0598 1.1066 pass
1000 cold.startup p50 0.9213 1.0576 1.0401 1.5647 pass
1000 cold.startup p95 0.9213 1.0576 1.0401 1.5826 pass
1000 cold.startup p99 0.9213 1.0576 1.0401 1.5826 pass
1000 home.first_page p50 0.9384 1.1593 0.9219 1.2205 pass
1000 home.first_page p95 0.9384 1.1593 0.9219 1.2205 pass
1000 home.first_page p99 0.9384 1.1593 0.9219 1.2205 pass
1000 home.page p50 0.9725 1.0302 1.0852 1.1703 pass
1000 home.page p95 0.9347 1.0687 0.9115 1.2213 pass
1000 home.page p99 0.6942 0.9557 0.6630 0.9999 pass
1000 home.page_big p50 1.0173 1.0648 1.0427 1.0934 pass
1000 home.page_big p95 1.0173 1.0612 1.0427 1.0934 pass
1000 home.page_big p99 1.0173 1.0612 1.0427 1.0934 pass
1000 home.page_next p50 0.9863 1.0482 1.0341 1.1075 pass
1000 home.page_next p95 0.9776 1.0749 1.0578 1.2113 pass
1000 home.page_next p99 1.0493 1.1490 1.0223 1.0969 FAIL
1000 home.page_tag p50 1.0052 1.0276 1.0173 1.0416 pass
1000 home.page_tag p95 1.0278 1.0806 1.0361 1.0968 pass
1000 home.page_tag p99 1.0594 1.0939 1.0443 1.0949 pass
1000 home.page_title p50 1.0081 1.0462 1.0293 1.0619 pass
1000 home.page_title p95 0.9770 1.0643 1.0419 1.1789 pass
1000 home.page_title p99 0.8899 1.0580 0.8519 1.2659 pass
1000 journal.catch_up p50 1.0322 1.1184 1.1651 1.3089 pass
1000 journal.catch_up p95 1.0322 1.1184 1.1651 1.3089 pass
1000 journal.catch_up p99 1.0322 1.1184 1.1651 1.3089 pass
1000 journal.entries p50 1.0000 1.0000 1.0000 1.0000 pass
1000 journal.entries p95 1.0000 1.0000 1.0000 1.0000 pass
1000 journal.entries p99 1.0000 1.0000 1.0000 1.0000 pass
1000 journal.page p50 1.0331 1.1172 1.1751 1.3370 pass
1000 journal.page p95 1.0331 1.1184 1.1751 1.3370 pass
1000 journal.page p99 1.0331 1.1184 1.1751 1.3370 pass
1000 mem.after_first_page p50 1.0207 1.0392 0.9950 1.0175 FAIL
1000 mem.after_first_page p95 1.0207 1.0392 0.9950 1.0175 FAIL
1000 mem.after_first_page p99 1.0207 1.0392 0.9950 1.0175 FAIL
1000 mem.after_opens p50 1.0012 1.0098 1.0045 1.0137 pass
1000 mem.after_opens p95 1.0012 1.0098 1.0045 1.0137 pass
1000 mem.after_opens p99 1.0012 1.0098 1.0045 1.0137 pass
1000 mem.after_search p50 1.0001 1.0169 1.0159 1.0461 pass
1000 mem.after_search p95 1.0001 1.0169 1.0159 1.0461 pass
1000 mem.after_search p99 1.0001 1.0169 1.0159 1.0461 pass
1000 mem.idle p50 1.0257 1.0486 1.0030 1.0331 FAIL
1000 mem.idle p95 1.0257 1.0486 1.0030 1.0331 FAIL
1000 mem.idle p99 1.0257 1.0486 1.0030 1.0331 FAIL
1000 open.api_get p50 0.9815 1.0111 1.0324 1.1091 pass
1000 open.api_get p95 0.9400 0.9925 1.0401 1.1279 pass
1000 open.api_get p99 0.9600 1.0213 1.0682 1.1033 pass
1000 open.long_note p50 1.0680 1.2105 1.0033 1.0156 FAIL
1000 open.long_note p95 1.0680 1.2105 1.0033 1.0156 FAIL
1000 open.long_note p99 1.0680 1.2105 1.0033 1.0156 FAIL
1000 open.note p50 1.0760 1.2207 1.0328 1.0545 FAIL
1000 open.note p95 1.0432 1.1874 1.0400 1.1037 FAIL
1000 open.note p99 1.0100 1.0988 1.1528 1.3217 pass
1000 search.catch_up p50 1.0000 1.0002 1.0000 1.0002 pass
1000 search.catch_up p95 1.0000 1.0002 1.0000 1.0002 pass
1000 search.catch_up p99 1.0000 1.0002 1.0000 1.0002 pass
1000 search.first_query p50 1.0021 1.0465 0.9782 1.0951 pass
1000 search.first_query p95 1.0021 1.0465 0.9782 1.0979 pass
1000 search.first_query p99 1.0021 1.0465 0.9782 1.0951 pass
1000 search.prefix p50 0.9881 1.0015 0.9609 1.0058 pass
1000 search.prefix p95 0.9793 1.0353 0.9195 1.0734 pass
1000 search.prefix p99 0.9680 1.0521 0.8762 1.0594 pass
1000 search.query p50 0.9484 0.9802 0.9442 1.0429 pass
1000 search.query p95 0.9840 1.0503 1.0105 1.0996 pass
1000 search.query p99 0.9270 0.9540 0.9846 1.0322 pass
1000 search.typo p50 0.9257 0.9788 0.9627 1.1528 pass
1000 search.typo p95 0.9041 0.9786 0.9499 1.3013 pass
1000 search.typo p99 0.9258 1.0456 1.0456 1.4878 pass
1000 shutdown p50 1.1523 1.3239 1.0060 1.0257 FAIL
1000 shutdown p95 1.1523 1.3239 1.0060 1.0257 FAIL
1000 shutdown p99 1.1523 1.3239 1.0060 1.0257 FAIL
1000 startup.healthz p50 1.1162 1.3085 0.9748 1.0510 FAIL
1000 startup.healthz p95 1.1162 1.3085 0.9748 1.0510 FAIL
1000 startup.healthz p99 1.1162 1.3085 0.9748 1.0510 FAIL
1000 sync.durable_write p50 1.0202 1.0859 1.0721 1.1722 pass
1000 sync.durable_write p95 1.0779 1.1999 1.0303 1.1661 FAIL
1000 sync.durable_write p99 0.9996 1.0927 1.0766 1.1536 pass
1000 sync.round_trip p50 1.0218 1.0392 0.9165 0.9625 FAIL
1000 sync.round_trip p95 1.0085 1.0295 0.9845 1.0561 pass
1000 sync.round_trip p99 0.9903 1.1181 1.3138 1.6369 pass
1000 sync.save_ack p50 1.0166 1.0374 0.9908 1.0186 FAIL
1000 sync.save_ack p95 1.0207 1.0827 0.9197 0.9508 FAIL
1000 sync.save_ack p99 1.1208 1.5450 1.0676 1.2118 FAIL
10000 cold.disk_written p50 0.9997 1.0016 0.9989 1.0013 FAIL
10000 cold.disk_written p95 0.9997 1.0016 0.9989 1.0013 FAIL
10000 cold.disk_written p99 0.9997 1.0016 0.9989 1.0013 FAIL
10000 cold.first_page p50 1.0476 1.0754 0.9993 1.0521 FAIL
10000 cold.first_page p95 1.0476 1.0754 0.9993 1.0521 FAIL
10000 cold.first_page p99 1.0476 1.0754 0.9993 1.0521 FAIL
10000 cold.index p50 0.9995 1.0127 1.0241 1.0482 pass
10000 cold.index p95 0.9995 1.0127 1.0241 1.0482 pass
10000 cold.index p99 0.9995 1.0127 1.0241 1.0482 pass
10000 cold.mem_peak p50 1.0047 1.0093 1.0033 1.0084 FAIL
10000 cold.mem_peak p95 1.0047 1.0093 1.0033 1.0084 FAIL
10000 cold.mem_peak p99 1.0047 1.0093 1.0033 1.0084 FAIL
10000 cold.notes_per_s p50 0.9995 1.0127 1.0241 1.0490 pass
10000 cold.notes_per_s p95 0.9995 1.0127 1.0241 1.0482 pass
10000 cold.notes_per_s p99 0.9995 1.0127 1.0241 1.0482 pass
10000 cold.startup p50 1.0044 1.0641 1.0304 1.1080 pass
10000 cold.startup p95 1.0044 1.0641 1.0304 1.1101 pass
10000 cold.startup p99 1.0044 1.0641 1.0304 1.1101 pass
10000 home.first_page p50 1.2930 1.4210 1.1532 1.5810 pass
10000 home.first_page p95 1.2930 1.4210 1.1532 1.5810 pass
10000 home.first_page p99 1.2930 1.4210 1.1532 1.5810 pass
10000 home.page p50 0.9776 1.0476 1.0536 1.2108 pass
10000 home.page p95 0.9394 1.3131 0.8125 2.1571 pass
10000 home.page p99 0.7542 1.1867 0.7539 1.1664 FAIL
10000 home.page_big p50 0.9816 1.0078 1.0070 1.0333 pass
10000 home.page_big p95 1.0000 1.0205 0.9838 1.0429 pass
10000 home.page_big p99 1.0000 1.0205 0.9838 1.0429 pass
10000 home.page_next p50 1.0087 1.0361 0.9840 1.0244 FAIL
10000 home.page_next p95 0.9910 1.0407 0.9969 1.0417 pass
10000 home.page_next p99 1.0333 1.0993 1.0023 1.1060 pass
10000 home.page_tag p50 0.9787 1.0086 1.0093 1.0423 pass
10000 home.page_tag p95 0.9619 0.9970 1.0685 1.1413 pass
10000 home.page_tag p99 0.9570 1.0504 0.9383 1.0823 pass
10000 home.page_title p50 1.0107 1.0379 0.9855 1.0891 pass
10000 home.page_title p95 0.9643 1.0079 1.0070 1.3325 pass
10000 home.page_title p99 0.8339 1.2176 0.7265 1.2493 pass
10000 journal.catch_up p50 0.9856 1.0227 0.9957 1.0394 pass
10000 journal.catch_up p95 0.9856 1.0227 0.9957 1.0400 pass
10000 journal.catch_up p99 0.9856 1.0227 0.9957 1.0400 pass
10000 journal.entries p50 1.0000 1.0000 1.0000 1.0000 pass
10000 journal.entries p95 1.0000 1.0000 1.0000 1.0000 pass
10000 journal.entries p99 1.0000 1.0000 1.0000 1.0000 pass
10000 journal.page p50 0.9891 1.0239 0.9984 1.0383 pass
10000 journal.page p95 0.9477 1.0030 0.9883 1.0956 pass
10000 journal.page p99 0.9477 1.0030 0.9883 1.0956 pass
10000 mem.after_first_page p50 1.0113 1.0206 1.0034 1.0094 FAIL
10000 mem.after_first_page p95 1.0113 1.0206 1.0034 1.0094 FAIL
10000 mem.after_first_page p99 1.0113 1.0203 1.0034 1.0094 FAIL
10000 mem.after_opens p50 0.9974 1.0096 1.0051 1.0287 pass
10000 mem.after_opens p95 0.9974 1.0096 1.0051 1.0287 pass
10000 mem.after_opens p99 0.9974 1.0096 1.0051 1.0289 pass
10000 mem.after_search p50 1.0075 1.0181 1.0052 1.0179 FAIL
10000 mem.after_search p95 1.0075 1.0181 1.0052 1.0179 FAIL
10000 mem.after_search p99 1.0075 1.0181 1.0052 1.0179 FAIL
10000 mem.idle p50 1.0049 1.0264 0.9936 1.0252 FAIL
10000 mem.idle p95 1.0049 1.0264 0.9936 1.0257 FAIL
10000 mem.idle p99 1.0049 1.0264 0.9936 1.0252 FAIL
10000 open.api_get p50 1.0586 1.1645 1.0405 1.1612 FAIL
10000 open.api_get p95 1.1408 1.2532 1.0555 1.2011 FAIL
10000 open.api_get p99 1.0789 1.2436 1.0672 1.1509 FAIL
10000 open.long_note p50 0.7602 0.9305 0.7336 1.4527 pass
10000 open.long_note p95 0.7602 0.9305 0.7336 1.4527 pass
10000 open.long_note p99 0.7602 0.9305 0.7336 1.4527 pass
10000 open.note p50 0.9705 1.0013 1.0161 1.0598 pass
10000 open.note p95 1.0058 1.1399 0.9678 1.0853 FAIL
10000 open.note p99 0.9439 1.0597 0.9699 1.1530 pass
10000 search.catch_up p50 1.0002 1.0004 1.0000 1.0002 FAIL
10000 search.catch_up p95 1.0002 1.0004 1.0000 1.0002 FAIL
10000 search.catch_up p99 1.0002 1.0004 1.0000 1.0002 FAIL
10000 search.first_query p50 0.9843 1.0192 0.8350 0.9283 FAIL
10000 search.first_query p95 0.9843 1.0192 0.8350 0.9283 FAIL
10000 search.first_query p99 0.9843 1.0192 0.8350 0.9283 FAIL
10000 search.prefix p50 0.9176 0.9952 0.9344 1.1060 pass
10000 search.prefix p95 0.6318 0.9124 1.0265 2.4236 pass
10000 search.prefix p99 0.6273 0.9973 1.0972 3.0446 pass
10000 search.query p50 0.9227 1.0204 0.9105 1.0823 pass
10000 search.query p95 0.8128 1.0146 1.1948 2.0964 pass
10000 search.query p99 0.9125 0.9737 0.9095 1.0143 pass
10000 search.typo p50 0.7628 0.9340 1.2134 1.4945 pass
10000 search.typo p95 0.5571 0.8035 0.9159 1.2798 pass
10000 search.typo p99 0.4843 0.6695 1.0669 2.4615 pass
10000 shutdown p50 0.9355 1.3031 0.8898 1.3315 pass
10000 shutdown p95 0.9355 1.3032 0.8898 1.3315 pass
10000 shutdown p99 0.9355 1.3032 0.8898 1.3290 pass
10000 startup.healthz p50 1.0431 1.1788 0.9565 1.1278 FAIL
10000 startup.healthz p95 1.0431 1.1788 0.9565 1.1278 FAIL
10000 startup.healthz p99 1.0431 1.1788 0.9565 1.1278 FAIL
10000 sync.durable_write p50 1.0554 1.1043 1.0500 1.1238 pass
10000 sync.durable_write p95 1.0542 1.1022 1.0928 1.2336 pass
10000 sync.durable_write p99 1.0243 1.0826 1.1498 1.4342 pass
10000 sync.round_trip p50 1.0157 1.0338 0.9670 1.0193 FAIL
10000 sync.round_trip p95 0.9939 1.0371 1.0136 1.0659 pass
10000 sync.round_trip p99 1.3166 1.6107 1.1212 1.2451 FAIL
10000 sync.save_ack p50 0.9961 1.0234 0.9837 1.0166 FAIL
10000 sync.save_ack p95 1.2035 1.5215 1.0409 1.1253 FAIL
10000 sync.save_ack p99 1.9539 2.6767 1.3134 1.7143 FAIL
100000 cold.disk_written p50 0.9980 0.9997 0.9968 1.0003 pass
100000 cold.disk_written p95 0.9980 0.9997 0.9968 1.0003 pass
100000 cold.disk_written p99 0.9980 0.9997 0.9968 1.0003 pass
100000 cold.first_page p50 0.9632 1.0081 0.9376 1.0180 pass
100000 cold.first_page p95 0.9632 1.0081 0.9376 1.0180 pass
100000 cold.first_page p99 0.9632 1.0081 0.9376 1.0180 pass
100000 cold.index p50 1.0031 1.0223 0.9803 1.0119 FAIL
100000 cold.index p95 1.0031 1.0223 0.9803 1.0119 FAIL
100000 cold.index p99 1.0031 1.0223 0.9803 1.0119 FAIL
100000 cold.mem_peak p50 0.9976 1.0030 1.0010 1.0128 pass
100000 cold.mem_peak p95 0.9976 1.0030 1.0010 1.0128 pass
100000 cold.mem_peak p99 0.9976 1.0030 1.0010 1.0130 pass
100000 cold.notes_per_s p50 1.0031 1.0223 0.9803 1.0119 FAIL
100000 cold.notes_per_s p95 1.0031 1.0223 0.9803 1.0119 FAIL
100000 cold.notes_per_s p99 1.0031 1.0223 0.9803 1.0119 FAIL
100000 cold.startup p50 1.0840 1.2295 0.9966 1.0719 FAIL
100000 cold.startup p95 1.0840 1.2295 0.9966 1.0709 FAIL
100000 cold.startup p99 1.0840 1.2325 0.9966 1.0719 FAIL
100000 home.first_page p50 1.0481 1.1205 1.1416 1.4372 pass
100000 home.first_page p95 1.0481 1.1205 1.1416 1.4372 pass
100000 home.first_page p99 1.0481 1.1205 1.1416 1.4372 pass
100000 home.page p50 1.0579 1.1353 0.9014 0.9875 FAIL
100000 home.page p95 0.9628 1.0911 1.3583 2.5428 pass
100000 home.page p99 0.7912 1.2427 1.0739 1.7068 pass
100000 home.page_big p50 0.9913 1.0069 1.0352 1.0831 pass
100000 home.page_big p95 1.0943 1.3982 0.8222 0.8835 FAIL
100000 home.page_big p99 1.0943 1.3982 0.8222 0.8835 FAIL
100000 home.page_next p50 0.9524 1.0036 1.0334 1.0974 pass
100000 home.page_next p95 0.8818 1.0614 0.9343 1.1386 pass
100000 home.page_next p99 0.9859 1.0685 0.8560 0.9620 FAIL
100000 home.page_tag p50 1.0046 1.0084 1.0111 1.0284 pass
100000 home.page_tag p95 1.0210 1.0570 0.9970 1.0335 FAIL
100000 home.page_tag p99 1.0601 1.1066 0.9674 1.0326 FAIL
100000 home.page_title p50 1.0335 1.1029 0.8072 0.9183 FAIL
100000 home.page_title p95 0.8947 1.2703 1.1049 1.9583 pass
100000 home.page_title p99 1.0765 1.7728 1.5899 3.8727 pass
100000 journal.catch_up p50 0.9707 0.9803 1.0675 1.1160 pass
100000 journal.catch_up p95 0.9707 0.9803 1.0675 1.1160 pass
100000 journal.catch_up p99 0.9707 0.9803 1.0675 1.1173 pass
100000 journal.entries p50 1.0000 1.0000 1.0000 1.0000 pass
100000 journal.entries p95 1.0000 1.0000 1.0000 1.0000 pass
100000 journal.entries p99 1.0000 1.0000 1.0000 1.0000 pass
100000 journal.page p50 0.9678 0.9797 1.0611 1.1183 pass
100000 journal.page p95 0.9533 0.9898 1.1277 1.2107 pass
100000 journal.page p99 0.9391 1.0203 1.3044 1.4838 pass
100000 mem.after_first_page p50 1.0164 1.0313 0.9972 1.0153 FAIL
100000 mem.after_first_page p95 1.0164 1.0313 0.9972 1.0153 FAIL
100000 mem.after_first_page p99 1.0164 1.0313 0.9972 1.0153 FAIL
100000 mem.after_opens p50 1.0089 1.0312 0.9989 1.0102 FAIL
100000 mem.after_opens p95 1.0089 1.0312 0.9989 1.0100 FAIL
100000 mem.after_opens p99 1.0089 1.0312 0.9989 1.0102 FAIL
100000 mem.after_search p50 1.0451 1.0770 1.0197 1.0528 FAIL
100000 mem.after_search p95 1.0451 1.0770 1.0197 1.0528 FAIL
100000 mem.after_search p99 1.0451 1.0770 1.0197 1.0528 FAIL
100000 mem.idle p50 1.0050 1.0203 0.9811 1.0137 FAIL
100000 mem.idle p95 1.0050 1.0203 0.9811 1.0137 FAIL
100000 mem.idle p99 1.0050 1.0192 0.9811 1.0137 FAIL
100000 open.api_get p50 0.9817 1.0677 1.0650 1.1385 pass
100000 open.api_get p95 1.0076 1.1291 1.0536 1.1613 pass
100000 open.api_get p99 0.9967 1.1422 1.1940 1.4674 pass
100000 open.long_note p50 0.9482 1.0322 1.1262 1.3150 pass
100000 open.long_note p95 0.9482 1.0322 1.1262 1.3199 pass
100000 open.long_note p99 0.9482 1.0322 1.1262 1.3150 pass
100000 open.note p50 1.0134 1.0513 0.9728 1.0166 FAIL
100000 open.note p95 0.9544 0.9905 1.0059 1.0284 pass
100000 open.note p99 0.9683 1.0812 1.0507 1.3099 pass
100000 search.catch_up p50 1.0077 1.0350 1.0138 1.0424 pass
100000 search.catch_up p95 1.0077 1.0350 1.0138 1.0424 pass
100000 search.catch_up p99 1.0077 1.0350 1.0138 1.0425 pass
100000 search.first_query p50 1.0999 1.3137 0.9771 1.0241 FAIL
100000 search.first_query p95 1.0999 1.3137 0.9771 1.0241 FAIL
100000 search.first_query p99 1.0999 1.3137 0.9771 1.0241 FAIL
100000 search.prefix p50 1.3161 1.5727 0.7020 1.0099 FAIL
100000 search.prefix p95 2.5829 3.5552 0.6232 1.8187 FAIL
100000 search.prefix p99 2.1856 4.4292 0.6527 2.1253 FAIL
100000 search.query p50 1.4110 1.7309 0.6496 0.9927 FAIL
100000 search.query p95 1.9866 3.4167 0.7298 1.5882 FAIL
100000 search.query p99 1.4066 1.7522 0.8752 1.1991 FAIL
100000 search.typo p50 1.3363 1.8847 0.9270 1.6987 FAIL
100000 search.typo p95 1.1191 1.3627 0.9950 1.4095 pass
100000 search.typo p99 1.1026 1.3592 0.9327 1.5483 pass
100000 shutdown p50 1.0281 1.0839 0.8869 0.9999 FAIL
100000 shutdown p95 1.0281 1.0839 0.8869 0.9999 FAIL
100000 shutdown p99 1.0281 1.0839 0.8869 1.0007 FAIL
100000 startup.healthz p50 0.9571 1.0424 1.0151 1.2332 pass
100000 startup.healthz p95 0.9571 1.0424 1.0151 1.2332 pass
100000 startup.healthz p99 0.9571 1.0424 1.0151 1.2332 pass
100000 sync.durable_write p50 0.9976 1.0730 1.0513 1.1549 pass
100000 sync.durable_write p95 0.9705 1.0526 1.1046 1.2205 pass
100000 sync.durable_write p99 1.0118 1.1141 1.1413 1.3185 pass
100000 sync.round_trip p50 0.9666 1.0127 0.8774 0.9818 FAIL
100000 sync.round_trip p95 0.9050 1.0542 0.9152 1.1536 pass
100000 sync.round_trip p99 1.0323 1.3863 0.7875 1.6400 pass
100000 sync.save_ack p50 0.9919 1.0614 1.0762 1.2121 pass
100000 sync.save_ack p95 0.8354 1.0999 0.6799 1.0931 FAIL
100000 sync.save_ack p99 0.9085 1.2539 1.6445 3.4700 pass

Bootstrap resamples: 20000; paired rounds: 5; candidate/control ratio samples: 10/5.
Ratios normalize lower-is-better metrics as candidate/control; cold.notes_per_s is inverted.
Gate: candidate upper 95% bootstrap bound must be at or below the dev-copy control upper bound for every metric and quantile.
FAIL: 111 comparisons exceeded the dev-copy bound.

### Files slice 1 r6 verdict: FAIL PR #1010 is still based on `dev` at head `5517ce595a09a8f949d2b33aff970e373c9d150e`. The measured candidate source was `1609d3c54dc8b341846f9d68addc362784c7e2b7` and remains unpushed. Its release binary SHA-256 is `5fe8790e40bdbaa7ead6bc6a9014360ba1837a81d2ca01d96f6a4a40a0d5c18b`. **Recorded functional gates on the candidate:** - `cargo fmt --all -- --check`: exit 0. - `cargo clippy --workspace --all-targets --locked -j4 -- -D warnings`: exit 0. - Crash tests: `cargo test -p calternal --test notes_crash --locked -j4` and `cargo test -p calternal-notes --lib interrupted_home_scan_keeps_stale_rows_for_restart_reconcile --locked -j4`: exit 0. - Clean workspace run: `cargo test --workspace --locked -j4 --no-fail-fast -- --test-threads=2`: exit 0. - `cargo build --workspace --release --locked -j4`: exit 0. - `bunx playwright test e2e/home-files-identity.spec.ts --project=chromium-1440 --project=chromium-390 --project=webkit-1440 --project=webkit-390 --workers=1`: 4 passed. **Perf r6:** `~/bin/perf-turn` completed five paired ABAB rounds at 1k, 10k and 100k. All arm invocations exited 0, with no `Failed:` markers. The candidate upper 95% bootstrap bound had to be at or below the dev-copy upper bound for every metric and quantile. The comparison used 20,000 bootstrap resamples and 10 candidate / 5 control ratio samples. Lower is better; `cold.notes_per_s` is inverted. | Notes | Over-bound comparisons | Examples, candidate U95 vs dev-copy U95 | |---:|---:|---| | 1k | 29 / 96 | `cold.disk_written` p50/p95/p99: 1.0030 vs 0.9977; `open.note` p50: 1.2207 vs 1.0545; `sync.save_ack` p99: 1.5450 vs 1.2118 | | 10k | 38 / 96 | `cold.disk_written` p50/p95/p99: 1.0016 vs 1.0013; `open.api_get` p95: 1.2532 vs 1.2011; `sync.save_ack` p99: 2.6767 vs 1.7143 | | 100k | 44 / 96 | `cold.index` p50/p95/p99: 1.0223 vs 1.0119; `home.page_big` p95/p99: 1.3982 vs 0.8835; `search.prefix` p99: 4.4292 vs 2.1253; `search.query` p95: 3.4167 vs 1.5882 | | **Total** | **111 / 288** | **FAIL** | The leading cause to investigate is contention from the initial Home identity scan: startup launches the scan and it enumerates Home entries while the benchmark exercises search, Home pages, open and save paths. The measured results do not isolate that scan as the sole cause, so this is a hypothesis rather than a confirmed attribution. The perf-02 r6 hold is inactive. The FIFO currently has an `nfa-fc1` ticket alive, so no r7 or further Files perf ticket was queued. This candidate is not READY because the perf gate failed; no push was made. <details><summary>Full r6 comparison table</summary> | Notes | Metric | Quantile | Candidate ratio gmean | Candidate upper 95% | Dev-copy ratio gmean | Dev-copy upper 95% | Gate | |---:|---|---|---:|---:|---:|---:|---| | 1000 | cold.disk_written | p50 | 1.0008 | 1.0030 | 0.9964 | 0.9977 | FAIL | | 1000 | cold.disk_written | p95 | 1.0008 | 1.0030 | 0.9964 | 0.9977 | FAIL | | 1000 | cold.disk_written | p99 | 1.0008 | 1.0030 | 0.9964 | 0.9976 | FAIL | | 1000 | cold.first_page | p50 | 1.0086 | 1.0293 | 1.0737 | 1.1313 | pass | | 1000 | cold.first_page | p95 | 1.0086 | 1.0293 | 1.0737 | 1.1313 | pass | | 1000 | cold.first_page | p99 | 1.0086 | 1.0293 | 1.0737 | 1.1313 | pass | | 1000 | cold.index | p50 | 1.0075 | 1.0246 | 1.0598 | 1.1066 | pass | | 1000 | cold.index | p95 | 1.0075 | 1.0246 | 1.0598 | 1.1066 | pass | | 1000 | cold.index | p99 | 1.0075 | 1.0246 | 1.0598 | 1.1066 | pass | | 1000 | cold.mem_peak | p50 | 1.0067 | 1.0145 | 0.9983 | 1.0085 | FAIL | | 1000 | cold.mem_peak | p95 | 1.0067 | 1.0145 | 0.9983 | 1.0085 | FAIL | | 1000 | cold.mem_peak | p99 | 1.0067 | 1.0145 | 0.9983 | 1.0085 | FAIL | | 1000 | cold.notes_per_s | p50 | 1.0075 | 1.0246 | 1.0598 | 1.1066 | pass | | 1000 | cold.notes_per_s | p95 | 1.0075 | 1.0246 | 1.0598 | 1.1066 | pass | | 1000 | cold.notes_per_s | p99 | 1.0075 | 1.0246 | 1.0598 | 1.1066 | pass | | 1000 | cold.startup | p50 | 0.9213 | 1.0576 | 1.0401 | 1.5647 | pass | | 1000 | cold.startup | p95 | 0.9213 | 1.0576 | 1.0401 | 1.5826 | pass | | 1000 | cold.startup | p99 | 0.9213 | 1.0576 | 1.0401 | 1.5826 | pass | | 1000 | home.first_page | p50 | 0.9384 | 1.1593 | 0.9219 | 1.2205 | pass | | 1000 | home.first_page | p95 | 0.9384 | 1.1593 | 0.9219 | 1.2205 | pass | | 1000 | home.first_page | p99 | 0.9384 | 1.1593 | 0.9219 | 1.2205 | pass | | 1000 | home.page | p50 | 0.9725 | 1.0302 | 1.0852 | 1.1703 | pass | | 1000 | home.page | p95 | 0.9347 | 1.0687 | 0.9115 | 1.2213 | pass | | 1000 | home.page | p99 | 0.6942 | 0.9557 | 0.6630 | 0.9999 | pass | | 1000 | home.page_big | p50 | 1.0173 | 1.0648 | 1.0427 | 1.0934 | pass | | 1000 | home.page_big | p95 | 1.0173 | 1.0612 | 1.0427 | 1.0934 | pass | | 1000 | home.page_big | p99 | 1.0173 | 1.0612 | 1.0427 | 1.0934 | pass | | 1000 | home.page_next | p50 | 0.9863 | 1.0482 | 1.0341 | 1.1075 | pass | | 1000 | home.page_next | p95 | 0.9776 | 1.0749 | 1.0578 | 1.2113 | pass | | 1000 | home.page_next | p99 | 1.0493 | 1.1490 | 1.0223 | 1.0969 | FAIL | | 1000 | home.page_tag | p50 | 1.0052 | 1.0276 | 1.0173 | 1.0416 | pass | | 1000 | home.page_tag | p95 | 1.0278 | 1.0806 | 1.0361 | 1.0968 | pass | | 1000 | home.page_tag | p99 | 1.0594 | 1.0939 | 1.0443 | 1.0949 | pass | | 1000 | home.page_title | p50 | 1.0081 | 1.0462 | 1.0293 | 1.0619 | pass | | 1000 | home.page_title | p95 | 0.9770 | 1.0643 | 1.0419 | 1.1789 | pass | | 1000 | home.page_title | p99 | 0.8899 | 1.0580 | 0.8519 | 1.2659 | pass | | 1000 | journal.catch_up | p50 | 1.0322 | 1.1184 | 1.1651 | 1.3089 | pass | | 1000 | journal.catch_up | p95 | 1.0322 | 1.1184 | 1.1651 | 1.3089 | pass | | 1000 | journal.catch_up | p99 | 1.0322 | 1.1184 | 1.1651 | 1.3089 | pass | | 1000 | journal.entries | p50 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | pass | | 1000 | journal.entries | p95 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | pass | | 1000 | journal.entries | p99 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | pass | | 1000 | journal.page | p50 | 1.0331 | 1.1172 | 1.1751 | 1.3370 | pass | | 1000 | journal.page | p95 | 1.0331 | 1.1184 | 1.1751 | 1.3370 | pass | | 1000 | journal.page | p99 | 1.0331 | 1.1184 | 1.1751 | 1.3370 | pass | | 1000 | mem.after_first_page | p50 | 1.0207 | 1.0392 | 0.9950 | 1.0175 | FAIL | | 1000 | mem.after_first_page | p95 | 1.0207 | 1.0392 | 0.9950 | 1.0175 | FAIL | | 1000 | mem.after_first_page | p99 | 1.0207 | 1.0392 | 0.9950 | 1.0175 | FAIL | | 1000 | mem.after_opens | p50 | 1.0012 | 1.0098 | 1.0045 | 1.0137 | pass | | 1000 | mem.after_opens | p95 | 1.0012 | 1.0098 | 1.0045 | 1.0137 | pass | | 1000 | mem.after_opens | p99 | 1.0012 | 1.0098 | 1.0045 | 1.0137 | pass | | 1000 | mem.after_search | p50 | 1.0001 | 1.0169 | 1.0159 | 1.0461 | pass | | 1000 | mem.after_search | p95 | 1.0001 | 1.0169 | 1.0159 | 1.0461 | pass | | 1000 | mem.after_search | p99 | 1.0001 | 1.0169 | 1.0159 | 1.0461 | pass | | 1000 | mem.idle | p50 | 1.0257 | 1.0486 | 1.0030 | 1.0331 | FAIL | | 1000 | mem.idle | p95 | 1.0257 | 1.0486 | 1.0030 | 1.0331 | FAIL | | 1000 | mem.idle | p99 | 1.0257 | 1.0486 | 1.0030 | 1.0331 | FAIL | | 1000 | open.api_get | p50 | 0.9815 | 1.0111 | 1.0324 | 1.1091 | pass | | 1000 | open.api_get | p95 | 0.9400 | 0.9925 | 1.0401 | 1.1279 | pass | | 1000 | open.api_get | p99 | 0.9600 | 1.0213 | 1.0682 | 1.1033 | pass | | 1000 | open.long_note | p50 | 1.0680 | 1.2105 | 1.0033 | 1.0156 | FAIL | | 1000 | open.long_note | p95 | 1.0680 | 1.2105 | 1.0033 | 1.0156 | FAIL | | 1000 | open.long_note | p99 | 1.0680 | 1.2105 | 1.0033 | 1.0156 | FAIL | | 1000 | open.note | p50 | 1.0760 | 1.2207 | 1.0328 | 1.0545 | FAIL | | 1000 | open.note | p95 | 1.0432 | 1.1874 | 1.0400 | 1.1037 | FAIL | | 1000 | open.note | p99 | 1.0100 | 1.0988 | 1.1528 | 1.3217 | pass | | 1000 | search.catch_up | p50 | 1.0000 | 1.0002 | 1.0000 | 1.0002 | pass | | 1000 | search.catch_up | p95 | 1.0000 | 1.0002 | 1.0000 | 1.0002 | pass | | 1000 | search.catch_up | p99 | 1.0000 | 1.0002 | 1.0000 | 1.0002 | pass | | 1000 | search.first_query | p50 | 1.0021 | 1.0465 | 0.9782 | 1.0951 | pass | | 1000 | search.first_query | p95 | 1.0021 | 1.0465 | 0.9782 | 1.0979 | pass | | 1000 | search.first_query | p99 | 1.0021 | 1.0465 | 0.9782 | 1.0951 | pass | | 1000 | search.prefix | p50 | 0.9881 | 1.0015 | 0.9609 | 1.0058 | pass | | 1000 | search.prefix | p95 | 0.9793 | 1.0353 | 0.9195 | 1.0734 | pass | | 1000 | search.prefix | p99 | 0.9680 | 1.0521 | 0.8762 | 1.0594 | pass | | 1000 | search.query | p50 | 0.9484 | 0.9802 | 0.9442 | 1.0429 | pass | | 1000 | search.query | p95 | 0.9840 | 1.0503 | 1.0105 | 1.0996 | pass | | 1000 | search.query | p99 | 0.9270 | 0.9540 | 0.9846 | 1.0322 | pass | | 1000 | search.typo | p50 | 0.9257 | 0.9788 | 0.9627 | 1.1528 | pass | | 1000 | search.typo | p95 | 0.9041 | 0.9786 | 0.9499 | 1.3013 | pass | | 1000 | search.typo | p99 | 0.9258 | 1.0456 | 1.0456 | 1.4878 | pass | | 1000 | shutdown | p50 | 1.1523 | 1.3239 | 1.0060 | 1.0257 | FAIL | | 1000 | shutdown | p95 | 1.1523 | 1.3239 | 1.0060 | 1.0257 | FAIL | | 1000 | shutdown | p99 | 1.1523 | 1.3239 | 1.0060 | 1.0257 | FAIL | | 1000 | startup.healthz | p50 | 1.1162 | 1.3085 | 0.9748 | 1.0510 | FAIL | | 1000 | startup.healthz | p95 | 1.1162 | 1.3085 | 0.9748 | 1.0510 | FAIL | | 1000 | startup.healthz | p99 | 1.1162 | 1.3085 | 0.9748 | 1.0510 | FAIL | | 1000 | sync.durable_write | p50 | 1.0202 | 1.0859 | 1.0721 | 1.1722 | pass | | 1000 | sync.durable_write | p95 | 1.0779 | 1.1999 | 1.0303 | 1.1661 | FAIL | | 1000 | sync.durable_write | p99 | 0.9996 | 1.0927 | 1.0766 | 1.1536 | pass | | 1000 | sync.round_trip | p50 | 1.0218 | 1.0392 | 0.9165 | 0.9625 | FAIL | | 1000 | sync.round_trip | p95 | 1.0085 | 1.0295 | 0.9845 | 1.0561 | pass | | 1000 | sync.round_trip | p99 | 0.9903 | 1.1181 | 1.3138 | 1.6369 | pass | | 1000 | sync.save_ack | p50 | 1.0166 | 1.0374 | 0.9908 | 1.0186 | FAIL | | 1000 | sync.save_ack | p95 | 1.0207 | 1.0827 | 0.9197 | 0.9508 | FAIL | | 1000 | sync.save_ack | p99 | 1.1208 | 1.5450 | 1.0676 | 1.2118 | FAIL | | 10000 | cold.disk_written | p50 | 0.9997 | 1.0016 | 0.9989 | 1.0013 | FAIL | | 10000 | cold.disk_written | p95 | 0.9997 | 1.0016 | 0.9989 | 1.0013 | FAIL | | 10000 | cold.disk_written | p99 | 0.9997 | 1.0016 | 0.9989 | 1.0013 | FAIL | | 10000 | cold.first_page | p50 | 1.0476 | 1.0754 | 0.9993 | 1.0521 | FAIL | | 10000 | cold.first_page | p95 | 1.0476 | 1.0754 | 0.9993 | 1.0521 | FAIL | | 10000 | cold.first_page | p99 | 1.0476 | 1.0754 | 0.9993 | 1.0521 | FAIL | | 10000 | cold.index | p50 | 0.9995 | 1.0127 | 1.0241 | 1.0482 | pass | | 10000 | cold.index | p95 | 0.9995 | 1.0127 | 1.0241 | 1.0482 | pass | | 10000 | cold.index | p99 | 0.9995 | 1.0127 | 1.0241 | 1.0482 | pass | | 10000 | cold.mem_peak | p50 | 1.0047 | 1.0093 | 1.0033 | 1.0084 | FAIL | | 10000 | cold.mem_peak | p95 | 1.0047 | 1.0093 | 1.0033 | 1.0084 | FAIL | | 10000 | cold.mem_peak | p99 | 1.0047 | 1.0093 | 1.0033 | 1.0084 | FAIL | | 10000 | cold.notes_per_s | p50 | 0.9995 | 1.0127 | 1.0241 | 1.0490 | pass | | 10000 | cold.notes_per_s | p95 | 0.9995 | 1.0127 | 1.0241 | 1.0482 | pass | | 10000 | cold.notes_per_s | p99 | 0.9995 | 1.0127 | 1.0241 | 1.0482 | pass | | 10000 | cold.startup | p50 | 1.0044 | 1.0641 | 1.0304 | 1.1080 | pass | | 10000 | cold.startup | p95 | 1.0044 | 1.0641 | 1.0304 | 1.1101 | pass | | 10000 | cold.startup | p99 | 1.0044 | 1.0641 | 1.0304 | 1.1101 | pass | | 10000 | home.first_page | p50 | 1.2930 | 1.4210 | 1.1532 | 1.5810 | pass | | 10000 | home.first_page | p95 | 1.2930 | 1.4210 | 1.1532 | 1.5810 | pass | | 10000 | home.first_page | p99 | 1.2930 | 1.4210 | 1.1532 | 1.5810 | pass | | 10000 | home.page | p50 | 0.9776 | 1.0476 | 1.0536 | 1.2108 | pass | | 10000 | home.page | p95 | 0.9394 | 1.3131 | 0.8125 | 2.1571 | pass | | 10000 | home.page | p99 | 0.7542 | 1.1867 | 0.7539 | 1.1664 | FAIL | | 10000 | home.page_big | p50 | 0.9816 | 1.0078 | 1.0070 | 1.0333 | pass | | 10000 | home.page_big | p95 | 1.0000 | 1.0205 | 0.9838 | 1.0429 | pass | | 10000 | home.page_big | p99 | 1.0000 | 1.0205 | 0.9838 | 1.0429 | pass | | 10000 | home.page_next | p50 | 1.0087 | 1.0361 | 0.9840 | 1.0244 | FAIL | | 10000 | home.page_next | p95 | 0.9910 | 1.0407 | 0.9969 | 1.0417 | pass | | 10000 | home.page_next | p99 | 1.0333 | 1.0993 | 1.0023 | 1.1060 | pass | | 10000 | home.page_tag | p50 | 0.9787 | 1.0086 | 1.0093 | 1.0423 | pass | | 10000 | home.page_tag | p95 | 0.9619 | 0.9970 | 1.0685 | 1.1413 | pass | | 10000 | home.page_tag | p99 | 0.9570 | 1.0504 | 0.9383 | 1.0823 | pass | | 10000 | home.page_title | p50 | 1.0107 | 1.0379 | 0.9855 | 1.0891 | pass | | 10000 | home.page_title | p95 | 0.9643 | 1.0079 | 1.0070 | 1.3325 | pass | | 10000 | home.page_title | p99 | 0.8339 | 1.2176 | 0.7265 | 1.2493 | pass | | 10000 | journal.catch_up | p50 | 0.9856 | 1.0227 | 0.9957 | 1.0394 | pass | | 10000 | journal.catch_up | p95 | 0.9856 | 1.0227 | 0.9957 | 1.0400 | pass | | 10000 | journal.catch_up | p99 | 0.9856 | 1.0227 | 0.9957 | 1.0400 | pass | | 10000 | journal.entries | p50 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | pass | | 10000 | journal.entries | p95 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | pass | | 10000 | journal.entries | p99 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | pass | | 10000 | journal.page | p50 | 0.9891 | 1.0239 | 0.9984 | 1.0383 | pass | | 10000 | journal.page | p95 | 0.9477 | 1.0030 | 0.9883 | 1.0956 | pass | | 10000 | journal.page | p99 | 0.9477 | 1.0030 | 0.9883 | 1.0956 | pass | | 10000 | mem.after_first_page | p50 | 1.0113 | 1.0206 | 1.0034 | 1.0094 | FAIL | | 10000 | mem.after_first_page | p95 | 1.0113 | 1.0206 | 1.0034 | 1.0094 | FAIL | | 10000 | mem.after_first_page | p99 | 1.0113 | 1.0203 | 1.0034 | 1.0094 | FAIL | | 10000 | mem.after_opens | p50 | 0.9974 | 1.0096 | 1.0051 | 1.0287 | pass | | 10000 | mem.after_opens | p95 | 0.9974 | 1.0096 | 1.0051 | 1.0287 | pass | | 10000 | mem.after_opens | p99 | 0.9974 | 1.0096 | 1.0051 | 1.0289 | pass | | 10000 | mem.after_search | p50 | 1.0075 | 1.0181 | 1.0052 | 1.0179 | FAIL | | 10000 | mem.after_search | p95 | 1.0075 | 1.0181 | 1.0052 | 1.0179 | FAIL | | 10000 | mem.after_search | p99 | 1.0075 | 1.0181 | 1.0052 | 1.0179 | FAIL | | 10000 | mem.idle | p50 | 1.0049 | 1.0264 | 0.9936 | 1.0252 | FAIL | | 10000 | mem.idle | p95 | 1.0049 | 1.0264 | 0.9936 | 1.0257 | FAIL | | 10000 | mem.idle | p99 | 1.0049 | 1.0264 | 0.9936 | 1.0252 | FAIL | | 10000 | open.api_get | p50 | 1.0586 | 1.1645 | 1.0405 | 1.1612 | FAIL | | 10000 | open.api_get | p95 | 1.1408 | 1.2532 | 1.0555 | 1.2011 | FAIL | | 10000 | open.api_get | p99 | 1.0789 | 1.2436 | 1.0672 | 1.1509 | FAIL | | 10000 | open.long_note | p50 | 0.7602 | 0.9305 | 0.7336 | 1.4527 | pass | | 10000 | open.long_note | p95 | 0.7602 | 0.9305 | 0.7336 | 1.4527 | pass | | 10000 | open.long_note | p99 | 0.7602 | 0.9305 | 0.7336 | 1.4527 | pass | | 10000 | open.note | p50 | 0.9705 | 1.0013 | 1.0161 | 1.0598 | pass | | 10000 | open.note | p95 | 1.0058 | 1.1399 | 0.9678 | 1.0853 | FAIL | | 10000 | open.note | p99 | 0.9439 | 1.0597 | 0.9699 | 1.1530 | pass | | 10000 | search.catch_up | p50 | 1.0002 | 1.0004 | 1.0000 | 1.0002 | FAIL | | 10000 | search.catch_up | p95 | 1.0002 | 1.0004 | 1.0000 | 1.0002 | FAIL | | 10000 | search.catch_up | p99 | 1.0002 | 1.0004 | 1.0000 | 1.0002 | FAIL | | 10000 | search.first_query | p50 | 0.9843 | 1.0192 | 0.8350 | 0.9283 | FAIL | | 10000 | search.first_query | p95 | 0.9843 | 1.0192 | 0.8350 | 0.9283 | FAIL | | 10000 | search.first_query | p99 | 0.9843 | 1.0192 | 0.8350 | 0.9283 | FAIL | | 10000 | search.prefix | p50 | 0.9176 | 0.9952 | 0.9344 | 1.1060 | pass | | 10000 | search.prefix | p95 | 0.6318 | 0.9124 | 1.0265 | 2.4236 | pass | | 10000 | search.prefix | p99 | 0.6273 | 0.9973 | 1.0972 | 3.0446 | pass | | 10000 | search.query | p50 | 0.9227 | 1.0204 | 0.9105 | 1.0823 | pass | | 10000 | search.query | p95 | 0.8128 | 1.0146 | 1.1948 | 2.0964 | pass | | 10000 | search.query | p99 | 0.9125 | 0.9737 | 0.9095 | 1.0143 | pass | | 10000 | search.typo | p50 | 0.7628 | 0.9340 | 1.2134 | 1.4945 | pass | | 10000 | search.typo | p95 | 0.5571 | 0.8035 | 0.9159 | 1.2798 | pass | | 10000 | search.typo | p99 | 0.4843 | 0.6695 | 1.0669 | 2.4615 | pass | | 10000 | shutdown | p50 | 0.9355 | 1.3031 | 0.8898 | 1.3315 | pass | | 10000 | shutdown | p95 | 0.9355 | 1.3032 | 0.8898 | 1.3315 | pass | | 10000 | shutdown | p99 | 0.9355 | 1.3032 | 0.8898 | 1.3290 | pass | | 10000 | startup.healthz | p50 | 1.0431 | 1.1788 | 0.9565 | 1.1278 | FAIL | | 10000 | startup.healthz | p95 | 1.0431 | 1.1788 | 0.9565 | 1.1278 | FAIL | | 10000 | startup.healthz | p99 | 1.0431 | 1.1788 | 0.9565 | 1.1278 | FAIL | | 10000 | sync.durable_write | p50 | 1.0554 | 1.1043 | 1.0500 | 1.1238 | pass | | 10000 | sync.durable_write | p95 | 1.0542 | 1.1022 | 1.0928 | 1.2336 | pass | | 10000 | sync.durable_write | p99 | 1.0243 | 1.0826 | 1.1498 | 1.4342 | pass | | 10000 | sync.round_trip | p50 | 1.0157 | 1.0338 | 0.9670 | 1.0193 | FAIL | | 10000 | sync.round_trip | p95 | 0.9939 | 1.0371 | 1.0136 | 1.0659 | pass | | 10000 | sync.round_trip | p99 | 1.3166 | 1.6107 | 1.1212 | 1.2451 | FAIL | | 10000 | sync.save_ack | p50 | 0.9961 | 1.0234 | 0.9837 | 1.0166 | FAIL | | 10000 | sync.save_ack | p95 | 1.2035 | 1.5215 | 1.0409 | 1.1253 | FAIL | | 10000 | sync.save_ack | p99 | 1.9539 | 2.6767 | 1.3134 | 1.7143 | FAIL | | 100000 | cold.disk_written | p50 | 0.9980 | 0.9997 | 0.9968 | 1.0003 | pass | | 100000 | cold.disk_written | p95 | 0.9980 | 0.9997 | 0.9968 | 1.0003 | pass | | 100000 | cold.disk_written | p99 | 0.9980 | 0.9997 | 0.9968 | 1.0003 | pass | | 100000 | cold.first_page | p50 | 0.9632 | 1.0081 | 0.9376 | 1.0180 | pass | | 100000 | cold.first_page | p95 | 0.9632 | 1.0081 | 0.9376 | 1.0180 | pass | | 100000 | cold.first_page | p99 | 0.9632 | 1.0081 | 0.9376 | 1.0180 | pass | | 100000 | cold.index | p50 | 1.0031 | 1.0223 | 0.9803 | 1.0119 | FAIL | | 100000 | cold.index | p95 | 1.0031 | 1.0223 | 0.9803 | 1.0119 | FAIL | | 100000 | cold.index | p99 | 1.0031 | 1.0223 | 0.9803 | 1.0119 | FAIL | | 100000 | cold.mem_peak | p50 | 0.9976 | 1.0030 | 1.0010 | 1.0128 | pass | | 100000 | cold.mem_peak | p95 | 0.9976 | 1.0030 | 1.0010 | 1.0128 | pass | | 100000 | cold.mem_peak | p99 | 0.9976 | 1.0030 | 1.0010 | 1.0130 | pass | | 100000 | cold.notes_per_s | p50 | 1.0031 | 1.0223 | 0.9803 | 1.0119 | FAIL | | 100000 | cold.notes_per_s | p95 | 1.0031 | 1.0223 | 0.9803 | 1.0119 | FAIL | | 100000 | cold.notes_per_s | p99 | 1.0031 | 1.0223 | 0.9803 | 1.0119 | FAIL | | 100000 | cold.startup | p50 | 1.0840 | 1.2295 | 0.9966 | 1.0719 | FAIL | | 100000 | cold.startup | p95 | 1.0840 | 1.2295 | 0.9966 | 1.0709 | FAIL | | 100000 | cold.startup | p99 | 1.0840 | 1.2325 | 0.9966 | 1.0719 | FAIL | | 100000 | home.first_page | p50 | 1.0481 | 1.1205 | 1.1416 | 1.4372 | pass | | 100000 | home.first_page | p95 | 1.0481 | 1.1205 | 1.1416 | 1.4372 | pass | | 100000 | home.first_page | p99 | 1.0481 | 1.1205 | 1.1416 | 1.4372 | pass | | 100000 | home.page | p50 | 1.0579 | 1.1353 | 0.9014 | 0.9875 | FAIL | | 100000 | home.page | p95 | 0.9628 | 1.0911 | 1.3583 | 2.5428 | pass | | 100000 | home.page | p99 | 0.7912 | 1.2427 | 1.0739 | 1.7068 | pass | | 100000 | home.page_big | p50 | 0.9913 | 1.0069 | 1.0352 | 1.0831 | pass | | 100000 | home.page_big | p95 | 1.0943 | 1.3982 | 0.8222 | 0.8835 | FAIL | | 100000 | home.page_big | p99 | 1.0943 | 1.3982 | 0.8222 | 0.8835 | FAIL | | 100000 | home.page_next | p50 | 0.9524 | 1.0036 | 1.0334 | 1.0974 | pass | | 100000 | home.page_next | p95 | 0.8818 | 1.0614 | 0.9343 | 1.1386 | pass | | 100000 | home.page_next | p99 | 0.9859 | 1.0685 | 0.8560 | 0.9620 | FAIL | | 100000 | home.page_tag | p50 | 1.0046 | 1.0084 | 1.0111 | 1.0284 | pass | | 100000 | home.page_tag | p95 | 1.0210 | 1.0570 | 0.9970 | 1.0335 | FAIL | | 100000 | home.page_tag | p99 | 1.0601 | 1.1066 | 0.9674 | 1.0326 | FAIL | | 100000 | home.page_title | p50 | 1.0335 | 1.1029 | 0.8072 | 0.9183 | FAIL | | 100000 | home.page_title | p95 | 0.8947 | 1.2703 | 1.1049 | 1.9583 | pass | | 100000 | home.page_title | p99 | 1.0765 | 1.7728 | 1.5899 | 3.8727 | pass | | 100000 | journal.catch_up | p50 | 0.9707 | 0.9803 | 1.0675 | 1.1160 | pass | | 100000 | journal.catch_up | p95 | 0.9707 | 0.9803 | 1.0675 | 1.1160 | pass | | 100000 | journal.catch_up | p99 | 0.9707 | 0.9803 | 1.0675 | 1.1173 | pass | | 100000 | journal.entries | p50 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | pass | | 100000 | journal.entries | p95 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | pass | | 100000 | journal.entries | p99 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | pass | | 100000 | journal.page | p50 | 0.9678 | 0.9797 | 1.0611 | 1.1183 | pass | | 100000 | journal.page | p95 | 0.9533 | 0.9898 | 1.1277 | 1.2107 | pass | | 100000 | journal.page | p99 | 0.9391 | 1.0203 | 1.3044 | 1.4838 | pass | | 100000 | mem.after_first_page | p50 | 1.0164 | 1.0313 | 0.9972 | 1.0153 | FAIL | | 100000 | mem.after_first_page | p95 | 1.0164 | 1.0313 | 0.9972 | 1.0153 | FAIL | | 100000 | mem.after_first_page | p99 | 1.0164 | 1.0313 | 0.9972 | 1.0153 | FAIL | | 100000 | mem.after_opens | p50 | 1.0089 | 1.0312 | 0.9989 | 1.0102 | FAIL | | 100000 | mem.after_opens | p95 | 1.0089 | 1.0312 | 0.9989 | 1.0100 | FAIL | | 100000 | mem.after_opens | p99 | 1.0089 | 1.0312 | 0.9989 | 1.0102 | FAIL | | 100000 | mem.after_search | p50 | 1.0451 | 1.0770 | 1.0197 | 1.0528 | FAIL | | 100000 | mem.after_search | p95 | 1.0451 | 1.0770 | 1.0197 | 1.0528 | FAIL | | 100000 | mem.after_search | p99 | 1.0451 | 1.0770 | 1.0197 | 1.0528 | FAIL | | 100000 | mem.idle | p50 | 1.0050 | 1.0203 | 0.9811 | 1.0137 | FAIL | | 100000 | mem.idle | p95 | 1.0050 | 1.0203 | 0.9811 | 1.0137 | FAIL | | 100000 | mem.idle | p99 | 1.0050 | 1.0192 | 0.9811 | 1.0137 | FAIL | | 100000 | open.api_get | p50 | 0.9817 | 1.0677 | 1.0650 | 1.1385 | pass | | 100000 | open.api_get | p95 | 1.0076 | 1.1291 | 1.0536 | 1.1613 | pass | | 100000 | open.api_get | p99 | 0.9967 | 1.1422 | 1.1940 | 1.4674 | pass | | 100000 | open.long_note | p50 | 0.9482 | 1.0322 | 1.1262 | 1.3150 | pass | | 100000 | open.long_note | p95 | 0.9482 | 1.0322 | 1.1262 | 1.3199 | pass | | 100000 | open.long_note | p99 | 0.9482 | 1.0322 | 1.1262 | 1.3150 | pass | | 100000 | open.note | p50 | 1.0134 | 1.0513 | 0.9728 | 1.0166 | FAIL | | 100000 | open.note | p95 | 0.9544 | 0.9905 | 1.0059 | 1.0284 | pass | | 100000 | open.note | p99 | 0.9683 | 1.0812 | 1.0507 | 1.3099 | pass | | 100000 | search.catch_up | p50 | 1.0077 | 1.0350 | 1.0138 | 1.0424 | pass | | 100000 | search.catch_up | p95 | 1.0077 | 1.0350 | 1.0138 | 1.0424 | pass | | 100000 | search.catch_up | p99 | 1.0077 | 1.0350 | 1.0138 | 1.0425 | pass | | 100000 | search.first_query | p50 | 1.0999 | 1.3137 | 0.9771 | 1.0241 | FAIL | | 100000 | search.first_query | p95 | 1.0999 | 1.3137 | 0.9771 | 1.0241 | FAIL | | 100000 | search.first_query | p99 | 1.0999 | 1.3137 | 0.9771 | 1.0241 | FAIL | | 100000 | search.prefix | p50 | 1.3161 | 1.5727 | 0.7020 | 1.0099 | FAIL | | 100000 | search.prefix | p95 | 2.5829 | 3.5552 | 0.6232 | 1.8187 | FAIL | | 100000 | search.prefix | p99 | 2.1856 | 4.4292 | 0.6527 | 2.1253 | FAIL | | 100000 | search.query | p50 | 1.4110 | 1.7309 | 0.6496 | 0.9927 | FAIL | | 100000 | search.query | p95 | 1.9866 | 3.4167 | 0.7298 | 1.5882 | FAIL | | 100000 | search.query | p99 | 1.4066 | 1.7522 | 0.8752 | 1.1991 | FAIL | | 100000 | search.typo | p50 | 1.3363 | 1.8847 | 0.9270 | 1.6987 | FAIL | | 100000 | search.typo | p95 | 1.1191 | 1.3627 | 0.9950 | 1.4095 | pass | | 100000 | search.typo | p99 | 1.1026 | 1.3592 | 0.9327 | 1.5483 | pass | | 100000 | shutdown | p50 | 1.0281 | 1.0839 | 0.8869 | 0.9999 | FAIL | | 100000 | shutdown | p95 | 1.0281 | 1.0839 | 0.8869 | 0.9999 | FAIL | | 100000 | shutdown | p99 | 1.0281 | 1.0839 | 0.8869 | 1.0007 | FAIL | | 100000 | startup.healthz | p50 | 0.9571 | 1.0424 | 1.0151 | 1.2332 | pass | | 100000 | startup.healthz | p95 | 0.9571 | 1.0424 | 1.0151 | 1.2332 | pass | | 100000 | startup.healthz | p99 | 0.9571 | 1.0424 | 1.0151 | 1.2332 | pass | | 100000 | sync.durable_write | p50 | 0.9976 | 1.0730 | 1.0513 | 1.1549 | pass | | 100000 | sync.durable_write | p95 | 0.9705 | 1.0526 | 1.1046 | 1.2205 | pass | | 100000 | sync.durable_write | p99 | 1.0118 | 1.1141 | 1.1413 | 1.3185 | pass | | 100000 | sync.round_trip | p50 | 0.9666 | 1.0127 | 0.8774 | 0.9818 | FAIL | | 100000 | sync.round_trip | p95 | 0.9050 | 1.0542 | 0.9152 | 1.1536 | pass | | 100000 | sync.round_trip | p99 | 1.0323 | 1.3863 | 0.7875 | 1.6400 | pass | | 100000 | sync.save_ack | p50 | 0.9919 | 1.0614 | 1.0762 | 1.2121 | pass | | 100000 | sync.save_ack | p95 | 0.8354 | 1.0999 | 0.6799 | 1.0931 | FAIL | | 100000 | sync.save_ack | p99 | 0.9085 | 1.2539 | 1.6445 | 3.4700 | pass | Bootstrap resamples: 20000; paired rounds: 5; candidate/control ratio samples: 10/5. Ratios normalize lower-is-better metrics as candidate/control; cold.notes_per_s is inverted. Gate: candidate upper 95% bootstrap bound must be at or below the dev-copy control upper bound for every metric and quantile. FAIL: 111 comparisons exceeded the dev-copy bound. </details>
Author
Owner

Files handover, 13 Nov 2026 (written by the orchestrator; the lane was stopped before it could post its own)

Heads

  • PR #1010 branch feat/files-s1-identity: 5517ce595a09. Not READY.
  • Tested candidate 1609d3c54dc8b341846f9d68addc362784c7e2b7, on origin/dev 5fba67585: it was only on dev-01 (codex/files-s1-gates-20261112, worktree ~/Developer/Worktrees/f1). I pushed it as wip/handover/files-s1-candidate. Release binary SHA-256 5fe8790e…5c18b.

Gates on the candidate. All pass: fmt, strict clippy, crash tests, workspace tests, release build, and the Files e2e home-files-identity.spec.ts (4/4 across the four Playwright projects). Details: comment 95008.

Perf r6: FAIL.

  • 111 of 288 metric/quantile comparisons are over the dev-copy upper bound: 1k 29/96, 10k 38/96, 100k 44/96.
  • Worst offenders:
    • 100k search.prefix p99: 4.43 vs 2.13
    • 10k sync.save_ack p99: 2.68 vs 1.71
    • 1k cold.disk_written
    • open.note
    • startup/shutdown
  • Likely cause: contention from the initial Home identity scan. Not isolated.

Perf method.

  • ~/bin/perf-turn on perf-01, five paired ABAB rounds at 1k/10k/100k, with perf-02's lock held as a quiet pair.
  • Comparator: 20,000 bootstrap resamples; the candidate U95 must be at or below the dev-copy U95.
  • Driver, staged binaries and run logs: in the files-s1-perf-c8688c-* worktrees on dev-01 and perf-01.

Next steps

  1. Profile the initial Home identity scan against save, open and search: is it running concurrently, and is it fsync-bound? Then move it off the hot path (idle-time, batched, or throttled) or make it incremental.
  2. Re-run r7 only after a profile shows the contention is gone.
  3. Then rebase onto current dev, update PR #1010 to the candidate, and re-gate.

Tiering v5 compatibility is kept: there's no tier metadata in this slice.

## Files handover, 13 Nov 2026 (written by the orchestrator; the lane was stopped before it could post its own) **Heads** - PR #1010 branch `feat/files-s1-identity`: `5517ce595a09`. Not READY. - Tested candidate `1609d3c54dc8b341846f9d68addc362784c7e2b7`, on `origin/dev` `5fba67585`: it was only on dev-01 (`codex/files-s1-gates-20261112`, worktree `~/Developer/Worktrees/f1`). I pushed it as **`wip/handover/files-s1-candidate`**. Release binary SHA-256 `5fe8790e…5c18b`. **Gates on the candidate.** All pass: fmt, strict clippy, crash tests, workspace tests, release build, and the Files e2e `home-files-identity.spec.ts` (4/4 across the four Playwright projects). Details: [comment 95008](https://git.kayg.org/kayg/calternal/pulls/1010#issuecomment-95008). **Perf r6: FAIL.** - 111 of 288 metric/quantile comparisons are over the dev-copy upper bound: 1k 29/96, 10k 38/96, 100k 44/96. - Worst offenders: - 100k `search.prefix` p99: 4.43 vs 2.13 - 10k `sync.save_ack` p99: 2.68 vs 1.71 - 1k `cold.disk_written` - `open.note` - startup/shutdown - Likely cause: contention from the initial Home identity scan. Not isolated. **Perf method.** - `~/bin/perf-turn` on perf-01, five paired ABAB rounds at 1k/10k/100k, with perf-02's lock held as a quiet pair. - Comparator: 20,000 bootstrap resamples; the candidate U95 must be at or below the dev-copy U95. - Driver, staged binaries and run logs: in the `files-s1-perf-c8688c-*` worktrees on dev-01 and perf-01. **Next steps** 1. Profile the initial Home identity scan against save, open and search: is it running concurrently, and is it fsync-bound? Then move it off the hot path (idle-time, batched, or throttled) or make it incremental. 2. Re-run r7 only after a profile shows the contention is gone. 3. Then rebase onto current dev, update PR #1010 to the candidate, and re-gate. Tiering v5 compatibility is kept: there's no tier metadata in this slice.
Author
Owner

Superseded by #1117 (feat/files-s1-identity-r7, head 934ef1c36). It is the tested candidate 1609d3c54 rebased onto dev 796d80cba, plus the r7 fix: the Home Files walk now runs only in idle time (every action counts as use, pauses end at once on shutdown, one syncfs per page). It is not a fast-forward of this branch, so it is a new PR. Profile and gates are on #1117; perf r7 is queued in the FIFO. This PR's branch was not changed.

Superseded by #1117 (`feat/files-s1-identity-r7`, head `934ef1c36`). It is the tested candidate `1609d3c54` rebased onto dev `796d80cba`, plus the r7 fix: the Home Files walk now runs only in idle time (every action counts as use, pauses end at once on shutdown, one `syncfs` per page). It is not a fast-forward of this branch, so it is a new PR. Profile and gates are on #1117; perf r7 is queued in the FIFO. This PR's branch was not changed.
Author
Owner

Superseded by #1117 (identity-walk contention fixed; rebased on dev 796d80cba). Closing; the old head stays on feat/files-s1-identity.

Superseded by #1117 (identity-walk contention fixed; rebased on dev 796d80cba). Closing; the old head stays on `feat/files-s1-identity`.
kayg closed this pull request 2026-11-14 11:10:02 +00:00
Some checks failed
CI / server (pull_request) Has been cancelled
CI / rust (pull_request) Has been cancelled
CI / web (pull_request) Has been cancelled
Markdown extraction contract / markdown-native-contract (pull_request) Has been cancelled
Markdown extraction contract / markdown-editor-contract (pull_request) Has been cancelled

Pull request closed

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

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal!1010
No description provided.