Skip to content

fix: let Tom search repository history when asked who worked on a feature - #1487

Open
sulimanbenhalim wants to merge 1 commit into
dev-null-sh:productionfrom
sulimanbenhalim:fix/tom-repository-history-for-who-worked-on
Open

sulimanbenhalim wants to merge 1 commit into
dev-null-sh:productionfrom
sulimanbenhalim:fix/tom-repository-history-for-who-worked-on

Conversation

@sulimanbenhalim

@sulimanbenhalim sulimanbenhalim commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Changes

  • the SearchRepositoryHistory criterion now says who built or worked on a feature counts and that this covers asking who worked on "this" or "it" when the message or thread makes clear which feature it means even next to congratulations
  • an unclear "this" still falls under the policy's ambiguity rule
  • its contributor rankings exclusion now says naming who worked on one feature isn't a ranking since that exclusion is the likeliest reason the question got turned away

Validation

  • OpenAIToolDecisionProviderTest checks the new wording reaches the history question and fails without the change
  • the tool decision and Tom tests pass (142) and Pint and Rector and PHPStan pass

Independent review

  • read-only Claude agent: CODE PASS on base 84c5496a head 18ba6cc6 after its first pass caught a looser wording that let an unclear "this" through

Limitations

  • I don't have an OpenAI key so I couldn't run the real classifier on that thread before and after and the test only checks the prompt text so it's worth trying that thread against production

Summary by CodeRabbit

  • Bug Fixes
    • Repository history search now recognizes questions about who worked on or changed a feature, including when the question also includes congratulations.
    • Asking who contributed to a feature is treated as identifying contributors, not ranking them.

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The SearchRepositoryHistory criterion now covers questions about who worked on a feature, including questions accompanied by congratulations. The shared-policy test checks this wording and clarifies that naming a contributor is not a ranking.

Changes: Feature contributor question routing

Layer / File(s) Summary
Search policy and expectations
app/Services/ToolDecisionProviders/OpenAIToolDecisionProvider.php, tests/Unit/Services/ToolDecisionProviders/OpenAIToolDecisionProviderTest.php
The criterion covers questions about who worked on a feature, including references to “this” or “it” when the thread identifies the feature, and questions accompanied by congratulations. The test checks this wording and distinguishes naming a contributor from requesting a ranking.

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Bug fix

Possibly related PRs

  • dev-null-sh/dev-null.sh#1450: Updates the same shared tool policy and distinguishes repository contributors from community member rankings.
  • dev-null-sh/dev-null.sh#1156: Changes author resolution in RepositoryHistoryQuery, which handles the author data flow for repository-history searches.

Suggested reviewers: paulinevos, nunomaduro

Merge Risk: Minimal · up to 18ba6

No actionable merge-blocking risk is established for this prompt-routing change.

Security architecture risk: Minimal · up to 18ba6

The change clarifies when to consult development history. Searches retain the same repository scope, input limits and read-only access; no new security exposure was identified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • observed — Each accepted query searches one configured repository for at most five PRs and five commits. The request cannot choose another repository. Each tool instance permits two attempts, including rejected inputs. Broader conversational selection therefore retains the existing independently enforceable search scope.

Trust Boundaries and Controls

  • observed — User-influenced, model-generated keywords cross an external API boundary only after normalization, a 100-character limit and a character allow-list. Terms are individually quoted beneath fixed repository qualifiers. The HTTP search path uses configured OAuth-app credentials at a fixed endpoint, without invoking the separate issue-writing installation-token path.

Resilience and Maintainability Implications

  • inferred — The existing cache is keyed by repository and query hash with a 15-minute lifetime. Its callback returns a combined result only after both searches complete successfully; incomplete responses or handled HTTP failures return unavailable. Repetition and concurrent misses can repeat reads, but introduce no repository mutation or partially committed attribution record. Local mentions are resolved after cache retrieval rather than stored in the shared history result.
Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: allowing repository-history searches when users ask who worked on a feature.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0c20c347-e440-43da-b255-51ca817fc33b
Commits

Reviewing files that changed from the base of the PR and between 84c5496 and 18ba6cc.

Files selected for processing: 2

  • app/Services/ToolDecisionProviders/OpenAIToolDecisionProvider.php
  • tests/Unit/Services/ToolDecisionProviders/OpenAIToolDecisionProviderTest.php

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

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