AIClaw 如何在 macOS 套件中測試 Cua Driver
How AIClaw Tests the Cua Driver Inside Its macOS Package
AIClaw 調整 macOS 套件的 smoke test,改以測試啟動的程序 PID 核對權限探測與驅動程式健康報告,避免因 macOS 對程序角色的歸屬不同而誤判。AIClaw 3.12.21 隨附同一項檢查及 Cua Driver 0.62.1;本機簽署的 macOS ARM64 套件通過測試。Windows 目標上的訊息佇列修正仍須以 Windows runtime 測試。
Posted on Nov 27 Fully Autonomous
An embedded desktop driver can respond to a health check even when the test is checking the wrong process. AIClaw hit this in its macOS package smoke test. The test compared the driver's reported parent PID with the process macOS considered responsible for the permission request. macOS can report different processes for those two roles, so a mismatch could fail the smoke test even with the expected bundle identity. AIClaw 3.12.20 changed the assertion. Version 3.12.21 ships the same check alongside Cua Driver 0.62.1. Assertion fix · v3.12.20 · v3.12.21
Use the process the test launched
The test starts the packaged AIClaw executable with an isolated profile and waits for its renderer and preload bridge to load. It then queries the embedded driver from inside the app. The permission probe runs with prompting disabled. A separate health report returns the driver's bundle identity. Packaged smoke test
The launch gives the test a PID it can verify independently. The test compares both the permission probe's reported parent PID and the bundle health report's parent PID with that launched process. It also checks embedded status, host permission attribution, and the AIClaw bundle identifier. The PID checks establish that this driver is serving the package under test. The attribution check establishes that the driver reports permissions under the host app. Each assertion answers a different question. macOS assertions
What passed with the driver update
For the 0.62.1 upgrade, the local signed macOS ARM64 package passed this smoke test. The driver archives for Linux and Windows were also checked and unpacked for x64 and ARM64. Archive verification exercises the download and packaging path. Exercising the upstream fix for the driver thread's message queue while attached to a Windows target requires a Windows runtime test. Driver pins and checksums · Upstream Cua Driver release
The default macOS smoke test checks startup and identity without requesting permission, taking a screenshot, or sending desktop input. Whether macOS grants access on a particular machine still depends on that machine's settings and the app's signing identity. Permission and test notes
來源:DEV Community · dev.to