Skip to content

fix(rpc): register openhuman.system_info and add legacy alias (Sentry CORE-RUST-G0, closes #2871)#2877

Merged
M3gA-Mind merged 3 commits into
tinyhumansai:mainfrom
M3gA-Mind:fix/sentry-system-info-rpc-2871
May 28, 2026
Merged

fix(rpc): register openhuman.system_info and add legacy alias (Sentry CORE-RUST-G0, closes #2871)#2877
M3gA-Mind merged 3 commits into
tinyhumansai:mainfrom
M3gA-Mind:fix/sentry-system-info-rpc-2871

Conversation

@M3gA-Mind
Copy link
Copy Markdown
Contributor

Summary

Rebased and fixed version of #2872 by @graycyrus, plus one additional commit to make the 4 failing tests pass.

What changed from #2872:

  • Added fix(health): use empty-log RpcOutcome so system_info returns bare valuesingle_log wraps the outcome as {"result":…,"logs":[…]}, but the four tests (system_info_returns_non_empty_version, system_info_returns_known_os, system_info_returns_non_zero_pid, handle_system_info_returns_json_object) all access fields directly at the top level (json["version"], json["os"], json["pid"]). The tracing::debug! call already handles observability logging, so the redundant RPC log entry is dropped: RpcOutcome::new(info, vec![]) returns the bare SystemInfo JSON.
  • Merged current upstream/main to resolve the stale base.

All other changes are identical to #2872.

Closes #2872, closes #2871.


Original summary from @graycyrus:

  • Adds openhuman.health_system_info controller to the health domain, returning app version, OS, CPU architecture, and PID.
  • Adds legacy alias openhuman.system_infoopenhuman.health_system_info in src/core/legacy_aliases.rs and app/src/services/rpcMethods.ts.
  • Adds healthSystemInfo: 'openhuman.health_system_info' to CORE_RPC_METHODS.
  • Fixes Sentry CORE-RUST-G0.

Test plan

  • cargo test --lib openhuman::health — 19 passed, 0 failed (includes all 4 previously failing tests)
  • Drift guard frontend_legacy_aliases_match_server_alias_table satisfied
  • Drift guard frontend_core_rpc_methods_exist_in_core_schema_registry satisfied
  • cargo fmt --check clean

graycyrus and others added 3 commits May 29, 2026 03:19
… (Sentry CORE-RUST-G0, closes tinyhumansai#2871)

- Adds `openhuman.health_system_info` controller to the `health` domain, returning
  app version, OS, architecture, and PID via `std::env::consts` and `CARGO_PKG_VERSION`.
- Adds legacy alias `openhuman.system_info` → `openhuman.health_system_info` to both
  `src/core/legacy_aliases.rs` and `app/src/services/rpcMethods.ts` so older clients
  resolve without error.
- Adds `healthSystemInfo: 'openhuman.health_system_info'` to `CORE_RPC_METHODS`.
- Unit tests: `handle_system_info_returns_json_object` in `health/schemas.rs`;
  `system_info_returns_non_empty_version/os/pid` in `health/ops.rs`;
  `resolve_legacy_rewrites_system_info` in `legacy_aliases.rs`;
  targeted alias test in `rpcMethods.test.ts`.
single_log wraps the result as {"result":…,"logs":[…]}; the three
ops-layer tests and the schemas handler test all expect the SystemInfo
fields at the top level (json["version"], json["os"], json["pid"]).
The tracing::debug! call already records the request for observability,
so the redundant RPC log is dropped: switch to RpcOutcome::new(info, vec![]).
@M3gA-Mind M3gA-Mind requested a review from a team May 28, 2026 22:32
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@M3gA-Mind, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 41 minutes and 55 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bbf20054-7e5e-479c-ab58-88a29679f909

📥 Commits

Reviewing files that changed from the base of the PR and between 972e327 and 7c53f52.

📒 Files selected for processing (5)
  • app/src/services/__tests__/rpcMethods.test.ts
  • app/src/services/rpcMethods.ts
  • src/core/legacy_aliases.rs
  • src/openhuman/health/ops.rs
  • src/openhuman/health/schemas.rs

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

@M3gA-Mind M3gA-Mind merged commit 32dd0be into tinyhumansai:main May 28, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing RPC handler for openhuman.system_info method

2 participants