From e1b3f2911815dd8d9c4ed10ba7789f58ec2f8eeb Mon Sep 17 00:00:00 2001 From: Self-Managing Codebase Manager <7004983+WillTaylor22@users.noreply.github.com> Date: Tue, 2 Jun 2026 13:33:48 +0000 Subject: [PATCH] memory: sentry firstSeen relative-duration syntax is rejected by the API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Sentry MCP search_issues tool description shows firstSeen:-24h / lastSeen:-7d as example query filters, but the Sentry API rejects firstSeen:>-7d with 'Invalid date: >-7d'. Surfaced this session while running the step-2 Sentry sweep — the unscoped is:unresolved query already covered what we needed, but a future session will try the relative-time form because the tool docs say it's valid. +5 lines under .claude/memory/learnings/ + 1 MEMORY.md index line. MEMORY.md still well under the 200-line cap (16 learnings, cap 20). --- .claude/memory/MEMORY.md | 1 + ...6-02-sentry-firstseen-relative-rejected.md | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .claude/memory/learnings/2026-06-02-sentry-firstseen-relative-rejected.md diff --git a/.claude/memory/MEMORY.md b/.claude/memory/MEMORY.md index b8809bc..fcc3022 100644 --- a/.claude/memory/MEMORY.md +++ b/.claude/memory/MEMORY.md @@ -19,6 +19,7 @@ Keep this file under 200 lines — anything longer is content bloat, not memory. - [learnings/git-checkout-theirs-replaces-whole-file](learnings/2026-05-27-git-checkout-theirs-replaces-whole-file.md) — `git checkout --theirs ` during a merge replaces the WHOLE file, silently reverting unrelated edits earlier on the branch; verify with `git diff origin/` afterwards (PR #29 round 1) - [learnings/verify-ticket-issues-still-exist-on-main](learnings/2026-05-28-verify-ticket-issues-still-exist-on-main.md) — Re-read the ticket's target file in current `origin/` before drafting; humans push small fixes direct-to-main between ticket creation and agent pickup (PR #29 ENG-30 round 1) - [learnings/vercel-mcp-silently-hides-projects](learnings/2026-05-31-vercel-mcp-silently-hides-projects.md) — Vercel MCP can return only a subset of a team's projects even with the right teamId — `get_project(self-managing-codebase)` 404'd despite the project being healthy; use the curl+Vercel-bot fallback, don't assume it was deleted +- [learnings/sentry-firstseen-relative-rejected](learnings/2026-06-02-sentry-firstseen-relative-rejected.md) — Sentry `search_issues` tool description shows `firstSeen:-7d` as a valid filter but the API rejects it; use ISO timestamps or pass `statsPeriod` on the tool call instead ## Decisions - [decisions/mcp-for-small-writes-checkout-for-big](decisions/2026-05-26-mcp-for-small-writes-checkout-for-big.md) — Single-file writes go through GitHub MCP; multi-file or test-needing changes use the mounted checkout + `git push` diff --git a/.claude/memory/learnings/2026-06-02-sentry-firstseen-relative-rejected.md b/.claude/memory/learnings/2026-06-02-sentry-firstseen-relative-rejected.md new file mode 100644 index 0000000..66eb103 --- /dev/null +++ b/.claude/memory/learnings/2026-06-02-sentry-firstseen-relative-rejected.md @@ -0,0 +1,24 @@ +# Sentry `search_issues` rejects `firstSeen:-7d` shape (tool docs are wrong) + +The Sentry MCP `search_issues` tool description shows `firstSeen:-24h` / +`lastSeen:-7d` as example query filters, but the Sentry API actually +rejects that syntax: + +``` +HTTP 400: Error parsing search query: first_seen: Invalid date: >-7d. +Expected +/-duration (e.g. +1h) or ISO 8601-like (e.g. 2026-06-02T...). +``` + +(MCP-side translation rewrites `firstSeen:-7d` → `first_seen:>-7d`, +which the API then fails to parse — the leading `-` is read as part +of the date, not a relative-duration prefix.) + +What works instead: +- Absolute ISO timestamps: `firstSeen:>2026-05-26T00:00:00` +- Just rely on the default time window — `is:unresolved` is + sufficient for the step-2 sweep; project-wide unresolved count is + what step 2 actually cares about. If you need a time bound, scope + with `statsPeriod='7d'` on the tool call instead of putting it in + `query`. + +Don't trust the tool description's relative-time examples.