Skip to content

Group discovery errors in GlitchTip by code path, not scan folder (WEB-6914) - #449

Merged
anonpran merged 2 commits into
stagingfrom
web-6914-discovery-glitchtip-grouping
Nov 30, 2026
Merged

anonpran merged 2 commits into
stagingfrom
web-6914-discovery-glitchtip-grouping

Conversation

@anonpran

@anonpran anonpran commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem

  • The agent runs from a new temp folder each scan, and GlitchTip puts that path into its grouping, so the same bug opens a new GlitchTip issue on every scan.
  • Sentry ignores the path, so it groups these correctly.

Fix

Change File
The GlitchTip copy gets fingerprint = error type + agent frames (path after coding_discovery_tools/ + function) + HTTP <code> when there is one scripts/coding_discovery_tools/utils.py
<listcomp>-style frames skipped (Python 3.12 inlines them); frameless events keep default grouping utils.py
Fingerprint failure falls back to default grouping; the Sentry copy is never touched utils.py
Tests: grouping across scan folders, fallback on failure, Windows paths tests/test_discovery_flow.py

Why split by HTTP code: Sentry merges all HTTP failures into one issue; GlitchTip gets one issue per code (413 / 401 / 500), which is the agreed trial behaviour.

Verified

  • Local GlitchTip 6.2.3, real send path, 2 scan folders × (413, 401, 500, 500 with a different body): 8 issues before → 3 after. The Sentry stand-in received no fingerprint.
  • Unit tests pass (98 locally; the guard tests also pass on Python 3.9.6).

Linear: WEB-6914. Pairs with websentry-ai/ai-gateway-data#3614 (same idea for gateway-data).

🤖 Generated with Claude Code

Unbound Review · Score 5/5 (no findings) · bfdac80

  • codex (own score 5/5): The PR adds a GlitchTip-only fingerprint based on exception type, agent frames, and HTTP or curl status while preserving the Sentry payload. The earlier curl exit-code finding is addressed, and I found no further actionable defects in the changed code.
  • claude (own score 5/5): The PR adds a grouping fingerprint to the GlitchTip copy of each event. The fingerprint is the error type, the agent's code frames (path relative to coding_discovery_tools/ plus function name, skipping -style frames), the HTTP code and the curl exit code. This stops GlitchTip from opening a new issue for every per-scan temp folder. The Sentry payload is left unchanged, a failure to build the fingerprint falls back to GlitchTip's default

findings: 0 P0 · 0 P1 · 0 P2 (top 5 P0/P1 inline) · engines: codex ✅ · claude ✅

rules applied: CLAUDE.md

…B-6914)

The GlitchTip copy gets a fingerprint of error type, agent frames and HTTP code, so the per-scan temp folder no longer opens a new issue each scan. The Sentry copy is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anonpran
anonpran requested a review from a team November 30, 2026 13:49

@vigneshsubbiah16 vigneshsubbiah16 left a comment

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.

✅ Security consensus: no issues found. (reviewers: Claude, Semgrep, Gitleaks)


🤖 consensus review · reviewers: Claude, Semgrep, Gitleaks · head 41b08488 · 2026-11-30T13:52Z

@anonpran

Copy link
Copy Markdown
Contributor Author

/review code

Comment thread scripts/coding_discovery_tools/utils.py Resolved
DNS, refused and TLS failures each get their own GlitchTip issue instead of one shared one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@anonpran

Copy link
Copy Markdown
Contributor Author

/review code

@vigneshsubbiah16 vigneshsubbiah16 left a comment

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.

✅ Security consensus: no issues found. (reviewers: claude, semgrep, gitleaks)


🤖 consensus review · reviewers: Claude, Semgrep, Gitleaks · head bfdac805 · 2026-11-30T14:13Z

@anonpran
anonpran merged commit b2e6ef5 into staging Nov 30, 2026
11 checks passed
anonpran added a commit that referenced this pull request Nov 30, 2026
* feat(discovery): report skipped scans and hook policy [WEB-6392] (#440)

* Group discovery errors in GlitchTip by code path, not scan folder (WEB-6914) (#449)

* Group discovery errors in GlitchTip by code path, not scan folder (WEB-6914)

The GlitchTip copy gets a fingerprint of error type, agent frames and HTTP code, so the per-scan temp folder no longer opens a new issue each scan. The Sentry copy is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Split GlitchTip network-failure issues by curl exit code (WEB-6914)

DNS, refused and TLS failures each get their own GlitchTip issue instead of one shared one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Iyad Zargar <dev@iyadzargar.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

3 participants