Skip to content

fix: reopen closed peer reviews safely - #903

Open
alee wants to merge 2 commits into
mainfrom
codex/fix-peer-review-reopening
Open

alee wants to merge 2 commits into
mainfrom
codex/fix-peer-review-reopening

Conversation

@alee

@alee alee commented Oct 9, 2026

Copy link
Copy Markdown
Member

Requesting peer review again for an unpublished release with a closed review now reopens the existing review and reuses the release. Previously, that request could be rejected or attempt to create a duplicate review. Published releases continue to create a separate review draft, and completed reviews remain protected.

The request handler locks the codebase before reading release or review state. Concurrent requests, including requests from different releases, return the same active review without duplicate reopen events or notifications.

Peer-review work extracted from #900 onto a branch based directly on main. Backup, logging, Redis, and Compose changes are excluded from this PR.

Validation:

  • All 12 release-view and PostgreSQL concurrency tests passed: make test TEST_ARGS='library.tests.test_views.CodebaseReleaseViewSetTestCase library.tests.test_views.ConcurrentPeerReviewRequestTestCase'.
  • Both listing/search tests passed independently after a later test rebuilt the stale local Elasticsearch index. Their initial failures were investigated separately.
  • Formatting of the new concurrency tests and git diff --check passed.

alee added 2 commits October 9, 2026 09:35
Acquire the codebase row lock before reading release or review state so
concurrent requests cannot reopen a review twice or create separate reviews
for different releases of the same codebase.

Add PostgreSQL concurrency tests that verify blocking, a single review,
one reopen event, and one notification.

Validation: all 12 release-view and concurrency tests passed. Both previously
failing listing/search tests passed after the stale local index was rebuilt.

Related to #900.

This branch has not been deployed

No deployments
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.

1 participant