Files
sand-boxer/workplans/SAND-WP-0010-cloud-adapters-and-billing.md
tegwick 15f031fd65 feat: cloud adapters E2B/Modal and billing export (SAND-WP-0010)
Add credentialed E2B and Modal extensions, burst routing fallback,
fin-hub meter export hook, BYOK docs, and 77 tests.
2026-06-24 12:50:19 +02:00

114 lines
2.5 KiB
Markdown

---
id: SAND-WP-0010
type: workplan
title: "Cloud adapters and billing export"
domain: infotech
repo: sand-boxer
status: finished
owner: codex
topic_slug: custodian
created: "2026-06-24"
updated: "2026-06-24"
state_hub_workstream_id: "a78ea9f1-d076-43a6-8798-36fc333edd25"
---
# Cloud adapters and billing export
Replace `ext.saas-stub` with real metered cloud backends (E2B, Modal) and wire
BYOK credential routing plus fin-hub billing export.
Gap analysis P5/P10: `history/2026-06-24-post-wp0007-intent-scope-gap-analysis.md`
Supersedes: SAND-WP-0006-T06
**Predecessor:** SAND-WP-0009 (TTL — finished)
**Follow-on:** SAND-WP-0011 (reachability + consumer profiles)
---
## Credential routing and BYOK
```task
id: SAND-WP-0010-T01
status: done
priority: high
state_hub_task_id: "5aeb6a17-dc5b-4e39-996c-f7f31c2659f4"
```
`src/sandboxer/extensions/credentials.py`; docs in `docs/payments.md` and
`docs/cloud-adapters.md`.
## ext.e2b adapter
```task
id: SAND-WP-0010-T02
status: done
priority: high
state_hub_task_id: "205bc70a-aaa6-4cd7-b0a5-11669490c150"
```
`ext.e2b`, `profile.e2b-burst`, mocked HTTP tests in `tests/test_e2b.py`.
## ext.modal adapter
```task
id: SAND-WP-0010-T03
status: done
priority: high
state_hub_task_id: "b9f104e1-e9d6-4324-b82a-8406be3006e5"
```
`ext.modal`, `profile.modal-gpu`, `tests/test_modal.py`.
## Routing and credits integration
```task
id: SAND-WP-0010-T04
status: done
priority: high
state_hub_task_id: "c11bdaf1-4c25-4c14-a566-0e28b0bd8b1d"
```
`profile.burst-sandbox` routes e2b → modal → stub; credential-aware resolver.
## fin-hub billing export
```task
id: SAND-WP-0010-T05
status: done
priority: medium
state_hub_task_id: "4eb1b0df-c6d7-4fb6-a7a4-e1455d2fac61"
```
`payments/billing_export.py`; hook on metered destroy; `tests/test_billing_export.py`.
## Docs and capability registry
```task
id: SAND-WP-0010-T06
status: done
priority: medium
state_hub_task_id: "d0aba132-b8fa-461b-b722-099868bf1770"
```
`docs/cloud-adapters.md`; registry A5/C5; routing/payments/extension-sdk updates.
## Tests and smoke
```task
id: SAND-WP-0010-T07
status: done
priority: high
state_hub_task_id: "3aebb3be-ae5e-4642-9710-9d80a1e8a582"
```
77 tests; `scripts/smoke-cloud-adapter.sh` (operator, credential-gated).
---
## Acceptance criteria
- E2B and Modal adapters provision/teardown via CLI with mocked CI
- BYOK documented; no secrets in repo or State Hub payloads
- `profile.burst-sandbox` routes to E2B when creds available
- fin-hub export hook callable when `SANDBOXER_FIN_HUB_URL` set
- SAND-WP-0006-T06 cancelled (superseded)