refactor: own resumable layout drafts in explicit host work objects
Verify Tessera GUI / verify (push) Failing after 8m52s

This commit is contained in:
2026-10-23 01:07:33 +08:00
parent 09c3902d84
commit 020b914658
4 changed files with 150 additions and 43 deletions
+3
View File
@@ -1130,6 +1130,9 @@ When an occurrence's cross-axis constraint changes during settling, its preferre
The source layout driver now uses Aster's resumable read-only call API with a soft quantum of 256 instructions. Pauses retain the same VM frames, operand/local roots, return contracts and read tracking; total instruction/frame limits still apply across slices. ui.stats().layoutSlices counts slices in the most recent solve (native fast path: 1). The worker currently resumes Pending immediately after yielding its OS time slice. Parking the solve across worker turns, scheduling other work and handling newer inputs before completion are not implemented yet. Native callbacks are not preempted. Only the completed settled frame is published.
source_layout::start now returns either Complete(Draft) or Pending(Work). The host-owned Work retains the unpublished frame, derived runtime/cache snapshots, convergence plan and prepare root without borrowing caller frame/cache variables. Work::resume consumes the saved job and advances the same VM continuation; Work::cancel closes that continuation and releases the prepare root without merging a draft. A second start is rejected while any read-only execution is active. Every pending Work must be resumed or explicitly cancelled with its owning VM; dropping it is not cancellation. The current layout_frame adapter still drains jobs synchronously. Mount preparation/lifecycle cancellation and parking jobs in the execution worker remain unfinished.
## UI host object
Positional arguments only: