Fix #396: client fetch storm #402
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!402
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-396"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #396 (client fetch storm: ~5 GET/sec across all endpoints in bursts from one tab).\n\nLoop found (reproduced headlessly against the real data-layer modules with a fetch counter): no effect loop and no key churn — the idle layer is quiet. The unbounded path is SSE invalidation: invalidate() always starts a new generation (TTL bypass, the #41 mutation rule) and the §4 coalescer batched only within one microtask, so frames arriving in separate tasks each flushed a full refetch round per cached key (measured: 64-frame spread replay = ~192 GETs; a sha key queued explicitly + via prefix fetched 2x/frame). Fix: the scheduleInvalidate flush (SSE path only) dedupes prefix expansion per flush and TTL-gates each key (08 §6 table; Infinity = immutable windows never SSE-refetched); mutation invalidate() stays eager. Tasks-overlay busy cadence 1.5s→5s (hottest endpoint). No backend change (server emission is event-driven, not 5Hz spam). No new deps.\n\nTests: web/test/unit/fetch-rate-guard.test.js (8 tests: sync/spread/mixed burst budgets, post-TTL liveness, immutable pin, mutation-eager #41 pin, unknown/uncached no-ops, BUSY/IDLE cadence pins) — fail 5/8 pre-fix, pass post-fix. Full node suite 796/796 green; vite+esbuild green; E9 evid harness green. Docs: 12_web_ui.md §2.9 + Decisions, features/08 §4 + Decisions.