WIP: Cold growth + fast startup on #764 #767
Draft
kayg
wants to merge 30 commits from
perf/cold-growth-on-764 into dev
pull from: perf/cold-growth-on-764
merge into: kayg:dev
kayg:main
kayg:feat/style-sheet-fixes
kayg:storage/wal-checkpoint-off-save-1051
kayg:t3/paged-search-reconcile-final
kayg:feat/pass8
kayg:review/calendar-2
kayg:fix/shared-row-swipes
kayg:feat/contrast
kayg:dev
kayg:feat/collections-db
kayg:fix/instant-keys-1056
kayg:feat/money-round
kayg:perf/stalls-1054
kayg:wip/tiering-v3-cold4
kayg:wip/tiering-v3-cold5
kayg:port/rows-actions
kayg:port/rows-drop
kayg:port/hidden-blocks
kayg:port/rows
kayg:port/port-tables
kayg:port/port-tables-2
kayg:t3/mail-1011-liveness
kayg:port/devices
kayg:port/port-attachments
kayg:port/port-attachments-2
kayg:port/port-attachments-3
kayg:docs/design-consistency
kayg:docs/engineering-standards
kayg:fix/rusqlite-0.41-rustsec-2026-0459
kayg:feat/iphone-fixes
kayg:shared/restore-and-stale-918-919
kayg:fix/phone-top-band-contrast
kayg:feat/notes-approve
kayg:perf/soak-max-gate
kayg:feat/files-s1-identity
kayg:fix/lifecycle-event-id
kayg:feat/quickfix
kayg:wip/tiering-v3-cold
kayg:perf/web-mockup-frame-fixes
kayg:port/contacts-merge
kayg:port/contacts-edit
kayg:test/shared-room-no-deleted-text
kayg:perf/first-paint-credits
kayg:fix/shared-history-after-grant
kayg:fix/phone-swipe-regressions
kayg:feat/contrast-r1
kayg:review/sharing-pr3-review
kayg:feat/tiering-v3-s2-tags
kayg:feat/folder-drop
kayg:fix/deskpills-lazy-share
kayg:feat/sharing-s1-pr3
kayg:tmp/money-round-before
kayg:fix/phone-pane-backdrop-roots
kayg:fix/palette-preload-chips
kayg:fix/invite-defaults
kayg:port/tasks-matrix
kayg:fix/restore-green-gates
kayg:fix/sharing-fast-path-hardening
kayg:t3/photos-s1
kayg:feat/tiering-v3-s1-namespace
kayg:notes-archive-hide
kayg:feat/tasks-actions
kayg:t3/photos-plan-slice-one
kayg:feat/whiteboard-s1
kayg:t3/paged-search-reconcile
kayg:t3/smooth-pane-transitions
kayg:t3/index-position-startup-scan
kayg:fix/private-staging-759b-r2
kayg:feat/dav-transport
kayg:feat/imap-notes-fetch
kayg:feat/imap-notes-projection
kayg:feat/imap-notes-readonly
kayg:feat/imap-notes-auth
kayg:feat/imap-notes-server-foundation
kayg:docs/undo-block-ids-plan
kayg:fix/undo-768
kayg:proto/block-identity-v7d
kayg:issue/carddav-read-perf-fix-r2
kayg:issue/carddav-read-r2
kayg:docs/imap-766-plan-v2
kayg:docs/imap-notes-plan
kayg:docs/quota-plan-2
kayg:fix/parallel-test-flakes
kayg:feat/contacts-companion-pure
kayg:docs/calendar-backend-v2-plan
kayg:feat/calendar-ical-converter
kayg:docs/tasks-writes-v2-plan
kayg:docs/carddav-writes-v2-plan
kayg:docs/contacts-import-v2-plan
kayg:issue/610-pm-midnight
kayg:feat/calendar-v2-s1-containment
kayg:docs/dav-recorder-v2-plan
kayg:plan/previews-865
kayg:plan/save-log-durable-entry
kayg:fix/e2e-data-on-ram
kayg:feat/appwindow3
kayg:feat/appwindow2
kayg:feat/appwindow
kayg:feat/money-p1
kayg:feat/keys-sheet
kayg:review/calendar-2-themes
kayg:feat/smooth-cursor
kayg:fix/float-style
kayg:review/calendar-2-float
kayg:release/2026-11-06-hotfix
kayg:archive/port/rows-drop-code
kayg:archive/port/rows-actions
kayg:archive/port/rows
kayg:scratch/tasks-894-ui-gates
kayg:review/calendar-2-night-wip
kayg:release/2026-11-05
kayg:archive/feat/tiering-v3-s1-namespace
kayg:archive/flaky/rows-drop-fixed
kayg:archive/flaky/rows-actions
kayg:archive/feat/tiering-v3-reader
kayg:archive/feat/tiering-v3-roots
kayg:archive/flaky/rows
kayg:sim/bm15-final
kayg:sim/bm15-fix
kayg:sim/bm15-bis-932
kayg:sim/bm15-bis-909
kayg:sim/bm15
kayg:sim/bm15-bis-887
kayg:perf/tiering-option-b
kayg:port/style-3
kayg:port/style-2
kayg:port/style
kayg:fix/sw-lazy-precache
kayg:fix/vim-w-waits-for-save
kayg:fix/signout-test-races
kayg:fp-scratch/all
kayg:sim/bm15-first-paint
kayg:archive/bm15/rows-drop
kayg:archive/bm15/rows-actions
kayg:fix/palette-snippet-contrast
kayg:archive/bm15/rows
kayg:archive/bm15/hidden
kayg:archive/plan/save-log-durable-entry
kayg:mock/money-fix2
kayg:archive/fix/e2e-data-on-ram
kayg:mock/appearance-all
kayg:mock/pill-press
kayg:archive/docs/design-consistency
kayg:mock/auto-swipes
kayg:mock/mail-actions
kayg:archive/feat/mail-p1
kayg:mock/money-static
kayg:archive/review/standards-917
kayg:archive/docs/engineering-standards
kayg:perf/tiering-761-fix
kayg:mock/type-audit
kayg:mock/third-pane
kayg:feat/contacts-import-v2-s1
kayg:perf/executor-hot-path
kayg:archive/port/hidden-blocks
kayg:archive/port/devices
kayg:scratch/executor-on-894
kayg:scratch/executor-spans2
kayg:scratch/executor-spans
kayg:train/2026-11-03-bm14c
kayg:archive/port/rows-drop
kayg:feat/tiering-761-d-scale
kayg:feat/tiering-761-c-index
kayg:feat/tiering-761-b-reader
kayg:archive/review/sharing-pr3-review-9fec3d1f
kayg:train/2026-11-03-bm14b
kayg:perf/ports-lazy-budgets
kayg:feat/tiering-761-a-migration
kayg:train/2026-11-03-bm14
kayg:train/2026-11-03-bm12
kayg:archive/review/sharing-pr3-review
kayg:archive/feat/sharing-s1-pr3
kayg:train/2026-11-03-bm11
kayg:archive/feat/imap-notes-fetch
kayg:train/2026-11-03-bm10
kayg:archive/review/sharing-pr3-review-code
kayg:archive/plan/previews-865
kayg:train/2026-11-02-bm9
kayg:archive/port/port-attachments-3
kayg:archive/port/contacts-merge
kayg:fix/motion-audit-859
kayg:train/2026-11-02-bm8
kayg:archive/scratch/bm8-prep
kayg:archive/port/port-pickers
kayg:archive/port/port-tables-2
kayg:archive/port/port-tables
kayg:archive/feat/sharing-s1-pr3-code
kayg:archive/scratch/bm7-fixed
kayg:train/2026-11-02-bm7
kayg:archive/fix/parallel-test-flakes-code-minipc01
kayg:train/2026-11-02-bm6
kayg:docs/imap-766-readonly-slice
kayg:feat/dav-recorder-v3
kayg:research/788-diagnosis
kayg:archive/fix/parallel-test-flakes
kayg:archive/perf/pr792-cold-index-edit
kayg:docs/sharing-slice-1
kayg:archive/docs/imap-766-plan-v2
kayg:feat/dav-recorder-v2
kayg:archive/docs/dav-recorder-v2-plan
kayg:spike/imap-766-s0-cases
kayg:archive/fix/undo-768
kayg:feat/dav-recorder
kayg:archive/docs/contacts-import-v2-plan
kayg:archive/feat/calendar-ical-converter
kayg:feat/contacts-import
kayg:perf/cold-growth-on-tiering
kayg:archive/docs/tasks-writes-v2-plan
kayg:archive/docs/calendar-backend-v2-plan
kayg:archive/feat/contacts-companion-pure
kayg:feat/tasks-set-status
kayg:feat/tasks-move-reorder
kayg:archive/docs/carddav-writes-v2-plan
kayg:archive/feat/calendar-v2-s1-containment
kayg:feat/tasks-delete-promote-duplicate
kayg:archive/feat/dav-transport
kayg:archive/fix/carddav-rebuild-r1
kayg:archive/fix/carddav-retention-r1
kayg:feat/carddav-writes
kayg:perf/quota-on-tiering
kayg:perf/quota-simple
kayg:perf/cold-growth-on-quota-stack
kayg:feat/calendar-identity
kayg:feat/calendar-event-parser
kayg:feat/calendar-props-maps
kayg:port/glass-when-ring
kayg:feat/tiering-761-s1
kayg:wip/10by32-01-impl-759b-scratch-20261030
kayg:wip/6by32-01-bm3-webkit-pause-20261030
kayg:wip/10by32-01-bm3-chromium-pause-20261030
kayg:wip/6by32-01-tier-761-s1-pause-20261030
kayg:spike/imap-766-s0
kayg:wip/6by32-02-calternal-pause-20261030
kayg:wip/8by64-01-review-688-pause-20261030
kayg:wip/6by32-01-verify-744-pause-20261030
kayg:wip/6by32-01-verify-742-pause-20261030
kayg:fix/private-staging-759b
kayg:wip/6by32-01-review-748-pause-20261030
kayg:wip/6by32-01-review-733c-pause-20261030
kayg:wip/6by32-01-review-733b-pause-20261030
kayg:wip/6by32-01-perf-idle-8-pause-20261030
kayg:wip/6by32-01-perf767-base-pause-20261030
kayg:wip/6by32-01-perf767b-767-pause-20261030
kayg:wip/6by32-01-perf767b-764-pause-20261030
kayg:wip/6by32-01-perf767-767-pause-20261030
kayg:wip/6by32-01-perf767-764-pause-20261030
kayg:wip/6by32-01-lists-b-pause-20261030
kayg:wip/6by32-01-ids-verify5-pause-20261030
kayg:wip/6by32-01-ids-verify4-pause-20261030
kayg:review/calendar-month
kayg:wip/10by32-02-undo-768-20261030
kayg:test/ids-verify3
kayg:wip/10by32-02-bm3-chromium-20261030
kayg:wip/10by32-01-review-753-20261030
kayg:wip/10by32-01-perf-idle-2-20261030
kayg:wip/10by32-01-bm2-webkit2-20261030
kayg:plan/759b-staging
kayg:train/2026-10-30-bm2
kayg:review/758b-tests
kayg:review/758-tests
kayg:review/764d-tests
kayg:review/767b-tests
kayg:review/preview-2026-10-29
kayg:review/767-tests
kayg:docs/tiering-731-plan
kayg:wip/c6b02-when2
kayg:wip/c6b02-tasks-create-fix5
kayg:wip/c6b02-settings-frost-mock
kayg:wip/c6b02-settings-frost-base
kayg:wip/c6b02-settings-frost
kayg:wip/c6b02-ring
kayg:wip/c6b02-review-733d
kayg:wip/c6b02-bm1-full-a
kayg:wip/compute02-when-field
kayg:wip/compute02-webkit-lists-repro
kayg:wip/compute02-train-bl2-dev
kayg:wip/compute02-dev-green-pw164
kayg:docs/deploy-plan
kayg:review/764c-tests
kayg:review/764b-tests
kayg:review/748g-tests
kayg:review/764-tests
kayg:review/759b-tests
kayg:fix/storage-owner-liveness-642
kayg:fix/storage-fix-7
kayg:wip/compute02-storage-fix-7
kayg:review/759-tests
kayg:feat/tiering-731
kayg:wip/tiering-731-first-attempt
kayg:wip/compute02-storage-fix-1
kayg:review/754g-tests
kayg:perf/idle-honest-2
kayg:review/754f-tests
kayg:review/754e-tests
kayg:review/755-tests
kayg:review/754d-tests
kayg:review/754c-tests
kayg:review/754b-tests
kayg:review/754-tests
kayg:fix/storage-private-tmp-642-dev
kayg:wip/compute02-verify-750
kayg:test/ids-verify5
kayg:test/ids-verify4
kayg:fix/storage-exact-file-quarantine-642
kayg:wip/compute02-verify-740
kayg:perf/one-flush-save
kayg:review/calendar-static
kayg:wip/compute02-verify-737
kayg:review/indexing-ring
kayg:review/when-field-2
kayg:wip/compute02-review-733
kayg:proto/block-identity-2-review
kayg:proto/block-identity-review
kayg:wip/c6b02-tc-design
kayg:review/when-field
kayg:issue/tasks-create-ids
kayg:issue/tasks-create
kayg:review/combined
kayg:wip/compute02-review-combined
kayg:review/task-polish
kayg:review/top-buttons
kayg:review/q1-q5
kayg:train/2026-10-26-bl2
kayg:archive/wt-398h
kayg:archive/train-bm-proptest-seed
kayg:archive/integ325-293
kayg:archive/integ325-ci
kayg:archive/client-auth-review-baseline
kayg:archive/wt-sim-4853
kayg:archive/wt-sim-4811
kayg:archive/wt-448m
kayg:archive/wt-398a-allocator
kayg:issue/calendar-adr
kayg:archive/old/train/2026-10-23bk2
kayg:archive/old/train/2026-10-23bk
kayg:issue/469-mockup-9a
kayg:issue/smart-tasks-mockup
kayg:issue/469-menus
kayg:issue/652-signout-flake
kayg:issue/652-history-fix7
kayg:issue/652-history-fix6
kayg:archive/old/issue/spring-check-perf
kayg:issue/spring-check-perf
kayg:issue/659-rename-fast
kayg:archive/old/train/2026-10-21ar
kayg:issue/search-hardening-3
kayg:issue/652-history-fix5
kayg:issue/660-port-sheets-glass
kayg:issue/652-history-fix4
kayg:issue/652-history-fix3
kayg:issue/652-history-fix2
kayg:issue/652-history-flake
kayg:train/2026-10-21an
kayg:issue/settings-admin-port
kayg:issue/search-port
kayg:train/2026-10-20am
kayg:issue/storage-split-fix2
kayg:issue/storage-split
kayg:archive/old/issue/folder-ids-fix
kayg:train/2026-10-20al
kayg:archive/old/issue/folder-ids
kayg:train/2026-10-20ak
kayg:issue/tables-mockup
kayg:train/2026-10-19aj
kayg:train/2026-10-19ai
kayg:issue/469-merge-fixes
kayg:issue/sidebar-band
kayg:archive/old/issue/608-settings-spec
kayg:train/2026-10-19ah
kayg:issue/swipe-offscreen
kayg:train/2026-10-19ag
kayg:archive/old/issue/590-nlp-adr
kayg:archive/old/issue/587-event-after-write-2
kayg:train/2026-10-19af
kayg:archive/old/issue/587-event-after-write
kayg:issue/469-pill-room-c
kayg:issue/469-pill-room
kayg:train/2026-10-19ae
kayg:issue/469-narrow-handle
kayg:issue/397-ios-swipe-2
kayg:archive/old/issue/adrs-photos-files-tasks
kayg:issue/469-desk-fixes
kayg:archive/old/issue/auto-update-adr
kayg:issue/469-filter-gap
kayg:issue/469-port-1b
kayg:issue/442-opacity-flake
kayg:archive/397-ios-swipe-2
kayg:issue/327-web-fast-3
kayg:archive/old/issue/469-port-1
kayg:issue/469-port-1
kayg:issue/327-web-fast-2
kayg:archive/old/issue/327-web-fast
kayg:archive/old/issue/425-stt-bench-vq1
kayg:archive/old/issue/445-no-bleed
kayg:archive/old/issue/400-swipe-mockup-2
kayg:issue/426-client-review
kayg:issue/426-client-2
kayg:issue/426-client
kayg:archive/old/issue/476-safe-area-lab
kayg:archive/445-top-light-2
kayg:archive/old/issue/445-top-light
kayg:issue/471-blocks-mockup
kayg:archive/old/issue/448-links-app-2
kayg:archive/old/issue/448-links-app
kayg:archive/old/issue/398-cold-links
kayg:issue/434-442-small-2
kayg:issue/434-442-small
kayg:archive/old/issue/398-unload
kayg:archive/old/issue/445-bottom-band
kayg:issue/445-bottom-band
kayg:issue/351-rem-3
kayg:archive/312-views-mockup
kayg:issue/351-rem-2
kayg:issue/351-rem
kayg:archive/old/issue/327-first-note
kayg:issue/395-width-phone
kayg:archive/old/issue/327-typing
kayg:issue/396-ios-edges
kayg:issue/397-ios-swipe
kayg:archive/398-allocator
kayg:archive/old/issue/327-notes-index
kayg:issue/345-347-contrast-empty-2
kayg:archive/old/issue/44-arenas
kayg:issue/44-arenas
kayg:archive/integ325
kayg:archive/old/issue/327-perf-harness
kayg:archive/old/issue/44-thp
kayg:issue/44-thp
kayg:archive/old/issue/285-sticky-pills
kayg:archive/old/issue/44-trim-3
kayg:issue/44-trim-3
kayg:archive/old/issue/165-cards
kayg:archive/old/issue/165-picker-2
kayg:archive/old/issue/212-multi-select
No reviewers
Labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
kayg/calternal!767
Loading…
Reference in a new issue
No description provided.
Delete branch "perf/cold-growth-on-764"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Current stacked revision
Head:
8b5b8cdc74385b3bcbf1540d1c612c075952ef06; target:dev.Stack: #761-A
feat/tiering-761-a-migration(5441212fd8b445fb80ff8ed640a4b33c17ae1d07) → #761-Bfeat/tiering-761-b-reader(58ffcc7182a8c7c1ff64ecc366d0e52ebe2eddf8) → #764 (75978ddb5ed30152a85fbb1d766a62d5c5a73113) → #767. This change needs A+B only; it is not based onfeat/tiering-761-s1and does not include C or D.Cold-growth work is stacked on the userdata-only quota accounting. The deterministic startup fence regression fails on
race-redwithDirectoryNotEmptyand passes on this head.Verified gates
cargo fmt --all -- --check: pass.cargo clippy --workspace --all-targets -j4 -- -D warnings: pass.QUOTA_PROPERTY_CASES=50000 cargo test --workspace -j4: pass, exit 0.cargo test -p calternal-fsio -j4 fence_never_blocks_a_recursive_home_delete -- --nocapture: fails onrace-red, passes on this head.CALTERNAL_INODE_REUSE_DIR=/home/claude cargo test -p calternal-fsio -j4 review_754d_reused_directory_inode_must_not_certify_a_replacement -- --nocapture: pass; ext4 recycled the directory inode and the replacement was charged.Performance qualification
The original same-Home reproduction completed on
86f48a39with 100k notes andindex.dbinside the Home. Across three runs, medians were typing CPU 35.483%, idle CPU 0.000%, idle RSS 81.44 MB, and idle wakeups 0.000/s. This reproduces the high typing CPU when the Notes index database is under the Home.The replacement matrix used
perf/vm/typing-idle.sh(SHA25613c2e7bf6489663fcf99f21ddc010118d27e5a33e773c9f89be0a1ff113df90b) through~/bin/perf-lock, holding/var/lock/calternal-perf.lockonclaude@calternal-perf-02-backup01. It completed 13 samples before stopping inquota-4: the warm run's firstnotes.listpage was empty and markedincomplete: true. That failed run has no accepted metrics. The firstdev-quota-1sample is excluded because an external diagnostic file walk overlapped its idle interval; its validquota-1partner is excluded to keep the pair matched. Twelve completed samples remain usable, but the six-pair matrix is incomplete and no comparison is claimed. The #759b matrix currently holds the shared lock; continuation will wait for it.Supplied dev reference (
d83e54db, six runs): typing CPU 1.125%, idle CPU 0.647%, idle RSS 106.1 MB, wakeups 0.102/s. Budgets are typing CPU <=2%, idle CPU <=0.1%, RSS <=100 MB, and wakeups <=0.2/s.Measurement audit
#788 held
/var/lock/calternal-perf.lockfrom 19:26:10Z on perf-01 and 19:28:31Z on perf-02 until 22:28:36Z. Two original-path attempts using the old/tmp/perf.lockat 20:35:12Z and 20:39:41Z are excluded; they produced only fixture/startup output, not typing or idle metrics. No numeric results were discarded for this overlap. The valid same-Home reproduction started at 22:30:01Z, after release.The later r2 matrix did not overlap #788, but its loop repeated
quota-1; these five misattributed samples are excluded from the new medians (typing CPU %, idle CPU %, RSS MB, wakeups/s): dev-quota-1(1.150, 0.673, 131.98, 0.100), quota-1(0.467, 0.000, 81.68, 0.000), dev-cold-1(1.217, 0.550, 112.49, 0.073), cold-1(0.483, 0.000, 81.05, 0.000), and dev-quota-2(1.217, 0.723, 126.16, 0.123).No merge or deployment.
Historical description from earlier head follows.
Port #760's cold-growth index and startup-readiness work from
d23e80b9onto #764 atd0e6d6f6. Stable shared note keys, covering task-membership ranges and unchanged memberships survive field edits; bounded cold scans, shared parsing and checkpoint/reclamation changes come with their correctness tests. The cold-growth harness is carried for later measurements on the perf VMs.Production quota, usage and native watcher code keeps #764's whole-Home recount and inotify-barrier design. No incremental counter or #760 watch-registration implementation is restored. Startup remains asynchronous; never-counted or provisional Homes must obtain a verified fenced total at admission. The readiness regression blocks a Home recount and proves startup returns, then checks its initial bytes; the HTTP regression enforces quota immediately after healthz.
Reviewer coverage from review/754*, review/755-tests and review/764*-tests is retained. The old 754g retry/index contracts are also expressed against per-Home failure accounting; 755's quota tests use #764's APIs, and review/764c-tests is included without production changes.
Validation on 10by32-02-std (arm64), with heavy commands through /usr/local/bin/build-slot.sh and cargo -j8:
The initial separate correctness run lacked y-protocols/sync in the fresh worktree. After bun install --frozen-lockfile, its full rerun and the workspace run passed; no source fix was needed. Existing ignored perf/idle observations were left for the perf VMs.
No performance measurements ran here and no performance claims are made for this head. The coordinator will build x86 binaries and measure on the perf-test VMs. This PR targets dev and includes #764 until that base lands. Supersedes #760; refs #686. No merge or deployment performed.
Head:
2df9787047. Forgejo represents draft status with the WIP title prefix.Independent review of
2df9787047, 10by32-02-std arm64. Verdict: fix first.P2 — unchanged memberships are rewritten on renames and partial tag changes.
crates/tasks/src/index.rs:295–303couples tag retention to path equality; a rename with the same stable ID/tags clears and reinserts all memberships. At lines 435–462, addinghometo[work/calls]also deletes/reinserts retainedworkandwork/calls. Independent audit triggers observe four writes to unchanged memberships in each case, expected zero. Counts also churn. Logical results are correct, but the explicit write-avoidance contract is violated. Separate path/link tracking from membership and apply tag-set differences, retaining intersections. This is not a measured cold-growth regression or a data-loss finding.Tests only pushed to review/767-tests, commit d7820b5a. Reproduce there:
Both fail
left: 4, right: 0. These two reproducers are explicitly ignored in default gates and were separately enabled. No production changes.Independent checks passed: 5,000 random edits/renames/tag/status changes/deletes against independent membership and badge-count models; covering-index reads agree with task-table identities; index columns are exactly tag/note_key/id; process exit after membership write before table write recovers the original WAL transaction with integrity_check=ok; dev-format cache rebuild preserves 13 notes and their bytes/identities. Real HTTP immediately after healthz enforces existing quota, permits an upload with room, refuses a new upload immediately after outside growth, and permits it after moving those outside bytes out, without settling waits.
The earlier non-linearizable fallback reproducer was enabled and passes: WouldBlock, provisional/display=0, actual=1009, minimum Home during transfer=202. Actual directory inode reuse on
/srv/inode-reusepassed with st_ino=16 and replacement/later mutation charged. All six client retry tests pass.Preservation: quota/Auth/watcher/client changes against
origin/perf/quota-simpleare additions only: no existing quota assertion changed/removed, all 57 reviewer-named base tests byte-for-byte present. Literal preservation of every historical #760/#755 test is false: #764 deliberately adapted scoped scanner tests to whole-Home boundaries. Five #755 fsio tests are moved/adapted inusage/review_755.rs; Auth stale-admission and task random/crash/dev-cache tests remain. Seven older inherited scoped/descriptor test names are absent; plan 0754 and current whole-Home containment/property/failure tests document their dispositions/replacements. Full source inventories/diffs are in the local report. Tasks schema/crash-harness adaptations do not weaken quota tests.Final gates all exit 0, heavy commands through build-slot.sh at -j8:
108 successful test-process reports, zero failures; summed results including nested-child repetitions: 1,361 passed / 29 ignored. Tasks abrupt-stop passed, no Tasks rerun. Initial reviewer-fixture issues (deduplicated upload and deliberate outside-write lint allowances) were corrected before final gates; attempts remain logged.
Findings/reproducers, inventories, diffs and logs:
/home/agent/codex-jobs/verify-767/findings.mdand siblings. No cold-growth measurement, perf-test VM access, merge or deployment. Target cleanup and heartbeat shutdown follow this comment.Fixed P2 comment #69795 in
30f2716fac, pushed only toperf/cold-growth-on-764.Fetched first and fast-forward merged reviewer tests
d7820b5aonto the requested2df97870head. Both original ignored reproducers failed before the fix with 4 unchanged-membership writes, expected 0. Their assertions are preserved; both are now enabled in the default suite.Task renames retain tag membership for the same stable identity while updating path/link tracking independently. Tag updates compare sorted old/new membership sets and delete/insert only their differences; only changed memberships update badge counts. Cold fills still defer badge aggregation until
after_fill.Added SQLite trigger counters for membership and badge writes covering rename, add tag, remove child tag, replace child tag with a shared parent, move to Someday, close task, other field edits, and no-op save. Rename, other fields, no-op saves, and live-list moves write zero membership/badge rows; tag additions/removals write only their actual differences. All retained-membership reviewer checks pass.
Gates on 10by32-01-std arm64, all exit 0:
Full workspace: 108 successful test-process reports, 1,364 reported passes / 0 failures / 27 ignored, including nested-child repetitions. Includes cold-fill/index equivalence, task correctness/crash recovery, all #767 reviewer tests, 5,000 random edits/renames/tags/deletes against the independent model, dev-cache rebuild, and immediate-after-ready growth/quota behavior. The focused Tasks run passed 61 tests, 0 ignored.
As requested,
CALTERNAL_INODE_REUSE_DIR=/srv/inode-reusewas omitted: that directory does not exist on this machine, so the dedicated inode-reuse filesystem exercise was not performed here. This run makes no cold-growth performance measurement claim.Logs:
/home/agent/codex-jobs/fix-767/{repro,delta-red,tasks-green,fmt,clippy,workspace}.log. Worktree:/home/agent/wt/cold-growth-fix.target/deleted and lease938679b5d8264326ad0ed41039ee99a6heartbeat stopped. PR remains draft.Independent verification, round 2, exact head
30f2716f(2df97870..30f2716f).Verdict: ship. Round-1 P2 is resolved. Four independent tests pass: exact delta write counts for rename, add/remove tag, list transitions and no-op; 1,000-task rename/field edits (0 writes) and tag additions (1,000); real room-protocol Yjs undo/redo; 3,000 random operations checked against a model, task identities/list eligibility and badge totals; and subprocess exit inside the production diff after its first delete, followed by WAL recovery and retry.
Earlier #767 reviewer assertions are intact and their two reproducer tests are now unignored. #755 membership/crash/migration reviewer tests remain intact. Against
perf/quota-simple, tests gain coverage and adapt schema comparisons; no reviewer case is removed. Older quota tests do deliberately allow bounded retryable accounting failures under churn, with eventual recovery checks; those changes precede this fix.Gates: fmt PASS; clippy
--workspace --all-targets -j8 -- -D warningsPASS; full workspace tests PASS (cargo test --workspace --no-fail-fast -j8, exit 0, including doc tests). Builds/tests ran on 10by32-01-std via/usr/local/bin/build-slot.sh,-j8.P3, inherited/outside this diff:
auth/tests/migration.rs:86intermittently returns 1 person instead of 2. One workspace run failed; an isolated rerun passed, and the same workspace-built binary failed once in 20 repeats. Likely fixture race: millisecond creation-time ties let the legacyORDER BY created_at,idchoose Member as admin. Keep all assertions and stabilize fixture chronology. Details/reproducer are in the report.Forgejo mergeability: current
git merge-tree --write-tree origin/dev 30f2716fexits 0. Conflicting files: none; no conflict-resolution difficulty to classify. Current devd83e54dbis an ancestor of the PR head. Forgejo says draft=true/mergeable=false while API head is30f2716f, butrefs/pull/767/headremains2df97870and there is no advertised merge ref. This is inconsistent/stale PR merge state, not a current file conflict. Git alone cannot establish why Forgejo has not recomputed it.Tests only:
review/767b-tests,fda3803c. Full report and logs:/home/agent/codex-jobs/verify-767b/findings.md. No merges, deployments or perf-test-* changes.Updated head:
4481816d4120325c540ada41507e3cc1524d0665.Merged
origin/perf/quota-simpleata506b739with a normal merge (7edee1eb). Kept #764's quota implementation and the existing reviewer regression test in the sole conflict. Preserved the ported #754/#764 reviewer coverage and added the missingreview/767b-testscommit (fda3803c, cherry-picked as67c6c4ea); both #767 reviewer sets are present.calternal-perfuploads now replay only explicitly retryable503 storage_busyand429responses. Retries keep the same body and idempotency key, honour numeric/dateRetry-After, add full jitter above the server minimum, follow the web client's attempt limits, and share a 30-second deadline including network I/O. Non-retryable errors return immediately. Scenario metrics includeuploads.retriesanduploads.time_to_success;uploads.responsealso includes the complete retry wait. Failure messages include elapsed time and retry count.Gates on 10by32-01-std (arm64), using
/usr/local/bin/build-slot.shand-j8for cargo build/test/clippy work:cargo fmt --all --check;cargo clippy --workspace --all-targets -j8 -- -D warnings).cargo test --workspace --no-fail-fast -j8).CALTERNAL_INODE_REUSE_DIRexists only on 10by32-02-std; the physical inode-reuse test was skipped here. Default ignored perf/stress/diagnostic tests remain ignored.cargo test -p calternal-tasks --lib -j8: 65 passed, including cold-fill equivalence, migration, membership/model, and real undo/redo checks). Upload HTTP regressions: 5 passed, covering replay identity, refusal classification, Retry-After parsing, attempt exhaustion, and stalled-I/O deadline.cargo test --workspace -j8 review -- --nocapture). Web upload retry/reviewer tests: 16 passed, zero skipped withREVIEW_764D_REQUIRE_JITTER=1.The first workspace attempt exposed a pre-existing migration-fixture race: owner/member creation could share a millisecond and the v2 migration chose its admin by random user-ID order. The fixture now supplies an explicit owner-first chronology; production migration code is unchanged. Its focused rerun passed.
Cold-path inspection: fresh fills already skip old-membership reads, defer secondary indexes, and aggregate tag counts after filling. Remaining work includes per-task tag expansion (
BTreeSetallocation followed by collection), folded path keys, narrow membership inserts, and final index builds/membership resolution. I found no further change clearly safe to make without measurement, so cold-path production code is unchanged. No perf measurements were run on this host; the 100k cold-growth margin remains unverified for this head.quota/cold r4 retained results
Budgets: typing CPU <=2%; idle CPU <=0.1%; idle RSS <=100 MB; wakeups <=0.2/s. Six matched pairs per comparison required; matrix stopped at quota-4.
13 runs completed, one failed run (quota-4). Two completed samples are excluded from matched comparisons. Available accepted pairs: quota rounds 2–3 (2/6); cold rounds 1–3 (3/6). dev-quota-4 is valid but unpaired. No six-pair qualification or cold-growth gate is claimed. Remaining runs: quota-4 retry, dev-cold-4/cold-4, and every arm of rounds 5–6 (11 invocations total).
disposition, diagnosis and reproduction
The r4 script had already exited after quota-4; no quota r4 process or measurement lock remained to stop.
typing-idle.shwrites DONE andrc=0even when the driver records scenario failures (it does not pass--gate). The outer r4 script correctly rejects a nonemptysizes[0].failures; that check caught quota-4. Treating DONE or rc=0 alone as success would be a harness error.Exact failure: HTTP 200,
result={"incomplete":true,"items":[],"next":null,"total":0}. There was no quota refusal or failed HTTP status. The failed fixture's derivednotes/meta.dbhad zero notes, schema 4, statsnotes=0, andPRAGMA quick_checkreturnedok. The retained warm server log contains the development-mode warning, with no recorded scan/disk error. The first-page harness incrates/perf/src/scenarios/home.rsrejects any empty list immediately;server.rswaits only for/healthz. Notes explicitly allow a partial list before Home discovery completes (Notes::pageandthe_first_page_never_waits_for_the_home_to_open).incomplete:truealone is not evidence of a product defect.Functional reproduction on dev-01, using a copy of the exact failed quota-4 userdata and appdata and the existing quota binary (SHA256
9c055318e954f79d0309dc6c99637eff98df35fba06c506cb28167730a10078d), under~/bin/slot, with no build or perf claim:calternal serve --create --listen 127.0.0.1:<free-port> --dev-user 0192f0a0-0000-7000-8000-00000000f1f0 --data <copy>/runs/n100000/indexed --state <copy>/appdata/runs/n100000/indexed, withGLIBC_TUNABLES=glibc.malloc.arena_max=2./api/v1/actions/notes.listwith{"limit":50},Content-Type: application/jsonandX-Requested-With: calternal. At 0.021s: 0 total / 0 items / incomplete=true, reproducing the r4 assertion failure.Verdict: observed failure is a harness readiness/precondition failure on a rebuilding cache, not evidence of a persistent list failure under quota or cold growth. The source of the earlier derived-cache reset is not established.
MetaDb::open_withon the measured quota head silently removes/rebuilds the derived DB after any open error, so a storage/open problem is a possible cause; neither corruption, ENOSPC nor a quota-specific regression has been proved. Do not call this root cause closed: a separate clean rerun needs logs of the first open error and cache counts before/after cold-to-warm handoff. Keep a genuine complete-first-page warm-start gate if that is the intended product requirement; otherwise explicitly wait for readiness outside typing/idle measurement, with a deadline and preserved startup timing. Do not silently weaken that gate or count quota-4 as passed.Measured stack is #764
75978ddb5ed30152a85fbb1d766a62d5c5a73113and #7678b5b8cdc74385b3bcbf1540d1c612c075952ef06(the quota/cold-on-tiering work), using the common driver SHA2562e3656cd3255e5d6b590705e2c5ea521f8d1dd7642fcb26b7f3aa8eaad94e4fc, and typing script13c2e7bf6489663fcf99f21ddc010118d27e5a33e773c9f89be0a1ff113df90b. Successful retained candidate samples pass all four absolute typing/idle budgets. This is not a completed paired qualification and does not establish the cold-growth <=10% gate.Small JSON/MD reports, run logs, scripts and reproduction observations are retained on perf-02 at
~/perf-reports-kept/takeover-20261101/quota-r4/and on control at/home/kayg/perf-reports/takeover-20261101/. Seeded r4 work/Homes are removed after copying the diagnostic fixture; the dev-01 copy is removed after both exact child processes have exited. The previous r2 cleanup was left untouched until it finished; only then were seeded Markdown Homes inadvertently copied into its report directory removed, retaining its real top-level reports. No merge or deployment.Final cleanup verification
Both 759b units stopped; quota r4 had already exited. All takeover cleanup and reproduction processes have exited. Earlier r2 cleanup completed untouched. Final free: perf-01 root 51G, split Home 58G; perf-02 root 37G, split Home 97G. Shared locks are held by #792 qualification (159697 / 1325428), not the stopped jobs. Cleanup/fixture-copy I/O overlapped the first #792 samples; those samples need overlap exclusion. Retained observations do not establish why quota-4 cache was reset.
Perf-02 cleanup and fixture-copy overlap was approximately 17:13–17:22 IST on 1 November (11:43–11:52 UTC). The earlier r2 file walk also overlapped #792 startup until it completed. #792 first overlapping samples must not be treated as uncontended measurements. No #792 process was stopped.
paired requalification blocked by rebase conflict
Current PR head:
8b5b8cdc74385b3bcbf1540d1c612c075952ef06(perf/cold-growth-on-764). Target checked: origin/dev55f35fcde3bc91ca3781055577b93e93819f6cd4.An isolated test branch ran
git rebase origin/dev. It stopped at step 2/74, applyingaef9715e(WIP fixes), with content conflicts indocs/storage.md:.calternal/settings.jsonversus the stacked userdata/appdata paths, prefs and additional task/contact state;storage splitprocedure.These describe storage behavior and recovery procedures, so I treated them as non-trivial and aborted the rebase, as requested. No conflict resolution, source edit, PR branch push or merge was performed. Both isolated worktrees returned clean to their original heads. Further conflicts beyond this first stop have not been assessed.
The r4 template on perf-02 was read; its partial retained results remain historical evidence, not a completed qualification. No builds or performance jobs were started, no performance locks were taken, and no seeded Homes or large artifacts were created. Both VMs remain available. Resume after the storage conflict is resolved by the implementation owner: fix the bounded readiness precondition, build on dev-01, relay and SHA256-check binaries, then run six fresh matched pairs per comparison split across perf-01/perf-02 under
~/bin/perf-lock.Verdict: qualification FAIL (blocked/unmeasured), not a measured product regression.
kayg referenced this pull request2026-11-05 23:21:11 +00:00
Housekeeping #1009 status: audited head
8b5b8cdc74385b3bcbf1540d1c612c075952ef06against devcd7f84432feb.git cherry origin/dev <head>reports 74 unmatched commits and 0 equivalent patches. Separate stable patch-id indexing and key-file checks do not establish full landing. Absent from dev:apps/web/src/lib/upload-retry-jitter.test.mjs,apps/web/src/lib/upload-retry-review-764b.test.mjs,apps/web/src/lib/upload-retry-review-764c.test.mjs. Left unchanged as WIP, per kayg’s instruction; no rebase, close, tests, or merge. The #1009 audit records the unmatched commit list.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.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.