Separate request Root durability barriers from complete storage flushes

This commit is contained in:
2026-11-10 03:03:39 +08:00
parent 3ae18b1670
commit aa72f9e484
8 changed files with 138 additions and 27 deletions
+29
View File
@@ -818,3 +818,32 @@ produce their own pins and completeness result; all supported transitions,
including resolved evidence, are validated. Cross-schema fallback pins and owner
order are preserved. The scanner is internal to one retention pass and is not
stored across Roots, projects or registry changes.
Query view construction no longer leaves a callback capturing the previous query
in the retained method context. Latest methods retain their own document/tables,
not the complete chain of discarded generations. Explicitly held historical
queries remain valid. A child-process GC check covers raw queries and the actual
editor with query coverage installed.
Persistence uses one writer and the existing pending Root Map. `writePrefix`
captures a finite Root boundary, validates every receipt and publishes at most one
durable-generation update for that prefix. The receipt-derived maximum survives
a failed metadata publication as a writer publication obligation. The writer
promise is installed before work, so synchronous listeners cannot start another
writer. No existing Root is skipped or rewritten.
Transport's internal `persistThrough` waits for its fixed request/dispatch Root;
it does not chase later local edits. Public `persist` still flushes all pending
Roots and the derived publication obligation, including metadata echoes. Failed
writes reject their barriers and retain the exact suffix for retry. Network
capacity grants recheck leader/identity before calling the adapter. A fenced
scheduler pump reports failed state publication without an unhandled rejection.
`settle` repeats until the Root and current task queues stabilize, preserving
future retry/held-job semantics instead of relying on two fixed passes.
The actual-page test uses bounded CDP requests and rejects disconnected/crashed
or dialog-blocked targets without accepting dialogs. A failed protocol call cannot
hang a second metrics read. Browser cleanup escalates only the fixture's own
process after its exit grace period. Optional heap/receipt sampling and a pinned
baseline override affect only fixture copies and are diagnostic, not product APIs
or production performance claims.