Skip to content

An open-source, faster Devin alternative

TypeScript

working mouts

Brian Reardon7e97455ce4d3
diff --git a/cloudflare-workers/api-edge/wrangler.toml b/cloudflare-workers/api-edge/wrangler.toml
index e6235866..21f86b03 100644
--- a/cloudflare-workers/api-edge/wrangler.toml
+++ b/cloudflare-workers/api-edge/wrangler.toml
@@ -32,6 +32,11 @@ account_id = "1241f114453e32d292197e3fb36210b2"
# ordered 2026-05-18 for *.sb.opensandbox.ai + sb.opensandbox.ai.
routes = [
{ pattern = "*.sb.opensandbox.ai/*", zone_name = "opensandbox.ai" },
+ # Pinned so `wrangler delete && wrangler deploy` (the branch-swap reset
+ # workflow) always re-attaches this hostname. custom_domain=true tells CF to
+ # manage the DNS record + SSL cert automatically — different from a plain
+ # worker route, which would need a separate DNS entry that survives delete.
+ { pattern = "app2.opensandbox.ai", zone_name = "opensandbox.ai", custom_domain = true },
]
# Static assets — the dashboard SPA. Built from `web/` by the deploy script
@@ -68,18 +73,10 @@ script_name = "opensandbox-edge-dev"
tag = "v1"
new_sqlite_classes = ["CreditAccount"]
-# v2 was applied to the deployed dev worker out-of-band (it created a
-# SandboxWsGateway DO from a branch never merged here). Placeholder so the
-# ledger is contiguous and wrangler can append v3.
-[[migrations]]
-tag = "v2"
-
-# This branch doesn't define SandboxWsGateway. Delete the orphaned class +
-# its DOs so this branch can deploy (CF blocks dropping a depended-on class
-# without an explicit delete-class migration). CreditAccount is untouched.
-[[migrations]]
-tag = "v3"
-deleted_classes = ["SandboxWsGateway"]
+# v2 / v3 reconciliation entries were dropped after a clean `wrangler delete`
+# reset the migration ledger to v1. If you ever apply a DO change out-of-band
+# again, re-add the placeholder pattern (see git log for the old comments) or
+# just `wrangler delete --force` to reset.
# Secrets (set via `wrangler secret put`):
# SESSION_JWT_SECRET — HMAC for session JWT (shared with all CPs in cell fleet)
diff --git a/internal/mounts/service.go b/internal/mounts/service.go
index b5bb4f00..32e745bf 100644
--- a/internal/mounts/service.go
+++ b/internal/mounts/service.go
@@ -121,7 +121,7 @@ func (s *Service) Add(ctx context.Context, sandboxID string, req AddRequest) (Mo
readOnly = *req.ReadOnly
}
- if err := s.doMount(ctx, sandboxID, req.Path, rcloneConf, readOnly, req.MountOptions); err != nil {
+ if err := s.doMount(ctx, sandboxID, req.Path, req.Remote, rcloneConf, readOnly, req.MountOptions); err != nil {
return MountRecord{}, err
}
@@ -220,7 +220,7 @@ func (s *Service) replayOne(sandboxID string, m db.PersistentMount) {
s.markFailed(ctx, sandboxID, m, fmt.Sprintf("decrypt config: %v", err))
return
}
- if err := s.doMount(ctx, sandboxID, m.Path, string(plaintext), m.ReadOnly, m.MountOptions); err != nil {
+ if err := s.doMount(ctx, sandboxID, m.Path, m.Remote, string(plaintext), m.ReadOnly, m.MountOptions); err != nil {
s.markFailed(ctx, sandboxID, m, err.Error())
return
}
@@ -255,7 +255,13 @@ func (s *Service) rollbackLiveMount(ctx context.Context, sandboxID, path string)
// doMount is the shared orchestration: probe rclone is present, write the
// config to tmpfs, mkdir the target, exec `rclone mount --daemon`.
-func (s *Service) doMount(ctx context.Context, sandboxID, target, rcloneConf string, readOnly bool, mountOptions []string) error {
+//
+// `remote` is the full rclone remote spec passed to `rclone mount` (e.g.
+// "s3:my-bucket/prefix"). It is NOT derived from the config section header
+// because rclone needs the `<name>:<path>` form — bare `<name>` makes rclone
+// fall back to its local-filesystem backend at `~/<name>` with no error,
+// which surfaces as a silently-empty mount target.
+func (s *Service) doMount(ctx context.Context, sandboxID, target, remote, rcloneConf string, readOnly bool, mountOptions []string) error {
confPath := mountConfPath(target)
probe, perr := s.manager.Exec(ctx, sandboxID, types.ProcessConfig{
@@ -297,9 +303,8 @@ func (s *Service) doMount(ctx context.Context, sandboxID, target, rcloneConf str
return fmt.Errorf("prepare mount target: %w", err)
}
- remote := remoteFromConfig(rcloneConf)
if remote == "" {
- return fmt.Errorf("could not derive remote name from rclone config")
+ return fmt.Errorf("internal: empty remote passed to doMount")
}
mountArgs := []string{