Contexts and their management #21
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#21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
So, we have contexts. These are basically buckets we organize our digital life in, like namespaces. These contexts allow separation in our data, and allow us to manage where certain data is stored (which path) and even in the future access control over that data. Anyways: these contexts should live and be managed somewhere. There is tooling in hero_osis for having a root context and a data model in schemas. see specifically: lhumina_code/hero_rpc#13 (comment)
anyways, per this, we actually also want our context managed in hero osis. the root admin context (context 0) should have a list of contexts in the hero. it should have the knowledge associated with that context, like description, tags, and db path (which is the path that osis will use for the db behind osis.) Additionally, we need to create an issue in hero_proxy so that it can use hero_osis to list contexts etc, and hero_proxy should have its own state for acls associated with each context and do access control. See how hero proxy keeps state and enhance to allow for this and create an issue on the repo to specify.
Implementation — schema side
Extended the
Contextrootobject inschemas/base/core.oschemawith the three fields called out in the issue:All three are optional so existing stored contexts remain valid.
Regenerated types via
cargo build -p hero_osis_server:crates/hero_osis_server/src/base/{types_generated.rs, core/types_generated.rs, types_wasm_generated.rs, core/types_wasm_generated.rs}crates/hero_osis_sdk/src/base/types.rs(Sidenote: the oschema generator writes the flat
src/base/types_generated.rsbut the module tree still loadssrc/base/core/types_generated.rs— I copied the regenerated output into thecore/location to keep them in sync. That mismatch between the generator's output layout and thecore/directory structure is a separate tech-debt item worth tracking.)Full workspace
cargo checkis clean.Since
Contextis arootobjectin thebasedomain, CRUD is already exposed over thebase.context_*RPC methods — the admin context (X-Hero-Context: 0) is the canonical holder of the list; no new endpoints were needed.hero_proxy side
Filed companion issue: lhumina_code/hero_proxy#21
That issue covers:
base.context_listfrom hero_osisIt also flags that per the architecture comment in hero_rpc#13, hero_router is the sole TCP entry point now, so the design step should confirm whether this lives in hero_proxy or hero_router.
What's NOT done in this change