Skip to content

fix(ci): merge duplicate [config] table in .pr_agent.toml - #394

Merged
InfinityZero3000 merged 2 commits into
mainfrom
fix/pr-agent-toml-main
Aug 7, 2026
Merged

fix(ci): merge duplicate [config] table in .pr_agent.toml#394
InfinityZero3000 merged 2 commits into
mainfrom
fix/pr-agent-toml-main

Conversation

@InfinityZero3000

Copy link
Copy Markdown
Owner

Summary

  • PR-Agent's GitHub Action fetches .pr_agent.toml from 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 on dev, so main kept the broken file and every PR since has failed config parsing with Cannot declare ('config',) twice.
  • This merges the trailing [config] block's git_provider/pr_commands keys into the top-level [config] table and removes the duplicate header.
  • Validated with python3 -c "import tomllib; tomllib.load(open('.pr_agent.toml','rb'))" — parses cleanly, single config section with model, fallback_models, git_provider, pr_commands.

Test plan

  • tomllib.load() parses the file without error
  • No functional change to any app code — CI-config-only fix

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
lexilingo-admin Ignored Ignored Aug 7, 2026 12:39pm
lexilingo-app Ignored Ignored Aug 7, 2026 12:39pm

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

PR-Agent failed to apply 'local' repo settings

The configuration file needs to be a valid TOML, please fix it.


Error message:
Cannot declare ('config',) twice (at line 61, column 8)

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>
@InfinityZero3000
InfinityZero3000 merged commit 3d82c53 into main Aug 7, 2026
11 checks passed
@InfinityZero3000
InfinityZero3000 deleted the fix/pr-agent-toml-main branch August 7, 2026 12:58
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.

1 participant