Uh oh!
There was an error while loading. Please reload this page.
docs: clarify transaction remote I/O exception - #481
Open
rohanmalhotracodes wants to merge 1 commit into
Open
Conversation
rohanmalhotracodes
requested review from
bhaveshpatel640, chiragjn, debajyoti-truefoundry, heerambavi1998, sr07asthana and thesujai
as code ownersAugust 27, 2026 18:37
|
Comment on lines
+1
to
+2
| - `withTransaction` callbacks MUST only do local DB work by default: no `await` of `fetch`, an SDK client, Redis, or other remote I/O (including through helpers). Finish remote work before opening the txn. Any exception MUST be documented at the call site and use an explicit timeout shorter than the database transaction timeout. | ||
| - `PUT /api/v1/settings/sandbox-providers` is a temporary exception: its Daytona `buildImage()` call runs inside the transaction while that design is revisited and MUST remain bounded by `BUILD_REQUEST_TIMEOUT_MS`. |
Contributor
There was a problem hiding this comment.
Suggested change
| -`withTransaction` callbacks MUST only do local DB work by default: no `await` of `fetch`, an SDK client, Redis, or other remote I/O (including through helpers). Finish remote work before opening the txn. Any exception MUST be documented at the call site and use an explicit timeout shorter than the database transaction timeout. | |
| -`PUT /api/v1/settings/sandbox-providers` is a temporary exception: its Daytona `buildImage()` call runs inside the transaction while that design is revisited and MUST remain bounded by `BUILD_REQUEST_TIMEOUT_MS`. | |
| -`withTransaction` callbacks MUST only do local DB work by default: no `await` of `fetch`, an SDK client, Redis, or other remote I/O (including through helpers), remote network calls can be done in rare cases only if it is bounded by strict timeout. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the docs
Closes#452
Changes
Documented the timeout requirement and Daytona exception
How was this tested?
NA, minimal doc change is done
Checklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
Low Risk
Documentation-only change to contributor guidelines; no runtime or API behavior changes.
Overview
AGENTS.mdnow treatswithTransactionas local DB work by default, with a documented escape hatch: any in-transaction remote I/O must be called out at the call site and wrapped in a timeout shorter than the DB transaction timeout.It also records a temporary allowed violation:
PUT /api/v1/settings/sandbox-providersmay run DaytonabuildImage()inside the transaction until that flow is redesigned, and that call must stay bounded byBUILD_REQUEST_TIMEOUT_MS.Reviewed by Cursor Bugbot for commit 3bd1fd1. Bugbot is set up for automated code reviews on this repo. Configure here.