fix: map REVIEW_MAX_COMMENTS to both inline and context limits #3

Closed
b3nw wants to merge 0 commits from fix/review-max-comments-env into main
Owner

REVIEW_MAX_COMMENTS was only mapped to REVIEW__MAX_INLINE_COMMENTS which
only limits comments per-file. Added REVIEW__MAX_CONTEXT_COMMENTS mapping
to also limit total comments per MR, which is what users expected.

Also added missing LLM__META__TEMPERATURE env var mapping.

REVIEW_MAX_COMMENTS was only mapped to REVIEW__MAX_INLINE_COMMENTS which only limits comments per-file. Added REVIEW__MAX_CONTEXT_COMMENTS mapping to also limit total comments per MR, which is what users expected. Also added missing LLM__META__TEMPERATURE env var mapping.
b3nw added 1 commit 2026-01-01 19:11:06 -06:00
REVIEW_MAX_COMMENTS was only mapped to REVIEW__MAX_INLINE_COMMENTS which
only limits comments per-file. Added REVIEW__MAX_CONTEXT_COMMENTS mapping
to also limit total comments per MR, which is what users expected.

Also added missing LLM__META__TEMPERATURE env var mapping.
First-time contributor

[README.md:30] The description is ambiguous: clarify whether the limit applies per-file or per-review for inline comments, and specify if context review has a separate total limit.

| `REVIEW_MAX_COMMENTS` | No | Maximum number of inline comments per file. Also limits total context review comments. Set to `0` to disable. | `3` |

#ai-review-inline

[README.md:30] The description is ambiguous: clarify whether the limit applies per-file or per-review for inline comments, and specify if context review has a separate total limit. ```suggestion | `REVIEW_MAX_COMMENTS` | No | Maximum number of inline comments per file. Also limits total context review comments. Set to `0` to disable. | `3` | ``` #ai-review-inline
First-time contributor

[compose.yaml:22] Comment is misleading: MAX_INLINE_COMMENTS is per-file, but MAX_CONTEXT_COMMENTS appears to be per-MR total, not both 'per-MR'.

      # Review Config (inline=per file, context=per MR total)

#ai-review-inline

[compose.yaml:22] Comment is misleading: MAX_INLINE_COMMENTS is per-file, but MAX_CONTEXT_COMMENTS appears to be per-MR total, not both 'per-MR'. ```suggestion # Review Config (inline=per file, context=per MR total) ``` #ai-review-inline
First-time contributor

[compose.yaml:24] Both MAX_INLINE_COMMENTS and MAX_CONTEXT_COMMENTS read from the same env var REVIEW_MAX_COMMENTS, making them always identical and unable to be configured independently.

      - REVIEW__MAX_CONTEXT_COMMENTS=${REVIEW_MAX_CONTEXT_COMMENTS:-3}

#ai-review-inline

[compose.yaml:24] Both MAX_INLINE_COMMENTS and MAX_CONTEXT_COMMENTS read from the same env var REVIEW_MAX_COMMENTS, making them always identical and unable to be configured independently. ```suggestion - REVIEW__MAX_CONTEXT_COMMENTS=${REVIEW_MAX_CONTEXT_COMMENTS:-3} ``` #ai-review-inline
First-time contributor

The documentation was clarified to better explain that REVIEW_MAX_COMMENTS applies both per-file for inline comments and as a total limit for context review comments. A new LLM__META__TEMPERATURE environment variable was added with a sensible default of 0.2 for more consistent AI behavior. The changes improve configuration clarity and user control. Consider documenting the LLM_TEMPERATURE variable in the README.md environment variables table for completeness.

#ai-review-summary

The documentation was clarified to better explain that `REVIEW_MAX_COMMENTS` applies both per-file for inline comments and as a total limit for context review comments. A new `LLM__META__TEMPERATURE` environment variable was added with a sensible default of 0.2 for more consistent AI behavior. The changes improve configuration clarity and user control. Consider documenting the `LLM_TEMPERATURE` variable in the README.md environment variables table for completeness. #ai-review-summary
b3nw added 1 commit 2026-01-01 19:44:32 -06:00
refactor: separate inline and context comment limits
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 39s
915d336b95
Split REVIEW_MAX_COMMENTS into two independent variables:
- REVIEW_MAX_COMMENTS: total comments per PR (context review)
- REVIEW_MAX_INLINE_COMMENTS: comments per file (inline review)

Addresses AI reviewer feedback for independent configuration.
b3nw closed this pull request 2026-01-01 19:49:24 -06:00
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 39s

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: b3nw/gitea-ai-webhook#3