Skip to content

Fix google sso multi users - #32

Open
amielnoy wants to merge 2 commits into
mainfrom
fix-google-sso-multi-users
Open

amielnoy wants to merge 2 commits into
mainfrom
fix-google-sso-multi-users

Conversation

@amielnoy

Copy link
Copy Markdown
Owner

No description provided.

amielnoy and others added 2 commits September 27, 2026 22:23
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-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@vercel

vercel Bot commented Sep 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
learn-practice-work-ai-testing-academy Error Error Sep 27, 2026 7:30pm UTC

This branch had an error being deployed

1 failed and 1 active deployments
preview — 5c419d3a Deployed Sep 27, 2026 by amielnoy via Build and deploy to Vercel #36
Preview — 5c419d3a Deployed Sep 27, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant