Repository navigation
Conversation
9520b62 to
6a27a3f
Compare
6a27a3f to
eddb094
Compare
Prepare the file-artifact baseline after durable input acceptance so the model can start immediately, and gate tools, matching lifecycle hooks, subagents and background writes behind that readiness. Re-scoped after upstream moved checkpoints to journal v2: the full-workspace checkpoint scan at turn start no longer exists, so this change no longer carries an incremental checkpoint cache. It keeps the single preparation task, the barrier for every write entry point, cancellation/lease cleanup, failure provenance and the artifact baseline's cooperative cancellation. Refs OpenBMB#687.
eddb094 to
1e2a3b9
Compare
|
The re-scoped implementation looks sound and is worth landing as a startup-latency improvement. Overlapping the artifact baseline with model startup has a concrete benefit, while the shared readiness barrier keeps tools, matching hooks, subagents, background tasks, and terminal finalization behind workspace preparation. The 29 preparation tests and 84 related tests passed locally, and Web and Desktop CI are green. In a synthetic 2,000-file workspace with a fixed 50 ms local model delay, the median first-text latency across the four warm runs fell from about 80 ms to 52 ms. This is a scoped benchmark, not a general end-to-end speedup claim. Before merging, please update I did not find a blocking implementation issue. Once that documentation cleanup is done, I recommend merging; its priority is lower than the correctness fixes in #702 and #703. |
The guide states the readiness and cancellation rules and how to run the startup benchmark. Implementation history stays in the pull request.
|
@xhd0728 Thanks for the review. |
Ubuntu DEB x64 aborted while Vite rendered chunks at the 2560 MB Node heap cap.
Re-scoped onto current
main(journal-v2 checkpoints).Upstream now records turn changes through command frames and increments instead of scanning the whole workspace in
beginTurn, so the incremental checkpoint cache this PR originally carried no longer applies. This PR now overlaps the remaining pre-request work — the file-artifact baseline — with model startup, and gates every write entry point behind that readiness.Refs #687 (the turn-start checkpoint scan half is provided upstream).
Changes
beginTurnstill persists the turn's checkpoint record, andFileArtifactCollector.startprepares the artifact baseline.UserPromptSubmit/InstructionsLoaded/PreModelRequest/ compaction hooks wait for protection; unmatched hooks never dispatch early.Validation
Node 22.23.2, Windows 11:
npm run build(tsc + plugins)node --test dist/tests/session/workspace-preparation.spec.jsnpm run test:checkpointsmainNot included
scripts/benchmark-turn-startup.tsis kept for that.