Conversation
What was broken Community challenge details treated serialized submission-limit metadata as a number, so configured limits displayed as Unlimited. Members could also attempt another submission after reaching a configured limit without the requested guidance. Root cause The sidebar expected a legacy scalar metadata value, while current challenges store a JSON string. Submission entry points did not read that metadata or verify the member's existing submissions. What was changed Added safe parsing for current and legacy submission-limit metadata, displayed the configured count in the challenge sidebar, and guarded both the challenge submit action and the final submission boundary. Members at the limit now see the requested Submission Limit Reached message and must delete an existing submission before replacing it. Any added/updated tests Added parser and message tests, header action coverage, and submission-boundary tests for unlimited, below-limit, reached-limit, and lookup-failure cases.
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.
What was broken
Community challenge details treated serialized submission-limit metadata as a number, so configured limits displayed as Unlimited. Members could also attempt another submission after reaching a configured limit without the requested guidance.
Root cause
The sidebar expected a legacy scalar metadata value, while current challenges store a JSON string. Submission entry points did not read that metadata or verify the member's existing submissions.
What was changed
Added safe parsing for current and legacy submission-limit metadata and displayed the configured count in the challenge sidebar. Guarded both the challenge submit action and the final submission boundary so members at the limit see the requested Submission Limit Reached message and must delete an existing submission before replacing it.
Any added/updated tests
Added parser and message tests, header action coverage, and submission-boundary tests for unlimited, below-limit, reached-limit, and lookup-failure cases.
Validation completed successfully with the full
npm testsuite (153 suites and 339 tests),npm run lint, andnpm run build.