## Summary
- Add provider dashboard URL reporting to `SandboxDetails`, including
Daytona dashboard links and a Sandbox tab provider link.
- Extend `SandboxDetails` with required provider-neutral public network
policy for egress and ingress allow/block rules.
- Populate local, Docker, and Daytona network policies from provider
details when Fabro can assert them, otherwise default to explicit
`unknown` policy.
- Update OpenAPI, Rust API replacements, generated TypeScript client
models, server/API tests, and the Sandbox tab `Network` panel.
## Notes
- This reports policy only; it does not probe live connectivity.
- The network model intentionally excludes ports, previews, IP
addresses, DNS, routes, Docker network IDs, and service discovery.
- Older persisted/API JSON still deserializes through the Rust serde
default for `network`.
## Verification
- `cargo build -p fabro-api`
- `cargo nextest run -p fabro-types -p fabro-api -p fabro-sandbox -p
fabro-server sandbox_details`
- `cargo test -p fabro-sandbox details --features docker,daytona`
- `cargo +nightly-2026-04-14 fmt --check --all`
- `cargo +nightly-2026-04-14 clippy --workspace --all-targets -- -D
warnings`
- `cd apps/fabro-web && bun test app/routes/run-sandbox.test.tsx`
- `cd apps/fabro-web && bun run typecheck`
- `cd apps/fabro-web && bun run build`
- `cd lib/packages/fabro-api-client && bun run typecheck`
- `git diff --check`
## Post-Deploy Monitoring & Validation
- Log queries/search terms: `Failed to inspect Docker container`,
`Daytona sandbox is not initialized`, `missing runtime metadata`, `GET
/api/v1/runs/*/sandbox`, `Sandbox unavailable`.
- Metrics/dashboards to watch: API 5xx/error rate for `GET
/api/v1/runs/{id}/sandbox`, frontend error reporting for the Sandbox
tab, and provider reconnect/inspect failures.
- Expected healthy signals: Sandbox tab loads with Overview, Resources,
Network, Labels, and Timestamps; Daytona sandboxes show provider links;
local/ambiguous network policy shows `Unknown`; Docker `network_mode =
none` shows `Blocked`.
- Failure signals and rollback trigger: sandbox details deserialization
errors, missing `network` crashes, sustained sandbox endpoint 5xx
increase, or blank Sandbox tab after deploy. Roll back this PR or hide
the Network panel if API/client shape issues appear.
- Validation window and owner: first 24 hours after deploy, release
owner/on-call.
## Compound Engineering
- Implemented with OpenAI Codex CLI on GPT-5.
5.7 KiB
Sandbox Network Details Implementation Plan
For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (
- [ ]) syntax for tracking.
Goal: Add required provider-neutral public network policy data to SandboxDetails and show it clearly on the Sandbox tab.
Architecture: Extend the shared fabro-types sandbox-details model with a required network object that separates egress and ingress policy. Populate it from provider inspection where available, default to explicit unknown policies when Fabro cannot assert the policy, and reuse the shared types through OpenAPI, Rust API generation, and the generated TypeScript client.
Tech Stack: Rust, serde, OpenAPI/progenitor, TypeScript Axios client, React, Bun tests, cargo nextest.
Summary
Add public-network policy reporting to SandboxDetails. The model reports only high-level public-network policy for egress and ingress; it does not include ports, previews, IP addresses, DNS, routes, Docker network IDs, or service discovery.
Key Changes
-
Add shared domain/API types in
fabro-typesand re-export them fromfabro-api:pub struct SandboxNetwork { pub egress: SandboxNetworkPolicy, pub ingress: SandboxNetworkPolicy, } pub struct SandboxNetworkPolicy { pub mode: SandboxNetworkPolicyMode, pub cidrs: Vec<String>, } #[serde(rename_all = "snake_case")] pub enum SandboxNetworkPolicyMode { Unknown, Open, Blocked, CidrAllowList, EssentialsOnly, } -
Add required
network: SandboxNetworktoSandboxDetails. -
Serialize
networkalways. -
Give
networka serde default of egress/ingressunknownso older persisted/API JSON can still deserialize. -
Update OpenAPI with required
networkand schemas for the new types. -
Add
fabro-apireplacement mappings for the new shared types. -
Regenerate the TypeScript API client after the OpenAPI/Rust type changes.
Provider Mapping
- Daytona:
network_block_all == truemaps egress toblocked.- Non-empty
network_allow_listmaps egress tocidr_allow_list, with comma-separated CIDRs trimmed. network_block_all == falseand no allow list maps egress tounknown, because current SDK fields do not distinguish full default access from Daytona tier-managed essentials-only behavior.- Ingress maps to
unknown.
- Docker:
- If
inspect.host_config.network_mode == "none", map egress and ingress toblocked. - Other Docker modes map to
unknown.
- If
- Local:
- Egress and ingress map to
unknown.
- Egress and ingress map to
Web UI
- Add a compact
Networkpanel to the Sandbox tab afterResources. - Show two primary rows:
EgressandIngress. - Use concise summaries:
UnknownOpenBlockedEssentials onlyCIDR allow list
- When a direction has
mode == "cidr_allow_list", add one extra row for that CIDR list, comma-separated and styled consistently with existing detail rows.
Implementation Tasks
- Add
SandboxNetwork,SandboxNetworkPolicy, andSandboxNetworkPolicyModetolib/crates/fabro-types/src/sandbox_details.rs. - Add constructors/default helpers for
unknown,open,blocked,allow_cidrs, andessentials_onlypolicies to keep provider mapping code readable. - Add
network: SandboxNetworkto everySandboxDetailsconstruction site. - Update local sandbox details to return
SandboxNetwork::unknown(). - Update Docker sandbox details to inspect
host_config.network_modeand emit blocked policy only for"none", otherwise unknown. - Update Daytona sandbox details to derive egress policy from
network_block_allandnetwork_allow_list, and ingress as unknown. - Update OpenAPI schemas and
fabro-api/build.rsreplacements for the new shared types. - Run
cargo build -p fabro-apiso Rust API generation validates the schema. - Regenerate the TypeScript client with
cd lib/packages/fabro-api-client && bun run generate. - Add the Sandbox tab
Networkpanel and formatting helpers inapps/fabro-web/app/routes/run-sandbox.tsx. - Update tests and snapshots affected by the now-required
networkfield.
Test Plan
-
Update
fabro-typesserde tests to provenetworkserializes, defaults to unknown when absent, and supportsopen,blocked,cidr_allow_list, andessentials_only. -
Update
fabro-apiround-trip/type-identity tests for the new shared types and OpenAPI JSON shape. -
Add
fabro-sandboxmapper tests for Daytona block-all, Daytona CIDR allow list, Daytona ambiguous default, local unknown, Dockernetwork_mode = none, and Docker non-noneunknown. -
Update server sandbox-details tests for the required
networkfield. -
Update
apps/fabro-webSandbox tab tests to expect theNetworkpanel and verify unknown, blocked, essentials-only, and CIDR allow-list display. -
Run:
cargo nextest run -p fabro-types -p fabro-api -p fabro-sandbox -p fabro-server sandbox_details cd apps/fabro-web && bun test app/routes/run-sandbox.test.tsx cd apps/fabro-web && bun run typecheck
Assumptions
- This is policy/reporting data, not live connectivity probing.
- No IPs, listening services, port mappings, preview URLs, DNS, routes, or Docker network IDs are added to
SandboxDetails. - The
essentials_onlymode is included in the API now, but v1 only emits it when Fabro can assert it from provider data. - Current Daytona SDK fields do not distinguish full default access from org-tier essentials-only access.
- Daytona behavior follows the current docs:
networkBlockAlltakes precedence,networkAllowListis IPv4 CIDR-only, and essential services are Daytona-managed.