Phase 1: Embed OSIS in main app (architecture alignment) #34
Labels
No labels
meeting-notes
meeting-sensitive
meeting-transcript
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coopcloud_code/home#34
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?
Goal
Switch the marketplace backend from the legacy
OsisClient→ externalhero_osiscontainer pattern to the freezone-style embeddedOsisMarketplacedomain pattern. One binary, OSIS compiled in, data on disk.Why
The marketplace already has a generated
OsisMarketplacedomain (24 typed DBs, 13 service handlers, Rhai bindings) — but the main web app ignores it. Instead, 17 hand-writtenimpl_hero/files call an externalhero_osiscontainer over HTTP viaOsisClient. This adds:Freezone proves the embedded pattern works in production: single binary, OSIS as library, files on disk, 2 active-active replicas on GlusterFS.
Tasks
OsisMarketplacein main app —main.rs: createOsisMarketplace::new("./data", 1), callinit_handlers(), addArc<OsisMarketplace>toAppStateimpl_local/service implementations — replace 17impl_hero/files with local domain calls (no HTTP, no OTOML conversion)ServiceProvider::local(domain)— new constructor that creates local trait implementations wrapping the embedded domainseed_marketplace.rhai(844 lines) against embedded domain at startup or via CLIhero_osisandhero_ledgercontainers from docker-composeimpl_hero/,OsisClient,osis_client.rsReference
znzfreezone_backend/src/main.rs—OsisFreezone::new(&data_dir, 1)projectmycelium_marketplace/src/generated/src/marketplace/osis_server_generated.rsprojectmycelium_marketplace/src/generated/src/marketplace/rpc.rsprojectmycelium_marketplace/src/bin/rpc_server.rsAcceptance criteria
./data/(Docker volume)impl_hero/andOsisClientremovedAPP_BACKENDunset)Signed-off-by: mik-tf
Phase 1 Complete — Embedded OSIS in main app
Commit:
mycelium_code/projectmycelium_marketplace_backend@6a73bf3What changed
hero_osiscontainer with embeddedOsisMarketplacedomain (freezone pattern)impl_local/service implementations wrapping domain directly (no HTTP, no JSON-RPC)local(embedded OSIS, files on disk at./data/marketplace)impl_hero/files,OsisClient,NearRpcClientpublic_keyfield to User schemaTest results (zero regressions vs fixtures baseline)
Tasks completed
Remaining for Phase 1
— mik-tf
Follow-up: hero_ledger integration
The embedded OSIS backend replaces hero_osis but hero_ledger (https://forge.ourworld.tf/lhumina_code/hero_ledger) integration needs to be wired properly.
Current state: Wallet uses in-memory off-chain balances (no blockchain). Works for all current flows.
Target: Connect to hero_ledger via
heroledger_sdk::HeroLedgerClientfor:spore().ft_balance_of())Not a regression — the old
NearRpcClientwas hand-written and only queried balances (never used for actual transactions). The proper SDK integration is new work.Tracked for Phase 6 (#39) under feature flags (
near_enabledin branding.toml).— mik-tf
Completed. Embedded OSIS in main app, deleted impl_hero/ (17 files), OsisClient, NearRpcClient. All tests pass. Part of v2.0.0 release.
— mik-tf