* fix(desktop): restore Windows bounds on the display with the most overlap
* fix(desktop): retry transient macOS DMG creation failures
Retry hdiutil Resource busy failures with bounded backoff and remove partial images before retrying. Preserve immediate failure for permanent errors and cover retries, cleanup, and child-process diagnostics with regression tests.
* fix(desktop): harden Windows window state persistence and recovery
Flush pending window state on minimized or fullscreen exit, retain deferred display clamping across native transitions, and validate maximized state strictly.
Preserve maximization when a saved display is unavailable and add real Electron lifecycle and cold-start regression tests with documented hardware verification limits.
* test(desktop): initialize Electron before Windows tests
---------
Co-authored-by: Codex <codex@openai.com>
prepare_model_request removed and re-appended the lesson packet (and its
original-page images) at the end of every model request. Each tool round
therefore moved ~3.3K tokens of packet and pages behind the new tool
results, and the next turn removed the stored packet from history, so no
request was a prefix extension of the previous one and every round re-paid
the packet and everything after it.
Deliver the packet like a runtime snapshot: an unchanged packet stays at
the position where it was first sent (within the turn and in replayed
history), and only a changed packet replaces it. The page images are
projected right after the packet instead of at the end of the request.
Refs #3186
tools[] heads the provider prompt-cache key, so a tool that one turn mounts
and the next drops re-bills the whole history on both turns. Three gates were
still read off a single turn:
- has_kb: detaching the knowledge base removed rag / kb_files /
knowledge_frontier. They now stay mounted once seen (outside exclusive
capabilities); while no KB is attached, dispatch passes an empty
_attached_kb_names and the tools refuse every kb_name, so this never
reaches a detached KB.
- has_book_authoring: a turn without a single referenced book page dropped
propose_book_edit. It stays; the tool already refuses without a page.
- has_scientific_research where nothing can be deferred (a partner whitelist
without load_tools): the message regex mounted the research tools for one
message only. Once mounted they stay.
Also, the setup capability's message/intro heuristic no longer activates on a
partner turn (which can write nothing and is already not offered the deferred
setup tools); with a whitelist lacking load_tools it mounted the setup tools
and a system block on a fresh install's first message and dropped them next.
Adds tools_gated_by() to tool_composition so the sticky checks name gated
tools from the single _CONDITIONAL_MOUNT_FLAGS table.
Refs #3183
Prompt caches key on tools, then system, then messages. Every round of a
chat-loop turn sends the loop's tool schemas, but the forced finish (round
budget spent) sent the request with tool_schemas=None. That changed the
very start of the request, so the whole turn history (often 10k-60k
tokens) missed the cache on the final round. tool_choice="none" is no
fix: on DeepSeek it caches exactly like a request without tools.
The forced finish now sends the same tool list the last normal round
sent (taken from the request snapshot, since the deferred tool loader
appends to the live list after a request goes out) with tool_choice left
at auto; the finish instruction already tells the model to stop calling
tools. A tool call it returns anyway is never dispatched, and no ask_user
draft card is published for it. The round is kept in the history as text
only (a call without a result is rejected by the next request; Responses
function_call items are dropped too), a repair note asks for a plain-text
answer, and one more attempt runs. If that also calls a tool, the turn
ends with the existing empty-response fallback. The forced finish still
counts as one loop round. The persisted model_turn tools and the context
budget now reflect what the final request really carried.
The context-exploration pre-pass had the same pattern on its last round
(tools dropped); it now keeps the tools, does not run a tool call there,
repairs once, and otherwise degrades to the existing single pass.
The finish instructions (chat, mastery, explore_context; en/zh) now say
the tools are still listed but no call will run. Same approach as the
staged pipelines' forced finish (#3080).
Refs #3182
Keep pull request and other branch caches read-only, while allowing main and dev builds to persist Gradle dependencies. Include stack traces and dependency resolution diagnostics in Android CI logs.
Co-Authored-By: GPT-6.2 Sol