Skip to content

fix: Use numberOrBoolParser for NumberOrBoolean options#10495

Open
puneetdixit200 wants to merge 2 commits into
parse-community:alphafrom
puneetdixit200:fix-number-or-bool-parser
Open

fix: Use numberOrBoolParser for NumberOrBoolean options#10495
puneetdixit200 wants to merge 2 commits into
parse-community:alphafrom
puneetdixit200:fix-number-or-bool-parser

Conversation

@puneetdixit200
Copy link
Copy Markdown

@puneetdixit200 puneetdixit200 commented Jun 4, 2026

Pull Request

Issue

Closes #9643.

Approach

  • Use the exported numberOrBoolParser when generating actions for NumberOrBoolean options.
  • Update the generated src/Options/Definitions.js entry for cluster.
  • Update the generator unit test expectation so future definitions keep the correct parser name.
  • Format the changed generator and spec files.

AI-assisted with human supervision.

Tasks

  • Add tests

Verification

  • npm ci (also ran the project build during prepare)
  • npx jasmine --config=jasmine.build-config.json with a temporary no-helper config for spec/buildConfigDefinitions.spec.js: 14 specs, 0 failures
  • npm run ci:definitionsCheck
  • npx prettier --check resources/buildConfigDefinitions.js spec/buildConfigDefinitions.spec.js src/Options/Definitions.js
  • npx eslint resources/buildConfigDefinitions.js spec/buildConfigDefinitions.spec.js src/Options/Definitions.js --flag unstable_config_lookup_from_file
  • git diff --check

Note: direct npx jasmine spec/buildConfigDefinitions.spec.js loads the repo-wide helper and timed out while starting a Parse server; the isolated no-helper config exercises the mapper unit spec directly.

@parse-github-assistant
Copy link
Copy Markdown

parse-github-assistant Bot commented Jun 4, 2026

🚀 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
Copy link
Copy Markdown

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 1e7f2e44-4af6-4ace-9289-86f6e9a84930

📥 Commits

Reviewing files that changed from the base of the PR and between 0073e39 and 0ee5ac8.

📒 Files selected for processing (2)
  • resources/buildConfigDefinitions.js
  • spec/buildConfigDefinitions.spec.js
🚧 Files skipped from review as they are similar to previous changes (1)
  • spec/buildConfigDefinitions.spec.js

📝 Walkthrough

Walkthrough

This PR corrects the parser function name for the NumberOrBoolean type: generator, test, and generated option now reference numberOrBoolParser instead of the nonexistent numberOrBooleanParser.

Changes

Parser Name Correction

Layer / File(s) Summary
Parser name reference fix across generator, tests, and output
resources/buildConfigDefinitions.js, spec/buildConfigDefinitions.spec.js, src/Options/Definitions.js
Generator rule for NumberOrBoolean now emits numberOrBoolParser instead of the nonexistent numberOrBooleanParser; corresponding test expectation updated; generated ParseServerOptions.cluster definition uses the corrected parser name.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Engage In Review Feedback ❓ Inconclusive Cannot verify review feedback engagement without access to GitHub PR comments. The repository contains the code changes but no git history showing review feedback or discussion. Need access to GitHub PR #10495 review comments to verify the author engaged with any feedback before dismissing or resolving it.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title begins with the required 'fix:' prefix and clearly describes the main change.
Description check ✅ Passed The PR description follows the template, includes the issue reference, approach, and documents completed tasks.
Linked Issues check ✅ Passed The PR addresses issue #9643 by replacing incorrect 'numberOrBooleanParser' references with 'numberOrBoolParser' across the codebase.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the parser naming issue identified in #9643 with no extraneous modifications.
Security Check ✅ Passed PR fixes reference from non-existent 'numberOrBooleanParser' to actual 'numberOrBoolParser'. No logic changes, validation unchanged, no security vulnerabilities introduced.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 OpenGrep (1.22.0)

OpenGrep fatal error (exit code 2): [00.12][ERROR]: Error: exception Unix_error: No such file or directory stat spec/buildConfigDefinitions.spec.js
Raised by primitive operation at UTmp.replace_named_pipe_by_regular_file_if_needed in file "libs/commons/UTmp.ml", line 145, characters 8-27
Called from Scan_CLI.replace_target_roots_by_regular_files_where_needed.(fun) in file "src/osemgrep/cli_scan/Scan_CLI.ml", lines 1086-1087, characters 19-65
Called from List_.fast_map in file "libs/commons/List_.ml", line 81, characters 17-20
Call


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 4, 2026
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.

Incorrect definition for NumberOrBoolean check in resources/buildConfigDefinition.js

1 participant