Skip to content

docs: clarify transaction remote I/O exception - #481

Open
rohanmalhotracodes wants to merge 1 commit into
truefoundry:mainfrom
rohanmalhotracodes:docc
Open

docs: clarify transaction remote I/O exception#481
rohanmalhotracodes wants to merge 1 commit into
truefoundry:mainfrom
rohanmalhotracodes:docc

Conversation

@rohanmalhotracodes

@rohanmalhotracodesrohanmalhotracodes commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

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

  • 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, .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

Low Risk
Documentation-only change to contributor guidelines; no runtime or API behavior changes.

Overview
AGENTS.md now treats withTransaction as 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-providers may run Daytona buildImage() inside the transaction until that flow is redesigned, and that call must stay bounded by BUILD_REQUEST_TIMEOUT_MS.

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

@changeset-bot

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3bd1fd1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

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`.

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.

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.

Sign up for freeto 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.

Update the agents.md to confirm the existing behavior to prevent repeated flagging by contributors

2 participants

@rohanmalhotracodes@thesujai