feat: noDailyStandingLimits cheat #791

Merged
Sainan merged 3 commits from standing-cheat into main 2025-01-16 22:02:20 -08:00
Owner

Closes #789

Closes #789
coderabbitai[bot] commented 2025-01-16 20:28:05 -08:00 (Migrated from github.com)
Author
Owner

Warning

Rate limit exceeded

@Sainan has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 45 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between bbca21467b and e020930e6e.

📒 Files selected for processing (1)
  • src/services/inventoryService.ts (2 hunks)

Walkthrough

The pull request introduces a new configuration option noDailyStandingLimits across multiple files to implement a feature that allows disabling daily standing limits. This change spans configuration, service, and controller layers. The config.json.example file now includes the new option, and the configService has been updated to support this configuration. The inventoryController and syndicateStandingBonusController have been modified to handle the new configuration, with the ability to set daily affiliation values to a high limit (999,999) when the option is enabled. Additionally, the web UI now includes a checkbox in the server settings to toggle this feature, providing users with a straightforward way to enable or disable daily standing limits.

Assessment against linked issues

Objective Addressed Explanation
Spoof bins in inventory response
Don't subtract from daily standing limits

The changes comprehensively address the objectives outlined in issue #789 by:

  1. Implementing a configuration option to bypass daily standing limits
  2. Modifying the inventory response to set high values when the option is enabled
  3. Preventing subtraction from daily standing limits when the configuration is active

The implementation provides a flexible approach to managing daily standing limits through a configuration-driven mechanism.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.
<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- This is an auto-generated comment: rate limited by coderabbit.ai --> > [!WARNING] > ## Rate limit exceeded > > @Sainan has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait **17 minutes and 45 seconds** before requesting another review. > > <details> > <summary>⌛ How to resolve this issue?</summary> > > After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. > > We recommend that you space out your commits to avoid hitting the rate limit. > > </details> > > > <details> > <summary>🚦 How do rate limits work?</summary> > > CodeRabbit enforces hourly rate limits for each developer per organization. > > Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. > > Please see our [FAQ](https://docs.coderabbit.ai/faq) for further information. > > </details> > > <details> > <summary>📥 Commits</summary> > > Reviewing files that changed from the base of the PR and between bbca21467bdaace05cd93813a096fd1d14aacf89 and e020930e6ea068237d01a3168efd73b54c328ad9. > > </details> > > <details> > <summary>📒 Files selected for processing (1)</summary> > > * `src/services/inventoryService.ts` (2 hunks) > > </details> <!-- end of auto-generated comment: rate limited by coderabbit.ai --> <!-- walkthrough_start --> ## Walkthrough The pull request introduces a new configuration option `noDailyStandingLimits` across multiple files to implement a feature that allows disabling daily standing limits. This change spans configuration, service, and controller layers. The `config.json.example` file now includes the new option, and the `configService` has been updated to support this configuration. The `inventoryController` and `syndicateStandingBonusController` have been modified to handle the new configuration, with the ability to set daily affiliation values to a high limit (999,999) when the option is enabled. Additionally, the web UI now includes a checkbox in the server settings to toggle this feature, providing users with a straightforward way to enable or disable daily standing limits. ## Assessment against linked issues | Objective | Addressed | Explanation | |-----------|-----------|-------------| | Spoof bins in inventory response | ✅ | | | Don't subtract from daily standing limits | ✅ | | The changes comprehensively address the objectives outlined in issue #789 by: 1. Implementing a configuration option to bypass daily standing limits 2. Modifying the inventory response to set high values when the option is enabled 3. Preventing subtraction from daily standing limits when the configuration is active The implementation provides a flexible approach to managing daily standing limits through a configuration-driven mechanism. <!-- walkthrough_end --> <!-- internal state start --> <!-- FAHghAtBAEAqAWBLAztF0CGA7TBXALgPYQDmAplmQE4b5kAm0AxoQLasX4Bc0ADldEIAjAFZkm+RADcyqIQE9mhetQxChifADoMiaFAB8wY+CjGAxOegAFAErQ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TIRbmPnqBCgABMWwAALAAGxrBCDZQfwAAMAArEwPQBsAAMxchbBoUYDwUbCQXxD0BbCEXgUYBZjxA8gAVoQwDASaCvly4fl5xzCbH0DPkbgAVAA=== --> <!-- internal state end --> <!-- tips_start --> --- Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <details> <summary>🪧 Tips</summary> ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit <commit_id>, please review it.` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### CodeRabbit Commands (Invoked using PR comments) - `@coderabbitai pause` to pause the reviews on a PR. - `@coderabbitai resume` to resume the paused reviews. - `@coderabbitai review` to trigger an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai generate docstrings` to [generate docstrings](https://docs.coderabbit.ai/finishing-touches/docstrings) for this PR. ([Beta](https://docs.coderabbit.ai/early-access#beta)) - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. ### Other keywords and placeholders - Add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. - Add `@coderabbitai summary` to generate the high-level summary at a specific location in the PR description. - Add `@coderabbitai` anywhere in the PR title to generate the title automatically. ### Documentation and Community - Visit our [Documentation](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit. - Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements. </details> <!-- tips_end -->
coderabbitai[bot] (Migrated from github.com) reviewed 2025-01-16 20:29:35 -08:00
coderabbitai[bot] (Migrated from github.com) left a comment
Author
Owner

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/controllers/api/inventoryController.ts (1)

237-241: Consider using numeric separator for better readability.

The implementation correctly sets unlimited standing when the cheat is enabled. Consider using numeric separator for better readability of the large number.

-            inventoryResponse[key] = 999_999;
+            inventoryResponse[key] = 999_999_999;
src/controllers/api/syndicateStandingBonusController.ts (1)

40-42: Consider adding a constant for the config flag name.

The boolean check is correct, but consider extracting noDailyStandingLimits into a named constant to improve maintainability and reduce the risk of typos.

+const NO_DAILY_STANDING_LIMITS = 'noDailyStandingLimits';
-    if (!config.noDailyStandingLimits && gainedStanding > getStandingLimit(inventory, syndicateMeta.dailyLimitBin)) {
+    if (!config[NO_DAILY_STANDING_LIMITS] && gainedStanding > getStandingLimit(inventory, syndicateMeta.dailyLimitBin)) {
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d8845bc478 and bbca21467b.

📒 Files selected for processing (6)
  • config.json.example (1 hunks)
  • src/controllers/api/inventoryController.ts (3 hunks)
  • src/controllers/api/syndicateStandingBonusController.ts (2 hunks)
  • src/services/configService.ts (1 hunks)
  • src/services/inventoryService.ts (1 hunks)
  • static/webui/index.html (1 hunks)
🔇 Additional comments (7)
config.json.example (1)

31-31: LGTM!

The new configuration option follows the existing naming pattern and is appropriately placed among other cheat-related options.

src/services/configService.ts (1)

57-57: LGTM!

The new configuration property is correctly typed as an optional boolean and appropriately placed among other cheat-related options.

src/services/inventoryService.ts (1)

517-519: LGTM!

The implementation efficiently extracts daily affiliation keys from the mapping using type-safe operations.

src/controllers/api/inventoryController.ts (1)

36-38: LGTM!

The refactored daily reset logic efficiently uses allDailyAffiliationKeys to reduce code duplication.

src/controllers/api/syndicateStandingBonusController.ts (2)

7-7: LGTM!

The import statement for the config service is correctly placed.


46-48: Verify standing limit update logic.

The conditional block correctly prevents standing limit updates when the feature is enabled. However, ensure that this doesn't affect other systems that might rely on the standing limit tracking.

Verification successful

Standing limit update logic is correctly implemented

The conditional block is safe and well-designed. No other systems depend on the standing limit tracking, and the feature flag properly gates both the limit check and update operations.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for other uses of updateStandingLimit to verify dependencies
rg -A 5 "updateStandingLimit" --type ts

Length of output: 1599


Script:

#!/bin/bash
# Search for uses of getStandingLimit and standing limit related types/constants
rg "getStandingLimit|TStandingLimitBin|STANDING_LIMIT_BIN_NONE" --type ts -A 3

Length of output: 2508

static/webui/index.html (1)

301-306: LGTM!

The new checkbox control follows the existing pattern and is properly integrated into the server settings form.

**Actionable comments posted: 0** <details> <summary>🧹 Nitpick comments (2)</summary><blockquote> <details> <summary>src/controllers/api/inventoryController.ts (1)</summary><blockquote> `237-241`: **Consider using numeric separator for better readability.** The implementation correctly sets unlimited standing when the cheat is enabled. Consider using numeric separator for better readability of the large number. ```diff - inventoryResponse[key] = 999_999; + inventoryResponse[key] = 999_999_999; ``` </blockquote></details> <details> <summary>src/controllers/api/syndicateStandingBonusController.ts (1)</summary><blockquote> `40-42`: **Consider adding a constant for the config flag name.** The boolean check is correct, but consider extracting `noDailyStandingLimits` into a named constant to improve maintainability and reduce the risk of typos. ```diff +const NO_DAILY_STANDING_LIMITS = 'noDailyStandingLimits'; - if (!config.noDailyStandingLimits && gainedStanding > getStandingLimit(inventory, syndicateMeta.dailyLimitBin)) { + if (!config[NO_DAILY_STANDING_LIMITS] && gainedStanding > getStandingLimit(inventory, syndicateMeta.dailyLimitBin)) { ``` </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used: .coderabbit.yaml** **Review profile: CHILL** **Plan: Pro** <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between d8845bc4786bfadad9f29ff771b936ef80f96ae9 and bbca21467bdaace05cd93813a096fd1d14aacf89. </details> <details> <summary>📒 Files selected for processing (6)</summary> * `config.json.example` (1 hunks) * `src/controllers/api/inventoryController.ts` (3 hunks) * `src/controllers/api/syndicateStandingBonusController.ts` (2 hunks) * `src/services/configService.ts` (1 hunks) * `src/services/inventoryService.ts` (1 hunks) * `static/webui/index.html` (1 hunks) </details> <details> <summary>🔇 Additional comments (7)</summary><blockquote> <details> <summary>config.json.example (1)</summary> `31-31`: **LGTM!** The new configuration option follows the existing naming pattern and is appropriately placed among other cheat-related options. </details> <details> <summary>src/services/configService.ts (1)</summary> `57-57`: **LGTM!** The new configuration property is correctly typed as an optional boolean and appropriately placed among other cheat-related options. </details> <details> <summary>src/services/inventoryService.ts (1)</summary> `517-519`: **LGTM!** The implementation efficiently extracts daily affiliation keys from the mapping using type-safe operations. </details> <details> <summary>src/controllers/api/inventoryController.ts (1)</summary> `36-38`: **LGTM!** The refactored daily reset logic efficiently uses allDailyAffiliationKeys to reduce code duplication. </details> <details> <summary>src/controllers/api/syndicateStandingBonusController.ts (2)</summary> `7-7`: **LGTM!** The import statement for the config service is correctly placed. --- `46-48`: **Verify standing limit update logic.** The conditional block correctly prevents standing limit updates when the feature is enabled. However, ensure that this doesn't affect other systems that might rely on the standing limit tracking. <details> <summary>✅ Verification successful</summary> <!-- [monologue] [task verify_standing_limit_2/2] [observations] 1. Standing limit system is self-contained and well-designed: - `TStandingLimitBin` is an imported type from "warframe-public-export-plus" - `STANDING_LIMIT_BIN_NONE` is a special case that returns MAX_SAFE_INTEGER - There's a mapping from bin types to inventory keys 2. The standing limit is used consistently: - `getStandingLimit` is used to check if gained standing exceeds the limit - When limit is exceeded, standing is capped to the limit value - Only then `updateStandingLimit` is called to update the remaining limit 3. The feature flag `noDailyStandingLimits` is used correctly: - It gates both the limit check and the limit update - When enabled, neither the check nor update occurs - This means no systems depend on the tracking when limits are disabled [analysis] 1. The implementation is safe because: - Standing limit tracking is only used within the same controller - The check and update are properly paired and gated by the same flag - The special case `STANDING_LIMIT_BIN_NONE` provides a fallback 2. No other systems depend on the standing limit tracking: - No other imports of `getStandingLimit` or `updateStandingLimit` - The limit is only used for capping gained standing - The tracking can be safely disabled without side effects [actions] Generate final response indicating the verification is successful, as the implementation is safe and well-contained. --> **Standing limit update logic is correctly implemented** The conditional block is safe and well-designed. No other systems depend on the standing limit tracking, and the feature flag properly gates both the limit check and update operations. </details> <details> <summary>🏁 Scripts executed</summary> The following scripts were executed for the analysis: Script: ```shell #!/bin/bash # Search for other uses of updateStandingLimit to verify dependencies rg -A 5 "updateStandingLimit" --type ts ``` Length of output: 1599 --- Script: ```shell #!/bin/bash # Search for uses of getStandingLimit and standing limit related types/constants rg "getStandingLimit|TStandingLimitBin|STANDING_LIMIT_BIN_NONE" --type ts -A 3 ``` Length of output: 2508 </details> </details> <details> <summary>static/webui/index.html (1)</summary> `301-306`: **LGTM!** The new checkbox control follows the existing pattern and is properly integrated into the server settings form. </details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Sign in to join this conversation.
No description provided.