Skip to content

[codex] Add transaction helpers - #27

Closed
zth wants to merge 1 commit into
rescriptfrom
codex/transaction-helpers
Closed

[codex] Add transaction helpers#27
zth wants to merge 1 commit into
rescriptfrom
codex/transaction-helpers

Conversation

@zth

@zth zth commented May 23, 2026

Copy link
Copy Markdown
Owner

Superseded by #28.

The original CI failure was caused by omitting the generated packages/cli/src/res/PgTyped.js runtime file. The replacement PR includes that file and should get a fresh Actions run from a new PR open event.

@zth
zth force-pushed the codex/transaction-helpers branch from 0992b97 to 02ec316 Compare May 23, 2026 12:34
@zth
zth marked this pull request as ready for review May 23, 2026 12:36
@zth
zth force-pushed the codex/transaction-helpers branch from a9a695b to 14dca18 Compare May 23, 2026 12:36
@zth zth closed this May 23, 2026
@zth zth reopened this May 23, 2026
@zth zth closed this May 23, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14dca182ea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +138 to +142
await client->Client.release
result
} catch {
| exn =>
await client->Client.release

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid releasing the same pooled client twice

The pool transaction helper releases the client in both the try path and the catch path, so if client.release itself throws in the success path, control enters catch and calls release again on the same client. In that scenario the second call can raise a secondary "already released" error and mask the original failure, making error handling misleading and harder to debug. A finally-based single-release flow avoids this double-release path.

Useful? React with 👍 / 👎.

Comment on lines +95 to +99
dbUser ++
":" ++
dbPassword ++
"@" ++
dbHost ++

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Encode fallback connection string components

The fallback DATABASE_URL is assembled by raw string concatenation of dbUser, dbPassword, and host/database segments. If credentials contain reserved URL characters (for example @, :, /, #, %), the resulting URI becomes invalid or is parsed incorrectly, so pool creation can fail in environments where direct config-based client connection still works. Use URL encoding (or pass a config object) when constructing this fallback.

Useful? React with 👍 / 👎.

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

1 participant