Repository navigation
Conversation
…onses out of order A GenClass race hunt on Linkwarden (dev at 45325d4), run locally with the runtime and the MCP server from this checkout injected from outside. Found: useUpdateUserPreference (packages/router/user.tsx) writes every PUT /api/v1/users/:id/preference response over the ["user"] cache and <html data-theme> in onSuccess, in arrival order. The reader view's light/dark switch clicked twice ends dark on the page with light stored; three font size steps end showing 22px or 24px with 26px stored. Explore: 32 of 72 reordered loads in 12 sessions, every replay reproduced; without GenClass, 3 of 3 trials per case with the first response delayed 1.5 s (0 of 3 without). Fix: only the latest update writes its response; Vitest regression test fails before, passes after; 0 of 72 on the fixed variant. Negatives: a link renamed during the preservation poll, pin then unpin. GenClass problems recorded in the report, section 6 (seeds 1-6 never swap the theme's two PUTs; false overwrote-newer witnesses from TanStack's notify batch). Files: docs/adoption/hunts/linkwarden.md, linkwarden.patch, linkwarden-issue.md, linkwarden/ (harness, results.json), README row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Fqwfq1ezG6pDWFmtkEF799
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: ready to send (after the contact-first step below; everything left for the sender is by hand).
What
A race hunt on Linkwarden's web app (
linkwarden/linkwardendevat45325d4). It found one real race.useUpdateUserPreference(packages/router/user.tsx) writes everyPUT /api/v1/users/:id/preferenceresponse over the["user"]cache and<html data-theme>, in whatever order the responses arrive. So the reader view's light/dark switch clicked twice ends dark on the page while the server stores light, and three font-size "+" clicks end showing 22px or 24px while 26px is stored (in 3 loads the server lost a step too). It also prepares a 16-line fix (only the latest update writes its response) with a Vitest regression test in Linkwarden's style, plus the issue and PR drafts in Linkwarden's templates, with the AI-assistance disclosure.Files
docs/adoption/hunts/linkwarden.md: the report (setup, every scenario with its verdict, the finding in causal order, root cause, fix, the fixed-variant check, problems with GenClass, time spent, how to reproduce)docs/adoption/hunts/linkwarden.patch: the fix andpackages/router/user.test.ts, against45325d45c5326f4418159294dcafdafbb95fbd62;git apply --checkis clean on that commitdocs/adoption/hunts/linkwarden-issue.md: the "before sending" checklist, the issue (Bug Report template) and the PR text (.github/pull_request_template.md, basedev)docs/adoption/hunts/linkwarden/:hunt.mjs(explore harness),sweep.sh,seed.mjs,repro.mjs(no GenClass),issue-repro.mjs(the issue's script),summarise.mjs,results.json(per-load summary, 88 KB)docs/adoption/hunts/README.mdTo send (a person, from a personal account)
node docs/adoption/hunts/linkwarden/issue-repro.mjsagainst a localdev: expectpage: dark,server: lightwithout the patch andlight/lightwith it. Runyarn vitest run packages/router/user.test.ts: 1 failed, 1 passed before the patch; 2 passed after. Read the diff.recordVideo; DevTools throttling does not reorder the responses).dev, apply the patch, and open the PR againstdev(check-branch.ymlrejects PRs intomainunless the head isdev). Tick the template's AI level ("Heavy" fits) and the verification boxes only for what you did yourself. If asked how it was found, the drafts' disclosure sentence covers it.Measured
repro.mjs, first response delayed 1,500 ms, 3 trials per case):tsc --strictand prettier are clean. Linkwarden's full Vitest suite: 52 passed, 16 skipped; one database test file fails identically without the patch becauseDATABASE_URLis unset.genclass_findingslisted 20 false stale-write findings per session (120 total) on TanStack Query bookkeeping,DndContextand component counters.Problems with GenClass itself (report section 6)
PUT …/preference#1priority over#2every time, so the default session said "No race found" on a racing page at all three latencies. Suggestion: cover both orders of each overlapping pair, or say when the unsafe requests were never reordered.overwrote-newerwitnesses on every optimistic mutation. A response is counted as overwriting its own change's optimistic write, because TanStack'snotifyManagersetTimeout(0)flush looks like a newer timer. That leaves 12 per load (12–19 stale-write findings per fixed session).changevalue is the opposite of its new state.Checks
docs/adoption/; no runtime, MCP, test or model-visible text changed; no dependency added.packages/changed (the runtime and MCP were built from this checkout for the hunt).Notes for the reviewer
cdn.playwright.devis blocked here.useUpdateUser(same shape, sidebar drag and drop): noted as a pointer only.claude/zen-ramanujan-reujxv, notadopt/linkwarden(the session's git instructions fix the branch name).Generated by Claude Code