fix(cli): repair bundled resource monitor permissions - #5448
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
ApprovabilityVerdict: Approved 20fe622 This is a narrow, self-contained bug fix that repairs bundled binaries lacking execute permissions. The change only affects bundled candidates (not user overrides), handles chmod failures gracefully, and includes a test covering the new behavior. You can customize Macroscope's approvability policy. Learn more. |
Problem
On Linux, the Resource monitor diagnostics do not load. The Settings page reports Native unavailable and shows zeroed CPU, memory, process, and throughput values.
The native monitor binary is present at
dist/resource-monitor/linux-x64/t3-resource-monitor, but the npm package publishes it with mode0644instead of an executable mode. T3 detects the bundled binary, rejects it as non-executable, and therefore never starts the native telemetry process.This is not a CPU architecture, shared-library, or
noexecmount problem: the affected binary is a valid Linux x64 ELF and its required libraries are available.Fix
This lets the diagnostics sidecar start even when npm packaging removes executable permissions from native files.
Regression coverage
One focused test creates a bundled monitor fixture with mode
0644, verifies resolution repairs it, and verifies it becomes executable. Existing coverage continues to ensure a non-executable explicit override is rejected.Verification
vp test run apps/server/src/resourceTelemetry/ResourceMonitorBinary.test.ts— 6 passedReproduction
t3@0.0.31and the current nightly package both publish the Linux monitor without execute bits. After this change, retrying the monitor or restarting the server should populate the Resource monitor instead of showing Native unavailable.