Inconsistent per-domain RPC coverage — context.* and task.* creation methods missing, contact.* works #24

Open
opened 2026-04-16 14:21:38 +00:00 by rawdaGastan · 2 comments
Member

Problem

While exercising hero_os UI create flows on a fresh local install (contexts, tasks, contacts), the backend returns RPC error [-32601]: Method not found for some domains but not others. This blocks core UX paths: users cannot create contexts or tasks at all.

Evidence from local repro

UI action RPC method UI calls Backend response
Contexts → "+ New Context" → Create Context context.register Method not found
Projects → Tasks → Add Task → Create Task task.create (or similar) Failed to create task: RPC error [-32601]: Method not found
Contacts → "+ New Contact" → Create Contact contact.create succeeds, SID 0001 assigned

Build: make installdev on each crate, started via hero_proc (hero_osis, hero_router, hero_os). Tested via hero_browser_mcp headed Chrome against http://127.0.0.1:9988/hero_os/ui/.

  • #21 "Contexts and their management" — acknowledges contexts as an unresolved design area.
  • #10 "Missing domain registrations: communication, media, job" — different slice of the same meta-problem (entire domains missing vs. methods-within-a-domain missing).
  • hero_os #61 / #45 report the UI symptom for tasks specifically but the root cause is here.

Ask

Track the missing RPC surface per domain in one place. A mapping of "what the UI calls" → "what hero_osis exposes" would let us fix these together rather than chasing one -32601 at a time. Confirmed gaps on this build:

  • Contexts: context.register / context.create / context.list / context.delete
  • Projects/Tasks: task.create, task.list, task.update, task.delete
  • (Plus likely the same story for sprints, stories, calendar events, themes — untested end-to-end yet.)
### Problem While exercising hero_os UI create flows on a fresh local install (contexts, tasks, contacts), the backend returns `RPC error [-32601]: Method not found` for some domains but not others. This blocks core UX paths: users cannot create contexts or tasks at all. ### Evidence from local repro | UI action | RPC method UI calls | Backend response | |---|---|---| | Contexts → "+ New Context" → Create Context | `context.register` | ❌ `Method not found` | | Projects → Tasks → Add Task → Create Task | `task.create` (or similar) | ❌ `Failed to create task: RPC error [-32601]: Method not found` | | Contacts → "+ New Contact" → Create Contact | `contact.create` | ✅ succeeds, SID 0001 assigned | Build: `make installdev` on each crate, started via `hero_proc` (hero_osis, hero_router, hero_os). Tested via hero_browser_mcp headed Chrome against `http://127.0.0.1:9988/hero_os/ui/`. ### Related existing issues - #21 "Contexts and their management" — acknowledges contexts as an unresolved design area. - #10 "Missing domain registrations: communication, media, job" — different slice of the same meta-problem (entire domains missing vs. methods-within-a-domain missing). - hero_os #61 / #45 report the UI symptom for tasks specifically but the root cause is here. ### Ask Track the missing RPC surface per domain in one place. A mapping of "what the UI calls" → "what hero_osis exposes" would let us fix these together rather than chasing one `-32601` at a time. Confirmed gaps on this build: - **Contexts:** `context.register` / `context.create` / `context.list` / `context.delete` - **Projects/Tasks:** `task.create`, `task.list`, `task.update`, `task.delete` - (Plus likely the same story for sprints, stories, calendar events, themes — untested end-to-end yet.)
Owner

Root cause pinned.

The hero_rpc generator (crates/generator/src/rust/rust_osis.rs:736-768) emits a fixed naming scheme for every OSIS-backed type:

{lowercase_typename}.new | .get | .set | .delete | .list | .find
+ per-service custom methods

Verified on development in hero_osis/crates/hero_osis_server/src/identity/server/osis_server_generated.rs:1928-1941:

"contact.new" => self.contact_rpc_new(...)
"contact.get" => self.contact_rpc_get(...)
"contact.set" => self.contact_rpc_set(...)

Base and projects domains match the same pattern. None of context.register, context.create, or task.create are registered anywhere — they return -32601 because the server never matched them.

Mapping

UI call Server has Match
contact.create contact.set
context.register context.set
task.create task.set

One thing to double-check in the repro

The issue says contact.create succeeds and returns SID 0001 — but per the mapping above, it should return -32601 just like the others. Likely explanations:

  • The Contacts form in the UI is actually calling contact.set under the hood (the hero_osis_ui dashboard does this at static/js/dashboard.js:1085: rpc(t.name.toLowerCase() + '.set', {data: payload})).
  • Or the hero_os UI has a special-cased contact path that the other two flows don't share.

Can you confirm by checking the DevTools network tab for the actual method name the Contacts form sends?

Short-term (unblock UX): Update hero_os UI callers for Contexts and Tasks to use .set with fresh SIDs (same pattern hero_osis_ui already uses). Local, low risk.

Long-term: Add REST-style alias support in the hero_rpc generator so .create/.update/.register work as aliases for .set. Filed as hero_rpc issue — will link here once open.

Root cause pinned. The hero_rpc generator (`crates/generator/src/rust/rust_osis.rs:736-768`) emits a fixed naming scheme for every OSIS-backed type: ``` {lowercase_typename}.new | .get | .set | .delete | .list | .find + per-service custom methods ``` Verified on `development` in `hero_osis/crates/hero_osis_server/src/identity/server/osis_server_generated.rs:1928-1941`: ``` "contact.new" => self.contact_rpc_new(...) "contact.get" => self.contact_rpc_get(...) "contact.set" => self.contact_rpc_set(...) ``` Base and projects domains match the same pattern. None of `context.register`, `context.create`, or `task.create` are registered anywhere — they return `-32601` because the server never matched them. ### Mapping | UI call | Server has | Match | |---|---|---| | `contact.create` | `contact.set` | ❌ | | `context.register` | `context.set` | ❌ | | `task.create` | `task.set` | ❌ | ### One thing to double-check in the repro The issue says `contact.create` succeeds and returns SID 0001 — but per the mapping above, it should return `-32601` just like the others. Likely explanations: - The Contacts form in the UI is actually calling `contact.set` under the hood (the `hero_osis_ui` dashboard does this at `static/js/dashboard.js:1085`: `rpc(t.name.toLowerCase() + '.set', {data: payload})`). - Or the `hero_os` UI has a special-cased contact path that the other two flows don't share. Can you confirm by checking the DevTools network tab for the actual method name the Contacts form sends? ### Recommended fixes **Short-term (unblock UX):** Update `hero_os` UI callers for Contexts and Tasks to use `.set` with fresh SIDs (same pattern `hero_osis_ui` already uses). Local, low risk. **Long-term:** Add REST-style alias support in the hero_rpc generator so `.create`/`.update`/`.register` work as aliases for `.set`. Filed as hero_rpc issue — will link here once open.
Owner

Long-term fix tracked at lhumina_code/hero_rpc#25 (generator: emit REST-style aliases).

Long-term fix tracked at https://forge.ourworld.tf/lhumina_code/hero_rpc/issues/25 (generator: emit REST-style aliases).
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_osis#24
No description provided.