Repository navigation
Host requests always settle, and the surface decides about sheets - #38
Merged
Merged
Conversation
Every host.request now answers exactly once. On main a request whose service never answers waits forever; a service's sheet raised over a home-screen tile or for an agent's tool call is dropped, and Mail's add_account never answers there. - A request times out after 60 s (HostService::timeout lets a service ask for more). The clock stops while the service's sheet is up and restarts when it closes; a replaced sheet no longer holds its request. - An answer after a timeout, after cancel_heap, or a second answer goes nowhere. The Card runner cancels the Card's and its sheet's requests when it closes, so nothing reaches a replacement. - 32 waiting requests per isolate (256 in all), arguments up to 1 MiB, answers up to 4 MiB; malformed arguments are refused, not read as null. Answers nobody takes expire after 2 minutes. - ServiceCall carries may_prompt, the isolate's surface permission from makepad. A sheet raised for a call without it is refused with an answer. IsolateSettings::host_prompts is true for a foreground app; it no longer follows the `prompt` capability, which Mail and AI providers do not request and which is about an app's own questions. - The reply queue gets a type alias, which also clears the existing clippy::type_complexity error on appstore.
Follow App Hub main 0f33211 (runtime cb66de07, makepad 1f3b1ded, Octoscript dbd48cfb).
This was referenced Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On main, a
host.requestwhose service never answers waits forever. The same happens when a service raises a sheet over a surface that cannot show one. For example, Mail'sadd_accountnever answers when it is called from a glance tile or an agent's tool call. This makes every request answer exactly once, and lets the surface, not thepromptcapability, decide whether a service may raise a sheet.Every request settles
DEFAULT_TIMEOUT);HostService::timeoutlets a service ask for longer. The clock stops while the service's sheet is up for that request, because the person is typing. It restarts when the sheet closes, whether throughclose_sheetorclose_sheet_later. A sheet that replaces another stops holding the earlier request.cancel_heap(heap), or a second answer is dropped. The Card runner cancels the Card's and its sheet's requests when it closes, so nothing reaches a replacement.null. Answers nobody takes expire after 2 minutes.The surface decides about sheets
may_promptonServiceCall. It comes from makepad's per-isolate flag, whichsplash.rsdocuments as "true for a foreground app host, false for background surfaces like home-screen widget tiles". A sheet raised for a call without it is refused with an answer.host_promptsis always true here.IsolateSettings::host_promptsno longer follows thepromptcapability. The settings describe a foreground app, and a background host sets the flag false itself. Mail (["storage","mail"]) and AI providers (["storage","llm"]) do not requestprompt, so tying the two would have refused their own sign-in and key sheets.promptstays the app's own-questions capability.The reply-queue type gets an alias, which also clears the
clippy::type_complexityerrorappstorehas on main.Checks
cargo test --workspace: 182 passed. That includes 10 newservicestests (timeouts, a late answer dropped, a longer service timeout, cancel on close, a background surface refused, a sheet holding its request, the per-isolate cap, malformed and oversized arguments, an oversized answer, stale answers expiring) and a newadmissiontest (the surface, notprompt, decides).cargo clippy -p octosense-appstore -p octosense-app-policy --all-targets --no-deps -- -D warnings: clean.Consumers
Every
ServiceCall { … }literal needsmay_prompt. The OctoSense side is OctoSense-org/OctoSense#204, a draft that pins this branch's head: glance tiles as a background surface, tool calls, Mail and AI providers refusing early, and the model service's longer timeout.This branch includes App Hub main
0f33211(runtimecb66de07). The merged tree was tested before it was pushed: 182 tests pass and clippy is clean.Not in this PR: the "Where these are served today" paragraph in
docs/PUBLISHING.mdis out of date: OctoSense main registersmodelandoctos. A generated capability matrix is proposed separately.