Context creation fails from Hero OS UI #35

Closed
opened 2026-03-18 16:03:05 +00:00 by mik-tf · 1 comment
Owner

Bug

Creating a new context from the Hero OS Contexts page fails with an error (red banner, no error message visible).

Steps to reproduce

  1. Go to herodev.gent04.grid.tf/hero_os_ui/
  2. Navigate to Contexts page
  3. Click "+ New Context"
  4. Fill in Display Name, Identifier, Description, Color
  5. Click "Create Context"
  6. Red error banner appears — context is not created

Expected

New context should be created, OSIS socket spawned, WebDAV directory created, context appears in list.

What works

Existing contexts (Geomind, Incubaid, Default, ThreeFold) work correctly — all scoped data (files, contacts, etc.) is accessible.

Technical context

Context creation involves:

  • hero_osis_server: context.register RPC call to dynamically spawn a new context socket
  • hero_foundry: WebDAV directory creation at ~/hero/var/hero_foundry/webdav/{context}/
  • hero_os_app: Context service calls context.register via base domain on root context

Need to check: is the RPC call failing? Is it a frontend JS error? Is the OSIS context.register handler broken?

Environment

  • herodev.gent04.grid.tf (herodev Docker tag)
  • All services running and healthy
## Bug Creating a new context from the Hero OS Contexts page fails with an error (red banner, no error message visible). ### Steps to reproduce 1. Go to herodev.gent04.grid.tf/hero_os_ui/ 2. Navigate to Contexts page 3. Click "+ New Context" 4. Fill in Display Name, Identifier, Description, Color 5. Click "Create Context" 6. Red error banner appears — context is not created ### Expected New context should be created, OSIS socket spawned, WebDAV directory created, context appears in list. ### What works Existing contexts (Geomind, Incubaid, Default, ThreeFold) work correctly — all scoped data (files, contacts, etc.) is accessible. ### Technical context Context creation involves: - hero_osis_server: `context.register` RPC call to dynamically spawn a new context socket - hero_foundry: WebDAV directory creation at `~/hero/var/hero_foundry/webdav/{context}/` - hero_os_app: Context service calls `context.register` via base domain on root context Need to check: is the RPC call failing? Is it a frontend JS error? Is the OSIS context.register handler broken? ### Environment - herodev.gent04.grid.tf (herodev Docker tag) - All services running and healthy
Author
Owner

Fixed and verified on herodev

Root cause: context.register was parsed as 2-part method (type=context, method=register) and routed to the context type handler in the base domain, which has no custom register method. The handle_context_method function in dispatch.rs existed but was never reached because the 2-part dispatch intercepted first.

Fix: Added context.register, context.delete, context.list to the built-in method check in dispatch_jsonrpc() (before 2-part parsing), routing them to handle_context_method() which handles lifecycle operations via the lifecycle channel.

Verification:

curl context.register {"name":"testctx123"}
→ {"status":"registered","context":"testctx123"}

Socket created: /root/hero/var/sockets/testctx123/hero_osis_server.sock ✅

Commits:

  • hero_rpc@222a6a3 on development (dispatch fix)
  • hero_osis@15c35db on development (Cargo.lock update)
## Fixed and verified on herodev **Root cause**: `context.register` was parsed as 2-part method (type=`context`, method=`register`) and routed to the `context` type handler in the base domain, which has no custom `register` method. The `handle_context_method` function in `dispatch.rs` existed but was never reached because the 2-part dispatch intercepted first. **Fix**: Added `context.register`, `context.delete`, `context.list` to the built-in method check in `dispatch_jsonrpc()` (before 2-part parsing), routing them to `handle_context_method()` which handles lifecycle operations via the lifecycle channel. **Verification**: ``` curl context.register {"name":"testctx123"} → {"status":"registered","context":"testctx123"} Socket created: /root/hero/var/sockets/testctx123/hero_osis_server.sock ✅ ``` Commits: - hero_rpc@222a6a3 on `development` (dispatch fix) - hero_osis@15c35db on `development` (Cargo.lock update)
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
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/home#35
No description provided.