Reuse validated immutable history ranges during resource retention

This commit is contained in:
2026-11-11 01:56:43 +08:00
parent 26d1688f2f
commit 72a8e01114
5 changed files with 90 additions and 4 deletions
+15
View File
@@ -1028,3 +1028,18 @@ latest value and retained focus. These frame opportunities exclude time before
the browser dispatches the input event; they are not end-to-end key latency or
proof that every intermediate composition string reached the display. Mixed
workload timings must be kept separate from the no-input copy baseline.
Resource retention reuses flattened history-transition changes across durability
cuts only after successful validation and a descriptor-based proof of immutable
plain data. Proofs are weakly held. Every own property must be a data property;
shallow freezing, accessors, custom prototypes, sparse arrays and hidden cycles
do not qualify. Cached ranges are frozen. Mutable evidence remains live and is
validated on every read. This cache contains neither resource IDs nor schema
results: each scan still applies the current registry and keeps working/ACK
owners separate. Explicit `validateHistoryTransition(..., checkChanges)` calls
always execute the caller's validator. No persistence/wire format changes.
CPU/allocation diagnostics found repeated history-transition validation under
resource retention. The production mixed-input probe and a same-machine old
history-path control both pass, but observed total runtimes are similar; this
change demonstrates reduced repeated interpretation, not an end-to-end speedup.