Files
archived-orca/src/shared
Brennan Benson 6db9aabbe1 perf(orchestration): stop orchestration.db growth by pruning settled chat output copies (#42839)
* perf(orchestration): prune settled chat output copies and reclaim orchestration.db space

Background maintenance rewrites chat workers' saved output copies of Runs settled over a day ago
to the reference later releases store, every six hours at a tenth of the thread, and returns
free pages in bounded steps once the file uses incremental auto_vacuum. New databases start
that way; Settings > Agent orchestration can restart Orca to rewrite an existing one.

* fix(orchestration): prune only copies whose chat is readable here, in bounded pages

Pages now examine a fixed window of archive rows and check each Run once, so a large Run
cannot make one slice quadratic. A copy whose chat this host cannot read stays. The restart
rewrite keeps its temporary copy on disk and records a failure for Settings to show.

* fix(orchestration): check chat readability without re-registering released workers

The readability probe builds the identity from the durable row instead of rehydrating it into
the live registry. Free-space checks use SQLite's own temp folder; a page's Run verdicts are
shared across a pass; a failed failure record no longer hides the VACUUM error.

* chore(orchestration): annotate prune casts, follow Button spacing, sync the runtime catalog

* chore(i18n): resync the runtime English catalog after rebase

* fix(orchestration): share Run verdicts across a prune pass; check the temp drive SQLite uses on Windows

* perf(orchestration): compact legacy storage during update shutdown

* test(orchestration): mock filesystem space checks through ESM factory

* Align update maintenance checks with shutdown-only work

* Drop the one-time update VACUUM; keep prune and incremental reclaim

Existing non-incremental orchestration databases stop growing because freed
pages are reused; nothing shrinks them automatically.
2026-11-16 01:01:58 -08:00
..