Repository navigation
feat(c3): replace Daytona with Runloop Devboxes #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Manual Runloop Devbox live tests (C3A). | ||
| # Not on pull_request. Not on push. Burns trial credits. | ||
| # Do NOT use runloopai/deploy-agent — FLOKS tests Devboxes, not Runloop Agents. | ||
| # RUNLOOP_API_KEY stays in GitHub secrets; never in git, guest env, or logs. | ||
| name: runloop-c3 | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: runloop-c3 | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| runloop-live: | ||
| name: Runloop Devbox live test | ||
| runs-on: ubuntu-24.04 | ||
| timeout-minutes: 20 | ||
| env: | ||
| RUNLOOP_API_KEY: ${{ secrets.RUNLOOP_API_KEY }} | ||
| FLOK_RUNLOOP_BLUEPRINT: ${{ vars.FLOK_RUNLOOP_BLUEPRINT }} | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 | ||
| with: | ||
| node-version: "22.16" | ||
| cache: npm | ||
| - run: npm ci | ||
| - name: Verify Runloop configuration | ||
| run: | | ||
| test -n "$RUNLOOP_API_KEY" | ||
| test -n "$FLOK_RUNLOOP_BLUEPRINT" | ||
| echo "Runloop blueprint: $FLOK_RUNLOOP_BLUEPRINT" | ||
| echo "RUNLOOP_API_KEY length=${#RUNLOOP_API_KEY}" | ||
| - name: Run Runloop live tests | ||
| env: | ||
| FLOK_LIVE_RUNLOOP_TEST: "1" | ||
| run: npm run test:live:runloop |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,7 +39,7 @@ Work only on the currently open phase. Nexus-IQ / AEON / Graphiti are **forbidde | |
| - Domain unit tests under `tests/domain/` (state-machine, service, fake-provider, pairing, path) | ||
|
|
||
| ### Non-goals (do not invent) | ||
| - Real network, Docker, Daytona client, MCP server, worker process, S3, Kysely wiring | ||
| - Real network, Docker, paid provider clients, MCP server, worker process, S3, Kysely wiring | ||
|
|
||
| ### Gate C1 | ||
| - [x] state helpers + tests (legal succeed, illegal throw, deleted terminal) — files present | ||
|
|
@@ -90,30 +90,41 @@ Work only on the currently open phase. Nexus-IQ / AEON / Graphiti are **forbidde | |
|
|
||
| --- | ||
|
|
||
| ## Phase 3 — Daytona production provider ← CURRENT | ||
|
|
||
| **Goal:** Linux VM class, real lifecycle + exec + fs + observe + act + VNC + checkpoint. | ||
|
|
||
| ### Implement | ||
| - `providers/daytona.ts` — DaytonaProvider (`name: "daytona"`) | ||
| - Linux **VM** snapshot only (not the default container class) | ||
| - Official `@daytona/sdk` (`new Daytona({ apiKey })` → `create()` / `get()`) | ||
| - `DAYTONA_API_KEY` stays in the control plane; never in Node env, workspace, exec env, MCP, or audit | ||
| - argv[] exec (shell mode rejected); path jail at `/home/flok` | ||
| - observe / act via Computer Use; takeover via signed noVNC preview URL | ||
| - checkpoint via `createSnapshot`; restore from snapshot | ||
| ## Phase 3 — Runloop production provider ← CURRENT | ||
|
|
||
| **Goal:** Runloop Devboxes as production-v1 ComputerProvider. C3A is the compute substrate. C3B (interactive computer / browser / noVNC) is deferred until C3A is green. | ||
|
|
||
| ### Implement (C3A) | ||
| - `providers/runloop.ts` — RunloopProvider (`name: "runloop"`) | ||
| - Official `@runloop/api-client` **1.28.0** via `RunloopSDK` (not the legacy client, not `runloopai/deploy-agent`) | ||
| - Default blueprint `FLOK_RUNLOOP_BLUEPRINT=runloop/universal-ubuntu-24.04-x86_64-dnd`, arch `x86_64` | ||
| - Workspace jail `/home/user/flok` | ||
| - `RUNLOOP_API_KEY` stays in the control plane; never in Devbox env, workspace, exec env, MCP, or audit | ||
| - argv[] exec (shell mode rejected) via JSON/base64 → Python `os.execvp` wrapper | ||
| - `pause` → `suspend` + `awaitSuspended` (disk preserved, **not** RAM) | ||
| - `wake` → `resume` + `awaitRunning` | ||
| - `stop` / `destroy` → idempotent `shutdown` | ||
| - `checkpoint` → `snapshotDisk`; `restore` creates a new Devbox from the snapshot (forks allowed) | ||
| - Non-live tests with an injected control-plane fake (zero network) | ||
| - Live tests opt-in: `FLOK_LIVE_COMPUTER_TEST=1` — missing key/snapshot **FAILS**, never silent skip | ||
| - Live tests opt-in: `FLOK_LIVE_RUNLOOP_TEST=1` — missing key/blueprint **FAILS**, never silent skip | ||
|
Comment on lines
+100
to
+109
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- tracked files relevant to Runloop/live tests ---'
git ls-files | rg '(^|/)(PHASES\.md|README\.md|package\.json|.*runloop.*|.*live.*|.*test.*)$' | head -200
printf '%s\n' '--- PHASES.md lines 90-115 ---'
cat -n PHASES.md | sed -n '90,115p'
printf '%s\n' '--- README.md lines 45-70 ---'
cat -n README.md | sed -n '45,70p'
printf '%s\n' '--- blueprint and live-test references ---'
rg -n -C 3 'FLOK_RUNLOOP_BLUEPRINT|FLOK_LIVE_RUNLOOP_TEST|RUNLOOP_API_KEY|test:live:runloop|universal-ubuntu' . \
-g '!node_modules' -g '!dist' -g '!build' | head -300Repository: Adaptive-Liquidity/floks-pc Length of output: 25386 🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- runloop-c3 workflow ---'
cat -n .github/workflows/runloop-c3.yml | sed -n '1,180p'
printf '%s\n' '--- provider construction and environment resolution ---'
cat -n src/lib/computers/providers/runloop.ts | sed -n '1,125p'
printf '%s\n' '--- live-test guards and provider setup ---'
cat -n tests/providers/runloop.isolation.test.ts | sed -n '105,155p'
cat -n tests/live/runloop.live.test.ts | sed -n '1,80p'
printf '%s\n' '--- read-only contract probe ---'
python3 - <<'PY'
from pathlib import Path
import re
provider = Path("src/lib/computers/providers/runloop.ts").read_text()
isolation = Path("tests/providers/runloop.isolation.test.ts").read_text()
readme = Path("README.md").read_text()
phases = Path("PHASES.md").read_text()
default = re.search(
r'DEFAULT_RUNLOOP_BLUEPRINT\s*=\s*"([^"]+)"',
Path("src/lib/computers/providers/runloop-client.ts").read_text()
).group(1)
print("provider default:", default)
print("constructor resolves env-or-default:",
"process.env.FLOK_RUNLOOP_BLUEPRINT ?? DEFAULT_RUNLOOP_BLUEPRINT" in provider)
print("fromEnv resolves env-or-default:",
"process.env.FLOK_RUNLOOP_BLUEPRINT ?? DEFAULT_RUNLOOP_BLUEPRINT" in provider)
print("live guard requires non-empty blueprint:",
"if (!process.env.FLOK_RUNLOOP_BLUEPRINT)" in isolation)
print("PHASES states live missing blueprint fails:",
"missing key/blueprint **FAILS**" in phases)
print("README states blueprint is required:",
"They require `RUNLOOP_API_KEY` and `FLOK_RUNLOOP_BLUEPRINT`" in readme)
PYRepository: Adaptive-Liquidity/floks-pc Length of output: 9430 Clarify the Runloop blueprint scopes. 📍 Affects 2 files
🤖 Prompt for AI Agents |
||
|
|
||
| ### C3B (do not implement until C3A is green) | ||
| Chromium + display + noVNC / Browserbase-or-Kernel. Authenticated Runloop tunnels later. Do not add those dependencies now. | ||
|
|
||
| ### Non-goals (do not invent) | ||
| - Provider factory, MCP gateway, pairing/capability wiring, worker, Kysely, Nexus/AEON/Graphiti | ||
| - Daytona (removed from the active C3 path) | ||
|
|
||
| ### Gate C3A | ||
| Two live Devboxes prove different provider IDs, isolated filesystems, distinct `boot_id`, independent lifecycle, suspend/resume disk persist, snapshot → forked Devbox with independent mutation, and shutdown of every paid Devbox. | ||
|
|
||
| ### Gate C3 | ||
| Two live Linux VMs prove different provider IDs, filesystems, browser profiles, process namespaces, independent lifecycle. | ||
| Live tests are **opt-in only** (`FLOK_LIVE_COMPUTER_TEST=1`). Not part of required PR CI. | ||
| Live tests are **opt-in only** (`FLOK_LIVE_RUNLOOP_TEST=1`, manual `runloop-c3` workflow). Not part of required PR CI. | ||
|
|
||
| **Status:** OPEN | ||
|
|
||
| ### Gate C3B | ||
| Deferred. Interactive computer layer after C3A PASS. | ||
|
|
||
| --- | ||
|
|
||
| ## Phase 4 — Node pairing and capability security | ||
|
|
@@ -223,7 +234,7 @@ All of the following must PASS: | |
| ## Phase 13 — Self-hosted high-performance compute (optional optimization) | ||
|
|
||
| KataProvider + containerd + Kata 4 + Firecracker. | ||
| Provider parity tests against Fake / DockerDev / Daytona / Kata. | ||
| Provider parity tests against Fake / DockerDev / Runloop / Kata. | ||
|
|
||
| --- | ||
|
|
||
|
|
@@ -260,7 +271,7 @@ memory_context | |
| memory_remember | ||
| ``` | ||
|
|
||
| Infrastructure tools (daytona_*, firecracker_*, nexus_*, graphiti_*, postgres_*) remain internal. | ||
| Infrastructure tools (runloop_*, firecracker_*, nexus_*, graphiti_*, postgres_*) remain internal. | ||
|
|
||
| --- | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Add blank lines around the new headings.
markdownlint-cli2reports MD022 for these headings. Add one blank line before and after each heading to keepPHASES.mdlint-clean.Also applies to: 111-111, 114-114, 118-118, 125-125
🧰 Tools
🪛 markdownlint-cli2 (0.23.2)
[warning] 97-97: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
🤖 Prompt for AI Agents
Source: Linters/SAST tools