fix(agents): prepare desktop runtime and recover initial status reads - #136
Merged
Merged
Conversation
Signed-off-by: Pinky <5f5ab050ec58ae208332edd544ebf705221e24c1b86d82a6ca07038a7a8f6ac9@buzz.block.builderlab.xyz>
added 2 commits
September 22, 2026 10:51
Signed-off-by: Pinky <5f5ab050ec58ae208332edd544ebf705221e24c1b86d82a6ca07038a7a8f6ac9@buzz.block.builderlab.xyz>
Preserve the existing click-to-paint-opportunity budget and visibility check while recording synchronous dispatch, frame callbacks and first visibility in the existing evidence report. This is diagnostic evidence for an unexplained hosted timing failure, not a performance repair. Signed-off-by: Pinky <5f5ab050ec58ae208332edd544ebf705221e24c1b86d82a6ca07038a7a8f6ac9@buzz.block.builderlab.xyz>
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.
Pinky is opening this PR on Wes’s behalf.
Summary
Make normal desktop agent setup reliable and keep first-open status loading through short native initialization/contention failures.
just desktopstarts Tauri and before packaged desktop builds. Reuse bundles only after validating revision, target, manifest shape/size, executable files and hashes; rebuild missing, stale or corrupt resources. Preparation failures stop launch; help remains nonbuilding.Five production files, +85/−6 lines; the remainder is regression tests and two documentation updates. No new runner architecture, migrations, credential changes, mention/autocomplete changes or notice restyling. Existing/release-app agents are untouched.
Validation
Original implementation head:
2b666681e8d85c471e97a86c2e2bc97eb8b3a288, based one9717dda50eb25e81e0edad30b5d0500a052b591.pnpm buildpassed (existing chunk-size warning only).cargo test -p buzz-agent-controller -p buzz-foundation --locked -- --include-ignored: 74 passed, zero skipped. Includes staged ACP lifecycle and isolated worker inference/token-refresh/restart fixtures.cargo build -p buzz-foundation --lockedpassed; copied runtime manifest and executable hashes verified. Native checks preceded the frontend-only loading follow-up; native implementation was unchanged afterward.84b0fd04b7831657df2873c3a835412f47cebb03onaarch64-apple-darwin: cold preparation ~152s; verified warm reuse ~0.130s.git diff --checkpassed; clean worktree after commit/push.Regression coverage and limits
Mounted UI coverage protects missing-runtime Create/no native writes/draft retention, saved-profile retry, and automatic status recovery. Controlled-clock projection tests cover both transient strings, the exact retry bound, retained snapshots, genuine errors, cancellation and no write replay.
Browser cases added/removed: 0/0. No browser-only contract changed; mounted UI, projection and real subprocess tests exercise the affected boundaries. Existing broad browser and Rust/tool-integration CI remain required; no local browser suite was added as an extra gate.
First-time preparation intentionally takes minutes; warm launches reuse verified resources. Real-account Create → mention → inference reply and a packaged installer have not been newly certified by this PR. Process-running evidence alone is not a claim of relay/inference readiness.
CI, external DCO Check and required reviewer/code-owner approval must pass before merge. This PR does not authorize merge.
CI follow-up: deterministic GIF selection test
GIF-repair head:
4c84ff1a21ef6e07a6416fb5040b06bed5b8c2b2.The first CI run failed one existing WebKit GIF journey; JavaScript, Rust/tool integration, browser measurements and the other three browser shards passed. WebKit shard 1/2 reported 120 passed / 1 failed / 0 skipped. The failure artifact records GitHub's checkout
f23eed3e849569e1a098bffc1e43743974548416for PR head2b66668; the embedded GIF test matches that head's source.At
gifs.spec.mjs:261, the draft stayed empty after selecting a GIF. The trace records the selection click at 444177–444611ms, with the cleared-query request at 444604ms inside it. The existing test only counted two tiles after clearing the search, so it could select old results while the 500ms debounce cleared/replaced them (GifPicker.tsx:82–102).The follow-up changes one test file, +15/−4; no production changes. The empty-query fixture now returns a distinctly named result, and the test waits for that rendered result before selecting. Exact URL/alt-text insertion, picker dismissal and existing assertions remain intact. No sleeps, forced clicks, extra retries or timeout increases. Browser cases added/removed remain 0/0.
Validation:
bin/pnpm test:browser tests/browser/gifs.spec.mjs --no-deps --project chromium --project webkit --repeat-each=3passed 18/18, zero skipped, in 24.3s on Apple Silicon macOS. Run state was2b66668plus this test delta, SHA-2564896a38774514db4e145414b998419980cbad29361ac580cc6c64c664c658558; pre-commit applied no changes and the committed file has the same hash. Required pre-commit and pre-push gates passed at the new head; remote head verified. Independent source/trace review found no blocker.Scope limit: this establishes selection after refreshed results arrive. It does not fix or rule out a real user losing a click on an old tile during replacement; that existing interaction remains outside this agent-setup PR. Fresh hosted Linux CI and required review remain pending.
CI follow-up: warm-switch diagnostic evidence (not a performance fix)
Current head:
58238811e3ca0fcc91adbdbcf70b607924324539.The second CI run passed all four functional browser shards, including the repaired GIF test, plus JavaScript and Rust/tool integration. Chromium channel-opening instead measured Alpha 73.6 ms, then Beta 107.5 ms against the unchanged <100 ms budget. The failure prevented the last two switches and final no-new-head assertion; these were not reported as passing. Artifact checkout was GitHub merge checkout
18a76929cc92acb6aceb32f94b6829d2c72faba2; its embedded measurement test matched the PR source.Source/artifact review found both signed startup catch-up markers observed and only the four initial/catch-up head reads recorded. Requests during warm intervals were stream-priority changes. This establishes neither a product cause nor harmless runner noise. A matched local Chromium control at
4c84ff1produced 12 warm samples per mode: trace-on median 38.1 ms (33.4–48.5), trace-off median 41.7 ms (35.4–49.3). It did not justify removing tracing; no tracing/config changes were made.This follow-up adds +27/−6 in one test file, recording synchronous click dispatch, animation-frame timestamps and callback-entry offsets, first observed correct-channel visibility, and the final paint opportunity in existing evidence. Original pre-click start/post-await endpoint, predicate, frame schedule, 1-second deadline and strict <100 ms assertion remain. Numeric evidence is saved before the assertion, including a completed over-budget result. These are phase boundaries, not CPU attribution; 1-second timeouts still reject before returning them. No production changes or performance-fix claim. Browser cases added/removed: 0/0. No assertions moved or removed.
Validation on Apple Silicon macOS, production React, Chromium 153.0.8010.12 / WebKit 26.6, Node v24.18.0:
Complete file, both engines, three serial repetitions: 12/12 passed, zero skipped. Wall 50.43 s; summed execution 34.14 s; slowest case WebKit 300-author thread opening 3.70 s. All execution belongs to
channel-opening.spec.mjs. Warm samples: Chromium 34.2–48.6 ms, WebKit 36–50 ms. Run state was4c84ff1plus exactly this test delta; SHA-256ccb4c3cc8433a8febc6abc0aa5bc55ddd29c4e288e4d045842036b42d4a5320cmatches committed bytes. The unmodified Chromium full-file control passed 6/6 in 18.7 s with tracing (and 6/6 in 19.2 s without); those one-engine invocations are not an end-to-end speed comparison against the two-engine validation. No runner or fixture setup changed.Independent source review found no blocker. Required pre-commit/pre-push hooks passed; unchanged committed bytes, clean worktree and remote head verified; DCO Check succeeded at
5823881. Hosted CI is running. The hosted timing cause remains unresolved; local green does not establish hosted reliability, and a new green run alone would not prove this diagnosed or repaired it. Required review and approval remain outstanding; nothing merged.