镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(relay): bound invite preview host lookup - #9308

Merged
brow merged 1 commit into
mainfrom
invite-preview-lookup-deadline
Nov 11, 2026
Merged

brow merged 1 commit into
mainfrom
invite-preview-lookup-deadline

Conversation

@brow

@brow brow commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Context: #9306 (merged) added link-preview tags to the invite page. To build the media URLs, the relay looks up the community for the request host. This fixes a problem found in our review of #9306.

Problem: The invite page waits for that lookup with no time limit. When the database is slow, the lookup can take as long as the pool acquire timeout (3 s) plus the statement timeout (120 s by default). During that time, a person who opens an invite link gets no page. Before #9306, this page did not use the database.

Fix: The lookup gets 250 ms. If it does not finish, the relay sends the page without the preview tags. A healthy indexed host lookup finishes well inside that, so crawlers still get the tags, and nothing else changes: the media route, the router and the build are untouched.

Validation

  • Added test: a host whose lookup never finishes gets the plain page. Without the timeout, this test hangs (confirmed locally; it was killed after 30 s).
  • The existing invite_preview and router invite tests pass.

🤖 Generated with Claude Code

Base automatically changed from invite-og-integration-20261109 to main November 9, 2026 23:12
The invite page awaited the community host lookup with no deadline, so a
slow database could hold GET /invite/<code> for the pool acquire plus
statement timeout. Give the lookup 250 ms and serve the page without
preview tags when it does not finish.

Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@buzz.block.builderlab.xyz>
Signed-off-by: Tom Brow <tomb@squareup.com>
@brow
brow force-pushed the invite-preview-lookup-deadline branch from 5e04524 to abb8031 Compare November 9, 2026 23:13
@brow
brow marked this pull request as ready for review November 10, 2026 23:49
@brow
brow requested a review from a team as a code owner November 10, 2026 23:49
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T23:51:18.371559Z abb8031 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@brow
brow deployed to codex-review November 10, 2026 23:50 — with GitHub Actions Active
@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Nov 10, 2026
@github-actions

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: 0aca7588e3a49719c177c2179a5e5201f1959a49...abb803103ffd74cd87258d9a16d82c1227763465
  • Model: gpt-6.1-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

No concrete findings in the authorized PR range. The preview lookup timeout preserves host isolation and safely falls back to generic HTML.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • Review used read-only source inspection. Builds and tests were not run.

Generated by Codex Security Review |
Requested by: @brow |
Workflow run

@kazemek21 kazemek21 left a comment

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.

I reviewed the PR and went through the Nexus review-tracker notes. I didn't see any P2-or-higher issues in this change.

Posted by Codex (gpt-6.1-sol) on behalf of kylez

@brow
brow merged commit 2c5c834 into main Nov 11, 2026
97 checks passed
@brow
brow deleted the invite-preview-lookup-deadline branch November 11, 2026 05:15

This branch was successfully deployed

1 active deployment
codex-review — abb80310 Deployed Nov 10, 2026 by brow via Run Codex Security Review #14312
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants