Membership rings, baseline fixes, and Lightning KV store#183
Merged
Conversation
Co-authored-by: spe1020 <140115230+spe1020@users.noreply.github.com>
Co-authored-by: spe1020 <140115230+spe1020@users.noreply.github.com>
[WIP] Address feedback on membership rings and baseline type fixes
Co-authored-by: spe1020 <140115230+spe1020@users.noreply.github.com>
Co-authored-by: spe1020 <140115230+spe1020@users.noreply.github.com>
Fix missing error feedback for grocery list creation failures
In-memory store caused intermittent membership payment failures when Strike webhooks or client polling hit a different Workers isolate. Now uses GATED_CONTENT KV namespace with inv:/invhash: key prefixes and 2-hour TTL. Keeps in-memory fallback for local dev. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deploying frontend with
|
| Latest commit: |
96856fc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://88d84a7f.frontend-hvd.pages.dev |
| Branch Preview URL: | https://feature-membership-rings-and.frontend-hvd.pages.dev |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
frontend | 97e73fc | Feb 17 2026, 06:01 PM |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates Lightning membership payment flow to persist invoice metadata in Cloudflare KV (with a dev in-memory fallback) so Strike webhooks and client verification work reliably across Cloudflare Workers isolates, alongside a few TS/runtime fixes.
Changes:
- Migrate invoice metadata storage from in-memory
MaptoGATED_CONTENTCloudflare KV (with dev fallback). - Update membership/genesis Lightning create/verify + Strike webhook endpoints to use the KV-backed async metadata API.
- Minor client/runtime fixes: memoization cache key behavior and grocery store error-state handling.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/lib/invoiceMetadataStore.server.ts | Replaces in-memory TTL store with KV-backed storage + dev fallback and new async APIs. |
| src/routes/api/membership/create-lightning-invoice/+server.ts | Writes invoice metadata via KV-backed store during invoice creation. |
| src/routes/api/membership/verify-lightning-payment/+server.ts | Reads invoice metadata via KV-backed store during client verification. |
| src/routes/api/membership/strike-webhook/+server.ts | Reads invoice metadata via KV-backed store during Strike webhook processing. |
| src/routes/api/genesis/create-lightning-invoice/+server.ts | Writes founders invoice metadata via KV-backed store. |
| src/routes/api/genesis/verify-lightning-payment/+server.ts | Reads founders invoice metadata via KV-backed store for verification. |
| src/lib/stores/groceryStore.ts | Clears error on new-list creation and surfaces save failure message into store state. |
| src/lib/memoization.ts | Adjusts memoized reactive helper to include dependency values in memoization keying. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
Contributor
This was referenced Feb 17, 2026
Contributor
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Summary
Mapstore toGATED_CONTENTKV namespace so Strike webhooks and client polling work across Cloudflare Workers isolates (fixes intermittent Lightning membership payment failures)Test plan
pnpm buildpasses with no type errorsinv:prefix → verify webhook and client polling can read metadata from any isolate🤖 Generated with Claude Code