mirror of
https://github.com/razzant/ouroboros.git
synced 2026-10-03 04:07:04 +00:00
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. |
||
|---|---|---|
| .. | ||
| about | ||
| architecture | ||
| archive/first-generation | ||
| assets | ||
| benchmarks | ||
| development | ||
| examples/author_ui_kit | ||
| history/first-48-hours | ||
| install | ||
| inventories | ||
| paper | ||
| .nojekyll | ||
| 404.html | ||
| ANDROID_INSTALL.md | ||
| ANDROID_RECOVERY.md | ||
| ARCHITECTURE.md | ||
| CHECKLISTS.md | ||
| CHECKLISTS_ARCHIVE.md | ||
| CNAME | ||
| CREATING_SKILLS.md | ||
| DELEGATED_ADMISSION.md | ||
| DEPLOYMENT.md | ||
| DESIGN.md | ||
| DEVELOPMENT.md | ||
| DOMAIN_MAP.md | ||
| index.html | ||
| install.json | ||
| llms.txt | ||
| MODEL_SEND_OBSERVABILITY.md | ||
| PERSISTENCE.md | ||
| robots.txt | ||
| sitemap.xml | ||
| USAGE_COMPACTION.md | ||