Repository navigation
embed pages: page ids up to 2,000 characters, and a first visit creates everything or nothing - #3292
Merged
Merged
Conversation
…es everything or nothing Every visit to a page with an id over 100 characters returned a 500 and left an orphan empty conversation. Widen page_ids.page_id and page_ids.site_id to varchar(2000), keeping the unique site and page pair. Create the conversation, page mapping and invite in one transaction so all three succeed or all three roll back. When first visits race, roll back the losing insert and redirect both visitors to the winner. Reject missing, empty or overlong site and page ids with a clear 400 before writing anything, while preserving the existing URL parsing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ss9NfEMZS9Qm4FZ2npXDrx
The report builder lists the migrations that sit outside the adoption set; the new migration joins that list and the generated report is refreshed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ss9NfEMZS9Qm4FZ2npXDrx
Measured against a fresh PostgreSQL 17 with the whole migration chain applied: the two page_ids columns widen to 2,000 characters; nothing else changes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ss9NfEMZS9Qm4FZ2npXDrx
…th migration Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ss9NfEMZS9Qm4FZ2npXDrx
Contributor
Delphi Coverage Report
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A page embedding Polis maps to a conversation through its embed key and page id; the first visit to a new page creates the conversation. Until now the page id column held 100 characters while the server inserted the conversation row before storing the id, so every visit to a page with a longer id returned a 500 and left an orphan empty conversation with a join code behind, again on each visit.
000045_page_ids_width:page_ids.page_idandpage_ids.site_idwiden fromvarchar(100)tovarchar(2000). Metadata-only in Postgres (no rewrite, verified on a populated copy), the unique constraint stays, additive and safe under a rolling replacement, with a 5 s lock timeout. A guarded down migration refuses to narrow if any stored id exceeds the old limit.Tests
npm run build,npm run lint, 1,270 unit tests, 1,159 integration tests on a migrated database; old and new server startup against the new schema.🤖 Generated with Claude Code
https://claude.ai/code/session_01Ss9NfEMZS9Qm4FZ2npXDrx