Repository navigation
PM-6737 submission ai usage question - #393
Merged
Merged
Conversation
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟡 Changes recommended
The change still has an unresolved documentation mismatch in src/dto/submission.dto.ts where JSDoc describes a boolean helper as query-specific despite it now being used for multipart/form-data too, which could mislead future maintenance.
1 open issue
What changed in this PR
Introduces a new aiAssisted flag on submissions to record whether a submitter reports that AI tools wrote most of their submission’s code, threading the field through the database, Prisma schema/client, and API DTOs.
Changes:
- Add nullable
aiAssistedcolumn to thesubmissiontable via migration. - Update Prisma
submissionmodel to includeaiAssisted. - Expose
aiAssistedin submission request/response DTOs with boolean parsing for string inputs. - Regenerate the published Prisma client artifacts to reflect the schema change.
| File | Description |
|---|---|
| src/dto/submission.dto.ts | Adds aiAssisted to submission request/response DTOs and uses a shared boolean-parsing helper to accept string/boolean inputs. |
| prisma/schema.prisma | Extends the Prisma submission model with a nullable aiAssisted boolean field. |
| prisma/migrations/20261110120000_add_submission_ai_assisted/migration.sql | Alters the submission table to add the nullable aiAssisted column. |
| packages/review-prisma-client/generated/wasm.js | Regenerates Prisma client runtime/WASM output to align with the updated schema (including aiAssisted). |
| packages/review-prisma-client/generated/schema.prisma | Updates the generated Prisma schema snapshot used by the published client package. |
| packages/review-prisma-client/generated/package.json | Updates the generated Prisma client package metadata produced during regeneration. |
| packages/review-prisma-client/generated/index.d.ts | Regenerates TypeScript type definitions so the client typings include the new aiAssisted field. |
| packages/review-prisma-client/generated/index-browser.js | Regenerates the browser build bundle/exports to match the updated Prisma client surface. |
Review effort: Balanced
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.

This pull request introduces support for recording and handling whether a submitter reports that AI tools wrote most of their submission's code. The changes span the database schema, Prisma model, API DTOs, and CI configuration to enable this new functionality and ensure it is properly validated and documented.
Database and Schema Updates:
aiAssistedto thesubmissiontable to store the submitter's answer regarding AI assistance.schema.prisma) to include the newaiAssistedfield in thesubmissionmodel, with documentation.API and DTO Enhancements:
aiAssistedfield to theSubmissionRequestBaseDtoandSubmissionResponseDtoclasses, including OpenAPI documentation, validation, and transformation logic to handle both boolean and string representations in requests. [1] [2]toQueryBooleanhelper to robustly parse boolean values from query parameters and ensure correct validation.toQueryBooleanfunction to an appropriate location, removing its duplicate.