Conversation
The design for moving the one thing that still needs a database off Postgres, and for the 429 that discovery turned up on the way. `routes/progress.py` has been able to keep a signed-in reader's progress since it was written and has never run in production. The table was only ever created by `initialize_database()` at boot, boot-time DDL went away when the API became a Vercel function, and the Supabase project it would have lived in no longer answers. The spec puts progress in the `LearnPracticeWorkData` spreadsheet, behind an Apps Script web app — chosen over a service account because `LockService` gives the read-modify-write merge a real mutex, and because it keeps a Google private key out of a function bundle already tuned against a 225 MB ceiling. Only the Google `sub` is stored; email is dropped, since a spreadsheet has no row level security. It also records what the investigation found: with `DATABASE_URL` set and the database unreachable, the AI buckets are `when_unavailable="refuse"`, so every AI request comes back 429 — a refusal that reads to a visitor exactly like an exhausted quota. Verified against production. The quota moves to Redis, which is what `api_rate_limits` was emulating in SQL anyway. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch had an error being 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.
No description provided.