Skip to content

fix: align MAX_CONVERSATION_TURNS in .env.example with code default#408

Open
howardpen9 wants to merge 1 commit intoBeehiveInnovations:mainfrom
howardpen9:fix/env-example-max-turns
Open

fix: align MAX_CONVERSATION_TURNS in .env.example with code default#408
howardpen9 wants to merge 1 commit intoBeehiveInnovations:mainfrom
howardpen9:fix/env-example-max-turns

Conversation

@howardpen9
Copy link
Copy Markdown

Summary

  • .env.example had MAX_CONVERSATION_TURNS=40, but the code default in utils/conversation_memory.py:122 is 50
  • This mismatch causes test_add_turn_max_limit to fail when users copy .env.example to .env
  • Updated .env.example to 50 and corrected the comment ("25 turns = ~12 exchanges")

Fixes #332

Test plan

  • Copy .env.example to .env, run pytest tests/test_conversation_memory.py::TestConversationMemory::test_add_turn_max_limit -v — should pass
  • Verify no other tests depend on MAX_CONVERSATION_TURNS=40

The code default in conversation_memory.py is 50, but .env.example had 40.
This mismatch causes test_add_turn_max_limit to fail when users copy
.env.example to .env.

Fixes BeehiveInnovations#332
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves an inconsistency between the example environment configuration and the application's default settings. By synchronizing the maximum conversation turns value, it ensures that developers using the provided example configuration will not encounter unexpected test failures related to this setting, thereby improving the initial setup experience and reliability.

Highlights

  • Configuration Alignment: The MAX_CONVERSATION_TURNS value in .env.example was updated from 40 to 50 to match the default value used in the code (utils/conversation_memory.py:122).
  • Test Fix: This misalignment previously caused the test_add_turn_max_limit test to fail when users copied .env.example to .env.
  • Documentation Correction: The comment associated with MAX_CONVERSATION_TURNS in .env.example was also corrected to reflect the new default and a more accurate exchange calculation.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • .env.example
    • Updated MAX_CONVERSATION_TURNS from 40 to 50.
    • Corrected the descriptive comment for MAX_CONVERSATION_TURNS to reflect the new default and exchange calculation.
Activity
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly aligns MAX_CONVERSATION_TURNS in .env.example with the code's default value of 50. This is an important fix to prevent test failures for users setting up the environment. I have one suggestion to improve the clarity of the comment in .env.example. Additionally, for full consistency, the documentation in docs/configuration.md should also be updated, as it currently specifies MAX_CONVERSATION_TURNS=20.

Comment thread .env.example
# Each exchange (Claude asks, Gemini responds) counts as 2 turns
# So 20 turns = 10 exchanges. Defaults to 40 if not specified
MAX_CONVERSATION_TURNS=40
# So 25 turns = ~12 exchanges. Defaults to 50 if not specified
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example '25 turns = ~12 exchanges' is a bit imprecise since 25 turns is exactly 12.5 exchanges. Using an approximation might be confusing for users. For better clarity, consider using an example with whole numbers that doesn't require approximation.

# So 24 turns = 12 exchanges. Defaults to 50 if not specified

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.

Test failure: test_add_turn_max_limit fails due to MAX_CONVERSATION_TURNS mismatch

1 participant