Skip to content

docs: Clarify that only numeric requestComplexity limits accept -1 - #10909

Open
OpenLucasKaka wants to merge 1 commit into
parse-community:alphafrom
OpenLucasKaka:fix/issue-10870-option-group-requestcomplexity-is-descri
Open

OpenLucasKaka wants to merge 1 commit into
parse-community:alphafrom
OpenLucasKaka:fix/issue-10870-option-group-requestcomplexity-is-descri

Conversation

@OpenLucasKaka

@OpenLucasKaka OpenLucasKaka commented Nov 28, 2026 •

Copy link
Copy Markdown

Pull Request

Issue

Closes: #10870

The description of the requestComplexity option group ends with "Each property can be set to -1 to disable that specific limit." That does not hold for requestComplexity.allowRegex, which is a boolean. requestComplexity: { allowRegex: -1 } fails startup with requestComplexity.allowRegex must be a boolean. (the validation is covered by spec/RequestComplexity.spec.js, "should reject non-boolean value for allowRegex").

Approach

In src/Options/index.js, change the sentence to "Each numeric property can be set to -1 to disable that specific limit." Then regenerate src/Options/Definitions.js and src/Options/docs.js with npm run definitions. The three lines that held the sentence change, and nothing else does. No behavior change.

Verified locally (Node 22.23.5, MongoDB 8.0.4 standalone):

  • npm run definitions regenerated the two files. node ci/definitionsCheck.js exits 0, so the generated files match index.js.
  • npx eslint --flag unstable_config_lookup_from_file src/Options/: clean.
  • npm run build, then TESTING=1 npx jasmine spec/RequestComplexity.spec.js: 85 specs, 0 failures.
  • TESTING=1 npx jasmine spec/buildConfigDefinitions.spec.js spec/ParseConfigKey.spec.js spec/ParseGlobalConfig.spec.js spec/ParseServerRESTController.spec.js: 56 specs, 0 failures.

Tasks

  • Add changes to documentation (guides, repository pages, code comments)

No test added: the change is limited to a description string, and the existing definitions check covers that the generated files are in sync.

This PR was prepared with the help of an AI coding assistant (Claude); the change and tests were verified locally before submission.

Summary by CodeRabbit

  • Documentation
    • Clarified that setting a numeric requestComplexity limit to -1 disables that limit.

@parse-github-assistant

Copy link
Copy Markdown

🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review.

Tip

  • Keep pull requests small. Large PRs will be rejected. Break complex features into smaller, incremental PRs.
  • Use Test Driven Development. Write failing tests before implementing functionality. Ensure tests pass.
  • Group code into logical blocks. Add a short comment before each block to explain its purpose.
  • We offer conceptual guidance. Coding is up to you. PRs must be merge-ready for human review.
  • Our review focuses on concept, not quality. PRs with code issues will be rejected. Use an AI agent.
  • Human review time is precious. Avoid review ping-pong. Inspect and test your AI-generated code.

Note

Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect.

Caution

Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The requestComplexity option descriptions now state that -1 disables limits for numeric properties. The change updates the option comment and its generated help text and documentation.

Changes: requestComplexity documentation

Layer / File(s) Summary
Clarify the numeric-property rule
src/Options/index.js, src/Options/Definitions.js, src/Options/docs.js
The option comment and corresponding help text and documentation now specify that only numeric properties can use -1 to disable a limit.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Severity of issue fixed: Low

Possibly related PRs

Suggested reviewers: mtrezza

Merge Risk: Minimal · up to 3d725

This documentation-only change clarifies that -1 disables only the numeric requestComplexity limits and not allowRegex. It has no behavior change and is safe to merge.

Pre-merge checks: Passed 6

Check name Status Explanation
Title check Passed The title uses the required "docs:" prefix with a capitalized first letter after it. It describes the main change: clarifying that only numeric requestComplexity limits accept -1. The title is 70 char…
Description check Passed The description covers the linked issue (#10870), the reason for the change, and the approach. It gives the exact wording change and the regeneration step. It lists local verification with test result…
Linked Issues check Passed Issue #10870 requires the requestComplexity description to state that only numeric properties accept -1. It asks for the change in src/Options/index.js and its generated copies. The reviewed dif…
Out of Scope Changes check Passed All changes are one-sentence wording edits to the same requestComplexity description. They appear in src/Options/index.js, its generated src/Options/Definitions.js copy, and the generated `src/O…
Security Check Passed The security check passes. The pull request changes three files: src/Options/index.js, src/Options/Definitions.js, and src/Options/docs.js. In each file, the diff alters one help or comment stri…
Engage In Review Feedback Passed The check is inapplicable because no review feedback exists to engage with. The supplied review context states that no CodeRabbit review threads were returned. The current review produced zero actiona…
Full details: Title check

Explanation

The title uses the required "docs:" prefix with a capitalized first letter after it. It describes the main change: clarifying that only numeric requestComplexity limits accept -1. The title is 70 characters long, and the requirements do not set a length limit.

Full details: Description check

Explanation

The description covers the linked issue (#10870), the reason for the change, and the approach. It gives the exact wording change and the regeneration step. It lists local verification with test results. It also marks the applicable task in the template and explains why no test was added. The template's security and license header is kept. The unchecked tasks (tests, security check, Parse JS SDK error codes) do not apply to this docs-only change, and the author gives a reason for skipping tests.

Full details: Linked Issues check

Explanation

Issue #10870 requires the requestComplexity description to state that only numeric properties accept -1. It asks for the change in src/Options/index.js and its generated copies. The reviewed diff for src/Options/index.js changes the comment from "Each property can be set to -1..." to "Each numeric property can be set to -1...". The diff for src/Options/Definitions.js makes the same wording change in the requestComplexity.help string. The PR summary reports the matching +1/-1 change in src/Options/docs.js. I did not inspect docs.js directly. The issue requests no runtime behavior change, and the diffs show none. The issue's requirements are documentation text only, so no unmet coding requirement remains. The tests cited by the author are not coding requirements of the issue.

Full details: Out of Scope Changes check

Explanation

All changes are one-sentence wording edits to the same requestComplexity description. They appear in src/Options/index.js, its generated src/Options/Definitions.js copy, and the generated src/Options/docs.js copy as reported in the summary. Each change is the change the issue requests. The PR adds no code, test, or behavior change. The docs.js change is supported only by the PR summary, not by a direct diff read. This does not affect the verdict, because the same edit is confirmed in two of three files and is the generated counterpart of the source edit.

Full details: Security Check

Explanation

The security check passes. The pull request changes three files: src/Options/index.js, src/Options/Definitions.js, and src/Options/docs.js. In each file, the diff alters one help or comment string. The sentence "Each property can be set to -1" becomes "Each numeric property can be set to -1". No executable code, parser, validation, default value, or permission logic changes. The diff does not introduce any pattern tied to the published GitHub security advisory classes (for example injection, auth bypass, unsafe deserialization, or DoS limit weakening). The requestComplexity limits and the boolean allowRegex validation stay as they are. The edit makes the docs more accurate, because allowRegex rejects -1. No security-relevant behavior changes.

Full details: Engage In Review Feedback

Explanation

The check is inapplicable because no review feedback exists to engage with. The supplied review context states that no CodeRabbit review threads were returned. The current review produced zero actionable findings. No posted comment was ignored or resolved without discussion. The check's condition applies only when review feedback exists. This PR's review context contains none, so no failure condition is met. The supplied metadata alone decides this check. I did not run further tools, because the criterion concerns review-thread state and that state is supplied directly. Scope note: this verdict covers only the "Engage in review feedback" criterion. It does not assess the PR's correctness. The diff changes only the requestComplexity description text in src/Options/index.js, src/Options/Definitions.js, and src/Options/docs.js. That matches the linked issue #10870.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Biome (2.6.5)

src/Options/index.js

File contains syntax errors that prevent linting: Line 18: Expected a type but instead found '?'.; Line 18: Expected a property, or a signature but instead found ';'.; Line 21: Expected a statement but instead found '?'.; Line 24: Expected a statement but instead found '?'.; Line 27: Expected a statement but instead found '?'.; Line 30: Expected a statement but instead found '?'.; Line 32: Expected a statement but instead found '?'.; Line 34: Expected a statement but instead found '?'.; Line 35: Expected a statement but instead found '}'.; Line 37: type alias are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 38: type alias are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 39: type alias are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Line 40: type alias are a TypeScript only feature. Convert your file to a TypeScript file or remove the syntax.; Li

... [truncated 16812 characters] ...

found '?'.; Line 916: Expected a statement but instead found '?'.; Line 918: Expected a statement but instead found '?'.; Line 919: Expected a statement but instead found '}'.; Line 933: Expected a type but instead found '?'.; Line 933: Expected a property, or a signature but instead found ';'.; Line 934: Expected a statement but instead found '}'.; Line 940: Expected a type but instead found '?'.; Line 940: Expected a property, or a signature but instead found ';'.; Line 944: Expected a statement but instead found '?'.; Line 948: Expected a statement but instead found '?'.; Line 952: Expected a statement but instead found '?'.; Line 956: Expected a statement but instead found '?'.; Line 960: Expected a statement but instead found '?'.; Line 961: Expected a statement but instead found '}'.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5e74080e-1b93-456d-b115-e8909e135979
Commits

Reviewing files that changed from the base of the PR and between 384b473 and 3d72590.

Files selected for processing: 3

  • src/Options/Definitions.js
  • src/Options/docs.js
  • src/Options/index.js

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

This branch has not been deployed

No deployments
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.

Option group requestComplexity is described as accepting -1 for every property, but allowRegex is a boolean

1 participant