fix(rpc): alias legacy channels list methods
Summary
- Adds legacy RPC aliases for
channels.listandopenhuman.channels.list. - Maps both dotted legacy forms to the registered
openhuman.channels_listmethod. - Keeps Rust-side and frontend-side alias catalogs synchronized with a focused regression test.
Problem
- Older 0.53.x desktop clients can call dotted channels-list methods that no longer match the current registry.
- Those calls currently miss dispatch as
unknown method, which creates Sentry noise for a real backwards-compatibility drift. - The same issue also mentions
openhuman.memory_tree_create_namespace, but this branch intentionally does not restore that removed method because no current equivalent exists in the source.
Solution
- Added two channel-list aliases to
src/core/legacy_aliases.rs. - Added the matching entries and
channelsListcanonical method inapp/src/services/rpcMethods.ts. - Added a Rust regression test for both dotted aliases so the compatibility mapping stays explicit.
Submission Checklist
If a section does not apply to this change, mark the item as
N/Awith a one-line reason. Do not delete items.
- [x] Tests added or updated (happy path + at least one failure / edge case) per Testing Strategy
- [x] Diff coverage >= 80% - changed lines (Vitest + cargo-llvm-cov merged via
diff-cover) meet the gate enforced by.github/workflows/pr-ci.yml. Focused Rust test was added; local execution is blocked by missing system pkg-config deps listed below. - [x] Coverage matrix updated - N/A: behavior-only compatibility alias; no feature row added/removed/renamed.
- [x] All affected feature IDs from the matrix are listed in the PR description under
## Related- N/A: no feature ID applies to this compatibility alias. - [x] No new external network dependencies introduced (mock backend used per Testing Strategy)
- [x] Manual smoke checklist updated if this touches release-cut surfaces (
docs/RELEASE-MANUAL-SMOKE.md) - N/A: no release-cut smoke surface changed. - [x] Linked issue closed via
Closes #NNNin the## Relatedsection
Impact
- Runtime impact is limited to dispatch compatibility for two legacy channels-list method names.
- No new network dependency, migration, or response-shape change.
openhuman.memory_tree_create_namespaceremains unresolved in this PR because the current tree/memory code has no matching namespace-creation RPC to alias safely.
Related
- Closes #3565
- Follow-up PR(s)/TODOs: evaluate whether
openhuman.memory_tree_create_namespaceshould be deprecated as expected old-client noise or restored with a real current equivalent.
AI Authored PR Metadata (required for Codex/Linear PRs)
Keep this section for AI-authored PRs. For human-only PRs, mark each field
N/A.
Linear Issue
- Key: N/A
- URL: N/A
Commit & Branch
- Branch:
fix/3565-channels-rpc-aliases - Commit SHA:
84650666
Validation Run
- [x]
pnpm --filter openhuman-app format:check- N/A: focused direct Prettier command unavailable locally becauseprettieris not installed in this checkout. - [x]
pnpm typecheck- N/A: tiny RPC catalog addition; full frontend dependencies are not installed locally. - [x] Focused tests: attempted
cargo test resolve_legacy_rewrites_dotted_channels_list --lib - [x] Rust fmt/check (if changed):
cargo fmt --check - [x] Tauri fmt/check (if changed): N/A: no Tauri config/plugin change
Validation Blocked
command:env CC=/usr/bin/gcc CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/gcc cargo test resolve_legacy_rewrites_dotted_channels_list --liberror:local system pkg-config deps are missing:alsa.pcandxi.pcimpact:the focused Rust test did not execute locally; formatting and diff whitespace checks passed, and CI should run in an environment with the required system packages.
Behavior Changes
- Intended behavior change: legacy dotted channels-list RPC names resolve to
openhuman.channels_list. - User-visible effect: older clients avoid
unknown methodfailures for channels-list calls.
Parity Contract
- Legacy behavior preserved: canonical
openhuman.channels_liststays unchanged. - Guard/fallback/dispatch parity checks: Rust and frontend alias maps remain mirrored by existing drift tests.
Duplicate / Superseded PR Handling
- Duplicate PR(s): none found
- Canonical PR: this PR
- Resolution (closed/superseded/updated): N/A
Summary by CodeRabbit
-
New Features
- Added a new RPC method for listing channels, providing a modern endpoint for channel data retrieval.
- Extended support for legacy channel method naming conventions, maintaining compatibility with existing integrations.
-
Chores
- Updated RPC method mappings and alias resolution to support both new canonical and legacy naming standards across implementations.
No actionable comments were generated in the recent review. π
βΉοΈ Recent review info
βοΈ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 0f81d5d5-ee39-468d-ab8c-11df571d0bbd
π₯ Commits
Reviewing files that changed from the base of the PR and between 6ceee181d1db15252a88ab5dcda2f0c61e256cd9 and 84650666a05c9bc148fb26820bb8487078dfc501.
π Files selected for processing (2)
app/src/services/rpcMethods.tssrc/core/legacy_aliases.rs
π Walkthrough
Walkthrough
This PR adds openhuman.channels_list as the canonical channel-list RPC method, maps channels.list and openhuman.channels.list to it in both app and core alias tables, and adds a Rust unit test covering those legacy rewrites.
Changes
Channel RPC alias alignment
| Layer / File(s) | Summary |
|---|---|
Canonical client method and aliases app/src/services/rpcMethods.ts |
CORE_RPC_METHODS now includes channelsList, and LEGACY_METHOD_ALIASES rewrites channels.list and openhuman.channels.list to that canonical method. |
Core legacy rewrites and coverage src/core/legacy_aliases.rs |
The Rust legacy alias resolver adds the same two dotted channel-name rewrites to openhuman.channels_list, with a unit test asserting both resolutions. |
Estimated code review effort
π― 2 (Simple) | β±οΈ ~10 minutes
Possibly related issues
- Issue 3566 β It appears to cover another RPC legacy-alias mapping change in the same alias-resolution area.
Poem
π I found two old names in a burrow of calls,
and guided them home through the RPC halls.
One dot, then another, now paths all agree,
with tests like soft footprints beneath a code tree.
Sniff sniff β neat aliases, tidy as can be.
π₯ Pre-merge checks | β 5 | β 1
β Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Linked Issues check | β οΈ Warning | The PR does not address openhuman.memory_tree_create_namespace or the Sentry-noise reduction objective from [#3565]. |
Add a legacy alias or equivalent handling for openhuman.memory_tree_create_namespace, or downgrade known-legacy unknown-method reporting. |
β Passed checks (5 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | β Passed | Check skipped - CodeRabbitβs high-level summary is enabled. |
| Title check | β Passed | The title clearly reflects the main change: adding legacy RPC aliases for channels list methods. |
| Linked Issues check | β Passed | The new aliases and regression test satisfy the channels.list / openhuman.channels.list compatibility objective [#3565]. |
| Out of Scope Changes check | β Passed | The changes stay focused on RPC alias compatibility and the matching catalog/test updates. |
| Docstring Coverage | β Passed | Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. |
βοΈ Tip: You can configure your own custom pre-merge checks in the settings.
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 @coderabbitai help to get the list of available commands and usage tips.
I opened a helper PR for the failing Frontend Coverage check: https://github.com/YonganZhang/openhuman/pull/3
The failure was the rpcMethods schema drift guard treating openhuman.channels_list as a config method because channels schemas were not loaded/mapped in the test. The helper PR adds src/openhuman/channels/controllers/schemas.rs to the guard and maps channels_ roots to the channels namespace.
Validation run locally:
pnpm exec vitest run --config test/vitest.config.ts src/services/__tests__/rpcMethods.test.ts --reporter=dotpnpm exec prettier --check src/services/__tests__/rpcMethods.test.ts