feat: Add Review Queue Locking and Conflict Resolution - #901
Open
deep-bhikadiya wants to merge 6 commits into
Open
feat: Add Review Queue Locking and Conflict Resolution #901deep-bhikadiya wants to merge 6 commits into
deep-bhikadiya wants to merge 6 commits into
Conversation
…n\nImplements short-lived locks for verification review to prevent concurrent\nreview actions. Meets acceptance criteria:\n\n- Review actions (approve/reject/request-resubmission) now require lock ownership\n- Locks expire after configurable duration (default 5 minutes)\n- Stale-lock recovery via scheduled job (every 2 minutes)\n- API responses include conflict details for frontend UX\n\nChanges:\n- Add ReviewLock model to Prisma schema\n- Add ReviewLockService with lock acquire/release/refresh/verify\n- Add ReviewLockScheduler for automatic stale-lock recovery\n- Add lock endpoints: POST /:id/lock, POST /lock/release, POST /lock/refresh\n- Add lock status to inbox listing and verification details\n- Integrate lock verification into review action endpoints\n- Add LockConflictResponse with suggestedAction for frontend guidance\n\nCloses Pulsefy#703
|
@deep-bhikadiya Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
|
Kindly fix failed CI |
added 2 commits
July 30, 2026 10:56
Regenerate the workspace lockfile from the current manifests so frozen installs include the Jest 29 pins and socket.io-client. Remove unused review-lock symbols and format the affected feature files so backend CI can proceed past installation cleanly. Constraint: Keep the fix scoped to PR Pulsefy#901 and leave local OMX ignore state uncommitted. Confidence: high Scope-risk: narrow Reversibility: clean Tested: pnpm 10.34.5 frozen install; targeted ESLint; backend build; 678 backend tests plus 4 health tests with local bind permission Not-tested: GitHub Actions rerun pending push
Merge Pulsefy/Soter main into the feature branch and regenerate pnpm-lock.yaml from the combined manifests to resolve the only content conflict without force-pushing history. Constraint: Upstream main advanced 29 commits and conflicted only in pnpm-lock.yaml. Rejected: Keep the branch on its stale merge base | GitHub marked PR Pulsefy#901 unmergeable after the lockfile fix. Confidence: high Scope-risk: moderate Reversibility: clean Directive: Regenerate pnpm-lock.yaml after future package manifest conflict resolutions. Tested: pnpm 10.34.5 frozen install; targeted review-lock ESLint; backend build Not-tested: Full cross-service suite after upstream merge; GitHub Actions pending push
deep-bhikadiya
pushed a commit
to deep-bhikadiya/Soter
that referenced
this pull request
Jul 30, 2026
Merge Pulsefy/Soter main into the contract-registry branch so CI receives the corrected workspace lockfile and Jest overrides. Remove inherited review-lock lint errors and make the synchronous registry fallback helper accurately non-async. Constraint: PR Pulsefy#902 was 29 upstream commits behind and inherited the same stale root lockfile importer as PR Pulsefy#901. Rejected: Regenerate the stale branch lockfile without syncing main | would duplicate upstream dependency policy and leave the branch outdated. Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep contract registry fallback paths synchronous unless they acquire real asynchronous work. Tested: pnpm 10.34.5 frozen install; targeted ESLint; backend build; 5 documented Jest suites with 50 passing tests Not-tested: Full cross-service suite; GitHub Actions pending push
Contributor
…he url property in schema.prisma datasource block is no longer supported\nin Prisma 7. Move connection URLs to prisma.config.ts.\n\nSee https://pris.ly/d/config-datasource
Contributor
Merge the latest upstream main while repairing its incomplete workspace lock graph. Keep the repository-owned workflows unchanged, remove the unused root Prisma 7 conflict so Backend CI resolves Prisma 6, provision the SQLite CI database through backend configuration, and clear the lint blockers exposed after installation. Constraint: GitHub Actions installs with pnpm 9 and fork-authored workflow changes require maintainer approval. Rejected: Disable frozen lockfile enforcement | would hide dependency drift instead of repairing it. Rejected: Modify the workflow | prevents automatic fork checks from running. Confidence: high Scope-risk: narrow Directive: Prisma CLI dependencies belong to app/backend; do not reintroduce a conflicting root Prisma major. Tested: pnpm 9 frozen install; npx Prisma 6 migration deploy under CI env; ESLint fix dry-run; backend build; 682 backend tests; Node and Python contract suites. Not-tested: npm package-lock regeneration, which hangs under npm 11 and is not consumed by these checks.
deep-bhikadiya
force-pushed
the
feature/review-queue-locking
branch
from
July 31, 2026 04:43
b21d531 to
376f7fa
Compare
Contributor
|
Kindly resolve conflicts |
Contributor
|
Please resolve conflicts |
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.
Closes #703
Summary
Implements short-lived locks for verification review to prevent two reviewers from acting on the same verification case simultaneously.
Changes
New Files
review-lock.service.ts- Core locking logic (acquire, release, refresh, verify, recover)review-lock.scheduler.ts- Cron job for stale-lock recoveryreview-lock.dto.ts- DTOs and response types with Swagger docsDatabase
Added
ReviewLockmodel to schema with fields:API Endpoints
New:
POST /verification-inbox/:id/lock- Acquire lockPOST /verification-inbox/lock/release- Release lockPOST /verification-inbox/lock/refresh- Refresh lockGET /verification-inbox/:id/lock- Get lock statusGET /verification-inbox/locks/my- Get reviewer's active locksGET /verification-inbox/locks/stats- Lock statisticsModified:
POST /verification-inbox/:id/approve- Requires lock ownershipPOST /verification-inbox/:id/reject- Requires lock ownershipPOST /verification-inbox/:id/request-resubmission- Requires lock ownershipAcceptance Criteria Met
code,message,conflictdetailsLockConflictResponseincludesremainingSeconds,suggestedAction('refresh_page'/'try_again_later'/'force_refresh')Testing
Run
npx prisma db pushto apply schema changes