You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backend: resolve BASE_URL override through context, drop clear semantics
Address review feedback on the per-user BASE_URL override:
- Resolution moves onto CouchersContext.use_base_url_override (a contextmanager
that sets the urls contextvar), replacing the free-floating
use_base_url_override_for_user(session, user_id) helper. The interceptor and
notification job now go through context, matching how the rest of the codebase
carries per-operation user state.
- An override is always non-empty: SetBaseUrlOverride rejects an empty base_url
and the empty-string-clears-the-override semantics is gone (it expires via TTL).
- Add a composite index (user_id, created) serving the active-override lookup,
replacing the redundant single-column user_id index.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
0 commit comments