ouroboros/docs
Ouroboros 825563217b Derive the usage-ledger compaction floor from the ledger, not from process memory
The growth guard was a per-process memo keyed by (inode, device, size), and a
committed pass REPLACES the file. So at the instant one process folds, every
other process's memo stops matching and re-enters a full pass on its next
reservation, and a process that has just started has no memo at all while the
residue that cannot fold — group rows, retained idempotent and
review-attributed rows, terminal rows younger than the 48-hour fold horizon —
holds the file above the trigger for good. Each of those passes rewrites the
whole monetary authority under the held money lock and copies the entire live
file into a new archive segment. Measured on the owner's live install: 100
passes archiving 2.37 GB in three days for 4.88 MB of live-file gain, with 93
of 99 consecutive passes entered after less than 1 MB of growth.

A guard that must hold across processes cannot live inside one of them. The
pass already stamps what it needs into line 1: the baseline header records
source_size_bytes, the size that pass read. maybe_compact_usage_ledger_locked
now declines while the file is below that plus the existing
USAGE_LEDGER_COMPACT_RETRY_GROWTH_BYTES, read lock-free through the existing
_live_baseline_header (one readline; appends never touch line 1 and the swap
is atomic). No new file, no header field, no constant, no lock ordering.

The per-process memo stays, because an abort changes no bytes and so leaves
the ledger's own floor naming the window that let that pass in: only the memo
can throttle the retry. It is also the whole guard on a ledger that states no
floor — nothing has folded here yet, the recorded size is not a positive
count, or the leading row cannot be read at all. That last case is contained
exactly where it was: the floor neither raises into the caller's reservation
nor declines in place of the pass, so the corruption still surfaces from the
normal ledger read.

Disclosed cost: the stamp names the PRE-pass size, so after a high-gain fold
the next pass waits until the file outgrows what the last one read. The 20 MB
USAGE_LEDGER_WARN_BYTES tripwire and the startup note on
state/usage_attempts.jsonl now name that as a third cause of growth, because a
decline happens before the pass and leaves no typed event.

test_a_committed_fold_arms_the_same_growth_guard_as_an_abort kept its claim
but had simulated growth by narrowing the retry window to one byte; it now
appends real chains, since the ledger's floor is the size the last pass read.
2026-09-21 07:57:39 +03:00
..
about docs: make installer downloads direct and self-syncing 2026-08-14 04:12:45 +03:00
architecture Derive the usage-ledger compaction floor from the ledger, not from process memory 2026-09-21 07:57:39 +03:00
archive/first-generation Retire completed campaign artifacts and keep repository reports explicit 2026-09-18 01:07:51 +03:00
assets docs: make installer downloads direct and self-syncing 2026-08-14 04:12:45 +03:00
benchmarks docs: make installer downloads direct and self-syncing 2026-08-14 04:12:45 +03:00
development Merge branch 'ouroboros' of https://github.com/razzant/ouroboros into claude/supervisor-reliability-20260921 2026-09-21 06:39:35 +03:00
examples/author_ui_kit feat: add opt-in module widget theme bridge 2026-09-20 04:22:43 +03:00
history/first-48-hours docs: expand public discovery and release proof 2026-08-02 06:13:01 +03:00
install fix: collect independent CI failures before release 2026-09-21 04:35:12 +03:00
inventories Merge branch 'ouroboros' of https://github.com/razzant/ouroboros into claude/supervisor-reliability-20260921 2026-09-21 06:39:35 +03:00
paper docs: make installer downloads direct and self-syncing 2026-08-14 04:12:45 +03:00
.nojekyll docs: sharpen Ouroboros repository presentation (#74) 2026-07-24 07:14:13 +03:00
404.html docs: make installer downloads direct and self-syncing 2026-08-14 04:12:45 +03:00
ANDROID_INSTALL.md Qualify experimental Android delivery without blocking desktop releases 2026-09-18 02:10:23 +03:00
ANDROID_RECOVERY.md Name the English Android stop control in recovery instructions 2026-09-18 04:40:18 +03:00
ARCHITECTURE.md fix: collect independent CI failures before release 2026-09-21 04:35:12 +03:00
CHECKLISTS.md docs: one owner intent has one control — references and commands 2026-09-21 01:47:37 +03:00
CHECKLISTS_ARCHIVE.md fix(review): align contribution sizing and diagnostics with retrieval 2026-09-18 01:35:59 +03:00
CNAME docs: expand public discovery and release proof 2026-08-02 06:13:01 +03:00
CREATING_SKILLS.md docs: define widget appearance intents 2026-09-20 17:54:38 +03:00
DELEGATED_ADMISSION.md Simplify delegated binding and disclose target drift 2026-09-20 18:40:05 +03:00
DEPLOYMENT.md v5.8.3-rc.2: centralize state helpers 2026-05-08 02:12:09 +03:00
DESIGN.md Merge remote-tracking branch 'managed/ouroboros' into claude/intent-door-20260921 2026-09-21 03:21:17 +03:00
DEVELOPMENT.md Bind Presence work to an owner-selected folder 2026-09-15 23:42:14 +03:00
DOMAIN_MAP.md Simplify delegated binding and disclose target drift 2026-09-20 18:40:05 +03:00
index.html docs: make installer downloads direct and self-syncing 2026-08-14 04:12:45 +03:00
install.json fix(packaging): harden AppImage runtime lifecycle 2026-08-11 04:21:16 +03:00
llms.txt docs: make installer downloads direct and self-syncing 2026-08-14 04:12:45 +03:00
MODEL_SEND_OBSERVABILITY.md Merge the landed repository-hygiene migration 2026-09-18 02:35:33 +03:00
PERSISTENCE.md Close four gaps the review panel found in the night-class change 2026-09-21 06:31:00 +03:00
robots.txt site: move Pages to ouroboros-agent.ai (#83) 2026-07-31 08:17:34 +03:00
sitemap.xml Add technical report page and citation metadata 2026-08-11 12:36:37 +03:00
USAGE_COMPACTION.md Derive the usage-ledger compaction floor from the ledger, not from process memory 2026-09-21 07:57:39 +03:00