rpc2_adapter: lowercase service-method wire names (#90 Phase 3a gap) #100
No reviewers
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_rpc!100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-90-adapter-lowercase-methods"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adapter bug surfaced while migrating hero_logic in #90 Phase 3a.
OsisAppRpcHandler::openrpc_specadvertises service methods with PascalCase service prefixes (LogicService.example_upsert) for human discoverability, but every existing wire client — OSIS SDK, JS SDK, hero_logic's own seed code — sends lowercase. That matches the generated dispatch arms inosis_server_generated.rs, which are all lowercase.OServer lowercased the inbound request before service-method dispatch, so both PascalCase and lowercase callers worked. The rpc2_adapter was registering the spec's PascalCase name verbatim with
RpcModule::register_method(case-sensitive), so any lowercase request hit-32601 Method not found.Fix:
name.to_lowercase()as the wire name inregister_methods.handle_service_call_with_context(matches the codegen'smatcharms exactly).register_method.service_methods_register_lowercasedpins the registered form./openrpc.json+rpc.discoverkeep returning PascalCase for discovery — only the JSON-RPC wire path is lowercased. Same effective contract OServer had.