Skip to content

refactor: update versioning logic in sandbox environment handling - #919

Merged
thesujai merged 26 commits into
mainfrom
feat/default-env-controller
Sep 30, 2026
Merged

thesujai merged 26 commits into
mainfrom
feat/default-env-controller

Conversation

@thesujai

@thesujai thesujai commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #

Changes

How was this tested?

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, python/trueforge_sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

High Risk
Large API and provisioning redesign (breaking provider status fields, version enum rename) with tenant-wide default env access and async snapshot builds on the critical sandbox path.

Overview
Moves snapshot build readiness off the sandbox provider and onto per-environment versions, with a tenant default environment created when a provider is configured.

API & product behavior: ConfiguredSandboxProvider no longer exposes build status; readiness uses environment version status (active → ready). Capabilities/skill gating follows the default environment (plus shared TFY provider / local fallback). Public sandbox-environment routes now include the default in lists, allow any tenant member to read default, block deleting it, and accept SandboxEnvironmentManifestRequest on upsert. New internal list pending / progress endpoints drive a controller that registers or polls Daytona snapshots and updates version rows.

Core runtime: SandboxProvider is generic over provider-specific DaytonaSandboxEnvironment; fresh creates pass snapshot ref, resources, optional build_script Dockerfile layering, and networking. The harness uses HarnessSandbox instead of a single global image build on the provider.

UI: Sandbox settings drop snapshot sync polling, status badges, and retry; configured providers show as connected only.

Reviewed by Cursor Bugbot for commit 5613666. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5613666

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@truefoundry/trueforge Minor
@truefoundry/trueforge-core Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/apis/capabilities.ts Outdated
Comment thread packages/trueforge/src/runtime/sessionResources.ts Outdated
Comment thread packages/trueforge/src/routes/sandboxEnvironmentBuildRoutes.ts
Comment thread packages/trueforge/src/apis/sandboxProviders.ts

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/controller/sandboxEnvBuild.ts Outdated
Comment thread packages/trueforge/src/controller/sandboxEnvBuild.ts Outdated
Comment thread packages/trueforge/src/controller/sandboxEnvBuild.ts Outdated
Comment thread packages/trueforge/src/controller/sandboxEnvBuild.ts Outdated
Comment thread packages/trueforge/src/controller/sandboxEnvBuild.ts Outdated
Comment thread packages/trueforge/src/controller/sandboxEnvBuild.ts
Comment thread packages/trueforge/src/sandbox/progressSandboxEnvironmentVersion.ts Outdated
Comment thread packages/trueforge/src/sandbox/providerUtils.ts Outdated
Comment thread packages/trueforge/src/apis/sandboxProviders.ts Outdated
Comment thread packages/trueforge/src/apis/sandboxProviders.ts Outdated
Comment thread packages/trueforge/src/truefoundry/TrueFoundrySandboxEnvironmentStore.ts Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/schemas/sandboxEnvironment.ts

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/apis/turns.ts Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/truefoundry/TrueFoundrySandboxEnvironmentStore.ts Outdated
Comment thread packages/trueforge/src/apis/capabilities.ts Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/apis/capabilities.ts

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/sandbox/progressSandboxEnvironmentVersion.ts

@debajyoti-truefoundry debajyoti-truefoundry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping approved as we discussed offline

Comment thread packages/trueforge/src/apis/turns.ts Outdated
Comment thread packages/trueforge/src/apis/turns.ts Outdated
Comment thread packages/trueforge/src/apis/turns.ts Outdated

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/main.ts
@thesujai
thesujai force-pushed the feat/default-env-controller branch from 94400f1 to c720703 Compare September 30, 2026 12:18

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread packages/trueforge/src/apis/sandboxEnvironments.ts
Comment thread packages/trueforge/src/sandbox/sandboxEnvironmentVersion.ts
Comment thread packages/trueforge/src/sandbox/progressSandboxEnvironmentVersion.ts
Comment thread .changeset/default-sandbox-env-controller.md Outdated
@thesujai
thesujai enabled auto-merge (squash) September 30, 2026 12:33

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 4 potential issues.

There are 7 total unresolved issues (including 3 from previous reviews).

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit e743a85. Configure here.

Comment thread packages/trueforge/src/sandbox/ensureDefaultSandboxEnvironment.ts
Comment thread packages/trueforge/src/schemas/sandboxEnvironment.ts
Comment thread packages/trueforge/src/sandbox/progressSandboxEnvironmentVersion.ts
@thesujai
thesujai disabled auto-merge September 30, 2026 12:40
@thesujai
thesujai merged commit b28f291 into main Sep 30, 2026
20 checks passed
@thesujai
thesujai deleted the feat/default-env-controller branch September 30, 2026 12:53
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.

2 participants