Skip to content

fix(sweep): mine the Greptile summary body for findings, not just inline comments#1707

Merged
carlos-alm merged 4 commits into
mainfrom
fix/sweep-greptile-summary
Jun 28, 2026
Merged

fix(sweep): mine the Greptile summary body for findings, not just inline comments#1707
carlos-alm merged 4 commits into
mainfrom
fix/sweep-greptile-summary

Conversation

@carlos-alm

Copy link
Copy Markdown
Contributor

Problem

The /sweep skill's addressing logic is inline-comment-centric. Greptile often raises actionable findings in its top-level summary — the ### Greptile Summary issue comment carrying a Confidence Score: N/5 and prose review — that are not mirrored as inline review comments. A sweep that only iterates the inline comments gathered in step 2d therefore silently misses these summary-only findings. This is the single most common way a Greptile concern survives a sweep unaddressed.

Fix

  • New step 2d.1 ("Mine the Greptile summary body"), inserted immediately after the gather-comments step (2d) and before the address-comments step (2e). It treats the summary as a source of findings, not a single comment to reply to: pulls the full summary body (from both the issue-comments and reviews endpoints, since Greptile sometimes posts it as a review body), then extracts every distinct finding — the Confidence Score justification, "First… Second…" gaps in a "Safe to merge after…" paragraph, per-row concerns in the Important Files Changed table, and "Note on…" / "Caveat…" / "mismatch" lines. Each finding is reconciled against the inline comments; any with no matching inline comment is still fixed (or tracked as a follow-up issue).
  • New Rules bullet reinforcing that you must mine the summary body, not just inline comments, and reconcile fixes against the summary before declaring a PR ready.

Docs-only change to .claude/skills/sweep/SKILL.md. Part of a cross-repo sweep-skill fix applying the same "mine the summary" step across repos that use the /sweep skill.

@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds a new "step 2d.1" to the /sweep skill that explicitly mines the Greptile top-level summary body for actionable findings, addressing a gap where summary-only findings (not mirrored as inline comments) were silently skipped during sweeps.

  • New step 2d.1 inserts a targeted gh api filter step between the gather-comments and address-comments phases, running two queries (issue-comments + review bodies) filtered to Greptile's user to extract the full summary body, then enumerates every distinct finding type (confidence-score justification, numbered gaps, table rows, "Note on…" caveats) and reconciles each against the inline-comment list.
  • New Rules bullet reinforces the mining requirement and makes it a first-class rule alongside the existing "address ALL comments" rule.
  • The previously flagged bug (wrong repo ops-codegraph-tool in the gh api calls) is fixed; both calls now correctly target repos/optave/codegraph.

Confidence Score: 5/5

Safe to merge — docs-only change to a skill file with no production code impact.

The change is confined to a single markdown skill file. The new step slots cleanly into the existing numbered sequence, both gh api calls target the correct repo (optave/codegraph), and the reconciliation logic is consistent with the pattern used elsewhere in the skill. No behavioral regressions are possible from a docs-only update.

No files require special attention.

Important Files Changed

Filename Overview
.claude/skills/sweep/SKILL.md Adds step 2d.1 to mine the Greptile summary body for findings and a corresponding Rules bullet; both gh api calls correctly target repos/optave/codegraph, and the logic fits cleanly into the existing step ordering.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Step 2d: Gather all review comments\nfetch /pulls/comments, /reviews, /issues/comments] --> B[Step 2d.1: Mine Greptile summary body]
    B --> C{Filter Greptile comments\nfrom both endpoints}
    C --> D[issues/comments\ngreptile summary as issue comment]
    C --> E[pulls/reviews\ngreptile summary as review body]
    D --> F[Extract distinct findings\nConfidence score gaps\nNumbered paragraphs\nImportant Files table rows\nNote on / Caveat lines]
    E --> F
    F --> G{Matching inline\ncomment exists?}
    G -- Yes --> H[Handle in address-comments step 2e]
    G -- No --> I[Add to actionable list\nfix it or file follow-up issue]
    H --> J[Step 2e: Address ALL comments]
    I --> J
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Step 2d: Gather all review comments\nfetch /pulls/comments, /reviews, /issues/comments] --> B[Step 2d.1: Mine Greptile summary body]
    B --> C{Filter Greptile comments\nfrom both endpoints}
    C --> D[issues/comments\ngreptile summary as issue comment]
    C --> E[pulls/reviews\ngreptile summary as review body]
    D --> F[Extract distinct findings\nConfidence score gaps\nNumbered paragraphs\nImportant Files table rows\nNote on / Caveat lines]
    E --> F
    F --> G{Matching inline\ncomment exists?}
    G -- Yes --> H[Handle in address-comments step 2e]
    G -- No --> I[Add to actionable list\nfix it or file follow-up issue]
    H --> J[Step 2e: Address ALL comments]
    I --> J
Loading

Reviews (4): Last reviewed commit: "Merge branch 'main' into fix/sweep-grept..." | Re-trigger Greptile

Comment thread .claude/skills/sweep/SKILL.md Outdated
Comment on lines +138 to +143
gh api repos/optave/ops-codegraph-tool/issues/<number>/comments --paginate \
--jq '.[] | select(.user.login|test("greptile";"i")) | .body'
# …and as a review body (Greptile sometimes posts the summary here instead):
gh api repos/optave/ops-codegraph-tool/pulls/<number>/reviews --paginate \
--jq '.[] | select(.user.login|test("greptile";"i")) | .body'
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Wrong repository in step 2d.1 gh api commands

The new bash block references repos/optave/ops-codegraph-tool (this file's home repo), but every other gh api call in the skill targets repos/optave/codegraph — the repo whose PRs are actually swept (Step 1 uses --repo optave/codegraph). When a subagent executes step 2d.1, it queries the wrong repo and silently returns no Greptile comments, so the entire new mining logic becomes a no-op. Both occurrences of ops-codegraph-tool should be replaced with codegraph.

Fix in Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in commit ad63cd2 — both gh api calls in step 2d.1 now reference repos/optave/codegraph, matching the file's convention for all other API calls in the skill. Verified there are no remaining ops-codegraph-tool references in the step 2d.1 bash block; the one remaining occurrence (in the follow-up-issue permalink template) is pre-existing and outside this PR's diff. Your own summary review of ad63cd2 confirms the calls now correctly target codegraph.

@carlos-alm

Copy link
Copy Markdown
Contributor Author

@greptileai

@carlos-alm carlos-alm merged commit f0a1f1d into main Jun 28, 2026
14 checks passed
@carlos-alm carlos-alm deleted the fix/sweep-greptile-summary branch June 28, 2026 01:18
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant