fix(osis): JSON-native CRUD RPC + axum 0.8 path syntax #48
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_osis!48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/osis-json-rpc-axum08"
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?
Two fixes that combine to make every OSIS domain CRUD client-friendly:
Regenerate every domain
osis_server_generated.rsagainst hero_rpc 01f0030 — new generator emitsserde_json::to_stringfor*_rpc_new/*_rpc_get/*_rpc_listinstead of OTOML text and newline-joined SID strings. Clients now get reallist[str]from*_list()and realdictfrom*_get(sid)— no client-side parsing.Fix axum 0.8 router path syntax in
hero_osis_ui/src/lib.rs—/css/:fileand/js/:filewere old (axum 0.7) param syntax which panics at startup under axum 0.8 ("Path segments must not start with:. For capture groups, use{capture}"). Migrated to{file}. Without this fix the orchestrator panics on every per-domain socket bind.Verified end-to-end:
client.opportunity_list()→["sid1",...]andclient.opportunity_get(sid)→ typed dict.Two fixes that combine to make every OSIS domain's CRUD API client-friendly: 1. Regenerate every domain's `osis_server_generated.rs` against hero_rpc 01f0030 — the new generator emits `serde_json::to_string` for `*_rpc_new`, `*_rpc_get`, and `*_rpc_list` instead of OTOML text and newline-joined SID strings. Effect: clients now get real Python `list[str]` from `*_list()` and real `dict` from `*_get(sid)`, no client-side parsing required. 2. Fix `hero_osis_ui/src/lib.rs` axum router — `/css/:file` and `/js/:file` were old (axum 0.7) param syntax, which panics at startup under axum 0.8 ("Path segments must not start with `:`. For capture groups, use `{capture}`"). Migrated to `/css/{file}` and `/js/{file}`. The askama 0.16 / rust 1.95 upgrade incbfe00apulled in axum 0.8 transitively but missed this site. Without (2), the orchestrator panicked on every per-domain socket bind so the JSON-native RPC change in (1) was unobservable. After both, `client.opportunity_list()` returns `["sid1", ...]` and `client.opportunity_get(sid)` returns a typed dict. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.