Skip to content

fix(cli): repair bundled resource monitor permissions - #5448

Open
gadzbi123 wants to merge 2 commits into
pingdotgg:mainfrom
gadzbi123:fix/resource-monitor-execute-bit
Open

fix(cli): repair bundled resource monitor permissions#5448
gadzbi123 wants to merge 2 commits into
pingdotgg:mainfrom
gadzbi123:fix/resource-monitor-execute-bit

Conversation

@gadzbi123

@gadzbi123 gadzbi123 commented Aug 5, 2026

Copy link
Copy Markdown

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 mode 0644 instead 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 noexec mount problem: the affected binary is a valid Linux x64 ELF and its required libraries are available.

Fix

  • distinguish bundled monitor candidates from explicitly configured override paths
  • when a bundled POSIX monitor lacks execute bits, add them before resolving it
  • retain the existing error for a monitor that still cannot be made executable
  • do not mutate explicit user-supplied monitor override paths

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 passed

Reproduction

t3@0.0.31 and 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.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 445eadf3-94ea-4a55-9498-cfb69423d885

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:S 10-29 changed lines (additions + deletions). labels Aug 5, 2026
@macroscopeapp

macroscopeapp Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S 10-29 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant