docs: clarify transaction remote I/O exception - #481
Open
rohanmalhotracodes wants to merge 2 commits into
Open
Conversation
rohanmalhotracodes
requested review from
bhaveshpatel640,
chiragjn,
debajyoti-truefoundry,
heerambavi1998,
sr07asthana and
thesujai
as code owners
August 27, 2026 18:37
|
thesujai
reviewed
Aug 28, 2026
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. |
Co-authored-by: Sujai Kumar Gupta <120925871+thesujai@users.noreply.github.com>
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 free
to 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 agent/contributor guidance; no runtime or API behavior changes.
Overview
Updates
packages/trueforge/AGENTS.mdso thewithTransactionrule is no longer an absolute ban on remote I/O inside the callback.The guidance now says callbacks must only do local DB work by default, and allows remote network calls only in rare cases when they are bounded by a strict timeout (still listing
fetch, SDK clients, Redis, and similar I/O as what to avoid by default).Reviewed by Cursor Bugbot for commit 0e4849e. Bugbot is set up for automated code reviews on this repo. Configure here.