Repository navigation
[Cherry-pick] Cherry-pick to release-v0.178.0 - #1003
truefoundry-saas merged 3 commits into
Conversation
…alidation (#976) * feat: validate sandbox environment resource limits and enhance form validation * test: remove sandbox environment validation tests Co-authored-by: Cursor <cursoragent@cursor.com> * Regenerate OpenAPI document and SDKs * feat: add configurable resource limits for sandbox environments and update UI validation * Regenerate OpenAPI document and SDKs * feat: update sandbox environment resource limits and enhance validation in schemas and UI * Regenerate OpenAPI document and SDKs --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: trueforge-dev-bot[bot] <trueforge-dev-bot[bot]@users.noreply.github.com>
🦋 Changeset detectedLatest commit: aa4ba25 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
) * feat: update sandbox documentation and link to secret management details * fix: update Daytona API key permissions in sandbox documentation * fix: remove redundant mention of secret rotations in sandbox documentation (cherry picked from commit 6b42368)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit aa4ba25. Configure here.
| environment_variables: z.record(z.string().min(1), z.string()).optional(), | ||
| environment_variables: z | ||
| .record(SandboxEnvironmentVariableNameSchema, SandboxEnvironmentVariableValueSchema) | ||
| .optional(), |
There was a problem hiding this comment.
Stored env schema tightened without migration
Medium Severity
New env-var and secret-name constraints live on the shared manifest fields that StoredSandboxEnvironmentManifestSchema parses on every store read. Existing rows with empty values, hyphenated or dotted keys, long domain_allow_list strings, or non-matching secret env names now fail parseStoredSandboxEnvironmentManifest, which can 500 list, get, and sandbox resolve. Resource caps correctly stay on the PUT schema only.
Additional Locations (1)
Triggered by project rule: @truefoundry/trueforge review rules
Reviewed by Cursor Bugbot for commit aa4ba25. Configure here.


Automated cherry-pick for release request
93763333-6a02-4c3d-99ce-ad7f94c86a4b.Source PRs (merged to main):
Warning
This PR does not contain the fix yet. The cherry-pick conflicted, so
automation stopped at the first conflicting commit and left the rest out.
GitHub therefore shows this PR as mergeable, with no conflict to resolve —
it carries only the 1 commit(s) that applied before the conflict.
Paste the prompt below into any coding agent that has this repository open.
It checks out this branch, applies the missing commits, and pushes.
Do not merge the PR. The release request checks every commit within a few
minutes (or use "Sync status" on it). The PR is merged when the request is
approved — or, if it is already approved, when a QA member or engineering
admin uses "Retry merge".
Agent prompt — copy from here:
Conflicting file(s):
packages/trueforge-ui/test/atoms/draft/AgentRuntimeConfigFields.test.tsxCommits still to apply (starting at the conflict):
95f5c5c5047b12eca493008457865cffcc7e3fb46b423685f43554284193f4433a75094c3721ad7bDo not merge manually — this PR is merged automatically when the release request is approved. If you do merge it yourself, use "Sync status" on the request so it stops showing as pending.
Note
Medium Risk
Changes default UI exposure and sandbox environment write validation/resource caps, which can reject previously accepted manifests or surface Environments UI where it was off.
Overview
Sandbox Environments is always on in the product: the
VITE_SANDBOX_ENVIRONMENTS_ENABLEDbuild flag, DockerARG, andsandboxEnvironmentsserver config are removed, and the TrueForge adapter always wiressandboxEnvironments. Composer and agent runtime always show environment selection and the Environments tab (no gating on an optional server port).API and validation tighten sandbox environment manifests: env var keys must match
^[A-Za-z_][A-Za-z0-9_]*$with length caps on names, values, domain allow lists, and secret lists; PUT rejects CPU/memory/disk above new env-configured maxima (SANDBOX_ENVIRONMENT_*_MAX, documented in.env.example). OpenAPI and route 400 descriptions reflect resource allocation errors.Docs UX: the Environments secrets “Learn more” link targets the sandbox docs section on how changes reach a running session. Tests drop coverage for the removed feature flag.
Reviewed by Cursor Bugbot for commit aa4ba25. Bugbot is set up for automated code reviews on this repo. Configure here.