Repository navigation
fix(windows): upgrade Tauri to prevent keyboard/focus reentry deadlock #2817
Description
Problem
AgentsCommander 0.41.0 on Windows VM204 stopped delivering GUI IPC at 2026-10-01 03:19 UTC-03 while renderer timers/frames and backend workers remained alive. The preserved renderer recorded 41,019 pending calls.
Unwinding the live backend dump using its own x64 unwind metadata, and checking the checksum-matched tao 0.34.8 source, localized a main-thread self-deadlock: WM_KEYUP handling calls PeekMessageW while keyboard input-state locks remain held; a reentrant WM_KILLFOCUS requests a lock already held by that same thread. The original source of the Shift/focus messages remains unknown; reproduction has not yet run.
Intended change
Update the Rust Tauri dependency to 2.12.1, resolving tao 0.37.1 and its compatible runtime/webview dependencies. The published tao 0.37.1 source removes this observed mechanism: per-window builders, peeks outside input locks, and ordered pending events. This claim is based on the published source, not literal identity with upstream PR tao#1215.
Read-only resolver dry-run succeeded; existing plugins remain pinned; current Rust toolchains exceed the new declared MSRV. Compilation and application behavior are unverified. Expected application change is src-tauri/Cargo.lock; Cargo.toml and application APIs are not expected to change. Any required API migration must be reviewed and added to the plan before implementation.
Acceptance and verification
- Confirm the resolved tao source lacks the observed lock-held peek/reentry route.
- Build/check AC and run relevant Rust and frontend suites on the updated dependency graph.
- Validate a bounded Windows regression harness with the old version as positive failure control and the new version as success control; include a negative control. Use only a private test window and targeted messages, with no global keyboard injection.
- Review focus, geometry, detached terminals, keyboard/IME, shortcuts and WebView2 regressions appropriate to the dependency update.
- Review the complete lockfile delta and compatibility of Invoke, WebviewWindowBuilder and the test feature.
- Required CI, independent adversarial review and PR landing must pass; never claim a merely resolved dependency graph is a working fix.
Scope boundaries
No application-version bump, release, installation, restart of the frozen VM204 app, unrelated synchronous-command refactor, IPC polling mitigation, diagnostic heartbeat, or sharing memory dumps externally. Interactive tests require the user's authorization before delegation. Any fallback backport requires a separately reviewed decision after demonstrated dependency incompatibility.
Evidence
Local shared evidence: room-17-ac-dev-team-v4/room-shared/incident-20261001, including rust-source-findings.md, rust-source-findings-adenda3.md and dump/unwind hashes. Investigation proposal: .ac/plans/vm204-ipc-hang-investigation-proposal.md. No dumps are uploaded to GitHub.
Related upstream: tauri-apps/tao#1349 and tauri-apps/tao#1215. Earlier AC #1652 delivered diagnostics; it did not establish this incident's fix.
User authorized issue creation and resolution on 2026-10-01. Delivery plan review and required specialist gates precede application edits.
Activity
mblua commentedon Oct 1, 2026
Technical scoring (ceremony excluded)
Raw sum: 109. Final: round((109-10)/190*99)+1 = 53/100.
Delivery: Full (architectural/concurrency and shared platform dependency scope raises the nominal Lite band). Architect writes plan, Rust and Grinch independently review matching digest. Vetoes: verification >=8 requires Grinch review of proof; blast radius >=12 requires full file-impact approval tables; state >=10 and concurrency >=10 require architect; environment >=8 requires written developer environment risk before code changes.
Excluded ceremony: issue/branch/PR creation, delegation, consensus rounds, waiting for CI, merge/cleanup and version/release bookkeeping. No application release or installation requested.
mblua commentedon Oct 1, 2026
Implementation paused: exact-head CI on 1cbade7 identified two directly related omissions from the approved scope: npm/Rust Tauri major.minor mismatch and nested diagnostic fixture semver lock drift. Frozen plan AF49984F50E048E24758AFDD59943332ADFC35FC03BDE457DAE330F008F0FC6B no longer authorizes further edits; a new certified plan and human approval are required. No corrective edits made. Windows CI executed both new tests successfully; positive/negative controls, GUI smoke and excess-send investigation remain open.
Remaining-delta technical re-score (previous score53/raw109):
Raw129. Final round((129-10)/190*99)+1=63. Excluded ceremony: issue/branch/PR handling, waitingCI, review rounds, delegation, messaging, merging, cleanup. Actual CI compatibility diagnosis included in environment. Architect must reassess partition/ownership at the new band; score does not itself dictate a product solution.
test(2817): add the tauri and @tauri-apps/api major.minor coupling gate
mblua commentedon Oct 1, 2026
D15 natural negative control: executed in CI and failed as designed
Evidence record for the version-coupling test added on this branch. This is the negative half of the control only; the positive half has not run. No rerun was made.
Execution
3e6992caf1603c0772071e1f4401eb67a562c73c(PR fix: raise tao to 0.37.1 to remove the keyboard reentrancy deadlock (#2817) #2819), commit addingsrc-tauri/tests/tauri_npm_version_coupling.rsonly.cb093d5e07c87577ac6d5d1c70ee569c273c35fd: "Merge 3e6992c… into 2ed19c1". That base is now behindmain.36926675100(PR regression gates), attempt 1, jobrust-regression110585607382onwindows-latest, stepcargo test.Verbatim from the job log (colour codes removed)
The target binary ran, the named test failed on its own assertion at line 75, and the message names both versions and both lockfiles. It is not a compile error and not a failure of another target.
Every red job in the two runs, by cause
rust-regressionbundle-validation(run36926675480),windows-release-cli-smokeFound version mismatched Tauri packages ... tauri (v2.12.1) : @tauri-apps/api (v2.10.1)terminal-snapshot-portableon windows-latest, ubuntu-latest, macos-15, macos-15-inteldiagnostic_fixture_lock_versions_are_a_workspace_subset: fixture lock pinssemver 1.0.27, absent from the workspaceCargo.lockThree causes, each one a lockfile alignment still pending on this branch. The other nine jobs of the full tier were green.
Limits
terminal_snapshot_host.rsandwake_consumption_measure.rs. 27 of 29 ran; the lib suite before them reported5838 passed; 0 failed; 26 ignored.tao_keyboard_reentrancyreportedresolved_tao_is_at_least_0_37_1 ... okandwin_harness::wm_keyup_peek_does_not_deadlock_on_reentrant_wm_killfocus ... ok. That is on this intermediate head, not the final one.Preserved log
The full
rust-regressionjob log (3413884 bytes) is archived with the team's evidence. SHA-2560d7957d81dced07fd77a8e1a66a3e25fc55a6eb9181eb3346ac8cf01775ae247. The excerpt above is lines 15829 to 15851 of that file.fix(2817): align @tauri-apps/api and the diagnostic fixture lock with…
mblua commentedon Oct 2, 2026
CI record for
23c5c2ad: all ten runs green, coupling test positive control executedFactual record of the finished CI executions for the current head of PR #2819. It reports what ran. It is not an approval, and it closes nothing.
Identity
23c5c2adb0036fdbad1bdfcf43ac0f87eed4279f:@tauri-apps/apilock entry to 2.12.1, diagnostic fixture locksemverto 1.0.28, plus.github/workflows/g-fe-certification.yml.pull_requestworkflows tested merge ref05eea84037b528d58bcae00e30ff3cf270559eaa: "Merge 23c5c2a… into a6b6280". That base is newer than themaincommit the branch was last synced with (c070965368431db38861252e9f9c13f1c8946029).pushworkflows, including G-FE certification, ran on the work SHA itself.Runs, all
completed/success, attempt 136938954236369389543393693895055336938954414,3693895055536938954326,3693895047236938954216,369389505013693895046925 jobs, no failed step.
Coupling test, positive control (job
rust-regression110625715337,windows-latest, colour codes removed)Same target and test as the negative control recorded earlier on this issue, now
ok. The two controls ran on different bases (negative on2ed19c1c, positive ona6b62803); the test file is byte-identical in both.Keyboard reentrancy harness, same step
The three earlier failure causes
bundle-validationorwindows-release-cli-smoke; the bundle job finished 2 bundles.diagnostic_fixture_lock_versions_are_a_workspace_subset:okon windows-latest, ubuntu-latest, macos-15 and macos-15-intel.cargo test --locked --lib --bins --tests: lib5841 passed; 0 failed; 26 ignored, 29 of 29 integration targets ran, 0FAILEDresult lines.G-FE certification run
Run
36938950553, job110625703225, artifactg-fe-evidence-23c5c2adb0036fdbad1bdfcf43ac0f87eed4279f(ID11200070163), ten evidence files retrieved. The five command status lines each record exit 0, and the recorded installed API version is2.12.1. Certification of this evidence belongs to the frontend owner and is pending.Limits
a6b62803is newer than the branch's sync point; what changed in between has not been classified.okonly. No local reproduction of the original deadlock was performed, and no real-runtime check of the new JS API minor exists;npm testexercises mocked seams.telegram.send_messagefinding seen locally earlier remains open and unexplained.Full logs and run metadata are archived with the team's evidence.
rust-regressionlog SHA-25635e58ea2d825996bb932e097666560ba6aaa7a940df2d98299b9c9a198de0f23; G-FE job logb6d83cc9acca1c8096b3c0cdc347db03058719bda63eeb463611135b3a7a79f0; manifest290880f7f46834c9423e890c979db86584a3e11690bcca038557d5fbe1b263d5.mblua commentedon Oct 2, 2026
CI record for
ae35162b: one run red, nine green. Delivery stopped.Factual record of the finished CI executions for the current head of PR #2819. It reports what ran. It is not an approval, it attributes no cause, and it closes nothing.
Identity
ae35162b4d703e8b4ae69c9185a00d0cfe834319: merge ofmainatd9c7db925d406ab77eafd5c326a800db367342d1into the branch head23c5c2adb0036fdbad1bdfcf43ac0f87eed4279f.pull_requestworkflows tested merge reff5260672: "Merge ae35162… into d9c7db9". The base tested equals the base the branch was merged with.pushworkflows, including G-FE certification, ran on the work SHA itself.Runs, all
completed, attempt 136952718755369527187183695271510436952718705,3695271511036952718736,3695271513336952718756,369527151093695271511225 jobs: 24
success, 1failure.The failure (job
rust-regression110668942790,windows-latest, stepcargo test, commandcargo test --locked --lib --bins --tests)The assertion at that line is
elapsed <= LOCK_WAIT_BUDGET + Duration::from_millis(150), withLOCK_WAIT_BUDGETat 100 ms: it allows 250 ms and the run measured 588.4544 ms.src-tauri/src/capture/state.rsis byte-identical betweenmainatd9c7db92and this head, and is not a path this branch changes. That is a fact about bytes; no cause is claimed and nothing was rerun.What did not run because of it
tauri_npm_version_coupling) and the keyboard reentrancy harness (tao_keyboard_reentrancy) were not executed for this SHA. Their earlier results on23c5c2adare historical.The other jobs
rust-regression-linuxandrust-regression-macos: 0FAILEDresult lines.diagnostic_fixture_lock_versions_are_a_workspace_subset:okon ubuntu-latest, windows-latest, macos-15 and macos-15-intel.bundle-validationorwindows-release-cli-smoke; the bundle job finished 2 bundles.G-FE certification run
Run
36952715104, job110668930442, artifactg-fe-evidence-ae35162b4d703e8b4ae69c9185a00d0cfe834319(ID11203789484, upload digestac761d0afc051485e672c19b23e7f6735dbca5a3847d9c2f8a96f9929b3e9f53, expires 2026-12-31), ten evidence files retrieved and their nine recorded digests matched. The five command status lines each record exit 0, and the recorded installed API version is2.12.1. Certification of this evidence belongs to the frontend owner and is pending. A green G-FE run does not lift the red regression run.Limits
Full logs and run metadata are archived with the team's evidence.
rust-regressionlog SHA-25618b9efcf31620b7e563d7ef38d8c6ac6d4f66f0c93064b56ed475de8920ba454; G-FE job logbf8173ec07d82ebed7550e074f7983df542dd511df7d3e824f3c69311cfddd23; manifest3f8fbd80431edc488eb326df5e1ae017ab15cc87e78d84f85b8e54dcd600c836.mblua commentedon Oct 2, 2026
CI record for
ae35162b, run36952718755attempt 2: the one re-executed job is greenFactual record of one re-execution. It follows the earlier record on this issue of attempt 1, which was red. It is not an approval, it attributes no cause, and it closes nothing.
What was re-executed
rust-regression(Windows) of the PR regression gates run36952718755. New job110686244967, attempt 2,completed/success, 03:02:09Z to 03:40:56Z.successis the attempt-1 result shown again.110668942790are preserved.Identity tested
f5260672d5b2dda0ce09041ffd48642fdede51c2by full SHA: "Merge ae35162 into d9c7db9". Same merge commit and base as attempt 1.The job
23 steps, all
success, none skipped.cargo test --locked --lib --bins --tests: lib5841 passed; 0 failed; 26 ignored; 29 of 29 integration targets ran; 57 result lines, noneFAILED. The four IS #1850 steps that attempt 1 skipped ran.The test that failed in attempt 1
It passed this time. A passing run prints no elapsed time, so this does not explain the 588.4544 ms measured in attempt 1. That failure remains unexplained.
Coupling test and keyboard reentrancy harness, now executed for this SHA (colour codes removed)
Limits
okonly. No local reproduction of the original deadlock and no real-runtime check of the new JS API minor exist.Logs and metadata are archived with the team's evidence. Attempt-2
rust-regressionlog SHA-256a1015b17a8588c4c25a327dbab4233f5e5e0dbd81f32b8561ffb0111c88cdefb; manifest06eefed01dccd9752df91b87cc7d92b6c77e60ee5b3b26d1d3603998ebde04ed.Merge pull request #2819 from mblua/fix/2817-tauri-keyboard-deadlock