From 3bd1fd11cc15b2196c1258f613da3b2fa408b612 Mon Sep 17 00:00:00 2001 From: Rohan Malhotra <139499925+rohanmalhotracodes@users.noreply.github.com> Date: Fri, 28 Aug 2026 00:03:53 +0530 Subject: [PATCH 1/2] docs: clarify transaction remote I/O exception --- packages/trueforge/AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/trueforge/AGENTS.md b/packages/trueforge/AGENTS.md index 79d9a3071..22cc9b9e6 100644 --- a/packages/trueforge/AGENTS.md +++ b/packages/trueforge/AGENTS.md @@ -1,4 +1,5 @@ -- `withTransaction` callbacks MUST only do local DB work: no `await` of `fetch`, an SDK client, Redis, or other remote I/O (including through helpers). Finish remote work before opening the txn. +- `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` is `db.transaction().execute(callback)`: commits on resolve, rolls back on throw. Return domain data from the callback; build success `c.json(...)` after it. Failures that must undo writes MUST `throw` (e.g. `HTTPException`); MUST NOT `return c.json({ error: ... }, status)` inside — a returned Response commits while the client still sees an error. ### OpenAPI naming convention From 0e4849e47135bf9272b88bcc2b4ba6da562f6d73 Mon Sep 17 00:00:00 2001 From: Rohan Malhotra <139499925+rohanmalhotracodes@users.noreply.github.com> Date: Sat, 29 Aug 2026 02:48:30 +0530 Subject: [PATCH 2/2] Update packages/trueforge/AGENTS.md Co-authored-by: Sujai Kumar Gupta <120925871+thesujai@users.noreply.github.com> --- packages/trueforge/AGENTS.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/trueforge/AGENTS.md b/packages/trueforge/AGENTS.md index 22cc9b9e6..13d58867a 100644 --- a/packages/trueforge/AGENTS.md +++ b/packages/trueforge/AGENTS.md @@ -1,5 +1,4 @@ -- `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. - `withTransaction` is `db.transaction().execute(callback)`: commits on resolve, rolls back on throw. Return domain data from the callback; build success `c.json(...)` after it. Failures that must undo writes MUST `throw` (e.g. `HTTPException`); MUST NOT `return c.json({ error: ... }, status)` inside — a returned Response commits while the client still sees an error. ### OpenAPI naming convention