Skip to content

feat: complete v0.2 CD — bindings, Pages, D1 migrations, live logs, run/list/rollback#4

Merged
sinameraji merged 1 commit into
mainfrom
feat/v0.2-complete
Jun 8, 2026
Merged

feat: complete v0.2 CD — bindings, Pages, D1 migrations, live logs, run/list/rollback#4
sinameraji merged 1 commit into
mainfrom
feat/v0.2-complete

Conversation

@sinameraji

Copy link
Copy Markdown
Owner

Finishes v0.2 to the full PLAN §4 spec, building on the MVP from #1.

What's added

  • Worker bindings. A compact YAML-subset parser (deploy/yaml.ts, no heavyweight dep — keeps the bundle lean) lets .gitflare/deploy.yml declare vars / kv / r2 / d1 / durable_objects / services, emitted into the Workers Scripts metadata.bindings.
  • Pages deploys (kind: pages) via Direct Upload (upload-token → check-missing → upload → create-deployment), with per-branch previews (production_branch).
  • D1 migrations — applied in order via the D1 query API, opt-in (apply: true), idempotent (applied set tracked per-database in the DeployDO).
  • Live deploy logs over a hibernatable WebSocket; the Deployments page subscribes at /r/:name/deployments/stream.
  • Manual / GitHub-down trigger: gitflare deploy run/control/deploy/run, authed by a CONTROL_SECRET (outside Access, like the webhook). This is the escape hatch — deploys the current Artifacts HEAD even when GitHub is down.
  • gitflare deploy list and gitflare deploy rollback [--to <id>] — rollback redeploys a previous successful commit via a full clone (migrations are forward-only and skipped).

Tests

56 unit tests (yaml parser, workflow validation incl. bindings/migrations, cf-deploy bindings/upload/Pages hashing, highlight, Access JWT). All packages typecheck; worker bundle 939 KB.

⚠️ Needs one live run

The Cloudflare API wire shapes — Workers Scripts multipart, Pages Direct Upload (the fiddliest), and D1 query — are coded to the docs but not yet validated against a real account. PLAN §12 M7 lists this as the one TODO before marking v0.2 ✅.

Note: overlaps the docs in #3 (which still says v0.2 "in progress"). I'll refresh those docs to "complete" + document the new commands once we settle merge order.

🤖 Generated with Claude Code

…un/list/rollback

Finishes v0.2 to the full PLAN §4 spec, on top of the MVP slice.

- Worker bindings: a real YAML-subset parser (deploy/yaml.ts, no heavy dep)
  lets deploy.yml declare vars/KV/R2/D1/durable_objects/services, emitted into
  the Workers Scripts metadata.bindings.
- Pages: kind: pages deploys via Direct Upload (upload-token → check-missing →
  upload → create-deployment) with per-branch previews (production_branch).
- D1 migrations: applied in order via the D1 query API, opt-in (apply: true),
  idempotent (applied set tracked per database in the DeployDO).
- Live logs: DeployDO streams log lines over a hibernatable WebSocket; the
  Deployments page subscribes at /r/:name/deployments/stream.
- Manual / GitHub-down trigger: `gitflare deploy run` + /control/deploy/run,
  authed by a CONTROL_SECRET (outside Access, like the webhook).
- `gitflare deploy list` + `gitflare deploy rollback [--to <id>]`; rollback
  redeploys a previous successful commit via a full clone (migrations skipped).

56 unit tests (yaml/workflow/cf-deploy/highlight/access). Worker bundle 939 KB.

Still needs one live run against a real Cloudflare account to confirm the
Scripts multipart, Pages Direct Upload, and D1 query wire shapes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sinameraji sinameraji merged commit cbe0dde into main Jun 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant