Skip to content

fix(repo-finder): grade maintainer signal from comment text, not association#31

Merged
gaurav0107 merged 3 commits into
gaurav0107:mainfrom
imkp1:fix/maintainer-signal-grading
Jul 21, 2026
Merged

fix(repo-finder): grade maintainer signal from comment text, not association#31
gaurav0107 merged 3 commits into
gaurav0107:mainfrom
imkp1:fix/maintainer-signal-grading

Conversation

@imkp1

@imkp1 imkp1 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Problem

The Step-4 approval bonus was set from comment association alone. Any comment from an OWNER/MEMBER/COLLABORATOR earned the full +3 and rendered as "Maintainer approved: yes" — regardless of what the comment said.

The contract was explicit that this was association, not approval (the note under the rubric: the field "answers one question — did an account GitHub vouches for as a maintainer speak on this issue?"), while the rubric line directly above it promised +3 for a comment "with approval signal". Nothing read the comment text, so the two never agreed.

In practice a maintainer refuting the report, a maintainer routing it to a colleague, and a maintainer inviting a PR were scored identically.

Change

Association becomes a prerequisite and stops being sufficient. maintainer_signal is graded from the comment text:

signal scores example
invites_pr +5 "PRs welcome", "happy to review"
confirms +3 "reproduced", "confirmed", "good catch"
neutral +1 routing, questions, clarification
none 0 no maintainer prose to grade

Three supporting changes, each covering a case association could not see:

  • Claim detection runs before the tiering. A maintainer can confirm a defect and claim it in one sentence ("this is valid, we will look into it"). Grading sentiment first scores that as approval and never reaches the claim.
  • Non-maintainer claims are skips. "I would like to work on this" is not an assignee, so the existing assignee test cannot see it. Windowed at 14 days, so an abandoned claim does not fence an issue off permanently.
  • Prose must be prose. Links and bare @mentions are stripped before grading. A comment that is only a pointer somewhere else states no position on the issue, and no sentiment tier can read one.

Cost

None. Every input comes from the bulk gh issue list payload the scan already fetches — the contract's existing "never issue a per-issue call for data the bulk list already returned" rule still holds. No new API calls, no added latency.

Limits, stated plainly

The filter matches prose with regexes and will misgrade. A refutation phrased in the project's own domain terms disputes the premise while matching none of the decline patterns. That case is handled in contract prose — the agent is told to read the graded comment, hard-skip on a disputed premise, and record any override in notes so the gaps stay visible. That is genuinely weaker than the code path.

Hard-skip rather than score-down is deliberate: zeroing the bonus still leaves bug + repro + small scope at 7, and labels plus recency clear the 8 threshold without any maintainer signal at all.

This strictly reduces the candidate set. Issues that previously cleared the threshold on an unearned +3 no longer do. That is the intent, but it will show up as fewer results per scan, not just better-ordered ones.

Breaking

best_issue.has_maintainer_approval (boolean) is replaced by best_issue.maintainer_signal (enum) in schemas/repo_shortlist.schema.json. A boolean cannot carry four states. The field was optional and no consumer read it outside the rubric and the report template, both updated here.

Tests

tests/scripts/test_triage_filter.sh — 9 new fixtures covering each tier, confirm-and-claim, live vs. stale outsider claim, bare-link comment, terse invite, and an undated comment. All pre-existing assertions still pass, including the union-only-commenter distinction.

The second commit fixes three defects found reviewing the first, each with a regression test: the prose floor ran ahead of the pattern match and graded "PRs welcome!" as no signal; the claim pattern was broad enough to match "the regression is on our side", which owns a defect rather than claiming it; and an undated comment reached fromdateiso8601, which throws on null and aborted the whole batch.

Full suite: 62 pass. test_audit_impact, test_parse_workflows and test_smoke_gate fail identically on main in this environment (missing yq and GNU timeout) and are unrelated.

Summary by CodeRabbit

  • New Features

    • Introduced graded maintainer signals: invites_pr, confirms, neutral, or none.
    • Shortlisted results now include maintainer_signal instead of the prior maintainer approval boolean.
    • Enhanced triage logic to better recognize maintainer/engagement language and outsider claims.
  • Bug Fixes

    • More reliably skips issues when a maintainer has disputed, redirected, or refuted the premise.
    • Improves handling of undated comments and “already fixing/looking into” variants.
  • Documentation

    • Updated scoring guidance, examples, and schema definitions to reflect maintainer_signal.
  • Tests

    • Expanded triage filter fixtures and assertions to cover additional cases and tiers.

imkp1 added 2 commits July 20, 2026 23:53
The approval bonus was set from comment association alone, so any comment by
an OWNER/MEMBER/COLLABORATOR earned the full +3 and rendered as "Maintainer
approved: yes" — refutations and bare links included.

Replace the boolean with a signal graded from the comment text: invites_pr +5,
confirms +3, neutral +1, none 0. Association stays a prerequisite and stops
being sufficient.

Close two claims the association and assignee tests cannot see:
- a maintainer who confirms and claims in one sentence; the claim test now
  runs before the tiering, which would otherwise score it as approval
- a non-maintainer claim, windowed at 14 days so an abandoned one does not
  fence the issue off permanently

Strip links and mentions before grading and require prose in what remains. A
comment that is only a pointer states no position.

Reads the bulk issue payload already in hand; no additional API calls.
Match before measuring. The prose floor ran ahead of the pattern match, so
"PRs welcome!" — 12 characters, the strongest signal there is — graded as no
signal. The floor now separates a remark from a pointer and decides
neutral-or-none only.

Narrow the claim test. Bare "on our side" also matches "the regression is on
our side", which owns the defect and invites a fix rather than claiming it.
Require an intent to act.

Guard the claim timestamp. A comment can serialize without createdAt, and
null | fromdateiso8601 throws, aborting the batch and taking every other
issue with it. Undated now reads as expired rather than as a live claim.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The triage filter now classifies maintainer engagement into graded signals, skips active outsider claims, and emits the new field. Repo-finder scoring, shortlist schema, examples, and tests are updated from has_maintainer_approval to maintainer_signal.

Changes

Maintainer signal flow

Layer / File(s) Summary
Triage signal classification and claim gates
scripts/orchestrator/triage_filter.sh, tests/scripts/test_triage_filter.sh
The filter recognizes additional claim phrases, derives signal tiers, skips live outsider claims, emits maintainer_signal, and tests signal and age-based cases.
Repo-finder scoring and shortlist contract
agents/repo-finder.md, schemas/repo_shortlist.schema.json
Scoring guidance, output examples, and schema definitions replace the approval boolean with the graded maintainer signal and add hard-skip guidance for disputed premises.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant IssueData
  participant triage_filter.sh
  participant repo_finder
  participant ShortlistSchema
  IssueData->>triage_filter.sh: Process issue comments
  triage_filter.sh->>triage_filter.sh: Classify maintainer_signal and live claims
  triage_filter.sh->>repo_finder: Emit KEEP or SKIP result
  repo_finder->>repo_finder: Apply signal scoring and dispute skips
  repo_finder->>ShortlistSchema: Validate maintainer_signal
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly captures the main change: switching repo-finder from association-based approval to graded maintainer signals from comment text.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/scripts/test_triage_filter.sh`:
- Around line 16-17: Update the RECENT and STALE fixture definitions in
tests/scripts/test_triage_filter.sh to derive timestamps relative to jq’s
current time using now and todateiso8601, keeping RECENT within the 14-day
live-claim window while preserving STALE as an older abandoned claim. Avoid
hardcoded dates and shell-specific timestamp commands.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9bcd7db0-a256-4f05-a1f2-beda4b70280e

📥 Commits

Reviewing files that changed from the base of the PR and between b4e455d and ebf7547.

📒 Files selected for processing (4)
  • agents/repo-finder.md
  • schemas/repo_shortlist.schema.json
  • scripts/orchestrator/triage_filter.sh
  • tests/scripts/test_triage_filter.sh

Comment thread tests/scripts/test_triage_filter.sh
Two regexes credited or skipped on text they had not actually matched.

- `reproduc` matched its own negation, so a maintainer who could not
  reproduce graded `confirms` (+3). Negated phrases are now deleted from
  the graded text before the tier test, not short-circuited on, so a
  second maintainer who did reproduce it still earns the tier. Not a
  decline: the report may still be sound, so it falls to `neutral`.
- `can i (take|work on|pick up)` had no object anchor, so "take a look at
  this" read as a claim and skipped the issue. Anchored on `(this|it)`
  like every other alternative.

Regression tests for both, plus guards that neither over-corrects.
@imkp1

imkp1 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai resume

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
✅ Action performed

Reviews resumed.

@imkp1

imkp1 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
tests/scripts/test_triage_filter.sh (1)

382-384: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Add missing KEEP assertion for issue 924.

Before asserting the maintainer_signal field, please consider explicitly asserting that issue 924 is kept by the triage filter. This maintains test consistency with the other fixtures (e.g., 923, 925) and provides a clearer error message if the issue is accidentally filtered out upstream.

♻️ Proposed refactor
 # Negations are deleted from the graded text, not short-circuited on: one
 # maintainer missing it cannot mute another who reproduced it.
+want 924 KEEP "one maintainer reproducing overrides another missing it"
 [ "$(field 924 maintainer_signal)" = "confirms" ] || { echo "FAIL `#924` signal: got '$(field 924 maintainer_signal)'"; exit 1; }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/scripts/test_triage_filter.sh` around lines 382 - 384, Add an explicit
KEEP assertion for issue 924 before the existing maintainer_signal check,
matching the assertion pattern used by fixtures 923 and 925; retain the current
signal assertion afterward.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@tests/scripts/test_triage_filter.sh`:
- Around line 382-384: Add an explicit KEEP assertion for issue 924 before the
existing maintainer_signal check, matching the assertion pattern used by
fixtures 923 and 925; retain the current signal assertion afterward.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ffb410f5-422f-4bd5-a5a0-5424302fdaf6

📥 Commits

Reviewing files that changed from the base of the PR and between ebf7547 and c7c879a.

📒 Files selected for processing (2)
  • scripts/orchestrator/triage_filter.sh
  • tests/scripts/test_triage_filter.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/orchestrator/triage_filter.sh

@gaurav0107
gaurav0107 merged commit f70f6ef into gaurav0107:main Jul 21, 2026
3 checks passed
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.

2 participants