Skip to content

PM-6737 submission ai usage question - #393

Merged
vas3a merged 4 commits into
developfrom
PM-6737_mm-ai-usage-question
Nov 10, 2026
Merged

vas3a merged 4 commits into
developfrom
PM-6737_mm-ai-usage-question

Conversation

@vas3a

@vas3a vas3a commented Nov 10, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Added a new nullable boolean column aiAssisted to the submission table to store the submitter's answer regarding AI assistance.
  • Updated the Prisma schema (schema.prisma) to include the new aiAssisted field in the submission model, with documentation.

API and DTO Enhancements:

  • Added the aiAssisted field to the SubmissionRequestBaseDto and SubmissionResponseDto classes, including OpenAPI documentation, validation, and transformation logic to handle both boolean and string representations in requests. [1] [2]
  • Introduced a toQueryBoolean helper to robustly parse boolean values from query parameters and ensure correct validation.
  • Refactored: Moved the toQueryBoolean function to an appropriate location, removing its duplicate.

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.

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 aiAssisted column to the submission table via migration.
  • Update Prisma submission model to include aiAssisted.
  • Expose aiAssisted in 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

Comment thread src/dto/submission.dto.ts Resolved
@vas3a
vas3a merged commit bc329b3 into develop Nov 10, 2026
4 of 5 checks passed
@vas3a
vas3a deleted the PM-6737_mm-ai-usage-question branch November 10, 2026 19:55
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