Akhil/optimise backend v2 - #219
Merged
Merged
Conversation
Stores the Mongo user doc on request.state so multiple Depends(get_current_user) in the same request resolve with one Mongo find. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Adds coverage for the request.state cache invalidation guard (cached doc with different _id must not be served) and explains why FastAPI dependency_overrides is used over monkeypatch. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Module-level Map<string, Promise> keyed by endpoint name; concurrent callers share one Promise, entry is cleared in finally so the next call re-runs the request. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- proxyJsonAuthed no longer pre-calls /auth/session/check - /auth/session, /auth/refresh, /auth/session/check share in-flight Promises via auth-inflight dedupe helper - establishBackendSession defaults check_revoked to false; only the initial login flow opts in to check_revoked=true
- proxyJsonAuthed try/catch around ensureBackendSession so persistent failures fall through to forceLogout instead of throwing - move token/lastError inside establishBackendSession's dedupe callback to remove latent shared-closure capture - restore informative comments in backendFetch around refresh paths - document get_current_user's per-request memoization contract
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fix 1: Collapse repeated getToolUsageCounts() calls by memoizing the result once and deriving both topUsedTools and the KPI card value from the same memo. Fix 2: Replace array index keys with stable segment label keys in donut arc circles for proper React reconciliation. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.