WIP: feat(whiteboard): file and sync foundation (slice 1), resumed on current dev (supersedes #1015) #1129

Draft
kayg wants to merge 40 commits from wip/whiteboard-s1-1114 into dev
Owner

Supersedes #1015 (not closed here). Same 39 commits (patch-equal) as the PR head 741e5453e, carried through the resume branch wip/handover/whiteboard-s1-resume and merged with current origin/dev 796d80cba. feat/whiteboard-s1 was not touched: the resume branch is a rebase, so it is not a fast-forward of the old head. No new code was added.

Plan, limits, failure table and decisions are in the #1015 description and comments; read those. Gate results are in the comment below.

Open: legacy_attachment_migration_is_recoverable_at_each_boundary waits on the Files identity API in #1010 (no parallel identity layer added). Draft until then.

🤖 Generated with Claude Code

Supersedes #1015 (not closed here). Same 39 commits (patch-equal) as the PR head `741e5453e`, carried through the resume branch `wip/handover/whiteboard-s1-resume` and merged with current `origin/dev` 796d80cba. `feat/whiteboard-s1` was not touched: the resume branch is a rebase, so it is not a fast-forward of the old head. No new code was added. Plan, limits, failure table and decisions are in the #1015 description and comments; read those. Gate results are in the comment below. Open: `legacy_attachment_migration_is_recoverable_at_each_boundary` waits on the Files identity API in #1010 (no parallel identity layer added). Draft until then. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
kayg added 40 commits 2026-11-14 08:14:19 +00:00
Merge remote-tracking branch 'origin/dev' into wip/whiteboard-s1-1114
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
0751d67339
Author
Owner

Notes hot-path ABAB ×5: head 0751d6733 vs dev 796d80cba

Why needed: the diff touches room/{pipeline,save,sync,actor,load}.rs. perf-01 turn via ~/bin/perf-turn, perf-02 lock held for the run and released after. Fresh 10k Home per report, seed 1, calternal-perf --sizes 10k --runs 1 --cold-runs 0 --idle-secs 0 --soak-secs 0, same harness binary for every arm. Ran 13:28–13:43 IST on 14 Nov. Boot ID unchanged (7a65f072-…), CPUs 0-3 before and after.

Hashes: dev calternal a354966bec19bf9d2c25dc59707707477a44494eb2d48b3d5277931e7d9fdc48; PR calternal c24ffd418c79b177c8cdeffdc094fba9f816676180ce63eaf668ecdcfa415ad5; harness 55b27c8e3fc166514a0c1cc06d2ded8caaf67e511944779f66c6c42b33300132 (built on dev-01, relayed, verified on perf-01).

Sequence: 5 dev controls, 5 rounds A-B-A-B (A=dev, B=PR), 5 dev controls. 30 reports, all exit 0. Values are medians of each report's p50 / p95 (ms).

Metric dev pre (n=5) A arms (n=10) PR B arms (n=10) dev post (n=5) B−A p95 post−pre p95
sync.round_trip 0.219 / 0.344 0.230 / 0.366 0.235 / 0.370 0.219 / 0.353 +0.004 (+1.1%) +0.009 (+2.5%)
sync.save_ack 6.873 / 10.384 6.990 / 9.251 7.013 / 9.643 7.001 / 10.140 +0.391 (+4.2%) −0.244 (−2.3%)
sync.durable_write 24.772 / 31.238 24.758 / 29.921 24.757 / 29.999 24.417 / 30.723 +0.078 (+0.3%) −0.515 (−1.6%)

Paired per-round B−A p95: round_trip +0.009, +0.003, +0.001, +0.016, −0.007 (median +0.003); save_ack +4.532, −1.188, −0.603, +0.475, −0.181 (median −0.181); durable_write −3.694, −1.621, −0.628, +1.587, +0.169 (median −0.628).

Reading: p50s are equal on all three paths. The save_ack p95 gap (+0.39 ms) is smaller than the spread of the dev-only groups (pre 10.38, A 9.25, post 10.14 = 1.13 ms); the PR value 9.64 sits inside it and the paired median is −0.18 ms (one round is a +4.5 outlier). No regression found; flat. Caveat: the save_ack and round_trip B−A p95 are nominally positive, so a larger run can tighten the bound if wanted.

An earlier attempt died after one report because my own systemd-run unit hit its RuntimeMaxSec while queued; its partial reports were discarded and the run was redone from scratch in a new turn.

## Notes hot-path ABAB ×5: head `0751d6733` vs dev `796d80cba` Why needed: the diff touches `room/{pipeline,save,sync,actor,load}.rs`. perf-01 turn via `~/bin/perf-turn`, perf-02 lock held for the run and released after. Fresh 10k Home per report, seed 1, `calternal-perf --sizes 10k --runs 1 --cold-runs 0 --idle-secs 0 --soak-secs 0`, same harness binary for every arm. Ran 13:28–13:43 IST on 14 Nov. Boot ID unchanged (`7a65f072-…`), CPUs `0-3` before and after. Hashes: dev `calternal` `a354966bec19bf9d2c25dc59707707477a44494eb2d48b3d5277931e7d9fdc48`; PR `calternal` `c24ffd418c79b177c8cdeffdc094fba9f816676180ce63eaf668ecdcfa415ad5`; harness `55b27c8e3fc166514a0c1cc06d2ded8caaf67e511944779f66c6c42b33300132` (built on dev-01, relayed, verified on perf-01). Sequence: 5 dev controls, 5 rounds A-B-A-B (A=dev, B=PR), 5 dev controls. 30 reports, all exit 0. Values are medians of each report's p50 / p95 (ms). | Metric | dev pre (n=5) | A arms (n=10) | PR B arms (n=10) | dev post (n=5) | B−A p95 | post−pre p95 | |---|---|---|---|---|---|---| | `sync.round_trip` | 0.219 / 0.344 | 0.230 / 0.366 | 0.235 / 0.370 | 0.219 / 0.353 | +0.004 (+1.1%) | +0.009 (+2.5%) | | `sync.save_ack` | 6.873 / 10.384 | 6.990 / 9.251 | 7.013 / 9.643 | 7.001 / 10.140 | +0.391 (+4.2%) | −0.244 (−2.3%) | | `sync.durable_write` | 24.772 / 31.238 | 24.758 / 29.921 | 24.757 / 29.999 | 24.417 / 30.723 | +0.078 (+0.3%) | −0.515 (−1.6%) | Paired per-round B−A p95: round_trip +0.009, +0.003, +0.001, +0.016, −0.007 (median +0.003); save_ack +4.532, −1.188, −0.603, +0.475, −0.181 (median −0.181); durable_write −3.694, −1.621, −0.628, +1.587, +0.169 (median −0.628). Reading: p50s are equal on all three paths. The `save_ack` p95 gap (+0.39 ms) is smaller than the spread of the dev-only groups (pre 10.38, A 9.25, post 10.14 = 1.13 ms); the PR value 9.64 sits inside it and the paired median is −0.18 ms (one round is a +4.5 outlier). No regression found; flat. Caveat: the `save_ack` and `round_trip` B−A p95 are nominally positive, so a larger run can tighten the bound if wanted. An earlier attempt died after one report because my own `systemd-run` unit hit its `RuntimeMaxSec` while queued; its partial reports were discarded and the run was redone from scratch in a new turn.
Author
Owner

Gates (copied from #1015 comment, head 0751d6733)

Gate Command Result
Rust cargo fmt --all -- --check && cargo clippy --workspace --all-targets --locked -j4 -- -D warnings && cargo test --workspace --locked -j4 (dev-01) pass; 1,825 passed, 0 failed, 22 ignored
Web bun run lint, bun run check, bun run test pass; svelte-check 0 errors / 19 warnings; vitest 261 passed
Chromium e2e playwright test e2e/lazy-ui.spec.ts e2e/lazy-styled.spec.ts --project=chromium-1440 --project=chromium-390 --workers=1 --retries=0 23 passed, 1 skipped
WebKit e2e (dev-02) same, webkit-1440, webkit-390 23 passed, 1 skipped
Bundle perf/web.sh --bundle-only --gate, PR vs dev pass; first-paint JS 223.749 / CSS 18.479 KiB identical to dev; Whiteboard first paint 0/0; editor open path 263.729 KiB JS + 18.010 KiB CSS, all lazy initial: false
Notes ABAB ×5 see previous comment flat

No Whiteboard e2e spec and no Safari/iPhone Simulator shots: slice 1 ships no board UI. Still pending: legacy_attachment_migration_is_recoverable_at_each_boundary (needs #1010).

## Gates (copied from #1015 comment, head `0751d6733`) | Gate | Command | Result | |---|---|---| | Rust | `cargo fmt --all -- --check && cargo clippy --workspace --all-targets --locked -j4 -- -D warnings && cargo test --workspace --locked -j4` (dev-01) | pass; 1,825 passed, 0 failed, 22 ignored | | Web | `bun run lint`, `bun run check`, `bun run test` | pass; svelte-check 0 errors / 19 warnings; vitest 261 passed | | Chromium e2e | `playwright test e2e/lazy-ui.spec.ts e2e/lazy-styled.spec.ts --project=chromium-1440 --project=chromium-390 --workers=1 --retries=0` | 23 passed, 1 skipped | | WebKit e2e (dev-02) | same, `webkit-1440`, `webkit-390` | 23 passed, 1 skipped | | Bundle | `perf/web.sh --bundle-only --gate`, PR vs dev | pass; first-paint JS 223.749 / CSS 18.479 KiB identical to dev; Whiteboard first paint 0/0; editor open path 263.729 KiB JS + 18.010 KiB CSS, all lazy `initial: false` | | Notes ABAB ×5 | see previous comment | flat | No Whiteboard e2e spec and no Safari/iPhone Simulator shots: slice 1 ships no board UI. Still pending: `legacy_attachment_migration_is_recoverable_at_each_boundary` (needs #1010).
Author
Owner

Orchestrator plan: #1129 waits for Files #1010 (the last slice-1 item, legacy_attachment_migration_is_recoverable_at_each_boundary, needs its identity API). Before the dev merge it also needs a longer save-path ABAB: B−A p95 sync.save_ack +0.39 ms (+4.2%) and round_trip +1.1% are inside the dev/dev spread but nominally positive; zero-regression rule.

Orchestrator plan: #1129 waits for Files #1010 (the last slice-1 item, `legacy_attachment_migration_is_recoverable_at_each_boundary`, needs its identity API). Before the dev merge it also needs a longer save-path ABAB: B−A p95 `sync.save_ack` +0.39 ms (+4.2%) and `round_trip` +1.1% are inside the dev/dev spread but nominally positive; zero-regression rule.
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
This pull request has changes conflicting with the target branch.
  • apps/web/vite.config.ts
  • perf/budgets.json
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'wip/whiteboard-s1-1114:wip/whiteboard-s1-1114'
git switch 'wip/whiteboard-s1-1114'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'dev'
git merge --no-ff 'wip/whiteboard-s1-1114'
git switch 'wip/whiteboard-s1-1114'
git rebase 'dev'
git switch 'dev'
git merge --ff-only 'wip/whiteboard-s1-1114'
git switch 'wip/whiteboard-s1-1114'
git rebase 'dev'
git switch 'dev'
git merge --no-ff 'wip/whiteboard-s1-1114'
git switch 'dev'
git merge --squash 'wip/whiteboard-s1-1114'
git switch 'dev'
git merge --ff-only 'wip/whiteboard-s1-1114'
git switch 'dev'
git merge 'wip/whiteboard-s1-1114'
git push origin 'dev'
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!1129
No description provided.