fix(agent): restore exec utility host#1697
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
✅ Files skipped from review due to trivial changes (4)
📝 WalkthroughWalkthroughThis PR isolates the exec utility host from main app bootstrap (new backgroundExecUtilityHost entry and build input), moves app startup into exported startApp(), normalizes parent-port RPC payloads with unwrapping and keep-alive, removes Electron main-process dependencies from utility-host code, extracts MIME detection, and adds tests. ChangesAgent Exec Utility Process Crash Fix
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Warning Review ran into problems🔥 ProblemsStopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/main/appMain.ts`:
- Around line 86-91: The code currently logs raw process.argv and the full
deeplink value which may expose secrets; update the initialization logging
around findStartupDeepLink and storeStartupDeepLink to avoid printing raw argv
or the full startupDeepLink: remove or change console.log(process.argv) and
console.log(startupDeepLink) to redact sensitive data (e.g., log only presence,
host/domain, or a masked/deferred version like "<redacted>…last4" or length) and
use a debug/log-level guard so full values are only emitted in debug mode; apply
the same redaction/guarding pattern to the analogous logging near the later
startup handling (the other findStartupDeepLink/storeStartupDeepLink usage).
- Around line 77-81: When requestSingleInstanceLock() fails, call app.quit() and
immediately return to stop further initialization; modify the block around
app.requestSingleInstanceLock() so that after app.quit() the function exits
(e.g., add an early return) to prevent the secondary instance from registering
handlers or continuing startup logic.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 303736d5-1263-4e34-af1f-230da4dcbcf6
📒 Files selected for processing (16)
docs/issues/agent-exec-utility-process-crash/plan.mddocs/issues/agent-exec-utility-process-crash/spec.mddocs/issues/agent-exec-utility-process-crash/tasks.mdelectron.vite.config.tssrc/main/appMain.tssrc/main/backgroundExecUtilityHostEntry.tssrc/main/index.tssrc/main/lib/agentRuntime/backgroundExecLogger.tssrc/main/lib/agentRuntime/backgroundExecSessionManager.tssrc/main/lib/agentRuntime/backgroundExecUtilityHost.tssrc/main/lib/agentRuntime/sessionPaths.tssrc/main/lib/agentRuntime/shellEnvHelper.tstest/main/lib/agentRuntime/backgroundExecSessionManager.test.tstest/main/lib/agentRuntime/backgroundExecUtilityHost.test.tstest/main/lib/agentRuntime/sessionPaths.test.tstest/main/lib/agentRuntime/shellEnvHelper.test.ts
|
Actionable comments posted: 0 |
|
Actionable comments posted: 0 |
Summary
Closes #1695
Validation
Summary by CodeRabbit
Bug Fixes
Refactor
Documentation
Tests