Skip to content

PM-5726 duplicate submission detection - #328

Merged
vas3a merged 3 commits into
developfrom
PM-5726_duplicate-submission-detection
Aug 26, 2026
Merged

vas3a merged 3 commits into
developfrom
PM-5726_duplicate-submission-detection

Conversation

@vas3a

@vas3a vas3a commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

https://topcoder.atlassian.net/browse/PM-5726 - Duplicate Detection Endpoint

This pull request introduces a new API endpoint for detecting duplicate submissions by SHA-256 hash, along with comprehensive backend logic and tests. The endpoint allows privileged users to find submissions that are byte-for-byte identical, either within a single challenge or across all challenges. The implementation includes robust access controls, error handling, and extensive unit tests to ensure correct behavior and security.

The most important changes are:

API Enhancements

  • Added a new endpoint GET /v6/submissions/{challengeId}/duplicates to detect duplicate submissions by sha256Hash, supporting both same-challenge and cross-challenge queries, with detailed access controls and error responses.
  • Updated OpenAPI (Swagger) documentation and controller annotations to describe the new endpoint, request parameters, and response schema, including new DTOs for the duplicate detection feature. [1] [2]

Service Layer and Business Logic

  • Implemented backend logic in SubmissionService to efficiently find duplicate submissions, enforce role-based access, and handle edge cases such as missing digests, deleted submissions, and cross-challenge queries. Introduced constants for allowed roles and excluded statuses. [1] [2]

Testing

  • Added a comprehensive test suite for the duplicate detection logic, covering normal operation, cross-challenge queries, access control, error cases, and resilience to missing challenge metadata. [1] [2]

Documentation

  • Updated README.md to document the new duplicate detection endpoint, its parameters, access restrictions, and response format for users and integrators.

@vas3a
vas3a requested review from jmgasper and a lite review from Copilot and removed request for Copilot August 24, 2026 12:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@vas3a
vas3a merged commit cc218b8 into develop Aug 26, 2026
5 checks passed
@vas3a
vas3a deleted the PM-5726_duplicate-submission-detection branch August 26, 2026 06:42
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.

2 participants