Skip to content

PM-5758: finish design submission limit handling - #2140

Open
jmgasper wants to merge 1 commit into
devfrom
PM-5758-1
Open

PM-5758: finish design submission limit handling#2140
jmgasper wants to merge 1 commit into
devfrom
PM-5758-1

Conversation

@jmgasper

Copy link
Copy Markdown
Collaborator

What was broken

The earlier PM-5758 fixes restored submission-limit configuration, guarded member uploads, enforced the limit atomically, and created Screening and Review scorecards for the latest configured number of Design submissions. QA still saw only the newest submission per member in Review, and Work Manager could stop displaying a saved limit immediately after saving a draft.

QA also repeated the checkpoint-versus-final submission failure in community-app. Investigation confirmed the merged follow-up already handles those submission types independently, but a later deployment from the older payload-cms branch overwrote the corrected dev bundle.

Root cause

The Review UI treated every finite limit as a boolean latest-only policy and relied on the API's isLatest flag, which identifies exactly one submission. It also grouped history without the configured count or exact submission type. Work Manager reset its form from a save response that can omit the submissionLimit metadata entry.

What was changed

  • Resolve Design limits with the same metadata policy as review-api and Autopilot: finite Design challenges use latest X, missing or explicit-unlimited Design metadata shows all, and non-Design challenges remain latest-one.
  • Rank complete history per member and normalized exact submission type before applying Screening or Review eligibility, without promoting older attempts or reintroducing ineligible rows.
  • Pass all phase-eligible rows into reviewer and submitter Review tables instead of pre-filtering to isLatest.
  • Preserve the submitted submissionLimit in Work Manager when a successful draft response omits that specific entry, while respecting a value returned by the API.

Deployment follow-up: redeploy current community-app develop and update/rebase payload-cms before it deploys again so the already-merged type-scoped guards from PR #7262 remain live.

Any added/updated tests

Added and updated coverage for finite counts of one and multiple submissions, unlimited and malformed metadata, backend-policy edge cases, independent contest/checkpoint histories, rank-before-eligibility, Screening selection, Review row forwarding, and Work Manager draft-save metadata preservation.

Validation:

  • Ticket-focused tests: 8 suites, 126 tests passed.
  • Lint passed.
  • Production build passed with existing repository warnings.
  • The full suite has 18 unrelated failing suites and 27 failing tests; the same failures were reproduced on untouched origin/dev, and all PM-5758 tests pass.

What was broken
Review showed only the newest submission per member when a Design challenge allowed more than one. Work Manager could also reset the visible submission-limit selection after saving a draft when the save response omitted that metadata entry.

Root cause
Review reduced every finite limit to the API's single isLatest flag and grouped history without using the configured count or exact submission type. The draft editor trusted sparse save-response metadata when resetting the form.

What was changed
Resolve the same latest-X Design policy used by the backend, rank complete member/type history before phase eligibility, and display every eligible Screening and Review row within that window. Preserve unlimited Design behavior and Development's latest-one behavior. Retain the submitted submissionLimit value when a successful draft response omits that entry.

Any added/updated tests
Added and updated regression coverage for finite counts, unlimited and malformed metadata, independent contest/checkpoint histories, rank-before-eligibility, Review row forwarding, Screening selection, and Work Manager draft-save metadata preservation.
@jmgasper
jmgasper requested a review from kkartunov as a code owner August 12, 2026 10:46
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