feat: add freestyle.sh delegated-run provider#148
Conversation
Adds a new provider backend for Freestyle.sh VMs using the v1 REST API.
Provider: freestyle (Kind: DelegatedRun, FeatureArchiveSync, CoordinatorNever)
Key behaviors:
- Create/manage VMs via POST/GET/DELETE /v1/vms
- Command execution via POST /v1/vms/{id}/exec-await
- Archive-based file sync via tar.gz + base64 upload + exec fallback
- List VMs filtered by crabbox name prefix
- Config via --freestyle-* flags, FREESTYLE_API_KEY env var, YAML
- Doctor support for inventory checks
Verified against live Freestyle API (api.freestyle.sh):
create → sync → exec → list → stop all working.
|
Codex review: needs changes before merge. Reviewed May 27, 2026, 4:23 AM ET / 08:23 UTC. Summary Reproducibility: not applicable. This PR adds a new provider rather than reporting a broken existing behavior. The changed behavior is source-reviewable and has live provider proof in the PR discussion. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge Security Review findings
Review detailsBest possible solution: Keep the provider-specific lifecycle, sync, and credential handling inside the Freestyle adapter, add the missing CLI help entry, then let maintainers explicitly approve the new provider boundary. Do we have a high-confidence way to reproduce the issue? Not applicable; this PR adds a new provider rather than reporting a broken existing behavior. The changed behavior is source-reviewable and has live provider proof in the PR discussion. Is this the best way to solve the issue? Yes, with one small gap: a provider adapter is the right boundary for Freestyle-specific lifecycle, sync, and API behavior, but the CLI provider help should expose the new provider consistently. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 0511f91aa357. Label changesLabel justifications:
Evidence reviewedAcceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Velvet Test Hopper Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
Remove env-secret CLI flag, preserve argv semantics, reject unsupported actions-runner warmups, support sync-only, and run user commands via bash -lc. Co-authored-by: Cursor <cursoragent@cursor.com>
Document env-only auth, archive sync behavior, CLI flags, and limitations for the new delegated Freestyle VM provider. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # CHANGELOG.md
Export validated environment names with shell-quoted values after entering the Freestyle workdir so forwarded values with spaces reach the user command. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve the changelog conflict, keep the Freestyle entry in the current unreleased section, and cover Freestyle config loading so the current coverage gate stays green. Co-authored-by: Cursor <cursoragent@cursor.com>
Make Freestyle no-sync preparation non-destructive for existing leases, cover the workspace-preservation path, and leave release notes to the release process. Co-authored-by: Cursor <cursoragent@cursor.com>
Require Freestyle VM identifiers to resolve through a Crabbox claim or a Crabbox-named sandbox before run/status/stop operations. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Send absolute file paths below the Freestyle /files route so direct sync uses the file API instead of falling back to exec upload. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep Freestyle authentication docs aligned with env-only API key handling. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
Omit VM sizing unless configured and encode Freestyle file paths as a single path parameter so the live file API path succeeds without exec-upload fallback. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@clawsweeper re-review Current-head Freestyle live proof on Validation: Proof resource cleanup: the proof VM was not present in the subsequent |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
PR #148 is ready from my side on head 1f58c07. What I did:
Local validation run:
|
Summary
Adds a new freestyle delegated-run provider for Freestyle.sh virtual machines.
Addresses all ClawSweeper review blockers on #148 (env-only auth, argv-safe commands, forwarded env variables, actions-runner rejection, sync-only support), includes provider documentation, and is merged up to current
main.Provider details
https://api.freestyle.sh) via direct HTTPnet/httpclientFREESTYLE_API_KEY/CRABBOX_FREESTYLE_API_KEY); no API key CLI flag--sync-only; rejects--actions-runnerand--checksumbash -lcwith argv-safe shell renderingFiles
internal/providers/freestyle/provider.gointernal/providers/freestyle/core.gointernal/providers/freestyle/client.gointernal/providers/freestyle/backend.gointernal/providers/freestyle/sync.gointernal/providers/freestyle/backend_test.gointernal/cli/config.gointernal/cli/providers_builtin_test.gointernal/providers/all/all.gointernal/providers/all/all_test.godocs/providers/freestyle.mdConfig
Verification
main; GitHub reports the PR as mergeable.