fix(delphi): cold-start generator copies FULL revote history (no DISTINCT ON dedup)#2638
Draft
jucor wants to merge 1 commit into
Draft
fix(delphi): cold-start generator copies FULL revote history (no DISTINCT ON dedup)#2638jucor wants to merge 1 commit into
jucor wants to merge 1 commit into
Conversation
This was referenced Jul 18, 2026
jucor
marked this pull request as draft
July 18, 2026 13:35
This was referenced Jul 18, 2026
docs(delphi): R1-parity goal docs, journal (2026-07-18 → 07-22 s3), quirks + divergence ledger
#2626
Draft
Delphi Coverage Report
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Delphi cold-start generator to copy the full vote history (including revotes) without DISTINCT ON deduplication, while avoiding Postgres ON CONFLICT ... DO UPDATE cardinality violations caused by the votes insert rule. It also adds an opt-in integration test plus a shared Postgres provisioning helper to validate the behavior against a real migrated schema.
Changes:
- Update
copy_votes_with_fresh_timestampsto copy all vote rows in(created, ctid)order and suppress theon_vote_insert_update_unique_tablerule during the bulk insert. - Add an opt-in integration test that seeds revote history and asserts the copy preserves full row count and order with fresh timestamps.
- Add a
require_polis_postgres()test helper that provisions/validates a migrated Postgres (CI service or throwaway docker) for integration tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
delphi/scripts/generate_cold_start_clojure.py |
Copy full vote history (no dedup) and suppress the votes rule during the bulk insert to avoid ON CONFLICT cardinality errors. |
delphi/tests/test_generator_vote_copy.py |
New integration test for full-history vote copying (revotes preserved, order preserved, fresh timestamps). |
delphi/tests/conftest.py |
Adds shared Postgres provisioning/verification helper for opt-in integration tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…INCT ON dedup) commit-id:970c79cf
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.
commit-id:970c79cf
Stack: