S4 — Canonical row selection is correct PASS
Ranking checks: most-recent updated_at wins in Group A; higher id wins as tiebreaker in Group B
Evidence captured against canary dev DB. Group A: kept fr-A-newest. Group B: kept fr-B-higher-id. Zero remaining duplicates. Partial unique index present. No preview banner.
== S4: which rows are canonical (keep source_incident_id) vs orphanedunterminated quoted string
id | title | source_incident_id | updated_at
----+--------------------------+--------------------+-------------------------------
20 | andrew-s1-fr-A-middle | | 2026-05-25 12:53:07.259146+00
21 | andrew-s1-fr-A-newest | 999001 | 2026-05-25 12:52:47.629518+00
19 | andrew-s1-fr-A-oldest | | 2026-05-25 12:53:07.259146+00
23 | andrew-s1-fr-B-higher-id | 999002 | 2026-05-25 12:52:47.629518+00
22 | andrew-s1-fr-B-lower-id | | 2026-05-25 12:53:07.259146+00
(5 rows)
== S4: zero remaining duplicates ==
source_incident_id | count
--------------------+-------
(0 rows)
== S4: partial unique index restored ==
indexname | indexdef
-----------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------
feature_requests_source_incident_id_key | CREATE UNIQUE INDEX feature_requests_source_incident_id_key ON canary.feature_requests USING btree (source_incident_id) WHERE (source_incident_id IS NOT NULL)
(1 row)
== Cleanup ==
DELETE 5
DELETE 2