Desktop default response speed
Verified 2026-10-03 UTC (work began October 2 local time).
Problem and change
The six DEFAULT_ASSISTANT_PROMPTS were not covered by the page-context cache warmer. Server response-cache lookup followed cognitive context preparation, retrieval, and possibly supplemental-query generation. A local What is Sol? JSON request took 28.194 seconds before this change.
bin/sol_chat_defaults.py now prepares six exact-match answers from the public site description and desktop/index metadata. bin/sol_chat_cache_warmer.py --desktop-defaults embeds the bundle in www/index.html. The browser displays these answers before extracting page context or waiting for the network. It makes a bounded background POST to retain the turn in session history; an offline display does not imply history was saved.
The POST /api/chat handler serves the same defaults before cognitive/retrieval/model preparation, supports JSON and SSE, and retains normal history persistence. Requests with images, actions enabled, or response caching disabled bypass this path. Unrecognized questions keep the existing generation path. This change does not accelerate the GET /api/chat/query route.
Recent-update answers explicitly report indexed modification dates, restricted to public desktop destinations; modification is not publication. Browser bundles expire after 24 hours and use the regular request path afterward, where the API still serves defaults without generation. Server bundles rebuild when the shell, public index, or README changes, or on the next UTC day. Rerun the publishing command after a site update to refresh the embedded snapshot.
Speculative suggestion POSTs were removed: aborting the browser request did not cancel backend generation and could leave unused work ahead of clicked questions. Existing cached reply speech can still be prefetched on voice-enabled desktop sessions.
Verification
- Four regression checks in
python3 bin/test_sol_chat_defaults.py: six-button coverage, exact matching, missing-source fallback, dated updates and no speculative model requests. - Python compilation passed for the three changed backend/warmer modules.
- All six local JSON replies returned
cache_match: desktop_default, approximately 1–32 ms including the first bundle load. - Public HTTPS POST returned the expected default in 0.383 seconds. Public shell contained all six bundled answers and the immediate handler.
- SSE emitted delta and done; persisted assistant text matched a subsequent history read.
- A 390-pixel-wide Chromium browser rendered all six bundled answers with networking disabled after load, in about 1–4 ms per synchronous DOM update. This measures text rendering, not network load or voice synthesis, and is not a physical-iPhone benchmark.
- Browser expiry fallback was tested with a mocked transport response so it did not invoke the model.
Public checks used curl --resolve sol.system42.one:443:172.67.195.80 because this workstation resolved the hostname to an unreachable 10.0.1.13. The Cloudflare address was resolved through public DNS during verification; do not assume that address remains current. No DNS configuration was changed.
Restore and evidence
Pre-change full snapshot: 20261003T045318Z, 5,138 items, missing_sources: [], under /home/david/backups/sol37-runtime.
Exact pre-edit copies and review diffs: /mnt/sol-data/sol-stack/verification/sol-default-speed-20261003/. The shell diff also contains independently occurring START radio-telescope links, which this task preserved and did not author. Do not overwrite those concurrent changes during a rollback; reverse only the assistant changes. Runtime service: sol-chat-api.service (restart verified active).
Post-change full snapshot: 20261003T051328Z, 5,150 items, missing_sources: [].