Repository navigation
Conversation
A stale-response race on the server-admin users, service accounts and org users lists (Grafana main at 98b10741): a slower response for an earlier page or search replaces the newer list. Found by explore on paging in 4, 5 and 3 of 6 reordered loads at 300, 600 and 900 ms, on search at 600 and 900 ms only; reproduced without GenClass in 5 of 5 delayed loads per list (0 of 5 without the delay). Fix (requestId per list through backend_srv's own cancellation) with Jest tests in Grafana's style, red before and green after; no race in 144 explore loads on the fixed build. Negative controls (panel refresh, contact-point save): no finding in 48 loads. Status: needs owner decision (Grafana requires signed commits and its CLA). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fqwfpz8FnVBNR6wRUdWfaT
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status: needs owner decision. The fix, tests and drafts are ready. Grafana closes unsigned commits ("including pull requests that have been authored by Agents") and requires its CLA, so the sender has to re-sign the commit with their own key and sign the CLA.
What
Following the verifier's retarget in the brief, this hunt covered Grafana's three admin list pages (
mainat98b10741; that day's head6cf5131ddoes not build, and itspublic/is identical). The server-admin users list, the service accounts list and the org users list each store whichever search response arrives last. So a slower response for an earlier page or search replaces the newer list. On paging, the pager also jumps back. On the org list, a new search word can end on "No users found". The fix passes a fixedrequestIdtogetBackendSrv().get(...), which already cancels the earlier in-flight request. It changes +17 −6 lines in three action files, plus Jest tests in Grafana's style that fail before the fix and pass after.Files (all under
docs/adoption/hunts/):grafana-panel-refresh.md: the report (setup, how Grafana was driven, every scenario incl. negatives, finding, root cause, fix, tests, GenClass problems, time, sending steps)grafana-panel-refresh.patch: one commit against98b10741, 7 files, +224 −6grafana-panel-refresh-issue.md: the issue (New Bug Report template) and the PR text (Grafana's template), with the disclosure paragraph and a "before sending" checklistgrafana-panel-refresh/:seed.mjs,hunt.mjs(explore and plain modes),repro.mjs(standalone, no GenClass),summarise.mjs,results/README.md: new rowMeasured (production frontend build, Chromium 1243; explore: 2 fifo baselines + 6 seeded loads per session)
page.routedelays only the earlier request by 1.5 s, or 3 s for the service account search): 5 of 5 loads wrong on every list, 0 of 5 without the delay.tsc --noEmit, ESLint and Prettier are clean on the changed files.knipcan't run without Grafana's private enterprise repo.To send (a person, personal account)
grafana-panel-refresh-issue.md: search for duplicates again, runrepro.mjsyourself and paste your own output, run the tests, read the diff.git amthe patch onto currentmain.git commit --amend --no-edit --reset-author -S. The commit author is a placeholder.Fixes #<issue>, and sign the CLA when the assistant asks.Problems with GenClass itself (details in report §6)
<base href="/">, e.g.GET /admin/api/users/searchwhere the real path is/api/users/search.Connect_Component.external0.*), not asredux.*.slow_ms: 300, debounced searches never overlap, and explore just says "No race found" there. A "requests never overlapped" note would help.Checks
packages/*/src, tests or model-visible text: docs/adoption onlypackages/changed). GenClass was only built (npm run buildfor the runtime and the MCP server) to run the hunt.Notes for the reviewer
claude/adoring-pascal-ylf9ze, notadopt/grafana-panel-refresh, because the session was told to push only to it.-o, which the app regex-escapes. That session is kept asorg-search-hyphen, and its oracle column is explained in the report.requestId, which the PR draft says.Generated by Claude Code