fix: scope ticket cache per-PR and fix Dynaconf list merge leaks in tests (#2383)#2489
fix: scope ticket cache per-PR and fix Dynaconf list merge leaks in tests (#2383)#2489utsab345 wants to merge 3 commits into
Conversation
…ests - Cache key is now 'related_tickets_<md5(pr_url)>' instead of global 'related_tickets', preventing stale tickets leaking between unrelated PRs - Added cache_tickets=true config flag under [pr_reviewer] to allow disabling - Fixed Dynaconf merge_enabled=True list append bug in both production code (env_bridge.py uses case-insensitive pop before set) and test helpers (restore_settings now calls _remove_key before every set) - Added azure-identity dependency for Azure DevOps provider availability - 1043 tests pass, 0 failures
PR Summary by QodoScope ticket cache per PR and add configurable ticket caching
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
Code Review by Qodo
1.
|
- Skip caching entirely when PR URL is unavailable (avoid global key fallback) - Add cache_tickets to .pr_agent.toml to mirror configuration.toml - Wrap overlong cache_key assignment to stay within 120-char line limit - Update PRReviewer to read PR-scoped cache key for accurate token budgeting
- Skip caching entirely when PR URL is unavailable (avoid global key fallback) - Add cache_tickets to .pr_agent.toml to mirror configuration.toml - Wrap overlong cache_key assignment to stay within 120-char line limit - Update PRReviewer to read PR-scoped cache key for accurate token budgeting
55a15e8 to
fc8ea8c
Compare
|
Code review by qodo was updated up to the latest commit fc8ea8c |
…nt#2383) - Add cache_tickets check to _load_related_tickets (prevent cache bypass) - Cache empty extraction results too (avoid repeated API calls) - Replace Dynaconf cache with in-memory dict + 1h TTL (bounded cache) - Update tests to use new in-memory cache

Scopes ticket caching to individual pull requests using a PR-specific cache key (
related_tickets_<md5(pr_url)>) instead of the globalrelated_ticketskey, preventing stale ticket context from leaking across unrelated PRs in long-lived deployments.Also adds an optional
pr_reviewer.cache_ticketsconfiguration flag (defaulttrue) to disable caching entirely.Fixes #2383