Harden broker startup and persona discovery#164
Conversation
|
Your free trial PR review limit of 300 PRs has been reached. Please upgrade your plan to continue using CodeAnt AI. |
|
Warning Review limit reached
More reviews will be available in 51 minutes and 16 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR introduces broker compatibility detection and extends personas listing to support working directory filtering. The broker compatibility layer automatically detects broker CLI capabilities and creates a shim for legacy flag remapping. The personas API is broadened throughout the IPC stack to accept an optional working directory, enabling filtered listings. Build packaging is updated to unpack broker binaries at runtime. ChangesBroker Compatibility and Personas API
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 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 unit tests (beta)
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.
Code Review
This pull request introduces a compatibility shim to support legacy broker binaries using older CLI flags (like --name instead of --instance-name), and updates the persona listing mechanism to support querying a project root before the workspace starts. The review feedback highlights a critical security vulnerability where the broker:list-personas IPC handler accepts an unvalidated cwd path, which could lead to remote code execution; it is recommended to enforce path validation. Additionally, the reviewer suggests refactoring the synchronous CLI flag inspection to be asynchronous to avoid blocking the Electron main thread, and wrapping signal propagation in a try/catch block to prevent potential crashes on Windows.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| ipcMain.handle('broker:list-personas', async (_, projectId: string, cwd?: string) => { | ||
| const personaCwd = cwd?.trim() | ||
| if (personaCwd && !isDirectory(personaCwd)) { | ||
| return [] | ||
| } | ||
| return brokerManager.listPersonas(projectId, personaCwd) | ||
| }) |
There was a problem hiding this comment.
The broker:list-personas IPC handler accepts an arbitrary cwd path from the renderer process without validating that it lies within the allowed project roots. Since listPersonas eventually executes binaries from the provided directory (via resolveAgentWorkforceCommand), a compromised renderer could exploit this to execute arbitrary local binaries. Please add assertPathWithinProjects(personaCwd) to enforce path validation, similar to other file system and Git IPC handlers.
ipcMain.handle('broker:list-personas', async (_, projectId: string, cwd?: string) => {
const personaCwd = cwd?.trim()
if (personaCwd) {
assertPathWithinProjects(personaCwd)
if (!isDirectory(personaCwd)) {
return []
}
}
return brokerManager.listPersonas(projectId, personaCwd)
})| function inspectBrokerInitCliFlags(binaryPath: string): BrokerInitCliFlags { | ||
| try { | ||
| const help = execFileSync(binaryPath, ['init', '--help'], { | ||
| encoding: 'utf8', | ||
| timeout: 2_000, | ||
| stdio: ['ignore', 'pipe', 'pipe'] | ||
| }) | ||
| return parseBrokerInitCliFlags(help) | ||
| } catch (err) { | ||
| console.warn(`[broker] Failed to inspect broker init CLI for ${binaryPath}:`, err) | ||
| return { | ||
| supportsInstanceName: true, | ||
| supportsName: true, | ||
| supportsWorkspaceKey: true | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Executing external processes synchronously using execFileSync on the Electron main thread blocks the entire application UI and responsiveness for up to 2 seconds (the configured timeout). This should be refactored to use asynchronous execFile wrapped in a Promise.
function inspectBrokerInitCliFlags(binaryPath: string): Promise<BrokerInitCliFlags> {
return new Promise((resolve) => {
require('node:child_process').execFile(binaryPath, ['init', '--help'], {
encoding: 'utf8',
timeout: 2_000,
stdio: ['ignore', 'pipe', 'pipe']
}, (err, stdout) => {
if (err) {
console.warn(`[broker] Failed to inspect broker init CLI for ${binaryPath}:`, err)
resolve({
supportsInstanceName: true,
supportsName: true,
supportsWorkspaceKey: true
})
} else {
resolve(parseBrokerInitCliFlags(stdout))
}
})
})
}| function resolveHarnessBrokerBinary(workspaceKey?: string): { binaryPath: string; env: NodeJS.ProcessEnv } { | ||
| const binaryPath = resolveBundledBrokerBinary() | ||
| const flags = inspectBrokerInitCliFlags(binaryPath) | ||
|
|
||
| if (workspaceKey && !flags.supportsWorkspaceKey) { | ||
| throw new Error( | ||
| `Broker binary does not support --workspace-key: ${binaryPath}. Rebuild or update agent-relay-broker, or unset AGENT_RELAY_WORKSPACE_KEY.` | ||
| ) | ||
| } | ||
|
|
||
| if (flags.supportsInstanceName) { | ||
| return { binaryPath, env: {} } | ||
| } | ||
|
|
||
| if (!flags.supportsName) { | ||
| throw new Error(`Broker binary supports neither --instance-name nor --name: ${binaryPath}`) | ||
| } | ||
|
|
||
| const shimPath = ensureBrokerBinaryCompatShim() | ||
| console.warn(`[broker] Broker binary uses legacy --name flag; launching through compatibility shim: ${binaryPath}`) | ||
| return { | ||
| binaryPath: shimPath, | ||
| env: { | ||
| PEAR_AGENT_RELAY_BROKER_BINARY: binaryPath, | ||
| PEAR_AGENT_RELAY_BROKER_SUPPORTS_INSTANCE_NAME: flags.supportsInstanceName ? '1' : '0', | ||
| PEAR_AGENT_RELAY_BROKER_SUPPORTS_WORKSPACE_KEY: flags.supportsWorkspaceKey ? '1' : '0' | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Since inspectBrokerInitCliFlags should be asynchronous to avoid blocking the main thread, resolveHarnessBrokerBinary should also be updated to be an async function and await the flags inspection.
async function resolveHarnessBrokerBinary(workspaceKey?: string): Promise<{ binaryPath: string; env: NodeJS.ProcessEnv }> {
const binaryPath = resolveBundledBrokerBinary()
const flags = await inspectBrokerInitCliFlags(binaryPath)
if (workspaceKey && !flags.supportsWorkspaceKey) {
throw new Error(
`Broker binary does not support --workspace-key: ${binaryPath}. Rebuild or update agent-relay-broker, or unset AGENT_RELAY_WORKSPACE_KEY.`
)
}
if (flags.supportsInstanceName) {
return { binaryPath, env: {} }
}
if (!flags.supportsName) {
throw new Error(`Broker binary supports neither --instance-name nor --name: ${binaryPath}`)
}
const shimPath = ensureBrokerBinaryCompatShim()
console.warn(`[broker] Broker binary uses legacy --name flag; launching through compatibility shim: ${binaryPath}`)
return {
binaryPath: shimPath,
env: {
PEAR_AGENT_RELAY_BROKER_BINARY: binaryPath,
PEAR_AGENT_RELAY_BROKER_SUPPORTS_INSTANCE_NAME: flags.supportsInstanceName ? '1' : '0',
PEAR_AGENT_RELAY_BROKER_SUPPORTS_WORKSPACE_KEY: flags.supportsWorkspaceKey ? '1' : '0'
}
}
}|
|
||
| // Phase 1 of #125: the local broker stays the workspace creator, so the | ||
| // key is only threaded when explicitly pinned via env. | ||
| const brokerBinary = resolveHarnessBrokerBinary(explicitWorkspaceKey) |
| child.on('exit', (code, signal) => { | ||
| if (signal) { | ||
| process.kill(process.pid, signal) | ||
| return | ||
| } | ||
| process.exit(code ?? 0) | ||
| }) |
There was a problem hiding this comment.
On Windows, calling process.kill with certain POSIX signals can throw an EINVAL error, causing the compatibility shim to crash with an unhandled exception. Wrapping the signal propagation in a try/catch block ensures the shim exits gracefully on all platforms.
child.on('exit', (code, signal) => {
if (signal) {
try {
process.kill(process.pid, signal)
} catch {
process.exit(1)
}
return
}
process.exit(code ?? 0)
})|
Your free trial PR review limit of 300 PRs has been reached. Please upgrade your plan to continue using CodeAnt AI. |
|
Addressed the review feedback in
Verified:
|
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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/broker.test.ts`:
- Around line 410-445: Add regression tests that exercise the compat-shim
execution path by invoking BrokerManager.start (or the test harness that
triggers it) and asserting that when a legacy broker is detected the process
launch switches to the compat-shim binary and forwards environment variables
with the PEAR_AGENT_RELAY_BROKER_* prefix; include tests for duplicate/replay
starts (calling start twice or replaying the same legacy detection) to ensure it
does not spawn extra processes and that the forwarded env is identical on
replay. Locate usages of parseBrokerInitCliFlags, BrokerManager.start, and the
compat-shim launch code in the broker startup tests and add mocks/stubs for the
child process spawn/exec to capture binary path and env, then assert the
expected behavior for legacy vs. modern flags and for duplicate invocation.
In `@src/main/broker.ts`:
- Around line 341-403: The current compat shim (brokerBinaryCompatShimSource /
ensureBrokerBinaryCompatShim) assumes a system "node" binary; fix by bundling a
JS launcher plus platform wrappers that invoke the app's Node (process.execPath)
instead of "node" or a shebang. Concretely: split the shim into a JS file
(agent-relay-broker-compat.js) containing the existing launcher logic but
without a shebang, then change ensureBrokerBinaryCompatShim to write (1) a POSIX
shell wrapper "agent-relay-broker-compat" that execs the quoted process.execPath
with the JS file (e.g. exec "<process.execPath>" "$0.js" "$@"), and (2) a
Windows CMD wrapper "agent-relay-broker-compat.cmd" that calls the quoted
process.execPath with the JS file and %*; ensure brokerBinaryCompatShimSource is
used for the JS payload (no shebang) and that all wrappers pass arguments
through and preserve env/cwd/stdio behavior.
- Around line 323-337: The catch block in the inspectBrokerInitCliFlags function
returns optimistic defaults with all flags set to true when the execFileSync
call fails, which bypasses compatibility checks and can cause issues with legacy
binaries. Change the error handling to return conservative defaults where all
flags (supportsInstanceName, supportsName, supportsWorkspaceKey) are set to
false instead of true, ensuring compatibility paths are properly exercised when
the CLI inspection fails.
In `@src/main/ipc-handlers.ts`:
- Around line 269-273: Normalize whitespace-only cwd to undefined before
validation and forwarding: after computing personaCwd from cwd (symbol:
personaCwd derived from cwd), convert empty-string results to undefined (e.g.,
personaCwd = cwd?.trim() || undefined) so the truthy check and
isDirectory(personaCwd) validation behave correctly; then call
brokerManager.listPersonas(projectId, personaCwd) with that normalized value.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c32b4e70-2d8b-4fc1-b665-22773d770458
📒 Files selected for processing (7)
electron-builder.ymlsrc/main/broker.test.tssrc/main/broker.tssrc/main/ipc-handlers.tssrc/preload/index.tssrc/renderer/src/lib/spawn-agent.tssrc/shared/types/ipc.ts
| describe('parseBrokerInitCliFlags', () => { | ||
| it('detects current broker init flags', () => { | ||
| const flags = parseBrokerInitCliFlags(` | ||
| Usage: agent-relay-broker init [OPTIONS] | ||
|
|
||
| Options: | ||
| --name <NAME> Legacy broker instance name flag. Prefer --instance-name [default: ] | ||
| --instance-name <INSTANCE_NAME> Stable broker instance name within the Relay workspace | ||
| --workspace-key <WORKSPACE_KEY> Join an existing Relay workspace instead of creating a fresh one | ||
| --channels <CHANNELS> [default: general] | ||
| `) | ||
|
|
||
| expect(flags).toEqual({ | ||
| supportsInstanceName: true, | ||
| supportsName: true, | ||
| supportsWorkspaceKey: true | ||
| }) | ||
| }) | ||
|
|
||
| it('detects legacy broker init flags', () => { | ||
| const flags = parseBrokerInitCliFlags(` | ||
| Usage: agent-relay-broker init [OPTIONS] | ||
|
|
||
| Options: | ||
| --name <NAME> [default: ] | ||
| --channels <CHANNELS> [default: general] | ||
| --persist Enable persistence | ||
| `) | ||
|
|
||
| expect(flags).toEqual({ | ||
| supportsInstanceName: false, | ||
| supportsName: true, | ||
| supportsWorkspaceKey: false | ||
| }) | ||
| }) | ||
| }) |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win
Add startup regression coverage for the compat-shim execution path.
These tests validate flag parsing, but they don’t verify BrokerManager.start actually switches to shim binary and forwards PEAR_AGENT_RELAY_BROKER_* env for legacy brokers (including replay/duplicate start behavior).
Based on learnings and coding guidelines: add regression tests when touching broker start, and include duplicate/replay cases, not just happy path.
🤖 Prompt for 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.
In `@src/main/broker.test.ts` around lines 410 - 445, Add regression tests that
exercise the compat-shim execution path by invoking BrokerManager.start (or the
test harness that triggers it) and asserting that when a legacy broker is
detected the process launch switches to the compat-shim binary and forwards
environment variables with the PEAR_AGENT_RELAY_BROKER_* prefix; include tests
for duplicate/replay starts (calling start twice or replaying the same legacy
detection) to ensure it does not spawn extra processes and that the forwarded
env is identical on replay. Locate usages of parseBrokerInitCliFlags,
BrokerManager.start, and the compat-shim launch code in the broker startup tests
and add mocks/stubs for the child process spawn/exec to capture binary path and
env, then assert the expected behavior for legacy vs. modern flags and for
duplicate invocation.
Sources: Coding guidelines, Learnings
| function inspectBrokerInitCliFlags(binaryPath: string): BrokerInitCliFlags { | ||
| try { | ||
| const help = execFileSync(binaryPath, ['init', '--help'], { | ||
| encoding: 'utf8', | ||
| timeout: 2_000, | ||
| stdio: ['ignore', 'pipe', 'pipe'] | ||
| }) | ||
| return parseBrokerInitCliFlags(help) | ||
| } catch (err) { | ||
| console.warn(`[broker] Failed to inspect broker init CLI for ${binaryPath}:`, err) | ||
| return { | ||
| supportsInstanceName: true, | ||
| supportsName: true, | ||
| supportsWorkspaceKey: true | ||
| } |
There was a problem hiding this comment.
Avoid optimistic defaults when broker CLI inspection fails.
If init --help probing fails, returning all flags as supported skips the compatibility path and can break startup on legacy binaries with unclear downstream errors.
Suggested hardening
function inspectBrokerInitCliFlags(binaryPath: string): BrokerInitCliFlags {
try {
@@
return parseBrokerInitCliFlags(help)
} catch (err) {
console.warn(`[broker] Failed to inspect broker init CLI for ${binaryPath}:`, err)
- return {
- supportsInstanceName: true,
- supportsName: true,
- supportsWorkspaceKey: true
- }
+ // Conservative fallback: prefer compatibility behavior over false capability claims.
+ return {
+ supportsInstanceName: false,
+ supportsName: true,
+ supportsWorkspaceKey: false
+ }
}
}🤖 Prompt for 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.
In `@src/main/broker.ts` around lines 323 - 337, The catch block in the
inspectBrokerInitCliFlags function returns optimistic defaults with all flags
set to true when the execFileSync call fails, which bypasses compatibility
checks and can cause issues with legacy binaries. Change the error handling to
return conservative defaults where all flags (supportsInstanceName,
supportsName, supportsWorkspaceKey) are set to false instead of true, ensuring
compatibility paths are properly exercised when the CLI inspection fails.
| function brokerBinaryCompatShimSource(): string { | ||
| return `#!/usr/bin/env node | ||
| const { spawn } = require('node:child_process') | ||
|
|
||
| const realBinary = process.env.PEAR_AGENT_RELAY_BROKER_BINARY | ||
| if (!realBinary) { | ||
| console.error('[pear-broker-compat] PEAR_AGENT_RELAY_BROKER_BINARY is required') | ||
| process.exit(127) | ||
| } | ||
|
|
||
| const supportsInstanceName = process.env.PEAR_AGENT_RELAY_BROKER_SUPPORTS_INSTANCE_NAME === '1' | ||
| const supportsWorkspaceKey = process.env.PEAR_AGENT_RELAY_BROKER_SUPPORTS_WORKSPACE_KEY === '1' | ||
| const inputArgs = process.argv.slice(2) | ||
| const outputArgs = [] | ||
|
|
||
| for (let index = 0; index < inputArgs.length; index += 1) { | ||
| const arg = inputArgs[index] | ||
| if (!supportsInstanceName && arg === '--instance-name') { | ||
| outputArgs.push('--name') | ||
| if (index + 1 < inputArgs.length) outputArgs.push(inputArgs[++index]) | ||
| continue | ||
| } | ||
| if (!supportsInstanceName && arg.startsWith('--instance-name=')) { | ||
| outputArgs.push('--name=' + arg.slice('--instance-name='.length)) | ||
| continue | ||
| } | ||
| if (!supportsWorkspaceKey && arg === '--workspace-key') { | ||
| index += 1 | ||
| continue | ||
| } | ||
| if (!supportsWorkspaceKey && arg.startsWith('--workspace-key=')) { | ||
| continue | ||
| } | ||
| outputArgs.push(arg) | ||
| } | ||
|
|
||
| const child = spawn(realBinary, outputArgs, { | ||
| cwd: process.cwd(), | ||
| env: process.env, | ||
| stdio: 'inherit' | ||
| }) | ||
|
|
||
| child.on('error', (error) => { | ||
| console.error('[pear-broker-compat] failed to launch broker:', error instanceof Error ? error.message : String(error)) | ||
| process.exit(127) | ||
| }) | ||
|
|
||
| child.on('exit', (code, signal) => { | ||
| if (signal) { | ||
| process.kill(process.pid, signal) | ||
| return | ||
| } | ||
| process.exit(code ?? 0) | ||
| }) | ||
| ` | ||
| } | ||
|
|
||
| function ensureBrokerBinaryCompatShim(): string { | ||
| const shimDir = join(app.getPath('userData'), 'broker-compat') | ||
| const shimPath = join(shimDir, process.platform === 'win32' ? 'agent-relay-broker-compat.cmd' : 'agent-relay-broker-compat') | ||
| const source = process.platform === 'win32' | ||
| ? `@echo off\r\nnode "%~dp0agent-relay-broker-compat.js" %*\r\n` | ||
| : brokerBinaryCompatShimSource() |
There was a problem hiding this comment.
Compat shim requires a system node binary, which can fail in packaged installs.
Both POSIX (#!/usr/bin/env node) and Windows (node ...) shim launch paths depend on external Node availability. On end-user machines without Node, broker startup can fail before the real binary runs.
Also applies to: 410-417
🤖 Prompt for 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.
In `@src/main/broker.ts` around lines 341 - 403, The current compat shim
(brokerBinaryCompatShimSource / ensureBrokerBinaryCompatShim) assumes a system
"node" binary; fix by bundling a JS launcher plus platform wrappers that invoke
the app's Node (process.execPath) instead of "node" or a shebang. Concretely:
split the shim into a JS file (agent-relay-broker-compat.js) containing the
existing launcher logic but without a shebang, then change
ensureBrokerBinaryCompatShim to write (1) a POSIX shell wrapper
"agent-relay-broker-compat" that execs the quoted process.execPath with the JS
file (e.g. exec "<process.execPath>" "$0.js" "$@"), and (2) a Windows CMD
wrapper "agent-relay-broker-compat.cmd" that calls the quoted process.execPath
with the JS file and %*; ensure brokerBinaryCompatShimSource is used for the JS
payload (no shebang) and that all wrappers pass arguments through and preserve
env/cwd/stdio behavior.
|
Implemented the current, validated review fixes in the checkout:
Validation run:
Addressed comments
I did not verify remote GitHub CI status, macOS |
|
The checked-out PR artifacts identify this as PR #166 ( I changed ChatView.tsx to share a stable room key between the virtualized list and its React Validation run:
GitHub API showed the head SHA’s checks/statuses were successful, but the PR API reports PR #166 is already merged/closed, so I am not printing Addressed comments
|
|
✅ pr-reviewer applied fixes — committed and pushed Implemented fixes for the valid PR findings. Changed src/main/broker.ts so failed broker CLI inspection no longer assumes modern flag support, and changed the compat shim at src/main/broker.ts to write a JS launcher plus platform wrapper using Added broker-start regression coverage in src/main/broker.test.ts, including modern direct launch, legacy compat-shim launch, duplicate reused start behavior, failed inspection fallback, and an executed POSIX shim fixture. Verification run: Addressed comments
|
|
No additional code edits were needed in this checkout. I validated the PR changes and the existing fixes against the current files. Validation run:
GitHub currently reports PR #164 as merged. I’m not printing Addressed comments
|
|
Implemented the valid fixes I could reproduce in the current checkout. Changed Validation passed:
GitHub reports PR #164 is already closed and merged, so I’m not ending with Addressed comments
|
|
Implemented the remaining validated PR fixes and kept the changes scoped to broker compatibility and its tests. Changed Validation passed:
Review comments checked against the public PR page: #164 Addressed comments
PR #164 appears merged on GitHub, so there is no open PR awaiting human action; I am not printing |
|
Implemented the validated fixes in the current checkout. Changed src/main/broker.ts so failed broker CLI flag inspection falls back to the legacy-compatible shim path instead of assuming modern flags. Updated the generated broker compat shim at src/main/broker.ts to write a JS payload plus POSIX/Windows wrappers that invoke Added focused regressions in src/main/broker.test.ts for modern direct launch, legacy shim launch, failed-inspection fallback, duplicate start coalescing, and executing the generated POSIX shim against a throwaway broker fixture. Validation passed:
GitHub API reports PR #164 is already Addressed comments
|
|
Implemented the validated fixes in the current checkout. Changed src/main/broker.ts so failed broker CLI flag inspection falls back to the legacy-compatible shim path instead of assuming modern flags. Updated the generated broker compat shim at src/main/broker.ts to write a JS payload plus POSIX/Windows wrappers that invoke Added focused regressions in src/main/broker.test.ts for modern direct launch, legacy shim launch, failed-inspection fallback, duplicate start coalescing, and executing the generated POSIX shim against a throwaway broker fixture. Validation passed:
GitHub API reports PR #164 is already Addressed comments
|
|
Implemented the remaining validated fixes in the current checkout. Changed src/main/broker.ts so failed broker CLI probing falls back to legacy-compatible shim flags instead of assuming modern support. Changed the broker compat shim to write a JS payload plus POSIX/Windows wrappers that invoke Validated:
GitHub’s PR page shows #164 is already merged, so I’m not printing Addressed comments
|
|
Implemented the validated fixes in the checkout. Changed src/main/broker.ts so broker CLI help inspection reads stdout and stderr, and failed probing falls back to the legacy-compatible shim path instead of assuming modern flags. Changed shim generation at src/main/broker.ts to use Added regression coverage in src/main/broker.test.ts, src/main/broker.test.ts, src/main/broker.test.ts, src/main/broker.test.ts, and src/main/broker.test.ts, including executing the generated POSIX shim against a throwaway broker fixture. Validation passed:
GitHub reports PR #164 is already closed and merged, so I am not ending with Addressed comments
|
Summary
--namebinaries when safeapp.asarTests
npx vitest run src/main/broker.test.tsnpx tsc --noEmit -p tsconfig.jsonnpm run build