feat: Runtime::dump_network_stats() for unyt-on-ASR (Phase 2)#138
feat: Runtime::dump_network_stats() for unyt-on-ASR (Phase 2)#138zippy wants to merge 2 commits into
Conversation
Companion to unyt's unyt-admin-access-needs.md, phased to match it. unyt drives admin from its own in-process Rust commands and uses a per-window multi-network UX, so the ASR-side surface is small: - Phase 2 (now): a single add, Runtime::dump_network_stats(); keep list_apps() arg-less. No admin-over-IPC, no multi-app app_request, no client-js change. - Phase 3 (deferred, co-design): the controllable-boot cluster (late passphrase, pre-launch lair hook for hc-auth material, restart- keeping-lair, generate_agent_pub_key, export_agent_seed). Records why the earlier admin-IPC / trusted-multi-app-window drafts were dropped (bundled-binary trust model; pinning is the future Case-2 boundary, not app_id).
Public wrapper over AdminRequest::DumpNetworkStats returning the typed kitsune2_api::ApiTransportStats, so callers read transport_stats.backend directly rather than a stringified dump (what unyt's About dialog needs). Adds kitsune2_api as an explicit dependency, pinned to 0.4.1 — the version holochain 0.6.1 already resolves — so it unifies to one copy. Includes a test asserting the backend field comes back populated.
|
✔️ 23eb5d1...edc64a8 - Conventional commits check succeeded. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Adds one runtime primitive needed to run unyt on ASR's unified in-process plugin:
Runtime::dump_network_stats(). Stacked on #137 (direct app-call path).This is intentionally minimal — the entire ASR-side addition for unyt's "Phase 2" is this one method. There is no admin-over-IPC, no admin websocket, and no
@holochain/clientchange: unyt drives admin from its own in-process#[tauri::command]s callingruntime().<method>(), and multi-network is handled per-window using the existing direct app transport from #137.What's in it
Runtime::dump_network_stats() -> kitsune2_api::ApiTransportStats— returns the typed struct (consumers read.transport_stats.backend). Routed through the adminDumpNetworkStats→NetworkStatsDumpedpath because the app-API variant returns a narrowerTransportStats.docs/tauri-direct-admin-calls-plan.md.list_apps()stays arg-less; consumers filter client-side.Scope notes
admin_requestIPC command, denylist,holochain:admincapability) were dropped; admin stays plain in-process Rust calls.Test plan
cargo build/cargo testfor the runtime crate (no UI/GL needed).