[cross-repo] ship Basilica sandboxes across backend + frontend#411
Open
machine-god-deus wants to merge 5 commits into
Open
Conversation
…s-across-backend--frontend--subtask-fix-sdk-doctest' into agent/issue-260-cross-repo-ship-basilica-sandboxes-across-backend--frontend
… basilica-validator os_process
…s-across-backend--frontend--subtask-fix-preexisting-validator-test' into agent/issue-260-cross-repo-ship-basilica-sandboxes-across-backend--frontend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /sandboxes,GET /sandboxes,GET /sandboxes/{id},DELETE /sandboxes/{id}) inbasilica-apiwithMultiClusterK8sClientfor dedicated sandbox-cluster routing (fail-hard, no main-cluster fallback)basilica-sandbox-operatorcrate: reconcilesBasilicaSandboxCRDs into Pod, Service, Secret, and NetworkPolicy on the sandbox cluster with PSSrestricted,RuntimeDefaultseccomp, hardcoded image allowlist,automountServiceAccountToken: false, and egress restrictions blocking RFC1918 + IMDSbasilica-exec-agentcrate: HTTP + WebSocket server on port 9999, validatesX-Exec-Secret(hashed comparison), executes commands, handles file ops, supports explicit R2 upload/downloadsandbox-routercrate: wildcard host routing fromsb-{id}.sandboxes.basilica.aito the correct sandbox service via field-selector lookups withsb-prefixCloudType::Sandboxto billing with migration (046_add_sandbox_cloud_type.sql), sandbox pricing config, and lifecycle hooks (TrackRental,FinalizeRental, heartbeat/status) insandbox_billing.rsorchestrator/k8s/sandbox/: Envoy Gateway route, image pre-pull DaemonSet, operator deployment/RBAC, router deployment, namespace bootstrap with ResourceQuota/LimitRange/PSS labels, and network policiesu-{user_id}with quota, limit range, and PSS enforcement in the sandbox API handlerscrates/integration-tests/exec_secret_hashand hash incoming header before comparisonsandbox_billing::track_sandbox_rentalsb-prefix to field selectorbasilica-apiandbasilica-autoscalerby disabling empty doctestsValidation
cargo testpasses all 353basilica-apitests, 123basilica-aggregatortests, and all provider-level tests (total across workspace)basilica-exec-agent,basilica-sandbox-operator, andbasilica-billing(too_many_arguments refactored)crates/integration-tests/tests/sandbox_k8s_integration.rs)X-Exec-Secretheader against storedexec_secret_hashtrack_sandbox_rentalcorrectly checks existing rental before insertRisks
sandbox_billing.rsis ~1096 lines, exceeding typical file size guidelines; may warrant splitting before production hardeningCloses one-covenant/basilica-backend#260