perf: compact quota snapshots at 100k notes #821

Closed
kayg wants to merge 0 commits from perf/idle-rss-100k into dev
Owner

idle heap owners: compact quota snapshots

At the seeded 100k idle checkpoint, quota snapshot allocations fall 23.80 → 5.12 MiB (78.5%). Total live requested heap falls 38.20 → 18.91 MiB; peak requested heap 94.14 → 65.55 MiB. These are heaptrack requested bytes, not RSS. Tracking stops before shutdown. Top ten allocation stacks in each version (decimal MB):

Rank Dev stack MB Compact stack MB
1 quota full path buffers 20.417 identity strings 5.517
2 identity strings 5.518 quota basename hash tables 3.277
3 quota flat hash table 4.325 identity slot vector 3.200
4 identity slot vector 3.200 quota exact basename boxes 2.014
5 search descriptor buffers 2.095 search descriptor buffers 1.809
6 identity path lookup table 0.655 identity path lookup table 0.655
7 identity id lookup table 0.655 identity id lookup table 0.655
8 Home opening allocation 0.262 Home opening allocation 0.262
9 note-list page result vector 0.218 identity formatting buffers 0.123
10 quota path buffers at another depth 0.200 search tag span vectors 0.102

Largest grouped owners after: note identity index 9.69 MiB, quota 5.12 MiB, search descriptors 1.87 MiB, native SQLite 1.20 MiB, search vocabulary 0.037 MiB, note-list metadata 0.025 MiB, Yjs 0.002 MiB. Search uses SQLite FTS5, not Tantivy. Baseline's post-idle diagnostic trim reclaimed 29.4 MiB, proving significant allocator-retained free pages; final code adds no purge. Worker-lifecycle variation explains smaller metadata/descriptor totals and is not claimed as the deterministic fix.

before/after performance

Unprofiled release binaries built on dev-01. Baseline dev a55521f94ef7337f0793037ae2cb2c27266d5720; final server source 7955f119. Median of per-run p95, RSS MiB, latency ms:

Host / samples per version Metric Dev Compact
dev-01 / 5 alternating idle.rss 110.898 72.219
dev-01 / 5 alternating open.note 6.229 5.958
dev-01 / 5 alternating search.query 12.395 10.800
perf-01 / 3 alternating idle.rss 105.199 68.078
perf-01 / 3 alternating open.note 3.005 2.970
perf-01 / 3 alternating search.query 4.388 3.955

Dev-01 compact maximum RSS is 73.523 MiB; all ten reports have zero scenario failures. Every dev sample fails RSS, every compact sample passes RSS/open gates. Search median p50 is 4.295 → 4.336 ms (+0.9%); maximum per-run p95 is 16.346 → 17.104 ms (+4.6%). The earlier 5x search slowdown does not recur in these medians. The build VM has latency variation. Perf-01 qualification is complete: I waited for ~/bin/perf-lock, collected all six alternating reports in this job, and verified zero scenario failures, three successful compact gate exits, and the identical binary SHA-256 manifest. idle-rss-compact-qualification.service finished with Result=success. Raw reports, exit codes and aggregate: research/idle-rss/perf01-three/.

Perf-01 maximum per-run p95: RSS 111.289 → 70.473 MiB, open 3.103 → 3.017 ms, search 4.665 → 4.286 ms. Every compact sample beats both budgets and the 85 MiB target. Median run p95 improves 35.3% RSS, 1.2% open, 9.9% search; search p50/p95 is lower in every corresponding pair. Open p95 is lower in two pairs, 4.7% higher in the first (2.881 → 3.017 ms). Full per-run p50/p95 values and caveats are in results.md; these summaries are not pooled quantiles or confidence bounds.

fix and trim audit

80fa9fab removes the added recount after_burst hook and fsio dependency. Its quiet timer can overlap queries; ARMED clears before malloc_trim, so another worker can arm before the first finishes. Therefore request exclusion and one trim per recount were not established. No new trim remains. Existing dev allocator policy is identical in both versions; changing all baseline trim callsites would be broader work.

7955f119 stores each exact parent path once, then exact boxed OS basename → u64 size entries. This avoids repeated full prefixes and spare PathBuf capacity. File mutations remain incremental, expected O(1). A full O(n) recount still discovers outside edits/deletions; two smaller maps may overlap. Complete publication, directory-generation retry and concurrent-write overlays remain intact. Note-open/search algorithms are unchanged. No lossy path hashes or platform path-identity changes.

All 45 fsio tests pass on dev-01, including exact OS bytes, duplicate basenames across folders, a randomized flat-map comparison, retained-byte budget, and directory move during recount. The budget test failed with the old flat layout (4,853,088 bytes/10k short names under a long common prefix), then passed with compact keys. Tests and build ran through Nix and ~/bin/slot, cargo -j4.

Failure table, exact commands and provenance: research/idle-rss/trim-audit.md, README.md, bins.sha256, results.md. Full top-ten stacks and exact grouped bytes: before.top10.txt, compact.top10.txt, before-owners.json, compact-owners.json; grouping: owners.py. Raw five-pair reports: dev01-five/.

Qualification uses the same unmodified harness source and same binary for both versions, equal-length work paths, seed 1, 100k, runs 1, cold-runs 1 for each first sample and 0 thereafter, idle-secs 60, --gate; no quick mode or cache drops. Binaries were relayed through the control host and SHA-256 checked on all three hosts. Perf-01 holds the one shared lock throughout all six alternating samples. RSS budget ≤100 MiB, target ≤85; open.note p95 ≤15 ms; search compared explicitly.

No merge performed. Control host remained edit/read-only; builds and tests ran on dev-01 through Nix/slot, measurements ran under the shared perf lock, no pattern kills.

## idle heap owners: compact quota snapshots At the seeded 100k idle checkpoint, quota snapshot allocations fall **23.80 → 5.12 MiB (78.5%)**. Total live requested heap falls **38.20 → 18.91 MiB**; peak requested heap **94.14 → 65.55 MiB**. These are heaptrack requested bytes, not RSS. Tracking stops before shutdown. Top ten allocation stacks in each version (decimal MB): | Rank | Dev stack | MB | Compact stack | MB | |---|---|---:|---|---:| | 1 | quota full path buffers | 20.417 | identity strings | 5.517 | | 2 | identity strings | 5.518 | quota basename hash tables | 3.277 | | 3 | quota flat hash table | 4.325 | identity slot vector | 3.200 | | 4 | identity slot vector | 3.200 | quota exact basename boxes | 2.014 | | 5 | search descriptor buffers | 2.095 | search descriptor buffers | 1.809 | | 6 | identity path lookup table | 0.655 | identity path lookup table | 0.655 | | 7 | identity id lookup table | 0.655 | identity id lookup table | 0.655 | | 8 | Home opening allocation | 0.262 | Home opening allocation | 0.262 | | 9 | note-list page result vector | 0.218 | identity formatting buffers | 0.123 | | 10 | quota path buffers at another depth | 0.200 | search tag span vectors | 0.102 | Largest grouped owners after: note identity index 9.69 MiB, quota 5.12 MiB, search descriptors 1.87 MiB, native SQLite 1.20 MiB, search vocabulary 0.037 MiB, note-list metadata 0.025 MiB, Yjs 0.002 MiB. Search uses SQLite FTS5, not Tantivy. Baseline's post-idle diagnostic trim reclaimed 29.4 MiB, proving significant allocator-retained free pages; final code adds no purge. Worker-lifecycle variation explains smaller metadata/descriptor totals and is not claimed as the deterministic fix. ## before/after performance Unprofiled release binaries built on dev-01. Baseline dev `a55521f94ef7337f0793037ae2cb2c27266d5720`; final server source `7955f119`. Median of per-run p95, RSS MiB, latency ms: | Host / samples per version | Metric | Dev | Compact | |---|---|---:|---:| | dev-01 / 5 alternating | idle.rss | 110.898 | 72.219 | | dev-01 / 5 alternating | open.note | 6.229 | 5.958 | | dev-01 / 5 alternating | search.query | 12.395 | 10.800 | | perf-01 / 3 alternating | idle.rss | 105.199 | 68.078 | | perf-01 / 3 alternating | open.note | 3.005 | 2.970 | | perf-01 / 3 alternating | search.query | 4.388 | 3.955 | Dev-01 compact maximum RSS is 73.523 MiB; all ten reports have zero scenario failures. Every dev sample fails RSS, every compact sample passes RSS/open gates. Search median p50 is 4.295 → 4.336 ms (+0.9%); maximum per-run p95 is 16.346 → 17.104 ms (+4.6%). The earlier 5x search slowdown does not recur in these medians. The build VM has latency variation. **Perf-01 qualification is complete**: I waited for `~/bin/perf-lock`, collected all six alternating reports in this job, and verified zero scenario failures, three successful compact gate exits, and the identical binary SHA-256 manifest. `idle-rss-compact-qualification.service` finished with Result=success. Raw reports, exit codes and aggregate: `research/idle-rss/perf01-three/`. Perf-01 maximum per-run p95: RSS **111.289 → 70.473 MiB**, open **3.103 → 3.017 ms**, search **4.665 → 4.286 ms**. Every compact sample beats both budgets and the 85 MiB target. Median run p95 improves 35.3% RSS, 1.2% open, 9.9% search; search p50/p95 is lower in every corresponding pair. Open p95 is lower in two pairs, 4.7% higher in the first (2.881 → 3.017 ms). Full per-run p50/p95 values and caveats are in `results.md`; these summaries are not pooled quantiles or confidence bounds. ## fix and trim audit `80fa9fab` removes the added recount `after_burst` hook and fsio dependency. Its quiet timer can overlap queries; `ARMED` clears before `malloc_trim`, so another worker can arm before the first finishes. Therefore request exclusion and one trim per recount were not established. No new trim remains. Existing dev allocator policy is identical in both versions; changing all baseline trim callsites would be broader work. `7955f119` stores each exact parent path once, then exact boxed OS basename → u64 size entries. This avoids repeated full prefixes and spare PathBuf capacity. File mutations remain incremental, expected O(1). A full O(n) recount still discovers outside edits/deletions; two smaller maps may overlap. Complete publication, directory-generation retry and concurrent-write overlays remain intact. Note-open/search algorithms are unchanged. No lossy path hashes or platform path-identity changes. All 45 fsio tests pass on dev-01, including exact OS bytes, duplicate basenames across folders, a randomized flat-map comparison, retained-byte budget, and directory move during recount. The budget test failed with the old flat layout (4,853,088 bytes/10k short names under a long common prefix), then passed with compact keys. Tests and build ran through Nix and `~/bin/slot`, cargo `-j4`. Failure table, exact commands and provenance: `research/idle-rss/trim-audit.md`, `README.md`, `bins.sha256`, `results.md`. Full top-ten stacks and exact grouped bytes: `before.top10.txt`, `compact.top10.txt`, `before-owners.json`, `compact-owners.json`; grouping: `owners.py`. Raw five-pair reports: `dev01-five/`. Qualification uses the same unmodified harness source and same binary for both versions, equal-length work paths, seed 1, 100k, runs 1, cold-runs 1 for each first sample and 0 thereafter, idle-secs 60, --gate; no quick mode or cache drops. Binaries were relayed through the control host and SHA-256 checked on all three hosts. Perf-01 holds the one shared lock throughout all six alternating samples. RSS budget ≤100 MiB, target ≤85; open.note p95 ≤15 ms; search compared explicitly. No merge performed. Control host remained edit/read-only; builds and tests ran on dev-01 through Nix/slot, measurements ran under the shared perf lock, no pattern kills.
kayg changed title from WIP: perf: release freed quota snapshots at idle to WIP: perf: compact quota snapshots at 100k notes 2026-11-01 00:29:30 +00:00
kayg changed title from WIP: perf: compact quota snapshots at 100k notes to perf: compact quota snapshots at 100k notes 2026-11-01 04:18:43 +00:00
Author
Owner

Independent review, round 1

Reviewed head 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05 against a55521f9, independently of the implementation report.

Findings P0–P3: none. Verdict: approve.

  • Accounting and identity: Files uses exact Path parents and exact OsStr basenames; hash collisions still require key equality. Different folders, case-distinct names, NFC/NFD-distinct names and non-UTF-8 basename bytes remain separate where the filesystem distinguishes them. No lossy conversion or compact numeric slot can redirect a key. Existing directory enumeration limitations are unchanged.
  • Mutation/recount/restart: file moves and deletes retain the existing incremental updates; directory moves retain generation-based recount retry, and concurrent writes/deletes retain the version overlay. A failed walk cannot publish a partial replacement. The snapshot is memory-only: startup reconstructs it from disk, and ensure() still gates initial quota admission. Existing durable file-write behavior is unchanged.
  • Complexity: insert/get/remove perform an expected constant number of hash-table operations, with linear path-byte hashing and amortized table growth. Recount walks files/directories once per successful attempt, then sums entries; there is no added per-note depth-squared traversal or mutation-triggered full rebuild. Directory moves scan directory keys plus the moved entries, as documented; generation changes can retry the walk. Existing per-person totals publication remains unchanged.
  • Numbers/trim: independently recomputed medians and maxima from all 16 committed raw reports. The PR table matches: dev-01 RSS 110.898 → 72.219 MiB, open 6.229 → 5.958 ms, search 12.395 → 10.800 ms; perf-01 105.199 → 68.078 MiB, 3.005 → 2.970 ms, 4.388 → 3.955 ms. All scenario-failure arrays are empty; perf-01 compact gate exits are 0/0/0. Owner JSON gives quota 23.801895 → 5.120939 MiB and live heap 38.197924 → 18.905537 MiB, matching the rounded claims. The added recount trim hook and fsio dependency are fully absent; baseline allocator policy is unchanged.

Independent validation: on dev-01, detached uncommitted worktree ~/Developer/Worktrees/review-821-r1, pinned to the reviewed head with only the required local Nix files and review probes added:

export PATH=/nix/var/nix/profiles/default/bin:$PATH
cd ~/Developer/Worktrees/review-821-r1
nix develop -c bash -c '~/bin/slot cargo test -j4 -p calternal-fsio'

Result: 47 passed, 0 failed, doc tests passed; unit review-821-r1-tests.service completed successfully. The two added probes cover 50,000 randomized flat-map comparisons (inserts, reads, removes, renames/moves, prefix enumeration and owner totals across duplicate/Unicode/case/raw-byte names and deep paths), plus actual folder moves across owners during recount, case-only rename, delete/write overlays, reconstruction after counter restart and an outside write, the maximum accepted depth, and retention of the published snapshot after an over-depth recount fails. Log: ~/review-821-r1-tests.log. Restart coverage reconstructs the counter rather than terminating a server process; filesystem-specific case folding was assessed from unchanged key semantics, not run on macOS. Performance measurements were audited, not rerun.

No commits or pushes; no control-host builds/tests.

## Independent review, round 1 Reviewed head `729c9fd737c5e2f01746d8526c9f9bfda8ef4c05` against `a55521f9`, independently of the implementation report. **Findings P0–P3: none. Verdict: approve.** - **Accounting and identity:** `Files` uses exact `Path` parents and exact `OsStr` basenames; hash collisions still require key equality. Different folders, case-distinct names, NFC/NFD-distinct names and non-UTF-8 basename bytes remain separate where the filesystem distinguishes them. No lossy conversion or compact numeric slot can redirect a key. Existing directory enumeration limitations are unchanged. - **Mutation/recount/restart:** file moves and deletes retain the existing incremental updates; directory moves retain generation-based recount retry, and concurrent writes/deletes retain the version overlay. A failed walk cannot publish a partial replacement. The snapshot is memory-only: startup reconstructs it from disk, and `ensure()` still gates initial quota admission. Existing durable file-write behavior is unchanged. - **Complexity:** insert/get/remove perform an expected constant number of hash-table operations, with linear path-byte hashing and amortized table growth. Recount walks files/directories once per successful attempt, then sums entries; there is no added per-note depth-squared traversal or mutation-triggered full rebuild. Directory moves scan directory keys plus the moved entries, as documented; generation changes can retry the walk. Existing per-person totals publication remains unchanged. - **Numbers/trim:** independently recomputed medians and maxima from all 16 committed raw reports. The PR table matches: dev-01 RSS 110.898 → 72.219 MiB, open 6.229 → 5.958 ms, search 12.395 → 10.800 ms; perf-01 105.199 → 68.078 MiB, 3.005 → 2.970 ms, 4.388 → 3.955 ms. All scenario-failure arrays are empty; perf-01 compact gate exits are 0/0/0. Owner JSON gives quota 23.801895 → 5.120939 MiB and live heap 38.197924 → 18.905537 MiB, matching the rounded claims. The added recount trim hook and fsio dependency are fully absent; baseline allocator policy is unchanged. **Independent validation:** on dev-01, detached uncommitted worktree `~/Developer/Worktrees/review-821-r1`, pinned to the reviewed head with only the required local Nix files and review probes added: ```sh export PATH=/nix/var/nix/profiles/default/bin:$PATH cd ~/Developer/Worktrees/review-821-r1 nix develop -c bash -c '~/bin/slot cargo test -j4 -p calternal-fsio' ``` Result: **47 passed, 0 failed**, doc tests passed; unit `review-821-r1-tests.service` completed successfully. The two added probes cover 50,000 randomized flat-map comparisons (inserts, reads, removes, renames/moves, prefix enumeration and owner totals across duplicate/Unicode/case/raw-byte names and deep paths), plus actual folder moves across owners during recount, case-only rename, delete/write overlays, reconstruction after counter restart and an outside write, the maximum accepted depth, and retention of the published snapshot after an over-depth recount fails. Log: `~/review-821-r1-tests.log`. Restart coverage reconstructs the counter rather than terminating a server process; filesystem-specific case folding was assessed from unchanged key semantics, not run on macOS. Performance measurements were audited, not rerun. No commits or pushes; no control-host builds/tests.
Author
Owner

ADR 0003 evidence migration: research/idle-rss/README.md

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

# 100k idle memory investigation

Baseline: dev `a55521f94ef7337f0793037ae2cb2c27266d5720`.
Final server source: `7955f119` (compact quota snapshot); no added trim hook.
The previous trim candidate and its diagnostic results are superseded.
See `trim-audit.md` for the allocator concurrency findings and design decisions.

Quota snapshots now share exact parent paths and store exact basenames with
u64 sizes. Recounts still discover outside edits/deletions and atomically
publish complete snapshots, preserving generation checks and write overlays.
The existing dev allocator policy remains identical in both variants.

## Heap evidence

Use the Nix devshell with `pkgs.heaptrack` added locally, never committed.
Build through `~/bin/slot cargo build --release -j4 -p calternal -p calternal-perf`.
`profile.sh` documents the diagnostic harness checkpoint and preload shim.
The shim stops heaptrack at the ordinary idle checkpoint before shutdown;
these are live allocations, not evidence of leaks. It then logs glibc arena
statistics and RSS around an explicit diagnostic trim, after the measurement.
Profiling RSS/latency is not qualification evidence.

`analyze.sh LABEL MARKER` interprets the raw trace and writes a live-byte
flamegraph and top-ten allocation stacks. `owners.py TRACE.stacks` groups
those bytes by owner, counting native SQLite allocations separately from
Rust search descriptors/vocabulary. The application uses SQLite FTS5.

## Alternating measurements

Unprofiled release binaries are built on dev-01, relayed through the control
host, and SHA-256 checked on all three hosts. See `bins.sha256`.
The same harness binary runs both versions with equal-length work paths.

```
calternal-perf --bin BIN --work WORK --sizes 100k --runs 1 \
  --cold-runs COLD --seed 1 --idle-secs 60 --budgets budgets.json \
  --gate --json REPORT.json --md REPORT.md
```

COLD=1 for each version's first sample, then 0 as in #792; zero still prepares
a cold Home but omits cold metrics. No quick mode or cache drops.
Budgets: `{"idle.rss@100000":{"p95":100},"open.note@100000":{"p95":15}}`.
The harness labels RSS MB but computes MiB (VmRSS KiB / 1024).

`qualify.sh` alternates dev/head, default three pairs. `sample-one.sh` wraps
each measurement in `~/bin/slot`; `aggregate.py` reports median run p50/p95,
all samples, and maximum run p95 for conservative gating. Scenario failures
are rejected; expected baseline RSS budget failures do not stop the matrix.
Search results require review alongside open latency, beyond the two gates.

Dev-01: `IDLE_RSS_ROOT=~/idle-rss-dev5 IDLE_RSS_SAMPLES=5 bash qualify.sh`,
owned by `idle-rss-dev5.service`. Profile runs afterwards to avoid adding
profiler load to these samples.

Perf-01: `~/bin/perf-lock timeout 10800 bash ~/idle-rss-gate/sample.sh`,
owned by `idle-rss-compact-qualification.service`. Its 12-hour unit limit
includes waiting for other lock holders; measurement itself is bounded to
three hours. All six samples hold the one shared lock. Results were collected
in this job; see `results.md`, `dev01-five/` and `perf01-three/`. All six
perf-VM reports have zero scenario failures; compact passes both gates and
the 85 MiB RSS target. Queuing alone does not qualify the change.

ADR 0003 evidence migration: `research/idle-rss/README.md` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ````text # 100k idle memory investigation Baseline: dev `a55521f94ef7337f0793037ae2cb2c27266d5720`. Final server source: `7955f119` (compact quota snapshot); no added trim hook. The previous trim candidate and its diagnostic results are superseded. See `trim-audit.md` for the allocator concurrency findings and design decisions. Quota snapshots now share exact parent paths and store exact basenames with u64 sizes. Recounts still discover outside edits/deletions and atomically publish complete snapshots, preserving generation checks and write overlays. The existing dev allocator policy remains identical in both variants. ## Heap evidence Use the Nix devshell with `pkgs.heaptrack` added locally, never committed. Build through `~/bin/slot cargo build --release -j4 -p calternal -p calternal-perf`. `profile.sh` documents the diagnostic harness checkpoint and preload shim. The shim stops heaptrack at the ordinary idle checkpoint before shutdown; these are live allocations, not evidence of leaks. It then logs glibc arena statistics and RSS around an explicit diagnostic trim, after the measurement. Profiling RSS/latency is not qualification evidence. `analyze.sh LABEL MARKER` interprets the raw trace and writes a live-byte flamegraph and top-ten allocation stacks. `owners.py TRACE.stacks` groups those bytes by owner, counting native SQLite allocations separately from Rust search descriptors/vocabulary. The application uses SQLite FTS5. ## Alternating measurements Unprofiled release binaries are built on dev-01, relayed through the control host, and SHA-256 checked on all three hosts. See `bins.sha256`. The same harness binary runs both versions with equal-length work paths. ``` calternal-perf --bin BIN --work WORK --sizes 100k --runs 1 \ --cold-runs COLD --seed 1 --idle-secs 60 --budgets budgets.json \ --gate --json REPORT.json --md REPORT.md ``` COLD=1 for each version's first sample, then 0 as in #792; zero still prepares a cold Home but omits cold metrics. No quick mode or cache drops. Budgets: `{"idle.rss@100000":{"p95":100},"open.note@100000":{"p95":15}}`. The harness labels RSS MB but computes MiB (VmRSS KiB / 1024). `qualify.sh` alternates dev/head, default three pairs. `sample-one.sh` wraps each measurement in `~/bin/slot`; `aggregate.py` reports median run p50/p95, all samples, and maximum run p95 for conservative gating. Scenario failures are rejected; expected baseline RSS budget failures do not stop the matrix. Search results require review alongside open latency, beyond the two gates. Dev-01: `IDLE_RSS_ROOT=~/idle-rss-dev5 IDLE_RSS_SAMPLES=5 bash qualify.sh`, owned by `idle-rss-dev5.service`. Profile runs afterwards to avoid adding profiler load to these samples. Perf-01: `~/bin/perf-lock timeout 10800 bash ~/idle-rss-gate/sample.sh`, owned by `idle-rss-compact-qualification.service`. Its 12-hour unit limit includes waiting for other lock holders; measurement itself is bounded to three hours. All six samples hold the one shared lock. Results were collected in this job; see `results.md`, `dev01-five/` and `perf01-three/`. All six perf-VM reports have zero scenario failures; compact passes both gates and the 85 MiB RSS target. Queuing alone does not qualify the change. ````
Author
Owner

ADR 0003 evidence migration: research/idle-rss/after-owners.json

Source commit: 8229346cb7b06b495a39ada220c44a79fcf523dd; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

{
  "quota snapshots": 24858380,
  "note identity index": 10152776,
  "search note descriptors": 1440945,
  "other": 1058059,
  "sqlite allocations": 1266184,
  "yjs": 26464,
  "search vocabulary": 38884,
  "note list metadata": 34833
}

ADR 0003 evidence migration: `research/idle-rss/after-owners.json` Source commit: [8229346cb7b06b495a39ada220c44a79fcf523dd](https://git.kayg.org/kayg/calternal/commit/8229346cb7b06b495a39ada220c44a79fcf523dd); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text { "quota snapshots": 24858380, "note identity index": 10152776, "search note descriptors": 1440945, "other": 1058059, "sqlite allocations": 1266184, "yjs": 26464, "search vocabulary": 38884, "note list metadata": 34833 } ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/after.top10.txt

Source commit: 8229346cb7b06b495a39ada220c44a79fcf523dd; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

reading file "/home/claude/idle-rss/after.ht" - please wait, this might take some time...
Debuggee command was: /home/claude/idle-rss/bin/calternal-head serve --create --listen 127.0.0.1:7607 --dev-user 0192f0a0-0000-7000-8000-00000000f1f0 --data /home/claude/idle-rss/work-after/runs/n100000/indexed --state /home/claude/idle-rss/work-after/runs/n100000/indexed
finished reading file, now analyzing data:

MEMORY LEAKS
20.22M leaked over 594664 calls from
  <alloc::raw_vec::RawVecInner>::finish_grow
    in /home/claude/idle-rss/bin/calternal-head
  <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global>
    in /home/claude/idle-rss/bin/calternal-head
  <std::path::Path>::_join
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount
    in /home/claude/idle-rss/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

5.52M leaked over 98364 calls from
  <calternal_notes::index::Index>::set
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

4.33M leaked over 83 calls from
  <hashbrown::raw::RawTableInner>::fallible_with_capacity::<alloc::alloc::Global>
    in /home/claude/idle-rss/bin/calternal-head
  <hashbrown::raw::RawTable<(std::path::PathBuf, u64)>>::reserve_rehash::<hashbrown::map::make_hasher<std::path::PathBuf, u64, std::hash::random::RandomState>::{closure#0}>
    in /home/claude/idle-rss/bin/calternal-head
  <hashbrown::map::HashMap<std::path::PathBuf, u64, std::hash::random::RandomState>>::insert
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount
    in /home/claude/idle-rss/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

3.20M leaked over 1 calls from
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

1.32M leaked over 299399 calls from
  <alloc::raw_vec::RawVecInner>::finish_grow
    in /home/claude/idle-rss/bin/calternal-head
  <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global>
    in /home/claude/idle-rss/bin/calternal-head
  calternal_notes::search::describe_with_body
    in /home/claude/idle-rss/bin/calternal-head
  calternal_notes::search::read_note
    in /home/claude/idle-rss/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::search::NotesSearch as calternal_core::search::SearchProvider>::doc::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

655.38K leaked over 1 calls from
  <hashbrown::raw::RawTable<u32>>::reserve_rehash::<<calternal_notes::index::Index>::read_file::{closure#1}>
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

655.38K leaked over 1 calls from
  <hashbrown::raw::RawTable<u32>>::reserve_rehash::<<calternal_notes::index::Index>::read_file::{closure#2}>
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

262.14K leaked over 1 calls from
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

198.00K leaked over 5400 calls from
  <alloc::raw_vec::RawVecInner>::finish_grow
    in /home/claude/idle-rss/bin/calternal-head
  <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global>
    in /home/claude/idle-rss/bin/calternal-head
  <std::path::Path>::_join
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount
    in /home/claude/idle-rss/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

122.80K leaked over 100000 calls from
  <alloc::raw_vec::RawVecInner>::finish_grow
    in /home/claude/idle-rss/bin/calternal-head
  <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global>
    in /home/claude/idle-rss/bin/calternal-head
  <alloc::string::String as core::fmt::Write>::write_str.4852
    in /home/claude/idle-rss/bin/calternal-head
  core::fmt::write
    in /home/claude/idle-rss/bin/calternal-head
  alloc::fmt::format::format_inner
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_notes::index::Index>::set
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss/bin/calternal-head
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6



total runtime: 324.37s.
calls to allocation functions: 29534855 (91053/s)
temporary memory allocations: 7914146 (24398/s)
peak heap memory consumption: 97.19M
peak RSS (including heaptrack overhead): 178.90M
total memory leaked: 38.88M

ADR 0003 evidence migration: `research/idle-rss/after.top10.txt` Source commit: [8229346cb7b06b495a39ada220c44a79fcf523dd](https://git.kayg.org/kayg/calternal/commit/8229346cb7b06b495a39ada220c44a79fcf523dd); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text reading file "/home/claude/idle-rss/after.ht" - please wait, this might take some time... Debuggee command was: /home/claude/idle-rss/bin/calternal-head serve --create --listen 127.0.0.1:7607 --dev-user 0192f0a0-0000-7000-8000-00000000f1f0 --data /home/claude/idle-rss/work-after/runs/n100000/indexed --state /home/claude/idle-rss/work-after/runs/n100000/indexed finished reading file, now analyzing data: MEMORY LEAKS 20.22M leaked over 594664 calls from <alloc::raw_vec::RawVecInner>::finish_grow in /home/claude/idle-rss/bin/calternal-head <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global> in /home/claude/idle-rss/bin/calternal-head <std::path::Path>::_join in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount in /home/claude/idle-rss/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 5.52M leaked over 98364 calls from <calternal_notes::index::Index>::set in /home/claude/idle-rss/bin/calternal-head <calternal_notes::index::Index>::read_file in /home/claude/idle-rss/bin/calternal-head <calternal_notes::home::Home>::open_at in /home/claude/idle-rss/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 4.33M leaked over 83 calls from <hashbrown::raw::RawTableInner>::fallible_with_capacity::<alloc::alloc::Global> in /home/claude/idle-rss/bin/calternal-head <hashbrown::raw::RawTable<(std::path::PathBuf, u64)>>::reserve_rehash::<hashbrown::map::make_hasher<std::path::PathBuf, u64, std::hash::random::RandomState>::{closure#0}> in /home/claude/idle-rss/bin/calternal-head <hashbrown::map::HashMap<std::path::PathBuf, u64, std::hash::random::RandomState>>::insert in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount in /home/claude/idle-rss/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 3.20M leaked over 1 calls from <calternal_notes::index::Index>::read_file in /home/claude/idle-rss/bin/calternal-head <calternal_notes::home::Home>::open_at in /home/claude/idle-rss/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 1.32M leaked over 299399 calls from <alloc::raw_vec::RawVecInner>::finish_grow in /home/claude/idle-rss/bin/calternal-head <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global> in /home/claude/idle-rss/bin/calternal-head calternal_notes::search::describe_with_body in /home/claude/idle-rss/bin/calternal-head calternal_notes::search::read_note in /home/claude/idle-rss/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::search::NotesSearch as calternal_core::search::SearchProvider>::doc::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 655.38K leaked over 1 calls from <hashbrown::raw::RawTable<u32>>::reserve_rehash::<<calternal_notes::index::Index>::read_file::{closure#1}> in /home/claude/idle-rss/bin/calternal-head <calternal_notes::index::Index>::read_file in /home/claude/idle-rss/bin/calternal-head <calternal_notes::home::Home>::open_at in /home/claude/idle-rss/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 655.38K leaked over 1 calls from <hashbrown::raw::RawTable<u32>>::reserve_rehash::<<calternal_notes::index::Index>::read_file::{closure#2}> in /home/claude/idle-rss/bin/calternal-head <calternal_notes::index::Index>::read_file in /home/claude/idle-rss/bin/calternal-head <calternal_notes::home::Home>::open_at in /home/claude/idle-rss/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 262.14K leaked over 1 calls from <calternal_notes::home::Home>::open_at in /home/claude/idle-rss/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 198.00K leaked over 5400 calls from <alloc::raw_vec::RawVecInner>::finish_grow in /home/claude/idle-rss/bin/calternal-head <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global> in /home/claude/idle-rss/bin/calternal-head <std::path::Path>::_join in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-head <calternal_fsio::usage::Usage>::recount in /home/claude/idle-rss/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 122.80K leaked over 100000 calls from <alloc::raw_vec::RawVecInner>::finish_grow in /home/claude/idle-rss/bin/calternal-head <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global> in /home/claude/idle-rss/bin/calternal-head <alloc::string::String as core::fmt::Write>::write_str.4852 in /home/claude/idle-rss/bin/calternal-head core::fmt::write in /home/claude/idle-rss/bin/calternal-head alloc::fmt::format::format_inner in /home/claude/idle-rss/bin/calternal-head <calternal_notes::index::Index>::set in /home/claude/idle-rss/bin/calternal-head <calternal_notes::index::Index>::read_file in /home/claude/idle-rss/bin/calternal-head <calternal_notes::home::Home>::open_at in /home/claude/idle-rss/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 total runtime: 324.37s. calls to allocation functions: 29534855 (91053/s) temporary memory allocations: 7914146 (24398/s) peak heap memory consumption: 97.19M peak RSS (including heaptrack overhead): 178.90M total memory leaked: 38.88M ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/aggregate.py

Source commit: 7955f1190a99567410615a740a6903e65c72d09e; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

import json, pathlib, os
root = pathlib.Path(__file__).resolve().parent
out = {}
for label in ('dev', 'head'):
    runs = [json.loads((root/f'{label}-{i}.json').read_text())['sizes'][0] for i in range(1, int(os.environ.get('IDLE_RSS_SAMPLES', '3')) + 1)]
    assert all(not r['failures'] for r in runs), (label, [r['failures'] for r in runs])
    metrics = [{m['metric']:m for m in r['metrics']} for r in runs]
    out[label] = {}
    for name in ('idle.rss','open.note','search.query','search.first_query','cold.index'):
        available = [m[name] for m in metrics if name in m]
        p50s = sorted(m['p50'] for m in available)
        p95s = sorted(m['p95'] for m in available)
        if not available: continue
        out[label][name] = {
            'p50':p50s[(len(p50s)-1)//2],
            # Conservative pooled-summary p95 used by #792 qualification.
            'p95':max(p95s),
            'median_run_p95':p95s[(len(p95s)-1)//2],
            'noise_pct':100*(max(p50s)-min(p50s))/p50s[(len(p50s)-1)//2],
            'samples': [[m['p50'],m['p95']] for m in available]
        }
(root/'summary.json').write_text(json.dumps(out,indent=2)+'\n')
print(json.dumps(out,indent=2))
assert out['head']['idle.rss']['p95'] <= 100
assert out['head']['open.note']['p95'] <= 15

ADR 0003 evidence migration: `research/idle-rss/aggregate.py` Source commit: [7955f1190a99567410615a740a6903e65c72d09e](https://git.kayg.org/kayg/calternal/commit/7955f1190a99567410615a740a6903e65c72d09e); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text import json, pathlib, os root = pathlib.Path(__file__).resolve().parent out = {} for label in ('dev', 'head'): runs = [json.loads((root/f'{label}-{i}.json').read_text())['sizes'][0] for i in range(1, int(os.environ.get('IDLE_RSS_SAMPLES', '3')) + 1)] assert all(not r['failures'] for r in runs), (label, [r['failures'] for r in runs]) metrics = [{m['metric']:m for m in r['metrics']} for r in runs] out[label] = {} for name in ('idle.rss','open.note','search.query','search.first_query','cold.index'): available = [m[name] for m in metrics if name in m] p50s = sorted(m['p50'] for m in available) p95s = sorted(m['p95'] for m in available) if not available: continue out[label][name] = { 'p50':p50s[(len(p50s)-1)//2], # Conservative pooled-summary p95 used by #792 qualification. 'p95':max(p95s), 'median_run_p95':p95s[(len(p95s)-1)//2], 'noise_pct':100*(max(p50s)-min(p50s))/p50s[(len(p50s)-1)//2], 'samples': [[m['p50'],m['p95']] for m in available] } (root/'summary.json').write_text(json.dumps(out,indent=2)+'\n') print(json.dumps(out,indent=2)) assert out['head']['idle.rss']['p95'] <= 100 assert out['head']['open.note']['p95'] <= 15 ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/analyze.sh

Source commit: 8229346cb7b06b495a39ada220c44a79fcf523dd; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

#!/usr/bin/env bash
set -euo pipefail
root="$HOME/idle-rss"
label=${1:-before}
marker=${2:-$root/idle.marker}
pid=$(cat "$marker")
heaptrack_root=$(dirname "$(dirname "$(command -v heaptrack)")")
~/bin/slot "$heaptrack_root/lib/heaptrack/libexec/heaptrack_interpret" < "$root/profile.$pid.raw" > "$root/$label.ht"
~/bin/slot heaptrack_print -f "$root/$label.ht" -p 0 -a 0 -T 0 -l 1 -m 0 -t 0 -n 10 -s 1 -F "$root/$label.stacks" --flamegraph-cost-type leaked > "$root/$label.top10"

ADR 0003 evidence migration: `research/idle-rss/analyze.sh` Source commit: [8229346cb7b06b495a39ada220c44a79fcf523dd](https://git.kayg.org/kayg/calternal/commit/8229346cb7b06b495a39ada220c44a79fcf523dd); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text #!/usr/bin/env bash set -euo pipefail root="$HOME/idle-rss" label=${1:-before} marker=${2:-$root/idle.marker} pid=$(cat "$marker") heaptrack_root=$(dirname "$(dirname "$(command -v heaptrack)")") ~/bin/slot "$heaptrack_root/lib/heaptrack/libexec/heaptrack_interpret" < "$root/profile.$pid.raw" > "$root/$label.ht" ~/bin/slot heaptrack_print -f "$root/$label.ht" -p 0 -a 0 -T 0 -l 1 -m 0 -t 0 -n 10 -s 1 -F "$root/$label.stacks" --flamegraph-cost-type leaked > "$root/$label.top10" ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/before-owners.json

Source commit: dcc44077cb444bf787937e5ff9220f94a0b86ac4; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

{
  "quota snapshots": 24958096,
  "note identity index": 10152745,
  "search note descriptors": 2261451,
  "sqlite allocations": 1345392,
  "other": 1033094,
  "note list metadata": 259583,
  "search vocabulary": 38884,
  "yjs": 4181
}

ADR 0003 evidence migration: `research/idle-rss/before-owners.json` Source commit: [dcc44077cb444bf787937e5ff9220f94a0b86ac4](https://git.kayg.org/kayg/calternal/commit/dcc44077cb444bf787937e5ff9220f94a0b86ac4); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text { "quota snapshots": 24958096, "note identity index": 10152745, "search note descriptors": 2261451, "sqlite allocations": 1345392, "other": 1033094, "note list metadata": 259583, "search vocabulary": 38884, "yjs": 4181 } ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/before.top10.txt

Source commit: 8e0d832df73faec56fc2e892c8e6398523227090; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

reading file "/home/claude/idle-rss/before.ht" - please wait, this might take some time...
Debuggee command was: /home/claude/idle-rss/bin/calternal-dev serve --create --listen 127.0.0.1:5775 --dev-user 0192f0a0-0000-7000-8000-00000000f1f0 --data /home/claude/idle-rss/work-before/runs/n100000/indexed --state /home/claude/idle-rss/work-before/runs/n100000/indexed
finished reading file, now analyzing data:

MEMORY LEAKS
20.42M leaked over 495553 calls from
  <alloc::raw_vec::RawVecInner>::finish_grow
    in /home/claude/idle-rss/bin/calternal-dev
  <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global>
    in /home/claude/idle-rss/bin/calternal-dev
  <std::path::Path>::_join
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount
    in /home/claude/idle-rss/bin/calternal-dev
  std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-dev
  <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-dev
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-dev
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

5.52M leaked over 98364 calls from
  <calternal_notes::index::Index>::set
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss/bin/calternal-dev
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-dev
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-dev
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-dev
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-dev
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

4.33M leaked over 67 calls from
  <hashbrown::raw::RawTableInner>::fallible_with_capacity::<alloc::alloc::Global>
    in /home/claude/idle-rss/bin/calternal-dev
  <hashbrown::raw::RawTable<(std::path::PathBuf, u64)>>::reserve_rehash::<hashbrown::map::make_hasher<std::path::PathBuf, u64, std::hash::random::RandomState>::{closure#0}>
    in /home/claude/idle-rss/bin/calternal-dev
  <hashbrown::map::HashMap<std::path::PathBuf, u64, std::hash::random::RandomState>>::insert
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount
    in /home/claude/idle-rss/bin/calternal-dev
  std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-dev
  <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-dev
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-dev
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

3.20M leaked over 1 calls from
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss/bin/calternal-dev
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-dev
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-dev
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-dev
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-dev
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

2.10M leaked over 299347 calls from
  <alloc::raw_vec::RawVecInner>::finish_grow
    in /home/claude/idle-rss/bin/calternal-dev
  <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global>
    in /home/claude/idle-rss/bin/calternal-dev
  calternal_notes::search::describe_with_body
    in /home/claude/idle-rss/bin/calternal-dev
  calternal_notes::search::read_note
    in /home/claude/idle-rss/bin/calternal-dev
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::search::NotesSearch as calternal_core::search::SearchProvider>::doc::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-dev
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-dev
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-dev
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-dev
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

655.38K leaked over 1 calls from
  <hashbrown::raw::RawTable<u32>>::reserve_rehash::<<calternal_notes::index::Index>::read_file::{closure#2}>
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss/bin/calternal-dev
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-dev
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-dev
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-dev
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-dev
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

655.38K leaked over 1 calls from
  <hashbrown::raw::RawTable<u32>>::reserve_rehash::<<calternal_notes::index::Index>::read_file::{closure#1}>
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss/bin/calternal-dev
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-dev
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-dev
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-dev
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-dev
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

262.14K leaked over 1 calls from
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss/bin/calternal-dev
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-dev
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-dev
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-dev
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-dev
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

217.60K leaked over 165 calls from
  <alloc::raw_vec::RawVecInner>::finish_grow
    in /home/claude/idle-rss/bin/calternal-dev
  <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global>
    in /home/claude/idle-rss/bin/calternal-dev
  core::iter::adapters::try_process::<rusqlite::row::MappedRows<<calternal_notes::meta::MetaDb>::page::{closure#6}>, (calternal_notes::meta::Entry, alloc::string::String), core::result::Result<core::convert::Infallible, rusqlite::error::Error>, <core::result::Result<alloc::vec::Vec<(calternal_notes::meta::Entry, alloc::string::String)>, rusqlite::error::Error> as core::iter::traits::collect::FromIterator<core::result::Result<(calternal_notes::meta::Entry, alloc::string::String), rusqlite::error::Error>>>::from_iter<rusqlite::row::MappedRows<<calternal_notes::meta::MetaDb>::page::{closure#6}>>::{closure#0}, alloc::vec::Vec<(calternal_notes::meta::Entry, alloc::string::String)>>
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_notes::meta::MetaDb>::page
    in /home/claude/idle-rss/bin/calternal-dev
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<calternal_notes::meta::page::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss/bin/calternal-dev
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-dev
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-dev
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-dev
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

199.80K leaked over 4500 calls from
  <alloc::raw_vec::RawVecInner>::finish_grow
    in /home/claude/idle-rss/bin/calternal-dev
  <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global>
    in /home/claude/idle-rss/bin/calternal-dev
  <std::path::Path>::_join
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss/bin/calternal-dev
  <calternal_fsio::usage::Usage>::recount
    in /home/claude/idle-rss/bin/calternal-dev
  std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>
    in /home/claude/idle-rss/bin/calternal-dev
  <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss/bin/calternal-dev
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss/bin/calternal-dev
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6



total runtime: 298.08s.
calls to allocation functions: 28689264 (96248/s)
temporary memory allocations: 7308971 (24520/s)
peak heap memory consumption: 98.71M
peak RSS (including heaptrack overhead): 176.54M
total memory leaked: 40.05M

ADR 0003 evidence migration: `research/idle-rss/before.top10.txt` Source commit: [8e0d832df73faec56fc2e892c8e6398523227090](https://git.kayg.org/kayg/calternal/commit/8e0d832df73faec56fc2e892c8e6398523227090); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text reading file "/home/claude/idle-rss/before.ht" - please wait, this might take some time... Debuggee command was: /home/claude/idle-rss/bin/calternal-dev serve --create --listen 127.0.0.1:5775 --dev-user 0192f0a0-0000-7000-8000-00000000f1f0 --data /home/claude/idle-rss/work-before/runs/n100000/indexed --state /home/claude/idle-rss/work-before/runs/n100000/indexed finished reading file, now analyzing data: MEMORY LEAKS 20.42M leaked over 495553 calls from <alloc::raw_vec::RawVecInner>::finish_grow in /home/claude/idle-rss/bin/calternal-dev <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global> in /home/claude/idle-rss/bin/calternal-dev <std::path::Path>::_join in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount in /home/claude/idle-rss/bin/calternal-dev std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-dev <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-dev <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-dev start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 5.52M leaked over 98364 calls from <calternal_notes::index::Index>::set in /home/claude/idle-rss/bin/calternal-dev <calternal_notes::index::Index>::read_file in /home/claude/idle-rss/bin/calternal-dev <calternal_notes::home::Home>::open_at in /home/claude/idle-rss/bin/calternal-dev tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-dev std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-dev <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-dev <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-dev start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 4.33M leaked over 67 calls from <hashbrown::raw::RawTableInner>::fallible_with_capacity::<alloc::alloc::Global> in /home/claude/idle-rss/bin/calternal-dev <hashbrown::raw::RawTable<(std::path::PathBuf, u64)>>::reserve_rehash::<hashbrown::map::make_hasher<std::path::PathBuf, u64, std::hash::random::RandomState>::{closure#0}> in /home/claude/idle-rss/bin/calternal-dev <hashbrown::map::HashMap<std::path::PathBuf, u64, std::hash::random::RandomState>>::insert in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount in /home/claude/idle-rss/bin/calternal-dev std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-dev <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-dev <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-dev start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 3.20M leaked over 1 calls from <calternal_notes::index::Index>::read_file in /home/claude/idle-rss/bin/calternal-dev <calternal_notes::home::Home>::open_at in /home/claude/idle-rss/bin/calternal-dev tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-dev std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-dev <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-dev <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-dev start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 2.10M leaked over 299347 calls from <alloc::raw_vec::RawVecInner>::finish_grow in /home/claude/idle-rss/bin/calternal-dev <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global> in /home/claude/idle-rss/bin/calternal-dev calternal_notes::search::describe_with_body in /home/claude/idle-rss/bin/calternal-dev calternal_notes::search::read_note in /home/claude/idle-rss/bin/calternal-dev tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::search::NotesSearch as calternal_core::search::SearchProvider>::doc::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-dev std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-dev <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-dev <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-dev start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 655.38K leaked over 1 calls from <hashbrown::raw::RawTable<u32>>::reserve_rehash::<<calternal_notes::index::Index>::read_file::{closure#2}> in /home/claude/idle-rss/bin/calternal-dev <calternal_notes::index::Index>::read_file in /home/claude/idle-rss/bin/calternal-dev <calternal_notes::home::Home>::open_at in /home/claude/idle-rss/bin/calternal-dev tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-dev std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-dev <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-dev <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-dev start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 655.38K leaked over 1 calls from <hashbrown::raw::RawTable<u32>>::reserve_rehash::<<calternal_notes::index::Index>::read_file::{closure#1}> in /home/claude/idle-rss/bin/calternal-dev <calternal_notes::index::Index>::read_file in /home/claude/idle-rss/bin/calternal-dev <calternal_notes::home::Home>::open_at in /home/claude/idle-rss/bin/calternal-dev tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-dev std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-dev <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-dev <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-dev start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 262.14K leaked over 1 calls from <calternal_notes::home::Home>::open_at in /home/claude/idle-rss/bin/calternal-dev tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-dev std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-dev <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-dev <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-dev start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 217.60K leaked over 165 calls from <alloc::raw_vec::RawVecInner>::finish_grow in /home/claude/idle-rss/bin/calternal-dev <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global> in /home/claude/idle-rss/bin/calternal-dev core::iter::adapters::try_process::<rusqlite::row::MappedRows<<calternal_notes::meta::MetaDb>::page::{closure#6}>, (calternal_notes::meta::Entry, alloc::string::String), core::result::Result<core::convert::Infallible, rusqlite::error::Error>, <core::result::Result<alloc::vec::Vec<(calternal_notes::meta::Entry, alloc::string::String)>, rusqlite::error::Error> as core::iter::traits::collect::FromIterator<core::result::Result<(calternal_notes::meta::Entry, alloc::string::String), rusqlite::error::Error>>>::from_iter<rusqlite::row::MappedRows<<calternal_notes::meta::MetaDb>::page::{closure#6}>>::{closure#0}, alloc::vec::Vec<(calternal_notes::meta::Entry, alloc::string::String)>> in /home/claude/idle-rss/bin/calternal-dev <calternal_notes::meta::MetaDb>::page in /home/claude/idle-rss/bin/calternal-dev tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<calternal_notes::meta::page::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss/bin/calternal-dev std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-dev <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-dev <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-dev start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 199.80K leaked over 4500 calls from <alloc::raw_vec::RawVecInner>::finish_grow in /home/claude/idle-rss/bin/calternal-dev <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global> in /home/claude/idle-rss/bin/calternal-dev <std::path::Path>::_join in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss/bin/calternal-dev <calternal_fsio::usage::Usage>::recount in /home/claude/idle-rss/bin/calternal-dev std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()> in /home/claude/idle-rss/bin/calternal-dev <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss/bin/calternal-dev <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss/bin/calternal-dev start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 total runtime: 298.08s. calls to allocation functions: 28689264 (96248/s) temporary memory allocations: 7308971 (24520/s) peak heap memory consumption: 98.71M peak RSS (including heaptrack overhead): 176.54M total memory leaked: 40.05M ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/bins.sha256

Source commit: dcc44077cb444bf787937e5ff9220f94a0b86ac4; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

da8cd4ab195c629fb63c2f90120041a52962940dc5f52a15dcb57a6232f64c83  bin/calternal-dev
d64c1acb2fbac820731ecfdba1d63430d54d76b57c5e909c76fc2c3a4e1831e4  bin/calternal-head
b8afc82cb3918d6ca2e1fa73b8c8cc32e786a412f40629c8ea546c64c0b28136  bin/calternal-perf

ADR 0003 evidence migration: `research/idle-rss/bins.sha256` Source commit: [dcc44077cb444bf787937e5ff9220f94a0b86ac4](https://git.kayg.org/kayg/calternal/commit/dcc44077cb444bf787937e5ff9220f94a0b86ac4); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text da8cd4ab195c629fb63c2f90120041a52962940dc5f52a15dcb57a6232f64c83 bin/calternal-dev d64c1acb2fbac820731ecfdba1d63430d54d76b57c5e909c76fc2c3a4e1831e4 bin/calternal-head b8afc82cb3918d6ca2e1fa73b8c8cc32e786a412f40629c8ea546c64c0b28136 bin/calternal-perf ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/compact-diagnostic.json

Source commit: f29334ed42cb79ac178818b3cc6483887fbe8c28; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (111,892 bytes): compact-diagnostic.json

ADR 0003 evidence migration: `research/idle-rss/compact-diagnostic.json` Source commit: [f29334ed42cb79ac178818b3cc6483887fbe8c28](https://git.kayg.org/kayg/calternal/commit/f29334ed42cb79ac178818b3cc6483887fbe8c28); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (111,892 bytes): [compact-diagnostic.json](https://git.kayg.org/attachments/b08bcdb4-9af2-4f78-a465-1d0c357fb892)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/compact-owners.json

Source commit: f29334ed42cb79ac178818b3cc6483887fbe8c28; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

{
  "note identity index": 10156594,
  "quota snapshots": 5369694,
  "search note descriptors": 1964443,
  "sqlite allocations": 1262600,
  "other": 1004040,
  "search vocabulary": 38884,
  "note list metadata": 25717,
  "yjs": 1920
}

ADR 0003 evidence migration: `research/idle-rss/compact-owners.json` Source commit: [f29334ed42cb79ac178818b3cc6483887fbe8c28](https://git.kayg.org/kayg/calternal/commit/f29334ed42cb79ac178818b3cc6483887fbe8c28); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text { "note identity index": 10156594, "quota snapshots": 5369694, "search note descriptors": 1964443, "sqlite allocations": 1262600, "other": 1004040, "search vocabulary": 38884, "note list metadata": 25717, "yjs": 1920 } ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/compact.top10.txt

Source commit: f29334ed42cb79ac178818b3cc6483887fbe8c28; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

reading file "/home/claude/idle-rss/compact.ht" - please wait, this might take some time...
Debuggee command was: /home/claude/idle-rss-dev5/bin/calternal-head serve --create --listen 127.0.0.1:8311 --dev-user 0192f0a0-0000-7000-8000-00000000f1f0 --data /home/claude/idle-rss/work-finalx/runs/n100000/indexed --state /home/claude/idle-rss/work-finalx/runs/n100000/indexed
finished reading file, now analyzing data:

MEMORY LEAKS
5.52M leaked over 98364 calls from
  <calternal_notes::index::Index>::set
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss-dev5/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss-dev5/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

3.28M leaked over 121 calls from
  <hashbrown::raw::RawTableInner>::fallible_with_capacity::<alloc::alloc::Global>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <hashbrown::raw::RawTable<(alloc::boxed::Box<std::ffi::os_str::OsStr>, u64)>>::reserve_rehash::<hashbrown::map::make_hasher<alloc::boxed::Box<std::ffi::os_str::OsStr>, u64, std::hash::random::RandomState>::{closure#0}>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_fsio::usage::files::Files>::insert_in
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount
    in /home/claude/idle-rss-dev5/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss-dev5/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

3.20M leaked over 1 calls from
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss-dev5/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss-dev5/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

2.01M leaked over 594664 calls from
  <calternal_fsio::usage::files::Files>::insert_in
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount_using::walk
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_fsio::usage::Usage>::recount
    in /home/claude/idle-rss-dev5/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss-dev5/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

1.81M leaked over 299435 calls from
  <alloc::raw_vec::RawVecInner>::finish_grow
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  calternal_notes::search::describe_with_body
    in /home/claude/idle-rss-dev5/bin/calternal-head
  calternal_notes::search::read_note
    in /home/claude/idle-rss-dev5/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::search::NotesSearch as calternal_core::search::SearchProvider>::doc::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss-dev5/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

655.38K leaked over 1 calls from
  <hashbrown::raw::RawTable<u32>>::reserve_rehash::<<calternal_notes::index::Index>::read_file::{closure#2}>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss-dev5/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss-dev5/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

655.38K leaked over 1 calls from
  <hashbrown::raw::RawTable<u32>>::reserve_rehash::<<calternal_notes::index::Index>::read_file::{closure#1}>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss-dev5/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss-dev5/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

262.14K leaked over 1 calls from
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss-dev5/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss-dev5/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

122.80K leaked over 100000 calls from
  <alloc::raw_vec::RawVecInner>::finish_grow
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <alloc::string::String as core::fmt::Write>::write_str.4846
    in /home/claude/idle-rss-dev5/bin/calternal-head
  core::fmt::write
    in /home/claude/idle-rss-dev5/bin/calternal-head
  alloc::fmt::format::format_inner
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_notes::index::Index>::set
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_notes::index::Index>::read_file
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <calternal_notes::home::Home>::open_at
    in /home/claude/idle-rss-dev5/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss-dev5/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6

101.50K leaked over 51212 calls from
  <alloc::raw_vec::RawVecInner>::finish_grow
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <alloc::raw_vec::RawVec<alloc::sync::Arc<dyn calternal_notes::sweepers::Sweeper>>>::grow_one
    in /home/claude/idle-rss-dev5/bin/calternal-head
  calternal_notes::tags::scan::spans
    in /home/claude/idle-rss-dev5/bin/calternal-head
  calternal_notes::search::describe_with_body
    in /home/claude/idle-rss-dev5/bin/calternal-head
  calternal_notes::search::read_note
    in /home/claude/idle-rss-dev5/bin/calternal-head
  tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::search::NotesSearch as calternal_core::search::SearchProvider>::doc::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
    in /home/claude/idle-rss-dev5/bin/calternal-head
  <std::sys::thread::unix::Thread>::new::thread_start
    in /home/claude/idle-rss-dev5/bin/calternal-head
  start_thread
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6
  __clone3
    in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6



total runtime: 319.54s.
calls to allocation functions: 28395923 (88865/s)
temporary memory allocations: 6560845 (20532/s)
peak heap memory consumption: 68.73M
peak RSS (including heaptrack overhead): 138.81M
total memory leaked: 19.82M

ADR 0003 evidence migration: `research/idle-rss/compact.top10.txt` Source commit: [f29334ed42cb79ac178818b3cc6483887fbe8c28](https://git.kayg.org/kayg/calternal/commit/f29334ed42cb79ac178818b3cc6483887fbe8c28); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text reading file "/home/claude/idle-rss/compact.ht" - please wait, this might take some time... Debuggee command was: /home/claude/idle-rss-dev5/bin/calternal-head serve --create --listen 127.0.0.1:8311 --dev-user 0192f0a0-0000-7000-8000-00000000f1f0 --data /home/claude/idle-rss/work-finalx/runs/n100000/indexed --state /home/claude/idle-rss/work-finalx/runs/n100000/indexed finished reading file, now analyzing data: MEMORY LEAKS 5.52M leaked over 98364 calls from <calternal_notes::index::Index>::set in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_notes::index::Index>::read_file in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_notes::home::Home>::open_at in /home/claude/idle-rss-dev5/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss-dev5/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss-dev5/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss-dev5/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss-dev5/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 3.28M leaked over 121 calls from <hashbrown::raw::RawTableInner>::fallible_with_capacity::<alloc::alloc::Global> in /home/claude/idle-rss-dev5/bin/calternal-head <hashbrown::raw::RawTable<(alloc::boxed::Box<std::ffi::os_str::OsStr>, u64)>>::reserve_rehash::<hashbrown::map::make_hasher<alloc::boxed::Box<std::ffi::os_str::OsStr>, u64, std::hash::random::RandomState>::{closure#0}> in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_fsio::usage::files::Files>::insert_in in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_fsio::usage::Usage>::recount in /home/claude/idle-rss-dev5/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()> in /home/claude/idle-rss-dev5/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss-dev5/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss-dev5/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 3.20M leaked over 1 calls from <calternal_notes::index::Index>::read_file in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_notes::home::Home>::open_at in /home/claude/idle-rss-dev5/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss-dev5/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss-dev5/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss-dev5/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss-dev5/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 2.01M leaked over 594664 calls from <calternal_fsio::usage::files::Files>::insert_in in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_fsio::usage::Usage>::recount_using::walk in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_fsio::usage::Usage>::recount in /home/claude/idle-rss-dev5/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<calternal_fsio::usage::Usage>::background::{closure#0}, ()> in /home/claude/idle-rss-dev5/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<calternal_fsio::usage::Usage>::background::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss-dev5/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss-dev5/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 1.81M leaked over 299435 calls from <alloc::raw_vec::RawVecInner>::finish_grow in /home/claude/idle-rss-dev5/bin/calternal-head <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global> in /home/claude/idle-rss-dev5/bin/calternal-head calternal_notes::search::describe_with_body in /home/claude/idle-rss-dev5/bin/calternal-head calternal_notes::search::read_note in /home/claude/idle-rss-dev5/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::search::NotesSearch as calternal_core::search::SearchProvider>::doc::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss-dev5/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss-dev5/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss-dev5/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss-dev5/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 655.38K leaked over 1 calls from <hashbrown::raw::RawTable<u32>>::reserve_rehash::<<calternal_notes::index::Index>::read_file::{closure#2}> in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_notes::index::Index>::read_file in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_notes::home::Home>::open_at in /home/claude/idle-rss-dev5/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss-dev5/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss-dev5/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss-dev5/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss-dev5/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 655.38K leaked over 1 calls from <hashbrown::raw::RawTable<u32>>::reserve_rehash::<<calternal_notes::index::Index>::read_file::{closure#1}> in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_notes::index::Index>::read_file in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_notes::home::Home>::open_at in /home/claude/idle-rss-dev5/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss-dev5/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss-dev5/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss-dev5/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss-dev5/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 262.14K leaked over 1 calls from <calternal_notes::home::Home>::open_at in /home/claude/idle-rss-dev5/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss-dev5/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss-dev5/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss-dev5/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss-dev5/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 122.80K leaked over 100000 calls from <alloc::raw_vec::RawVecInner>::finish_grow in /home/claude/idle-rss-dev5/bin/calternal-head <alloc::raw_vec::RawVecInner<_>>::reserve::do_reserve_and_handle::<alloc::alloc::Global> in /home/claude/idle-rss-dev5/bin/calternal-head <alloc::string::String as core::fmt::Write>::write_str.4846 in /home/claude/idle-rss-dev5/bin/calternal-head core::fmt::write in /home/claude/idle-rss-dev5/bin/calternal-head alloc::fmt::format::format_inner in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_notes::index::Index>::set in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_notes::index::Index>::read_file in /home/claude/idle-rss-dev5/bin/calternal-head <calternal_notes::home::Home>::open_at in /home/claude/idle-rss-dev5/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::Notes>::home::{closure#0}::{closure#1}::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss-dev5/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss-dev5/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss-dev5/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss-dev5/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 101.50K leaked over 51212 calls from <alloc::raw_vec::RawVecInner>::finish_grow in /home/claude/idle-rss-dev5/bin/calternal-head <alloc::raw_vec::RawVec<alloc::sync::Arc<dyn calternal_notes::sweepers::Sweeper>>>::grow_one in /home/claude/idle-rss-dev5/bin/calternal-head calternal_notes::tags::scan::spans in /home/claude/idle-rss-dev5/bin/calternal-head calternal_notes::search::describe_with_body in /home/claude/idle-rss-dev5/bin/calternal-head calternal_notes::search::read_note in /home/claude/idle-rss-dev5/bin/calternal-head tokio::runtime::task::raw::poll::<tokio::runtime::blocking::task::BlockingTask<<calternal_notes::search::NotesSearch as calternal_core::search::SearchProvider>::doc::{closure#0}::{closure#0}>, tokio::runtime::blocking::schedule::BlockingSchedule> in /home/claude/idle-rss-dev5/bin/calternal-head std::sys::backtrace::__rust_begin_short_backtrace::<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()> in /home/claude/idle-rss-dev5/bin/calternal-head <std::thread::lifecycle::spawn_unchecked<<tokio::runtime::blocking::pool::Spawner>::spawn_thread::{closure#0}, ()>::{closure#1} as core::ops::function::FnOnce<()>>::call_once::{shim:vtable#0} in /home/claude/idle-rss-dev5/bin/calternal-head <std::sys::thread::unix::Thread>::new::thread_start in /home/claude/idle-rss-dev5/bin/calternal-head start_thread in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 __clone3 in /nix/store/h4wfwic161kxrr74jlzla5lsm28hgary-glibc-2.44-25/lib/libc.so.6 total runtime: 319.54s. calls to allocation functions: 28395923 (88865/s) temporary memory allocations: 6560845 (20532/s) peak heap memory consumption: 68.73M peak RSS (including heaptrack overhead): 138.81M total memory leaked: 19.82M ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/dev01-diagnostic.json

Source commit: 8229346cb7b06b495a39ada220c44a79fcf523dd; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

{
  "context": "single-sample diagnostics on contended dev-01, not perf qualification",
  "baseline": "a55521f94ef7337f0793037ae2cb2c27266d5720",
  "candidate_rust_source": "6577451d",
  "runs": {
    "dev": {
      "metrics": {
        "idle.rss": {
          "unit": "MB",
          "p50": 109.5,
          "p95": 109.5
        },
        "open.note": {
          "unit": "ms",
          "p50": 1.617559,
          "p95": 5.09669
        },
        "search.query": {
          "unit": "ms",
          "p50": 2.921567,
          "p95": 6.901787000000001
        }
      },
      "failures": []
    },
    "head": {
      "metrics": {
        "idle.rss": {
          "unit": "MB",
          "p50": 86.28515625,
          "p95": 86.28515625
        },
        "open.note": {
          "unit": "ms",
          "p50": 2.415155,
          "p95": 8.198074
        },
        "search.query": {
          "unit": "ms",
          "p50": 11.814685,
          "p95": 33.52106
        }
      },
      "failures": []
    }
  },
  "trim_probe_kib": {
    "dev": {
      "rss_before": 112128,
      "rss_after": 82008,
      "pss_anon_before": 91972,
      "pss_anon_after": 61852
    },
    "head": {
      "rss_before": 88356,
      "rss_after": 88356,
      "pss_anon_before": 68092,
      "pss_anon_after": 68092
    }
  }
}

ADR 0003 evidence migration: `research/idle-rss/dev01-diagnostic.json` Source commit: [8229346cb7b06b495a39ada220c44a79fcf523dd](https://git.kayg.org/kayg/calternal/commit/8229346cb7b06b495a39ada220c44a79fcf523dd); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text { "context": "single-sample diagnostics on contended dev-01, not perf qualification", "baseline": "a55521f94ef7337f0793037ae2cb2c27266d5720", "candidate_rust_source": "6577451d", "runs": { "dev": { "metrics": { "idle.rss": { "unit": "MB", "p50": 109.5, "p95": 109.5 }, "open.note": { "unit": "ms", "p50": 1.617559, "p95": 5.09669 }, "search.query": { "unit": "ms", "p50": 2.921567, "p95": 6.901787000000001 } }, "failures": [] }, "head": { "metrics": { "idle.rss": { "unit": "MB", "p50": 86.28515625, "p95": 86.28515625 }, "open.note": { "unit": "ms", "p50": 2.415155, "p95": 8.198074 }, "search.query": { "unit": "ms", "p50": 11.814685, "p95": 33.52106 } }, "failures": [] } }, "trim_probe_kib": { "dev": { "rss_before": 112128, "rss_after": 82008, "pss_anon_before": 91972, "pss_anon_after": 61852 }, "head": { "rss_before": 88356, "rss_after": 88356, "pss_anon_before": 68092, "pss_anon_after": 68092 } } } ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/dev01-five/dev-1.json

Source commit: 50d4306bee81514d299ccdb126f1e62bc6eeeacc; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (111,747 bytes): dev-1.json

ADR 0003 evidence migration: `research/idle-rss/dev01-five/dev-1.json` Source commit: [50d4306bee81514d299ccdb126f1e62bc6eeeacc](https://git.kayg.org/kayg/calternal/commit/50d4306bee81514d299ccdb126f1e62bc6eeeacc); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (111,747 bytes): [dev-1.json](https://git.kayg.org/attachments/e839f901-e0c4-47b0-a80d-f6221ab12aeb)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/dev01-five/dev-2.json

Source commit: 50d4306bee81514d299ccdb126f1e62bc6eeeacc; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (110,323 bytes): dev-2.json

ADR 0003 evidence migration: `research/idle-rss/dev01-five/dev-2.json` Source commit: [50d4306bee81514d299ccdb126f1e62bc6eeeacc](https://git.kayg.org/kayg/calternal/commit/50d4306bee81514d299ccdb126f1e62bc6eeeacc); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (110,323 bytes): [dev-2.json](https://git.kayg.org/attachments/c1976711-0e1d-481d-a811-25185a2abc06)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/dev01-five/dev-3.json

Source commit: 50d4306bee81514d299ccdb126f1e62bc6eeeacc; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (110,263 bytes): dev-3.json

ADR 0003 evidence migration: `research/idle-rss/dev01-five/dev-3.json` Source commit: [50d4306bee81514d299ccdb126f1e62bc6eeeacc](https://git.kayg.org/kayg/calternal/commit/50d4306bee81514d299ccdb126f1e62bc6eeeacc); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (110,263 bytes): [dev-3.json](https://git.kayg.org/attachments/19d7cdb4-5afc-4916-9ede-a5cd9c04f27e)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/dev01-five/dev-4.json

Source commit: 50d4306bee81514d299ccdb126f1e62bc6eeeacc; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (110,384 bytes): dev-4.json

ADR 0003 evidence migration: `research/idle-rss/dev01-five/dev-4.json` Source commit: [50d4306bee81514d299ccdb126f1e62bc6eeeacc](https://git.kayg.org/kayg/calternal/commit/50d4306bee81514d299ccdb126f1e62bc6eeeacc); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (110,384 bytes): [dev-4.json](https://git.kayg.org/attachments/44928a63-44dc-475d-aff2-96b5b98217ac)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/dev01-five/dev-5.json

Source commit: 50d4306bee81514d299ccdb126f1e62bc6eeeacc; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (110,376 bytes): dev-5.json

ADR 0003 evidence migration: `research/idle-rss/dev01-five/dev-5.json` Source commit: [50d4306bee81514d299ccdb126f1e62bc6eeeacc](https://git.kayg.org/kayg/calternal/commit/50d4306bee81514d299ccdb126f1e62bc6eeeacc); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (110,376 bytes): [dev-5.json](https://git.kayg.org/attachments/213b2f93-f87f-4cb8-9811-990704425514)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/dev01-five/head-1.json

Source commit: 50d4306bee81514d299ccdb126f1e62bc6eeeacc; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (111,779 bytes): head-1.json

ADR 0003 evidence migration: `research/idle-rss/dev01-five/head-1.json` Source commit: [50d4306bee81514d299ccdb126f1e62bc6eeeacc](https://git.kayg.org/kayg/calternal/commit/50d4306bee81514d299ccdb126f1e62bc6eeeacc); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (111,779 bytes): [head-1.json](https://git.kayg.org/attachments/3d353315-6c58-464d-a1bb-403d4de07cb3)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/dev01-five/head-2.json

Source commit: 50d4306bee81514d299ccdb126f1e62bc6eeeacc; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (110,332 bytes): head-2.json

ADR 0003 evidence migration: `research/idle-rss/dev01-five/head-2.json` Source commit: [50d4306bee81514d299ccdb126f1e62bc6eeeacc](https://git.kayg.org/kayg/calternal/commit/50d4306bee81514d299ccdb126f1e62bc6eeeacc); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (110,332 bytes): [head-2.json](https://git.kayg.org/attachments/12b219f1-7cf2-4051-a8dc-7fb3f98b166e)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/dev01-five/head-3.json

Source commit: 50d4306bee81514d299ccdb126f1e62bc6eeeacc; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (110,303 bytes): head-3.json

ADR 0003 evidence migration: `research/idle-rss/dev01-five/head-3.json` Source commit: [50d4306bee81514d299ccdb126f1e62bc6eeeacc](https://git.kayg.org/kayg/calternal/commit/50d4306bee81514d299ccdb126f1e62bc6eeeacc); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (110,303 bytes): [head-3.json](https://git.kayg.org/attachments/11215334-9192-4b3f-bfb1-93eab72af2d7)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/dev01-five/head-4.json

Source commit: 50d4306bee81514d299ccdb126f1e62bc6eeeacc; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (110,276 bytes): head-4.json

ADR 0003 evidence migration: `research/idle-rss/dev01-five/head-4.json` Source commit: [50d4306bee81514d299ccdb126f1e62bc6eeeacc](https://git.kayg.org/kayg/calternal/commit/50d4306bee81514d299ccdb126f1e62bc6eeeacc); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (110,276 bytes): [head-4.json](https://git.kayg.org/attachments/e616706e-85d1-4ba5-8035-334d74efa3fd)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/dev01-five/head-5.json

Source commit: 50d4306bee81514d299ccdb126f1e62bc6eeeacc; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (110,385 bytes): head-5.json

ADR 0003 evidence migration: `research/idle-rss/dev01-five/head-5.json` Source commit: [50d4306bee81514d299ccdb126f1e62bc6eeeacc](https://git.kayg.org/kayg/calternal/commit/50d4306bee81514d299ccdb126f1e62bc6eeeacc); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (110,385 bytes): [head-5.json](https://git.kayg.org/attachments/46150ec0-f3b7-4649-9d47-533bd72a3ee7)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/dev01-five/summary.json

Source commit: 50d4306bee81514d299ccdb126f1e62bc6eeeacc; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

{
  "dev": {
    "idle.rss": {
      "p50": 110.8984375,
      "p95": 116.03125,
      "median_run_p95": 110.8984375,
      "noise_pct": 8.090877069390631,
      "samples": [
        [
          109.26171875,
          109.26171875
        ],
        [
          111.0625,
          111.0625
        ],
        [
          116.03125,
          116.03125
        ],
        [
          110.8984375,
          110.8984375
        ],
        [
          107.05859375,
          107.05859375
        ]
      ]
    },
    "open.note": {
      "p50": 1.9400229999999998,
      "p95": 10.522915000000001,
      "median_run_p95": 6.228962,
      "noise_pct": 58.417812572325175,
      "samples": [
        [
          2.679024,
          10.522915000000001
        ],
        [
          1.945357,
          5.958163
        ],
        [
          1.743081,
          6.228962
        ],
        [
          1.9400229999999998,
          6.244115
        ],
        [
          1.545705,
          5.31662
        ]
      ]
    },
    "search.query": {
      "p50": 4.295241,
      "p95": 16.345934999999997,
      "median_run_p95": 12.394606000000001,
      "noise_pct": 33.13495098412405,
      "samples": [
        [
          5.2121509999999995,
          11.12058
        ],
        [
          4.783997,
          16.345934999999997
        ],
        [
          3.788925,
          12.394606000000001
        ],
        [
          4.295241,
          10.429185
        ],
        [
          4.203663,
          16.280974
        ]
      ]
    },
    "search.first_query": {
      "p50": 67.12968599999999,
      "p95": 210.336843,
      "median_run_p95": 67.12968599999999,
      "noise_pct": 250.70885330820704,
      "samples": [
        [
          96.730068,
          96.730068
        ],
        [
          42.036777,
          42.036777
        ],
        [
          210.336843,
          210.336843
        ],
        [
          62.918296999999995,
          62.918296999999995
        ],
        [
          67.12968599999999,
          67.12968599999999
        ]
      ]
    },
    "cold.index": {
      "p50": 20.954430744,
      "p95": 20.954430744,
      "median_run_p95": 20.954430744,
      "noise_pct": 0.0,
      "samples": [
        [
          20.954430744,
          20.954430744
        ]
      ]
    }
  },
  "head": {
    "idle.rss": {
      "p50": 72.21875,
      "p95": 73.5234375,
      "median_run_p95": 72.21875,
      "noise_pct": 2.4556469061012547,
      "samples": [
        [
          71.75,
          71.75
        ],
        [
          73.5234375,
          73.5234375
        ],
        [
          71.98046875,
          71.98046875
        ],
        [
          72.21875,
          72.21875
        ],
        [
          73.12890625,
          73.12890625
        ]
      ]
    },
    "open.note": {
      "p50": 1.696141,
      "p95": 9.342569000000001,
      "median_run_p95": 5.957713,
      "noise_pct": 28.92401044488637,
      "samples": [
        [
          1.386167,
          5.957713
        ],
        [
          1.876759,
          7.892541
        ],
        [
          1.679023,
          5.054709999999999
        ],
        [
          1.696141,
          5.629421
        ],
        [
          1.788632,
          9.342569000000001
        ]
      ]
    },
    "search.query": {
      "p50": 4.335812,
      "p95": 17.104133,
      "median_run_p95": 10.800068,
      "noise_pct": 34.645644229961995,
      "samples": [
        [
          4.335812,
          14.4171
        ],
        [
          5.232136,
          17.104133
        ],
        [
          3.8099879999999997,
          9.188944
        ],
        [
          4.40195,
          9.613059999999999
        ],
        [
          3.729966,
          10.800068
        ]
      ]
    },
    "search.first_query": {
      "p50": 84.243564,
      "p95": 210.003399,
      "median_run_p95": 84.243564,
      "noise_pct": 200.147931775536,
      "samples": [
        [
          84.243564,
          84.243564
        ],
        [
          41.391648,
          41.391648
        ],
        [
          88.8251,
          88.8251
        ],
        [
          72.409615,
          72.409615
        ],
        [
          210.003399,
          210.003399
        ]
      ]
    },
    "cold.index": {
      "p50": 18.493119131,
      "p95": 18.493119131,
      "median_run_p95": 18.493119131,
      "noise_pct": 0.0,
      "samples": [
        [
          18.493119131,
          18.493119131
        ]
      ]
    }
  }
}

ADR 0003 evidence migration: `research/idle-rss/dev01-five/summary.json` Source commit: [50d4306bee81514d299ccdb126f1e62bc6eeeacc](https://git.kayg.org/kayg/calternal/commit/50d4306bee81514d299ccdb126f1e62bc6eeeacc); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text { "dev": { "idle.rss": { "p50": 110.8984375, "p95": 116.03125, "median_run_p95": 110.8984375, "noise_pct": 8.090877069390631, "samples": [ [ 109.26171875, 109.26171875 ], [ 111.0625, 111.0625 ], [ 116.03125, 116.03125 ], [ 110.8984375, 110.8984375 ], [ 107.05859375, 107.05859375 ] ] }, "open.note": { "p50": 1.9400229999999998, "p95": 10.522915000000001, "median_run_p95": 6.228962, "noise_pct": 58.417812572325175, "samples": [ [ 2.679024, 10.522915000000001 ], [ 1.945357, 5.958163 ], [ 1.743081, 6.228962 ], [ 1.9400229999999998, 6.244115 ], [ 1.545705, 5.31662 ] ] }, "search.query": { "p50": 4.295241, "p95": 16.345934999999997, "median_run_p95": 12.394606000000001, "noise_pct": 33.13495098412405, "samples": [ [ 5.2121509999999995, 11.12058 ], [ 4.783997, 16.345934999999997 ], [ 3.788925, 12.394606000000001 ], [ 4.295241, 10.429185 ], [ 4.203663, 16.280974 ] ] }, "search.first_query": { "p50": 67.12968599999999, "p95": 210.336843, "median_run_p95": 67.12968599999999, "noise_pct": 250.70885330820704, "samples": [ [ 96.730068, 96.730068 ], [ 42.036777, 42.036777 ], [ 210.336843, 210.336843 ], [ 62.918296999999995, 62.918296999999995 ], [ 67.12968599999999, 67.12968599999999 ] ] }, "cold.index": { "p50": 20.954430744, "p95": 20.954430744, "median_run_p95": 20.954430744, "noise_pct": 0.0, "samples": [ [ 20.954430744, 20.954430744 ] ] } }, "head": { "idle.rss": { "p50": 72.21875, "p95": 73.5234375, "median_run_p95": 72.21875, "noise_pct": 2.4556469061012547, "samples": [ [ 71.75, 71.75 ], [ 73.5234375, 73.5234375 ], [ 71.98046875, 71.98046875 ], [ 72.21875, 72.21875 ], [ 73.12890625, 73.12890625 ] ] }, "open.note": { "p50": 1.696141, "p95": 9.342569000000001, "median_run_p95": 5.957713, "noise_pct": 28.92401044488637, "samples": [ [ 1.386167, 5.957713 ], [ 1.876759, 7.892541 ], [ 1.679023, 5.054709999999999 ], [ 1.696141, 5.629421 ], [ 1.788632, 9.342569000000001 ] ] }, "search.query": { "p50": 4.335812, "p95": 17.104133, "median_run_p95": 10.800068, "noise_pct": 34.645644229961995, "samples": [ [ 4.335812, 14.4171 ], [ 5.232136, 17.104133 ], [ 3.8099879999999997, 9.188944 ], [ 4.40195, 9.613059999999999 ], [ 3.729966, 10.800068 ] ] }, "search.first_query": { "p50": 84.243564, "p95": 210.003399, "median_run_p95": 84.243564, "noise_pct": 200.147931775536, "samples": [ [ 84.243564, 84.243564 ], [ 41.391648, 41.391648 ], [ 88.8251, 88.8251 ], [ 72.409615, 72.409615 ], [ 210.003399, 210.003399 ] ] }, "cold.index": { "p50": 18.493119131, "p95": 18.493119131, "median_run_p95": 18.493119131, "noise_pct": 0.0, "samples": [ [ 18.493119131, 18.493119131 ] ] } } } ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/owners.py

Source commit: dcc44077cb444bf787937e5ff9220f94a0b86ac4; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

"""Group heaptrack live-at-checkpoint flamegraph bytes by application owner."""
import collections
import json
import pathlib
import sys

owners = collections.Counter()
for line in pathlib.Path(sys.argv[1]).read_text().splitlines():
    stack, size = line.rsplit(' ', 1)
    if 'calternal_fsio::usage' in stack:
        owner = 'quota snapshots'
    elif 'calternal_notes::index::Index' in stack:
        owner = 'note identity index'
    elif 'describe_with_body' in stack:
        owner = 'search note descriptors'
    elif 'sqlite3' in stack:
        owner = 'sqlite allocations'
    elif 'calternal_notes::meta' in stack:
        owner = 'note list metadata'
    elif '::build_vocabulary' in stack:
        owner = 'search vocabulary'
    elif 'yrs::' in stack:
        owner = 'yjs'
    else:
        owner = 'other'
    owners[owner] += int(size)
print(json.dumps(dict(owners.most_common()), indent=2))

ADR 0003 evidence migration: `research/idle-rss/owners.py` Source commit: [dcc44077cb444bf787937e5ff9220f94a0b86ac4](https://git.kayg.org/kayg/calternal/commit/dcc44077cb444bf787937e5ff9220f94a0b86ac4); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text """Group heaptrack live-at-checkpoint flamegraph bytes by application owner.""" import collections import json import pathlib import sys owners = collections.Counter() for line in pathlib.Path(sys.argv[1]).read_text().splitlines(): stack, size = line.rsplit(' ', 1) if 'calternal_fsio::usage' in stack: owner = 'quota snapshots' elif 'calternal_notes::index::Index' in stack: owner = 'note identity index' elif 'describe_with_body' in stack: owner = 'search note descriptors' elif 'sqlite3' in stack: owner = 'sqlite allocations' elif 'calternal_notes::meta' in stack: owner = 'note list metadata' elif '::build_vocabulary' in stack: owner = 'search vocabulary' elif 'yrs::' in stack: owner = 'yjs' else: owner = 'other' owners[owner] += int(size) print(json.dumps(dict(owners.most_common()), indent=2)) ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/bins.sha256

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

da8cd4ab195c629fb63c2f90120041a52962940dc5f52a15dcb57a6232f64c83  bin/calternal-dev
d64c1acb2fbac820731ecfdba1d63430d54d76b57c5e909c76fc2c3a4e1831e4  bin/calternal-head
b8afc82cb3918d6ca2e1fa73b8c8cc32e786a412f40629c8ea546c64c0b28136  bin/calternal-perf

ADR 0003 evidence migration: `research/idle-rss/perf01-three/bins.sha256` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text da8cd4ab195c629fb63c2f90120041a52962940dc5f52a15dcb57a6232f64c83 bin/calternal-dev d64c1acb2fbac820731ecfdba1d63430d54d76b57c5e909c76fc2c3a4e1831e4 bin/calternal-head b8afc82cb3918d6ca2e1fa73b8c8cc32e786a412f40629c8ea546c64c0b28136 bin/calternal-perf ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/dev-1.exit

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

1

ADR 0003 evidence migration: `research/idle-rss/perf01-three/dev-1.exit` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text 1 ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/dev-1.json

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (111,826 bytes): dev-1.json

ADR 0003 evidence migration: `research/idle-rss/perf01-three/dev-1.json` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (111,826 bytes): [dev-1.json](https://git.kayg.org/attachments/d2a82e3f-8842-432d-b30d-3bac393e3701)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/dev-2.exit

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

1

ADR 0003 evidence migration: `research/idle-rss/perf01-three/dev-2.exit` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text 1 ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/dev-2.json

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (110,225 bytes): dev-2.json

ADR 0003 evidence migration: `research/idle-rss/perf01-three/dev-2.json` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (110,225 bytes): [dev-2.json](https://git.kayg.org/attachments/1a42eeef-a45f-451a-9f84-b83ef1a721a8)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/dev-3.exit

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

1

ADR 0003 evidence migration: `research/idle-rss/perf01-three/dev-3.exit` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text 1 ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/dev-3.json

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (110,329 bytes): dev-3.json

ADR 0003 evidence migration: `research/idle-rss/perf01-three/dev-3.json` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (110,329 bytes): [dev-3.json](https://git.kayg.org/attachments/590866bb-04b6-4bb1-9e6a-de369e699a24)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/head-1.exit

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

0

ADR 0003 evidence migration: `research/idle-rss/perf01-three/head-1.exit` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text 0 ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/head-1.json

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (111,779 bytes): head-1.json

ADR 0003 evidence migration: `research/idle-rss/perf01-three/head-1.json` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (111,779 bytes): [head-1.json](https://git.kayg.org/attachments/fc421fac-16a2-4dee-b6ec-826c3b5628fe)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/head-2.exit

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

0

ADR 0003 evidence migration: `research/idle-rss/perf01-three/head-2.exit` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text 0 ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/head-2.json

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (110,330 bytes): head-2.json

ADR 0003 evidence migration: `research/idle-rss/perf01-three/head-2.json` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (110,330 bytes): [head-2.json](https://git.kayg.org/attachments/4582bd37-b089-44f2-a31f-e027900d0d13)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/head-3.exit

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

0

ADR 0003 evidence migration: `research/idle-rss/perf01-three/head-3.exit` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text 0 ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/head-3.json

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

Original file (110,299 bytes): head-3.json

ADR 0003 evidence migration: `research/idle-rss/perf01-three/head-3.json` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. Original file (110,299 bytes): [head-3.json](https://git.kayg.org/attachments/b08a4049-9463-4b76-a856-aabb4d5b77f8)
Author
Owner

ADR 0003 evidence migration: research/idle-rss/perf01-three/summary.json

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

{
  "dev": {
    "idle.rss": {
      "p50": 105.19921875,
      "p95": 111.2890625,
      "median_run_p95": 105.19921875,
      "noise_pct": 8.662879209832536,
      "samples": [
        [
          105.19921875,
          105.19921875
        ],
        [
          111.2890625,
          111.2890625
        ],
        [
          102.17578125,
          102.17578125
        ]
      ]
    },
    "open.note": {
      "p50": 0.748052,
      "p95": 3.1034859999999997,
      "median_run_p95": 3.005442,
      "noise_pct": 12.148888045216118,
      "samples": [
        [
          0.787857,
          2.8809590000000003
        ],
        [
          0.748052,
          3.1034859999999997
        ],
        [
          0.696977,
          3.005442
        ]
      ]
    },
    "search.query": {
      "p50": 1.838125,
      "p95": 4.664972,
      "median_run_p95": 4.387833,
      "noise_pct": 8.6990275416525,
      "samples": [
        [
          1.870425,
          4.664972
        ],
        [
          1.838125,
          4.387833
        ],
        [
          1.710526,
          4.2905
        ]
      ]
    },
    "search.first_query": {
      "p50": 46.753479,
      "p95": 49.224579999999996,
      "median_run_p95": 46.753479,
      "noise_pct": 21.955621741004542,
      "samples": [
        [
          49.224579999999996,
          49.224579999999996
        ],
        [
          46.753479,
          46.753479
        ],
        [
          38.959563,
          38.959563
        ]
      ]
    },
    "cold.index": {
      "p50": 11.196839565,
      "p95": 11.196839565,
      "median_run_p95": 11.196839565,
      "noise_pct": 0.0,
      "samples": [
        [
          11.196839565,
          11.196839565
        ]
      ]
    }
  },
  "head": {
    "idle.rss": {
      "p50": 68.078125,
      "p95": 70.47265625,
      "median_run_p95": 68.078125,
      "noise_pct": 3.970621987606151,
      "samples": [
        [
          70.47265625,
          70.47265625
        ],
        [
          67.76953125,
          67.76953125
        ],
        [
          68.078125,
          68.078125
        ]
      ]
    },
    "open.note": {
      "p50": 0.734767,
      "p95": 3.016883,
      "median_run_p95": 2.969656,
      "noise_pct": 20.665598754435063,
      "samples": [
        [
          0.781955,
          3.016883
        ],
        [
          0.6301110000000001,
          2.8599189999999997
        ],
        [
          0.734767,
          2.969656
        ]
      ]
    },
    "search.query": {
      "p50": 1.621789,
      "p95": 4.2856700000000005,
      "median_run_p95": 3.95477,
      "noise_pct": 9.606860078592216,
      "samples": [
        [
          1.621789,
          4.2856700000000005
        ],
        [
          1.6639789999999999,
          3.95477
        ],
        [
          1.508176,
          3.6742150000000002
        ]
      ]
    },
    "search.first_query": {
      "p50": 48.502218,
      "p95": 48.862050999999994,
      "median_run_p95": 48.502218,
      "noise_pct": 42.04471020273752,
      "samples": [
        [
          48.502218,
          48.502218
        ],
        [
          48.862050999999994,
          48.862050999999994
        ],
        [
          28.469434,
          28.469434
        ]
      ]
    },
    "cold.index": {
      "p50": 11.773734872,
      "p95": 11.773734872,
      "median_run_p95": 11.773734872,
      "noise_pct": 0.0,
      "samples": [
        [
          11.773734872,
          11.773734872
        ]
      ]
    }
  }
}

ADR 0003 evidence migration: `research/idle-rss/perf01-three/summary.json` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text { "dev": { "idle.rss": { "p50": 105.19921875, "p95": 111.2890625, "median_run_p95": 105.19921875, "noise_pct": 8.662879209832536, "samples": [ [ 105.19921875, 105.19921875 ], [ 111.2890625, 111.2890625 ], [ 102.17578125, 102.17578125 ] ] }, "open.note": { "p50": 0.748052, "p95": 3.1034859999999997, "median_run_p95": 3.005442, "noise_pct": 12.148888045216118, "samples": [ [ 0.787857, 2.8809590000000003 ], [ 0.748052, 3.1034859999999997 ], [ 0.696977, 3.005442 ] ] }, "search.query": { "p50": 1.838125, "p95": 4.664972, "median_run_p95": 4.387833, "noise_pct": 8.6990275416525, "samples": [ [ 1.870425, 4.664972 ], [ 1.838125, 4.387833 ], [ 1.710526, 4.2905 ] ] }, "search.first_query": { "p50": 46.753479, "p95": 49.224579999999996, "median_run_p95": 46.753479, "noise_pct": 21.955621741004542, "samples": [ [ 49.224579999999996, 49.224579999999996 ], [ 46.753479, 46.753479 ], [ 38.959563, 38.959563 ] ] }, "cold.index": { "p50": 11.196839565, "p95": 11.196839565, "median_run_p95": 11.196839565, "noise_pct": 0.0, "samples": [ [ 11.196839565, 11.196839565 ] ] } }, "head": { "idle.rss": { "p50": 68.078125, "p95": 70.47265625, "median_run_p95": 68.078125, "noise_pct": 3.970621987606151, "samples": [ [ 70.47265625, 70.47265625 ], [ 67.76953125, 67.76953125 ], [ 68.078125, 68.078125 ] ] }, "open.note": { "p50": 0.734767, "p95": 3.016883, "median_run_p95": 2.969656, "noise_pct": 20.665598754435063, "samples": [ [ 0.781955, 3.016883 ], [ 0.6301110000000001, 2.8599189999999997 ], [ 0.734767, 2.969656 ] ] }, "search.query": { "p50": 1.621789, "p95": 4.2856700000000005, "median_run_p95": 3.95477, "noise_pct": 9.606860078592216, "samples": [ [ 1.621789, 4.2856700000000005 ], [ 1.6639789999999999, 3.95477 ], [ 1.508176, 3.6742150000000002 ] ] }, "search.first_query": { "p50": 48.502218, "p95": 48.862050999999994, "median_run_p95": 48.502218, "noise_pct": 42.04471020273752, "samples": [ [ 48.502218, 48.502218 ], [ 48.862050999999994, 48.862050999999994 ], [ 28.469434, 28.469434 ] ] }, "cold.index": { "p50": 11.773734872, "p95": 11.773734872, "median_run_p95": 11.773734872, "noise_pct": 0.0, "samples": [ [ 11.773734872, 11.773734872 ] ] } } } ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/profile-wrapper.sh

Source commit: 8e0d832df73faec56fc2e892c8e6398523227090; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

#!/usr/bin/env bash
set -euo pipefail
root="$HOME/idle-rss"
bin="${IDLE_HEAP_BIN:-$root/bin/calternal-dev}"
if [[ "${1:-}" != serve ]]; then exec "$bin" "$@"; fi
heaptrack_lib="$(dirname "$(dirname "$(command -v heaptrack)")")/lib/heaptrack"
export LD_PRELOAD="$root/snapshot.so"
if [[ "${IDLE_HEAP_NO_TRACK:-0}" != 1 ]]; then
    export LD_PRELOAD="$heaptrack_lib/libheaptrack_preload.so:$LD_PRELOAD"
fi
export DUMP_HEAPTRACK_OUTPUT="$root/profile.$$.raw"
exec "$bin" "$@"

ADR 0003 evidence migration: `research/idle-rss/profile-wrapper.sh` Source commit: [8e0d832df73faec56fc2e892c8e6398523227090](https://git.kayg.org/kayg/calternal/commit/8e0d832df73faec56fc2e892c8e6398523227090); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text #!/usr/bin/env bash set -euo pipefail root="$HOME/idle-rss" bin="${IDLE_HEAP_BIN:-$root/bin/calternal-dev}" if [[ "${1:-}" != serve ]]; then exec "$bin" "$@"; fi heaptrack_lib="$(dirname "$(dirname "$(command -v heaptrack)")")/lib/heaptrack" export LD_PRELOAD="$root/snapshot.so" if [[ "${IDLE_HEAP_NO_TRACK:-0}" != 1 ]]; then export LD_PRELOAD="$heaptrack_lib/libheaptrack_preload.so:$LD_PRELOAD" fi export DUMP_HEAPTRACK_OUTPUT="$root/profile.$$.raw" exec "$bin" "$@" ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/profile.sh

Source commit: 58f9269e40332489f123cfe23e56ed8af24a54fe; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

#!/usr/bin/env bash
set -euo pipefail
cd "$HOME/Developer/Worktrees/idle-rss-100k"
root="$HOME/idle-rss"
mkdir -p "$root/bin"
# This checkpoint exists only in the diagnostic harness, never the server.
source=crates/perf/src/scenarios/idle.rs
backup=$(mktemp)
cp "$source" "$backup"
trap 'cp "$backup" "$source"; rm -f "$backup"' EXIT
python3 - <<'PATCH'
p='crates/perf/src/scenarios/idle.rs'
s=open(p).read()
if 'IDLE_HEAP_MARKER' not in s:
    line='    r.one("idle.threads", "count", cx.server.threads() as f64);'
    extra='''
    if let Ok(marker) = std::env::var("IDLE_HEAP_MARKER") {
        std::fs::write(marker, format!("{}", cx.server.pid())).unwrap();
        tokio::time::sleep(Duration::from_secs(3)).await;
    }'''
    assert line in s
    open(p,'w').write(s.replace(line, line+extra))
PATCH
~/bin/slot cargo build --release -j4 -p calternal-perf
clang -shared -fPIC -pthread "$root/snapshot.c" -ldl -o "$root/snapshot.so"
cp target/release/calternal "$root/bin/calternal-dev"
cp target/release/calternal-perf "$root/bin/calternal-perf-profile"
chmod +x "$root/profile-wrapper.sh"
export IDLE_HEAP_MARKER="$root/idle.marker"
rm -f "$IDLE_HEAP_MARKER"
~/bin/slot "$root/bin/calternal-perf-profile" --bin "$root/profile-wrapper.sh" --work "$root/work-before" --sizes 100k --runs 1 --cold-runs 1 --seed 1 --idle-secs 60 --json "$root/profile-before.json" --md "$root/profile-before.md"

ADR 0003 evidence migration: `research/idle-rss/profile.sh` Source commit: [58f9269e40332489f123cfe23e56ed8af24a54fe](https://git.kayg.org/kayg/calternal/commit/58f9269e40332489f123cfe23e56ed8af24a54fe); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text #!/usr/bin/env bash set -euo pipefail cd "$HOME/Developer/Worktrees/idle-rss-100k" root="$HOME/idle-rss" mkdir -p "$root/bin" # This checkpoint exists only in the diagnostic harness, never the server. source=crates/perf/src/scenarios/idle.rs backup=$(mktemp) cp "$source" "$backup" trap 'cp "$backup" "$source"; rm -f "$backup"' EXIT python3 - <<'PATCH' p='crates/perf/src/scenarios/idle.rs' s=open(p).read() if 'IDLE_HEAP_MARKER' not in s: line=' r.one("idle.threads", "count", cx.server.threads() as f64);' extra=''' if let Ok(marker) = std::env::var("IDLE_HEAP_MARKER") { std::fs::write(marker, format!("{}", cx.server.pid())).unwrap(); tokio::time::sleep(Duration::from_secs(3)).await; }''' assert line in s open(p,'w').write(s.replace(line, line+extra)) PATCH ~/bin/slot cargo build --release -j4 -p calternal-perf clang -shared -fPIC -pthread "$root/snapshot.c" -ldl -o "$root/snapshot.so" cp target/release/calternal "$root/bin/calternal-dev" cp target/release/calternal-perf "$root/bin/calternal-perf-profile" chmod +x "$root/profile-wrapper.sh" export IDLE_HEAP_MARKER="$root/idle.marker" rm -f "$IDLE_HEAP_MARKER" ~/bin/slot "$root/bin/calternal-perf-profile" --bin "$root/profile-wrapper.sh" --work "$root/work-before" --sizes 100k --runs 1 --cold-runs 1 --seed 1 --idle-secs 60 --json "$root/profile-before.json" --md "$root/profile-before.md" ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/qualify.sh

Source commit: 7955f1190a99567410615a740a6903e65c72d09e; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

#!/usr/bin/env bash
set -euo pipefail
cd "${IDLE_RSS_ROOT:-$HOME/idle-rss-gate}"
sha256sum -c bins.sha256
for ((sample=1; sample<=${IDLE_RSS_SAMPLES:-3}; sample++)); do
  for label in dev head; do
    printf '\n=== %s sample %s ===\n' "$label" "$sample"
    bash ./sample-one.sh "$label" "$sample" || true
  done
done
python3 ./aggregate.py

ADR 0003 evidence migration: `research/idle-rss/qualify.sh` Source commit: [7955f1190a99567410615a740a6903e65c72d09e](https://git.kayg.org/kayg/calternal/commit/7955f1190a99567410615a740a6903e65c72d09e); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text #!/usr/bin/env bash set -euo pipefail cd "${IDLE_RSS_ROOT:-$HOME/idle-rss-gate}" sha256sum -c bins.sha256 for ((sample=1; sample<=${IDLE_RSS_SAMPLES:-3}; sample++)); do for label in dev head; do printf '\n=== %s sample %s ===\n' "$label" "$sample" bash ./sample-one.sh "$label" "$sample" || true done done python3 ./aggregate.py ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/results.md

Source commit: 729c9fd737c5e2f01746d8526c9f9bfda8ef4c05; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

# Compact quota snapshot measurements

Server source: `7955f119`. Baseline dev: `a55521f9`.
SHA-256: `bins.sha256`. Exact command and sampling policy: `README.md`.

## Dev-01: five alternating samples per version

Each number below is the median of the five per-run summaries; RSS has one
idle observation per run. Latency units are ms, RSS is MiB.

| Metric | Dev median p50 | Compact median p50 | Dev median p95 | Compact median p95 | Dev max p95 | Compact max p95 |
|---|---:|---:|---:|---:|---:|---:|
| idle.rss | 110.898 | 72.219 | 110.898 | 72.219 | 116.031 | 73.523 |
| open.note | 1.940 | 1.696 | 6.229 | 5.958 | 10.523 | 9.343 |
| search.query | 4.295 | 4.336 | 12.395 | 10.800 | 16.346 | 17.104 |

RSS median falls 34.9%; open median run p95 falls 4.4%; search median run p95
falls 12.9%. Search median p50 rises 0.9%; its maximum run p95 rises 4.6%.
The old 5x search regression is absent in these five pairs, but this build VM
has substantial latency variation (see raw samples); perf-VM qualification
is still required. All ten reports have zero scenario failures. Every dev
sample exceeds the 100 MiB RSS budget; every compact sample passes both gates.
Raw reports and full aggregates: `dev01-five/`.

## Perf-01

Three alternating pairs collected under `~/bin/perf-lock` by
`idle-rss-compact-qualification.service` (Result=success), after waiting for
the previous holder. Same binaries and harness as dev-01, SHA-256 checked.

| Metric | Dev median p50 | Compact median p50 | Dev median p95 | Compact median p95 | Dev max p95 | Compact max p95 |
|---|---:|---:|---:|---:|---:|---:|
| idle.rss | 105.199 | 68.078 | 105.199 | 68.078 | 111.289 | 70.473 |
| open.note | 0.748 | 0.735 | 3.005 | 2.970 | 3.103 | 3.017 |
| search.query | 1.838 | 1.622 | 4.388 | 3.955 | 4.665 | 4.286 |

All six reports have zero scenario failures. Every compact sample passes
RSS ≤100 MiB and open p95 ≤15 ms; the maximum compact RSS 70.473 MiB also
beats the 85 MiB target by 14.527 MiB. Dev exceeds RSS in all three samples.
Compact search p50 and p95 are lower in every corresponding pair; open p95
is lower in two pairs and 4.7% higher in the first (2.881 → 3.017 ms).
Median open p95 falls 1.2%, search p95 9.9%, RSS 35.3%. Thus the earlier
5x search slowdown does not persist in the final implementation. These are
alternating-run comparisons, not pooled latency quantiles or confidence bounds.
Raw reports, exit codes, manifest and aggregate: `perf01-three/`.

## Heaptrack at the idle checkpoint

Live requested bytes, not RSS; snapshot before shutdown and diagnostic trim.
Both runs use the ordinary seeded 100k fixture and diagnostic checkpoint.
Allocation-stack tables are decimal MB, as printed by heaptrack. Owner totals
below are MiB. The grouping script also counts small Usage bookkeeping objects;
therefore baseline quota is 23.802 MiB versus the earlier snapshot-only 23.794.

| Live owner | Dev MiB | Compact MiB |
|---|---:|---:|
| quota snapshot and bookkeeping | 23.802 | 5.121 |
| note identity index | 9.683 | 9.686 |
| search note descriptors | 2.157 | 1.873 |
| native SQLite allocations | 1.283 | 1.204 |
| search vocabulary | 0.037 | 0.037 |
| note list metadata | 0.248 | 0.025 |
| Yjs | 0.004 | 0.002 |
| other | 0.985 | 0.958 |
| total live requested heap | 38.198 | 18.906 |
| peak requested heap | 94.137 | 65.546 |

Quota is 78.5% smaller. Full parent paths are shared and boxed basenames have
no spare PathBuf capacity. Two snapshots can still overlap during recount,
but both are smaller; peak requested heap drops about 30%.
There is no Tantivy owner: search uses SQLite FTS5. SQLite and Yjs are small.
The baseline's 29.4 MiB post-idle diagnostic trim showed substantial freed
allocator-retained pages; the final implementation needs no added purge to
meet the RSS target. Existing dev allocator policy is unchanged.

Top ten allocation stacks in each profile (decimal MB):

| Rank | Dev stack | MB | Compact stack | MB |
|---|---|---:|---|---:|
| 1 | quota full path buffers | 20.417 | identity strings | 5.517 |
| 2 | identity strings | 5.518 | quota basename hash tables | 3.277 |
| 3 | quota flat hash table | 4.325 | identity slot vector | 3.200 |
| 4 | identity slot vector | 3.200 | quota exact basename boxes | 2.014 |
| 5 | search descriptor buffers | 2.095 | search descriptor buffers | 1.809 |
| 6 | identity path lookup table | 0.655 | identity path lookup table | 0.655 |
| 7 | identity id lookup table | 0.655 | identity id lookup table | 0.655 |
| 8 | Home opening allocation | 0.262 | Home opening allocation | 0.262 |
| 9 | note-list page result vector | 0.218 | identity formatting buffers | 0.123 |
| 10 | quota path buffers at another depth | 0.200 | search tag span vectors | 0.102 |

Full stacks: `before.top10.txt`, `compact.top10.txt`. Grouped exact bytes:
`before-owners.json`, `compact-owners.json`, generated by `owners.py`.
The smaller metadata/descriptor values vary with worker lifecycle at the
checkpoint; the compact quota layout is the targeted deterministic change.

ADR 0003 evidence migration: `research/idle-rss/results.md` Source commit: [729c9fd737c5e2f01746d8526c9f9bfda8ef4c05](https://git.kayg.org/kayg/calternal/commit/729c9fd737c5e2f01746d8526c9f9bfda8ef4c05); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text # Compact quota snapshot measurements Server source: `7955f119`. Baseline dev: `a55521f9`. SHA-256: `bins.sha256`. Exact command and sampling policy: `README.md`. ## Dev-01: five alternating samples per version Each number below is the median of the five per-run summaries; RSS has one idle observation per run. Latency units are ms, RSS is MiB. | Metric | Dev median p50 | Compact median p50 | Dev median p95 | Compact median p95 | Dev max p95 | Compact max p95 | |---|---:|---:|---:|---:|---:|---:| | idle.rss | 110.898 | 72.219 | 110.898 | 72.219 | 116.031 | 73.523 | | open.note | 1.940 | 1.696 | 6.229 | 5.958 | 10.523 | 9.343 | | search.query | 4.295 | 4.336 | 12.395 | 10.800 | 16.346 | 17.104 | RSS median falls 34.9%; open median run p95 falls 4.4%; search median run p95 falls 12.9%. Search median p50 rises 0.9%; its maximum run p95 rises 4.6%. The old 5x search regression is absent in these five pairs, but this build VM has substantial latency variation (see raw samples); perf-VM qualification is still required. All ten reports have zero scenario failures. Every dev sample exceeds the 100 MiB RSS budget; every compact sample passes both gates. Raw reports and full aggregates: `dev01-five/`. ## Perf-01 Three alternating pairs collected under `~/bin/perf-lock` by `idle-rss-compact-qualification.service` (Result=success), after waiting for the previous holder. Same binaries and harness as dev-01, SHA-256 checked. | Metric | Dev median p50 | Compact median p50 | Dev median p95 | Compact median p95 | Dev max p95 | Compact max p95 | |---|---:|---:|---:|---:|---:|---:| | idle.rss | 105.199 | 68.078 | 105.199 | 68.078 | 111.289 | 70.473 | | open.note | 0.748 | 0.735 | 3.005 | 2.970 | 3.103 | 3.017 | | search.query | 1.838 | 1.622 | 4.388 | 3.955 | 4.665 | 4.286 | All six reports have zero scenario failures. Every compact sample passes RSS ≤100 MiB and open p95 ≤15 ms; the maximum compact RSS 70.473 MiB also beats the 85 MiB target by 14.527 MiB. Dev exceeds RSS in all three samples. Compact search p50 and p95 are lower in every corresponding pair; open p95 is lower in two pairs and 4.7% higher in the first (2.881 → 3.017 ms). Median open p95 falls 1.2%, search p95 9.9%, RSS 35.3%. Thus the earlier 5x search slowdown does not persist in the final implementation. These are alternating-run comparisons, not pooled latency quantiles or confidence bounds. Raw reports, exit codes, manifest and aggregate: `perf01-three/`. ## Heaptrack at the idle checkpoint Live requested bytes, not RSS; snapshot before shutdown and diagnostic trim. Both runs use the ordinary seeded 100k fixture and diagnostic checkpoint. Allocation-stack tables are decimal MB, as printed by heaptrack. Owner totals below are MiB. The grouping script also counts small Usage bookkeeping objects; therefore baseline quota is 23.802 MiB versus the earlier snapshot-only 23.794. | Live owner | Dev MiB | Compact MiB | |---|---:|---:| | quota snapshot and bookkeeping | 23.802 | 5.121 | | note identity index | 9.683 | 9.686 | | search note descriptors | 2.157 | 1.873 | | native SQLite allocations | 1.283 | 1.204 | | search vocabulary | 0.037 | 0.037 | | note list metadata | 0.248 | 0.025 | | Yjs | 0.004 | 0.002 | | other | 0.985 | 0.958 | | total live requested heap | 38.198 | 18.906 | | peak requested heap | 94.137 | 65.546 | Quota is 78.5% smaller. Full parent paths are shared and boxed basenames have no spare PathBuf capacity. Two snapshots can still overlap during recount, but both are smaller; peak requested heap drops about 30%. There is no Tantivy owner: search uses SQLite FTS5. SQLite and Yjs are small. The baseline's 29.4 MiB post-idle diagnostic trim showed substantial freed allocator-retained pages; the final implementation needs no added purge to meet the RSS target. Existing dev allocator policy is unchanged. Top ten allocation stacks in each profile (decimal MB): | Rank | Dev stack | MB | Compact stack | MB | |---|---|---:|---|---:| | 1 | quota full path buffers | 20.417 | identity strings | 5.517 | | 2 | identity strings | 5.518 | quota basename hash tables | 3.277 | | 3 | quota flat hash table | 4.325 | identity slot vector | 3.200 | | 4 | identity slot vector | 3.200 | quota exact basename boxes | 2.014 | | 5 | search descriptor buffers | 2.095 | search descriptor buffers | 1.809 | | 6 | identity path lookup table | 0.655 | identity path lookup table | 0.655 | | 7 | identity id lookup table | 0.655 | identity id lookup table | 0.655 | | 8 | Home opening allocation | 0.262 | Home opening allocation | 0.262 | | 9 | note-list page result vector | 0.218 | identity formatting buffers | 0.123 | | 10 | quota path buffers at another depth | 0.200 | search tag span vectors | 0.102 | Full stacks: `before.top10.txt`, `compact.top10.txt`. Grouped exact bytes: `before-owners.json`, `compact-owners.json`, generated by `owners.py`. The smaller metadata/descriptor values vary with worker lifecycle at the checkpoint; the compact quota layout is the targeted deterministic change. ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/sample-one.sh

Source commit: 7b1bdf8d556cf11fc0ed18b1536fe14a95a8be02; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

#!/usr/bin/env bash
set -euo pipefail
cd "${IDLE_RSS_ROOT:-$HOME/idle-rss-gate}"
label=$1
sample=$2
work="$PWD/work-head"
if [[ "$label" == dev ]]; then work="$PWD/work-dev0"; fi
cold=0
if [[ "$sample" == 1 ]]; then cold=1; fi
sha256sum -c bins.sha256
set +e
"$HOME/bin/slot" ./bin/calternal-perf --bin "$PWD/bin/calternal-$label" --work "$work" --sizes 100k --runs 1 --cold-runs "$cold" --seed 1 --idle-secs 60 --budgets "$PWD/budgets.json" --gate --json "$PWD/$label-$sample.json" --md "$PWD/$label-$sample.md"
status=$?
printf '%s\n' "$status" > "$label-$sample.exit"
exit "$status"

ADR 0003 evidence migration: `research/idle-rss/sample-one.sh` Source commit: [7b1bdf8d556cf11fc0ed18b1536fe14a95a8be02](https://git.kayg.org/kayg/calternal/commit/7b1bdf8d556cf11fc0ed18b1536fe14a95a8be02); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text #!/usr/bin/env bash set -euo pipefail cd "${IDLE_RSS_ROOT:-$HOME/idle-rss-gate}" label=$1 sample=$2 work="$PWD/work-head" if [[ "$label" == dev ]]; then work="$PWD/work-dev0"; fi cold=0 if [[ "$sample" == 1 ]]; then cold=1; fi sha256sum -c bins.sha256 set +e "$HOME/bin/slot" ./bin/calternal-perf --bin "$PWD/bin/calternal-$label" --work "$work" --sizes 100k --runs 1 --cold-runs "$cold" --seed 1 --idle-secs 60 --budgets "$PWD/budgets.json" --gate --json "$PWD/$label-$sample.json" --md "$PWD/$label-$sample.md" status=$? printf '%s\n' "$status" > "$label-$sample.exit" exit "$status" ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/snapshot.c

Source commit: 6577451da37db97946fd2af13ed7888846c1eea3; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

// Diagnostic only: freeze the allocation trace at the harness's idle checkpoint.
#define _GNU_SOURCE
#include <dlfcn.h>
#include <malloc.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
static void resident(const char *phase) {
    FILE *f = fopen("/proc/self/smaps_rollup", "r");
    char line[256];
    if (!f) return;
    while (fgets(line, sizeof line, f))
        if (!strncmp(line, "Rss:", 4) || !strncmp(line, "Pss_Anon:", 9))
            fprintf(stderr, "idle %s %s", phase, line);
    fclose(f);
}
static void *snapshot(void *unused) {
    const char *marker = getenv("IDLE_HEAP_MARKER");
    while (access(marker, F_OK)) sleep(1);
    struct mallinfo2 m = mallinfo2();
    fprintf(stderr, "idle malloc: arena=%zu live=%zu free=%zu mmap=%zu\n",
            m.arena, m.uordblks, m.fordblks, m.hblkhd);
    void (*stop)(void) = dlsym(RTLD_DEFAULT, "heaptrack_stop");
    if (stop) stop();
    resident("before trim");
    malloc_trim(0);
    resident("after trim");
    return NULL;
}
__attribute__((constructor)) static void start(void) {
    if (!getenv("IDLE_HEAP_MARKER")) return;
    pthread_t thread;
    if (!pthread_create(&thread, NULL, snapshot, NULL)) pthread_detach(thread);
}

ADR 0003 evidence migration: `research/idle-rss/snapshot.c` Source commit: [6577451da37db97946fd2af13ed7888846c1eea3](https://git.kayg.org/kayg/calternal/commit/6577451da37db97946fd2af13ed7888846c1eea3); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text // Diagnostic only: freeze the allocation trace at the harness's idle checkpoint. #define _GNU_SOURCE #include <dlfcn.h> #include <malloc.h> #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> static void resident(const char *phase) { FILE *f = fopen("/proc/self/smaps_rollup", "r"); char line[256]; if (!f) return; while (fgets(line, sizeof line, f)) if (!strncmp(line, "Rss:", 4) || !strncmp(line, "Pss_Anon:", 9)) fprintf(stderr, "idle %s %s", phase, line); fclose(f); } static void *snapshot(void *unused) { const char *marker = getenv("IDLE_HEAP_MARKER"); while (access(marker, F_OK)) sleep(1); struct mallinfo2 m = mallinfo2(); fprintf(stderr, "idle malloc: arena=%zu live=%zu free=%zu mmap=%zu\n", m.arena, m.uordblks, m.fordblks, m.hblkhd); void (*stop)(void) = dlsym(RTLD_DEFAULT, "heaptrack_stop"); if (stop) stop(); resident("before trim"); malloc_trim(0); resident("after trim"); return NULL; } __attribute__((constructor)) static void start(void) { if (!getenv("IDLE_HEAP_MARKER")) return; pthread_t thread; if (!pthread_create(&thread, NULL, snapshot, NULL)) pthread_detach(thread); } ```
Author
Owner

ADR 0003 evidence migration: research/idle-rss/trim-audit.md

Source commit: 80fa9fabad768ee692abf91e3e1b9f2884832525; snapshot from dev 55f35fcd. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable.

# Trim audit after review

The added recount hook reused `after_burst`. That function is asynchronous,
but its quiet timer is not a request admission barrier. A query can begin
after the timer's last check and overlap `malloc_trim`'s allocator locks.
It also clears `ARMED` before trimming, so a later burst can arm another
worker while the first trim is still running. Calls come from HTTP replies,
room closure, metadata rebuilds, scans and search indexing, not just recounts.
Therefore neither exclusion from requests nor one trim per recount was proven.

Remove the added recount hook and its dependency. The replacement must reduce
snapshot allocations without introducing allocator purges. Existing baseline
memory policy is outside this local quota change and is held identical in the
A/B measurements. The old diagnostic search/open slowdown remains unresolved;
only alternating measurements of the final implementation can qualify it.

Compact layout plan: one exact parent-directory key per directory, then exact
OS filename -> u64 byte size entries. No lossy path hashes, no changed path
identity. Keep generation checks and concurrent-write overlay unchanged.
Recount still walks to discover outside edits/deletions and publishes a
complete snapshot only after success, but its retained and replacement maps
contain basenames instead of repeated full paths. Cached per-person totals
remain lock-free for reads. Folder moves enumerate only matching directories.

Expected 100k payload: roughly 25-byte names plus a 25-byte hash-table entry,
about 5-7 MiB instead of 24 MiB. Two snapshots plus directory enumeration remain
O(n), with a much smaller constant. Writes remain expected O(1); moves are O(k)
for files moved plus the number of directories. Recount is O(n).

Failure -> effect -> detection -> recovery -> test:
- walk fails -> old snapshot remains -> IO error -> next recount -> existing tests
- concurrent write/delete -> stale scan must not win -> totals assertion -> overlay
  versions -> existing concurrent recount tests
- directory moves during walk -> retry before publication -> directory generation
  -> repeat walk -> existing accounting tests plus directory/file-map tests
- same filename in different folders -> must remain distinct -> exact-key model
  comparison -> no hash-only identities -> new map tests

Gates: all fsio tests, baseline/final 5 alternating dev-01 samples with median
per-run p50/p95, then 3 alternating samples each on a perf VM under the shared
perf lock, with SHA-256 checked release binaries built on dev-01. Collect all
results in this session. No added trim, no pattern kills, never merge.

ADR 0003 evidence migration: `research/idle-rss/trim-audit.md` Source commit: [80fa9fabad768ee692abf91e3e1b9f2884832525](https://git.kayg.org/kayg/calternal/commit/80fa9fabad768ee692abf91e3e1b9f2884832525); snapshot from dev `55f35fcd`. Full original source preserved below before repository removal/stripping. Design, code and test inputs are retained where applicable. ```text # Trim audit after review The added recount hook reused `after_burst`. That function is asynchronous, but its quiet timer is not a request admission barrier. A query can begin after the timer's last check and overlap `malloc_trim`'s allocator locks. It also clears `ARMED` before trimming, so a later burst can arm another worker while the first trim is still running. Calls come from HTTP replies, room closure, metadata rebuilds, scans and search indexing, not just recounts. Therefore neither exclusion from requests nor one trim per recount was proven. Remove the added recount hook and its dependency. The replacement must reduce snapshot allocations without introducing allocator purges. Existing baseline memory policy is outside this local quota change and is held identical in the A/B measurements. The old diagnostic search/open slowdown remains unresolved; only alternating measurements of the final implementation can qualify it. Compact layout plan: one exact parent-directory key per directory, then exact OS filename -> u64 byte size entries. No lossy path hashes, no changed path identity. Keep generation checks and concurrent-write overlay unchanged. Recount still walks to discover outside edits/deletions and publishes a complete snapshot only after success, but its retained and replacement maps contain basenames instead of repeated full paths. Cached per-person totals remain lock-free for reads. Folder moves enumerate only matching directories. Expected 100k payload: roughly 25-byte names plus a 25-byte hash-table entry, about 5-7 MiB instead of 24 MiB. Two snapshots plus directory enumeration remain O(n), with a much smaller constant. Writes remain expected O(1); moves are O(k) for files moved plus the number of directories. Recount is O(n). Failure -> effect -> detection -> recovery -> test: - walk fails -> old snapshot remains -> IO error -> next recount -> existing tests - concurrent write/delete -> stale scan must not win -> totals assertion -> overlay versions -> existing concurrent recount tests - directory moves during walk -> retry before publication -> directory generation -> repeat walk -> existing accounting tests plus directory/file-map tests - same filename in different folders -> must remain distinct -> exact-key model comparison -> no hash-only identities -> new map tests Gates: all fsio tests, baseline/final 5 alternating dev-01 samples with median per-run p50/p95, then 3 alternating samples each on a perf VM under the shared perf lock, with SHA-256 checked release binaries built on dev-01. Collect all results in this session. No added trim, no pattern kills, never merge. ```
Author
Owner

Closing: head 729c9fd7 is already in dev (reached via c78925b5); nothing left to merge. Branch kept.

Closing: head 729c9fd7 is already in dev (reached via c78925b5); nothing left to merge. Branch kept.
kayg closed this pull request 2026-11-04 13:04:50 +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

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!821
No description provided.