Schedule copy snapshot preparation by time and byte budgets

This commit is contained in:
2026-11-10 18:11:25 +08:00
parent afccb8c95c
commit 2452fd6ae9
6 changed files with 91 additions and 27 deletions
+11
View File
@@ -936,3 +936,14 @@ HEADLESS_PERFORMANCE_COUNT=10000 HEADLESS_PERFORMANCE_REPORT=/private/tmp/headle
Both modes retain the same full-copy, upper-canvas edge, synchronization and
far-card viewport assertions. Production here means an optimized frontend served
against the fixture HTTP service; it does not claim production Foundry validation.
Copy snapshot encoding/index scanning and legacy prepared-source encoding share
the import time-slice scheduler through an internal copy-budget adapter. They no
longer sleep every 32 records. Record bytes contribute weighted work so larger
records trigger budget checks sooner; the existing coarse-clock work ceiling is
retained. Topology/full validation iterators use the same slice budget. This is
a soft scheduling budget: JSON operations, document construction and a single
validation step remain indivisible. Copy cancellation still reports
`copy_aborted`; host clock/yield errors remain observable. Snapshot formats,
byte locators, size limits, source digests, lazy payload reads and admission/seal
ordering are unchanged. No partially encoded snapshot is admitted or returned.