fix(ci): merge duplicate [config] table in .pr_agent.toml - #394
Merged
Conversation
PR-Agent always reads .pr_agent.toml from the repo's default branch (main), regardless of which branch a PR is opened from. A prior fix for this file was merged into dev only (#392), so PR-Agent kept failing config parsing ("Cannot declare ('config',) twice") on every PR since main never got the fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
|
❌ PR-Agent failed to apply 'local' repo settings The configuration file needs to be a valid TOML, please fix it. Error message: Configuration content:[config]
# Use Google Gemini API
model = "google/gemini-2.5-pro"
fallback_models = ["google/gemini-2.5-flash"]
[pr_reviewer]
# Enable/disable features
require_focused_review = true
require_score_review = true
require_tests_review = true
require_security_review = true
require_estimate_effort_to_review = true
# Review settings
num_code_suggestions = 5
inline_code_comments = true
auto_review = true
remove_previous_review_comment = true
# Language and tone
extra_instructions = """
- Focus on code quality, security, and best practices
- Check for proper error handling
- Verify Clean Architecture principles
- Ensure proper test coverage
- Review API design and RESTful conventions
- Check for potential performance issues
- Verify proper logging and monitoring
"""
[pr_code_suggestions]
# Code improvement suggestions
num_code_suggestions = 5
extra_instructions = """
- Suggest improvements for code readability
- Recommend better naming conventions
- Propose performance optimizations
- Suggest security enhancements
"""
[pr_description]
# Auto-generate PR description
publish_description = true
add_original_user_description = true
extra_instructions = """
- Summarize main changes
- List affected components
- Note breaking changes
- Include testing notes
"""
[pr_questions]
# Auto-generate clarifying questions
num_questions = 3
extra_instructions = """
- Ask about design decisions
- Question potential edge cases
- Clarify implementation choices
"""
[config]
# Model configuration (uncomment to customize)
# model = "gpt-4-turbo-preview"
# model = "anthropic/claude-3-5-sonnet-20241022"
# fallback_models = ["gpt-3.5-turbo"]
# Git provider
git_provider = "github"
# Review triggers
pr_commands = [
"/review",
"/describe",
"/improve",
"/ask",
"/update_changelog",
]
|
Both fixes previously landed on dev only, so main's Gitleaks and MCP Pytest & Startup Smoke checks fail on every PR opened against main: - .gitleaks.toml: main was missing the allowlist entries dev already has for the rotated GCP key in scripts/data-pipeline/translate_*.py and a couple of doc/test-fixture paths, so the full-history scan (gitleaks git --log-opts=--all) flags an already-remediated historical commit as a new leak. - mcp-server/requirements.txt: main's unbounded `mcp>=1.0.0` resolves to mcp 2.0, which drops the lowlevel Server decorator API (list_tools/call_tool) mcp-server/server.py is written against. Pin to <2.0.0, matching dev. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.pr_agent.tomlfrom the repo's default branch (main), independent of which branch the PR itself is on. A previous fix for the duplicate[config]table (merged in Onboarding personalization, chat cold-start fix, Lexi chat UX, and backend hardening #392) only landed ondev, somainkept the broken file and every PR since has failed config parsing withCannot declare ('config',) twice.[config]block'sgit_provider/pr_commandskeys into the top-level[config]table and removes the duplicate header.python3 -c "import tomllib; tomllib.load(open('.pr_agent.toml','rb'))"— parses cleanly, singleconfigsection withmodel,fallback_models,git_provider,pr_commands.Test plan
tomllib.load()parses the file without error🤖 Generated with Claude Code