Skip to content

feat: finalize production V2 runtime - #14

Merged
iamjr15 merged 4 commits into
mainfrom
refactor/local-production-boundary
Jul 19, 2026
Merged

feat: finalize production V2 runtime#14
iamjr15 merged 4 commits into
mainfrom
refactor/local-production-boundary

Conversation

@iamjr15

@iamjr15 iamjr15 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Finalizes the V2-only production architecture across the web app, Workers, Durable Objects, database boundary, sandbox lifecycle, and release tooling.
  • Aligns the light and dark responsive UI with the established product surface while removing V1, approval, voice-input, product-policy-limit, and stale deployment residue.
  • Adds the curated sandbox skill runtime, custom Skill Creator persistence, browser takeover, Usage, permanent artifact access, and protected Daytona snapshot publication path.
  • Hardens tenant isolation, deletion and retention workflows, BYOK revalidation, runtime readiness, and direct-run recovery for production operation.

Plan

  • Architecture source of truth: plan.md
  • Release and contributor boundary: AGENTS.md

What is included

Runtime and agent workflows

  • Durable run workflow, transcript recovery, lifecycle alarms, output handling, browser takeover, projectless runs, and project creation only when file-backed work requires it.
  • Research safety bounds, media tools, provider attribution, custom skill runtime transport, and removal of approval-gated legacy execution.

Sandbox and skills

  • Immutable Daytona snapshot definition with browser driver, code server, document runtimes, app templates, skill package manager, and Cheatcode skill CLIs.
  • Nineteen curated built-in skills plus full document scripts, schemas, helpers, and runtime packages.
  • Custom skills persisted under .cheatcode/skills, loaded into runs, and surfaced through Skill Creator UI events.

Product UI

  • Responsive light and dark parity across home, chat, sidebar, models, skills, projects, Usage, Cheatcode 101, composer, Files, Browser, and Computer surfaces.
  • Shared composer behavior, model attribution, durable chat pills, mobile layout fixes, browser-first selection for browser work, and removal of voice input and focus-ring residue.

Data, billing, and operations

  • V2 database migrations, signed tenant boundary, permanent generated outputs with refreshed signed links, deletion and retention jobs, provider-key revalidation, and usage attribution.
  • Removal of BYOK tier slots, research plan fan-out, project instructions, deployment quotas, duplicate account routes, artifact expiration, and stale relational state.
  • Protected release workflows for static checks, Worker deployment, audit archive, and immutable Daytona snapshot publication.

Architecture

The gateway authenticates and validates public requests, the Agent Worker and Durable Objects own run and sandbox state, and Workflows provide durable background orchestration. Postgres remains the indexed system of record under signed tenant context, R2 owns artifact bytes, and Daytona provides per-project runtime sandboxes. Built-in skills are bundled at build time and copied into the immutable snapshot; user-authored skills are persisted per user and hydrated into the sandbox at run time.

Decisions made

Decision Choice Reasoning
Release path Protected PR, exact-SHA Static Checks, then snapshot workflow Prevents publishing an unreviewed or unverified runtime image.
User limits Remove product-policy entitlements; keep hidden safety invariants Safety bounds remain operational while paid-plan residue no longer changes core capability.
Skill storage Built-ins in the snapshot, custom skills in .cheatcode/skills with server persistence Matches the runtime filesystem model without losing user skills across sandbox replacement.
Project creation Agent decides from actual file-producing work Avoids brittle prompt regexes and prevents projects for chat-only or browser-only requests.
Artifacts Permanent indexed outputs with short-lived renewable links User output persists while download authorization remains time bounded.
Browser work Browser surface becomes active when browser tools execute Keeps Files as the code surface while reflecting the active task automatically.

Edge cases handled

Scenario Handling
Stream disconnect or Worker restart Durable sequence replay and transcript reconciliation resume the run.
Stale sandbox snapshot Lifecycle state detects the desired snapshot and upgrades safely.
Browser-only request Runs without creating a project and activates the Browser surface.
New file-producing request Creates and attaches a canonical project workspace during the run.
Expired artifact URL The client requests a fresh signed URL from the stable output id.
Custom skill save event fails Persistence remains authoritative and UI presentation failure does not discard the skill.
Clerk account deletion Durable cleanup removes billing, integration, sandbox, R2, and relational resources.

How to review

  1. Start with plan.md, Worker routing, and Durable Object workflow files for the runtime boundary.
  2. Review infra/containers/sandbox/Dockerfile, skills/, and the skill-runtime package for snapshot contents.
  3. Review the web shell, chat/composer, preview, Skills, and Usage components for product behavior.
  4. Review database migrations and release workflows for production sequencing and cleanup.

Verification completed

  • pnpm turbo skills:build
  • pnpm turbo typecheck
  • pnpm turbo lint
  • pnpm turbo build
  • Repository-wide Biome check and git diff --check
  • Local exact sandbox image build and runtime smoke checks
  • Direct browser invocation checks for all 19 bundled skills and projectless browser fallback
  • Protected GitHub Static Checks for this exact commit
  • Protected Daytona snapshot build, scan, smoke test, and publication

iamjr15 added 4 commits July 19, 2026 12:29
Completes the V2-only runtime, durable workflows, sandbox lifecycle, skill packages,
usage and creator flows, browser takeover, responsive UI parity, database hardening,
and protected release tooling required for the production snapshot.
Teach Knip about externally invoked sandbox skill commands and runtime binaries.
Remove obsolete exports and release helpers surfaced by the protected dead-code gate.
Make clean-runner dead-code analysis aware of dependencies invoked only inside the
Daytona image while preserving their pinned runtime ownership and lockfiles.
@iamjr15
iamjr15 merged commit a80c21e into main Jul 19, 2026
1 check passed
@iamjr15
iamjr15 deleted the refactor/local-production-boundary branch July 19, 2026 07:31
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