Something went wrong. Try again.
small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246# Ceilings and regression floors for the gated numbers, set from three 5-run# replay batches on valefar at CI size (12 CPUs, 12 GiB): two with repetitions# concurrent (C, D) and one sequential (S), on e79fc951's recordings.## ceiling: an absolute limit, about 10% above the highest batch median (more# for small slopes, whose noise is a larger share). Raising one is a reviewed# commit that says why; a rolling baseline alone would let creep through.# floor: the smallest change vs the baseline that counts as a regression, at# least three times the largest batch MAD and the spread between batch medians.# Byte counts regress at 1% instead of a floor.
# Empty daemon, private memory. C/D/S: 29.96 / 28.62 / 29.81 MB, MAD <= 0.34 MB;# batch medians differ by 1.3 MB. The tree is the daemon alone at boot, no# kernel or zygote. In CI, the last 40 main pushes (to c515c917) had medians# of 30.1 to 33.1 MB and samples of 29.2 to 34.4 MB, 19 of 200 above 33 MB;# 7d57ec7f's 33.07 MB median was over the old 33.0 MB ceiling. Local boot# replays at d6b969dd, 4c85ea00, eddd8199 and 7d57ec7f (3 rounds of 5 each)# had round medians of 31.06 to 33.69 MB within one commit, all-sample# medians of 31.67 / 32.24 / 32.49 / 32.07 MB, and the same BEAM total# (26.09 to 26.20 MB): USS noise outside the BEAM's own allocations, not# code. The ceiling is about 10% above the 32-33 MB upper medians; the 2 MB# floor against the baseline still catches real growth.[metrics.boot_tree_uss]kind = "memory"ceiling = 36_000_000floor = 2_000_000
# Per idle session (slope over 20 sessions). 315 / 329 / 333 KB, MAD <= 23 KB.[metrics.idle_session_tree_uss]kind = "memory"ceiling = 400_000floor = 70_000
# BEAM per idle session, without heap slack or binaries no process holds# (robot-docs/perf.md), Theil-Sen slope. Six batches: 209 to 211 KB, MAD# <= 1.2 KB. (Before: 218 to 279 KB, MAD up to 20 KB.)[metrics.idle_session_beam]kind = "memory"ceiling = 235_000floor = 8_000
# Process memory per turn after warm-up; includes the SQLite writer cache# still filling (robot-docs/perf.md). 16.4 / 11.2 / 10.5 KB, MAD <= 5 KB.[metrics.retained_turn_tree_uss]kind = "memory"ceiling = 32_000floor = 24_000
# BEAM per turn after warm-up, the precise leak gate, counted like# idle_session_beam. Six batches: 0.3 to 2.0 KB, MAD <= 3.4 KB.[metrics.retained_turn_beam]kind = "memory"ceiling = 16_000floor = 12_000
# The daemon's (beam.smp) largest turn peak over chat, coding and long, the# turn that starts coding's kernel left out (kernel_start_daemon_uss). It# replaced turn_peak_tree_uss (23.8 / 23.1 / 23.4 MB), which was a cold# kernel's start (16.4 MB) plus the daemon's, plus lazy code loading.# 1.45 to 1.70 MB over five runs, MAD 94 KB (2b617ac4's tree).# Recalibrated from seven five-run CI batches on main, 2026-11-14 (df5f6ef to# 79c89f4): medians 1,613,824 to 2,105,344 B, largest MAD 167,936 B, median# spread 491,520 B. One commit (a5e4d1b) ran twice and gave 1,978,368 and# 1,687,552 B, so the spread is mostly run-to-run and not the code; three of# the seven batches crossed the old 1.9 MB ceiling. The ceiling is 10% above# the highest median; the floor covers the spread and three times MAD. These# are batches across commits, so a small rise from that day's rewrite is not# ruled out.[metrics.turn_peak_daemon_uss]kind = "memory"ceiling = 2_300_000floor = 510_000
# Sum of allocator-instance high-water marks over the same turns. These maxima# need not coincide, so scheduling changes the upper bound without changing# production code. The original ceiling came from 5.28 to 5.91 MB batches.# Recalibrated the noise floor from three five-run replay batches on unchanged# production code (12 CPUs, 3915 MiB, Linux 6.18.35): medians 5,253,096,# 5,995,912 and 6,399,544 B; largest MAD 215,456 B; median spread 1,146,448 B.# This covers the spread and three times MAD while preserving the ceiling.# Command: python3 test/perf/run.py --mode replay --runs 5 --out /tmp/perf.json# Reports: https://sites.wisp.place/okami.mom/albedo-perf/b708ac1/# https://sites.wisp.place/okami.mom/albedo-perf/5c7a8a2/# https://sites.wisp.place/okami.mom/albedo-perf/017d19a/[metrics.turn_peak_beam_blocks]kind = "memory"ceiling = 6_500_000floor = 1_200_000
# The daemon's peak during the turn that starts coding's kernel.# 5.59 to 6.25 MB, MAD 127 KB.[metrics.kernel_start_daemon_uss]kind = "memory"ceiling = 7_000_000floor = 700_000
# Mean request bytes per long turn; identical in every run (48,704 B).[metrics.request_bytes_per_turn]kind = "bytes"ceiling = 53_600floor = 0
# Request growth per turn; identical in every run (235 B).[metrics.request_bytes_slope]kind = "bytes"ceiling = 300floor = 0
# Long session hydration (tail 200). 72,898 / 72,939 / 73,059 B.[metrics.attach_bytes]kind = "bytes"ceiling = 80_000floor = 0
# Kernel gates count anonymous memory (Pss_Anon): pages a fork still shares# with its zygote count once between them, and libpython's text is not# private just because no other process maps it (USS read 11 MB for a bare# interpreter alone, 4.9 MB beside another). kernel_rest_uss (16.33 MB USS)# was retired with this change.
# The session's kernel after its first cell.# 16.42 MB in every run.[metrics.kernel_rest_anon]kind = "memory"ceiling = 18_000_000floor = 500_000
# Every Python process after the first cell: the kernel and any zygote or# spares it brought, the whole cost of a daemon's first kernel.# 16.42 MB in every run: a cold launch, no zygote.[metrics.kernel_first_anon]kind = "memory"ceiling = 18_000_000floor = 500_000
# A kernel forked from the zygote, adopted by pool's second session.# 8.66 to 8.68 MB. Since 4de2d000 the adopted kernel checkpoints its resting# namespace before it is measured: 9,190,400 -> 9,607,168 B in CI. Preloading# pickle in the zygote (albedo_state.py) takes about 205 KB of that back# (9,625,600 -> 9,420,800 B in a local replay); the rest is the save itself.[metrics.kernel_forked_anon]kind = "memory"ceiling = 9_600_000floor = 500_000
# Kernel memory kept per cell over 30 cells after warm-up. 7.8 / 8.0 / 8.1 KB,# MAD <= 0.3 KB, as USS; main has measured 5.0-6.9 KB since. Read from Pss_Anon# plus SwapPss since 3f97c9e9 read -259 KB: its runner swapped the kernel out.[metrics.kernel_cell_slope]kind = "memory"ceiling = 12_000floor = 2_000
# Zygote and spares left at rest. 0 in every run; a lingering zygote is ~19 MB.[metrics.kernel_pool_pss]kind = "memory"ceiling = 4_000_000floor = 1_000_000
# Disk writes: /proc/<pid>/io write_bytes less cancelled_write_bytes over the# daemon's process tree (robot-docs/perf.md). Page counts, so regressions use# the floor and the baseline's noise without a percentage share.
# Empty home to the first checkpoint: schema creation and the fixture's# provider profile. 1,589,248 B in nine of ten batches with MAD 0, but# 1,683,456 in one (N), so the floor only catches a step past that. On main# with session_prompts (402a7545): 1,605,632 B (P). The store now backfills# up to 30 s after a commit; boot waits for it, 1,650,688 B in A and B.# The /cd move's ledgers (transfers, transfer_occurrences, moves,# move_occurrences), created with the core schema in its one commit: +49 KB,# six root pages and a schema page, WAL plus backfill; 1,781,760 B in CI# (abf1651e, MAD 0). Mail forwarding's ledgers (mail_remote, mail_outbox and# two indexes, mail_peers, family_remote), created in the core schema commit:# six root pages and two sqlite_schema pages from a leaf split, each a WAL# frame and backfilled: 1,839,104 B on valefar (+57 KB). The unified inbox's# mail_key index (mail.gleam), one root page, a WAL frame and its backfill:# +8 KB, 1,892,352 B in CI (3692dc90, MAD 0). Crash tolerance (4de2d000)# adds the session_side_questions table and its primary-key index (two new# root pages, each a WAL frame and a backfilled page) and two more WAL frames# of pages the database already has (the migration row session_titles now# records lands in one): +16,480 B of WAL and +8,192 B of# database writes in a local replay, 1,921,024 -> 1,945,600 B in CI (+24,576,# MAD 0).# 671de6cd moved extension reads of core tables onto typed operations: a fresh# home now creates the mail indexes those reads page through (the undelivered# index and the two partial key indexes webhooks files letters under), the# webhook delivery indexes (received, per-hook, per-session) and the# webhook_upgrades bookkeeping table, each a new root page written to the WAL# and backfilled: 1,945,600 -> 2,011,136 B in CI (+65,536, MAD 0). The ceiling# leaves the same ~24 KB of headroom the previous raise left, plus room for the# opt-in checklist extension's table and index (00a16763), which install# creates even when it is not enabled.# c12043d4 added the downgrade guard: a fresh home creates the# breaking_migrations table and its primary-key index and records each# breaking migration it runs (five today) before running it, each record its# own commit: 2,027,520 -> 2,125,824 B in CI (+98,304, MAD 0). No backup is# copied on a fresh home (it has no record yet), so this is the whole cost.# After the workspace migration, all five CI samples at 21b18cbc measured# 2,289,664 B (MAD 0). Accept this measured boot cost with about 40 KB of# headroom; the 200 KB regression floor is unchanged. This calibration does# not attribute the increase to a particular schema or build change.[metrics.disk_written_boot]kind = "disk"ceiling = 2_330_000floor = 200_000
# Median turn of long after warm-up, the home flushed between turns.# I/J/K/L/M/N: 487 / 500 / 500 / 492 / 494 / 498 KB, MAD <= 6 KB. WAL frames# (4,120 B) straddle pages, so a few bytes more content per turn moves this# by pages; disk_appended_per_turn is the precise number. session_prompts# (402a7545) took it to 319,488 B in every run of P.[metrics.disk_written_per_turn]kind = "disk"ceiling = 352_000floor = 20_000
# Bytes write calls give every file but albedo.sqlite per long turn after# warm-up: WAL frames, logs, state files (writes_shim.c). Checkpoint copies# into the database are left out because their timing varies. 275,866 to# 275,869 B in every run of three batches (L, M, N); 181,312 to 181,314# after session_prompts (P).[metrics.disk_appended_per_turn]kind = "disk"ceiling = 200_000floor = 2_000
# One scaled hour of idle: 0 / 0 / 0 / 147 KB medians, single runs 0 to 180 KB,# all in the first scaled minute (the held kernel's release). A file rewritten# every 10 s read 1.68 MB. Since the WAL backfill waits up to 30 s, the hour# starts once the turns before it are backfilled: A / B 94 / 143 KB, all in the# first scaled minute; the 10 s rewrite read 1.63 MB (T), `home/touched` named.[metrics.disk_written_idle_hour]kind = "disk"ceiling = 400_000floor = 200_000
# Bytes checkpoints copy into albedo.sqlite per long turn after warm-up, both# ends of the window waiting for the backfill (writes_shim.c). The store# backfills 30 s after a commit, so this counts a page once per its turns in# that span: batches A / B medians 13.3 / 10.5 KB, runs 10.5 to 13.3 KB. Backfilling after every turn# would copy every page each turn rewrites.[metrics.disk_backfilled_per_turn]kind = "disk"ceiling = 20_000floor = 4_000