Skip to content

Filter tombstoned rows in ListCodeOwnerIdentities - #40

Merged
ewhauser merged 1 commit into
mainfrom
codeowner-identity-index
Aug 5, 2026
Merged

Filter tombstoned rows in ListCodeOwnerIdentities#40
ewhauser merged 1 commit into
mainfrom
codeowner-identity-index

Conversation

@ewhauser

@ewhauser ewhauser commented Aug 5, 2026

Copy link
Copy Markdown
Owner

Fixes #35 — tombstoned identities no longer leak into reviewer candidates, and all three query branches now match the live-row partial-index predicates. A planner regression seeds 5,000 tombstoned rows per table and asserts index-only scans returning only live candidates; re-requested identities appear exactly once; every candidate-set consumer audited.

Built and adversarially reviewed by paired Codex sol-xhigh agents in a dedicated worktree (parallel batch #33#38). Full gate green locally.

🤖 Generated with Claude Code

The query's three branches (review requests, reviews, comments) read
all historical rows for a repository: tombstoned identities leaked
into the reviewer-candidate set, and without the tombstoned_at IS NULL
predicate none of the branches could use the live-row partial indexes,
so candidate listing scanned accumulated history. All three branches
now filter live rows and match the partial-index predicates exactly --
verified by a planner test that seeds 5,000 tombstoned rows per table
and asserts index-only scans on the *_live_pr_idx indexes with only
live candidates returned. A tombstoned-then-re-requested identity
appears exactly once, and every candidate-set consumer (ownership
resolution, the CODEOWNERS mirror path, drift) was audited against the
semantic change.

Fixes #35

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ewhauser
ewhauser force-pushed the codeowner-identity-index branch from a0b0787 to 1265ba4 Compare August 5, 2026 01:36
@ewhauser
ewhauser merged commit 6512037 into main Aug 5, 2026
5 checks passed
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.

ListCodeOwnerIdentities scans tombstoned rows and cannot use live-row indexes

1 participant