Repository navigation
Keep the plans when the sessionStorage cache cannot be read or written - #427
Merged
greg-olivier merged 2 commits intoDec 2, 2026
Conversation
|
👌 Chromatic found no visual changes to review. |
CamilleFljt
approved these changes
Dec 2, 2026
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
greg-olivier
force-pushed
the
feature/mp-323-rb-6-keep-plans-when-storage-fails
branch
from
December 2, 2026 11:21
2b065f5 to
5426cee
Compare
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.
Stacked on the PR that deletes only the expired cache entry. Merge that one first.
What changes
The cache only saves a request. Before, any
sessionStorageerror hid the plans: if reading the cache threw,getEligibility()failed and sent no request, and if writing it threw, a valid API response was thrown away.Now a failed read counts as a cache miss, so the request goes out. A failed write logs a warning and still returns the plans. A page where
sessionStorageis blocked now shows the plans, sends one request per widget, and caches nothing.The read and the write each log their own warning, so a blocked storage logs two lines, one for each:
The eligibility cache could not be read or cleaned.The eligibility response could not be cached.warnOncestill logs each message once per page. A failed cache key build still fails the widget, as before.Contract test edit
tests/integration/contract/failures.test.tschanges in two ways, and CLAUDE.md says a feature PR never edits that folder. This is a behaviour change on purpose, so the exception is deliberate.expectNoEscapegets amaxWarningsparameter that defaults to 1. Every other case keeps the limit of one warning. Only the blocked storage case passes 2.Rule change
ARCH-13 in
.claude/rules/public-api.mdand.claude/rules/widgets.mdsaid a misconfiguration logs one console warning. It now says each distinct failure logs one warning, throughwarnOnce, so a message is never logged twice. The old wording could not allow two warnings for two failures.For the reviewer
add()sends its own request, where before a blocked storage sent none.readCachethrows in both cases.🤖 Generated with Claude Code