Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/trueforge/AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- `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), 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
Expand Down