fix(gemini): guard against EACCES in workspace realpath during init#1912
fix(gemini): guard against EACCES in workspace realpath during init#1912
Conversation
…ELECTRON-BM) aioncli-core calls fs.realpath(workspace) internally without try-catch. The existing mkdir guard handles ENOENT (deleted temp dirs) but not EACCES (permission-denied dirs). Add an explicit realpath call after mkdir so the error is caught by the bootstrap chain instead of escaping as an unhandled promise rejection.
Code Review:fix(gemini): guard against EACCES in workspace realpath during init (#1912)变更概述本 PR 修复 Sentry 错误 ELECTRON-BM(60 次出现,v1.9.1): 方案评估结论:✅ 方案合理 一行预检的方式简洁有效——与现有 ENOENT 守卫模式( 问题清单未发现阻塞性问题。以下为 LOW 级别观察供参考: 🔵 LOW — 测试验证的是构建块行为而非集成路径文件: 说明:测试直接测试 是否阻塞:否。 汇总
结论✅ 批准合并 — 无阻塞性问题,修复精准,测试覆盖充分。 本报告由本地 CONCLUSION: APPROVED |
|
✅ 已自动 review,无阻塞性问题,正在触发自动合并。 |
* 'main' of github.com:wuhao1477/AionUi: (40 commits) fix(agents): prevent unhandled promise rejection in bootstrap initialization (iOfficeAI#1933) fix(gemini): restore context after stopping a reply (iOfficeAI#1932) fix(codex): reject start promise immediately on process exit during startup (iOfficeAI#1929) fix(conversation): sync renamed titles with detail view (iOfficeAI#1927) fix(paste): deduplicate filenames when pasting multiple images simultaneously fix(mobile): add SafeArea support and update app icon (iOfficeAI#1926) fix(database): guard against undefined params in databaseBridge providers (iOfficeAI#1924) fix(conversation): validate type field before creating conversation (iOfficeAI#1921) fix(docs): restore wechat_group_5.png reference to wx-5.png in readme fix(snapshot): add maxBuffer to git add/commit exec calls (iOfficeAI#1914) refactor(acp): consolidate AGENT_SKILLS_DIRS into ACP_BACKENDS_ALL (iOfficeAI#1913) fix(gemini): guard against EACCES in workspace realpath during init (ELECTRON-BM) (iOfficeAI#1912) fix(channels): send raw QR ticket instead of page URL in WeChat WebUI login SSE (iOfficeAI#1910) .md format chore(pr-automation): fix missed sleep 5 in comment to sleep 10 chore(pr-automation): increase auto-merge retry delay to 10s chore(pr-automation): add 5s retry for transient GitHub mergeStateStatus UNKNOWN fix(docs): remove trailing whitespace in OfficeCLI readmes chore(pr-automation): verify auto-merge success before labeling bot:done fix(snapshot): guard against non-existent workspace in WorkspaceSnapshotService.init (iOfficeAI#1906) ...
Summary
Fixes ELECTRON-BM (60 occurrences, last seen 3 days ago on v1.9.1).
aioncli-corecallsfs.realpath(workspace)internally without try-catchmkdirguard (ELECTRON-6W fix) handles ENOENT but not EACCES (permission denied)fs.promises.realpath(path)aftermkdirso the error is caught by the bootstrap chain instead of escaping as an unhandled promise rejectionTest plan
geminiWorkspaceEacces.test.ts— verifiesrealpathcatches EACCES thatmkdiralone missesgeminiWorkspaceRecovery.test.tsstill passes (no regression on ENOENT guard)bunx tsc --noEmitpassesbun run lint:fix— 0 errors