Repository navigation
Sync upstream Soju06/codex-lb main - #7
Merged
Merged
Conversation
Add a stable release guard that verifies release-managed version fields are promoted consistently before stable artifact publishing can proceed. - Validate pyproject, app version, frontend package, Helm chart, and uv.lock together - Run the guard in CI and release workflows - Cover release-please stable promotions, metadata repairs, and merge queue execution
Speed up the kind-based Helm smoke gate by avoiding avoidable chart-test image pulls and bounding Helm test waits. - Make the Helm test pod image configurable while preserving the BusyBox default - Point CI smoke Helm tests at the already-loaded app image - Run the external DB smoke with one app replica - Add timestamped smoke phase logs and a configurable Helm test timeout - Add OpenSpec coverage and regression tests for the CI smoke contract
## [1.20.1](Soju06/codex-lb@v1.20.0...v1.20.1) (2026-06-18) ### Bug Fixes * **release:** guard stable artifact publishing (Soju06#1049) ### Performance Improvements * **dashboard:** split request log page count (Soju06#1038) This release republishes the stable train after the incomplete v1.20.0 artifact publish, with release-version validation in place so PyPI, Docker, and Helm publishing cannot proceed from drifted release metadata.
…u06#1034) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…6#1076) The streaming startup probes raced the first upstream item against a short timeout with `asyncio.wait_for(asyncio.shield(first_task), timeout)`. On timeout `wait_for` cancels the shield's outer future; when `first_task` later fails with a `ProxyResponseError` (e.g. a 429 raised while the upstream is still blocked on the response-create admission gate), Python 3.14's `asyncio.shield` reports the inner exception through the loop exception handler as "ProxyResponseError exception in shielded future" -- a spurious ERROR, since the same error is already delivered to the caller through the streamed response. Race the task with `asyncio.wait({first_task}, timeout=...)` instead, which never cancels the task and does not wrap it in a shield. A done-callback retrieves the task's result if the wrapping stream is dropped before the task is awaited, so an abandoned probe task does not trip the "exception was never retrieved" warning either. Consumers that await the task still observe the upstream error unchanged. Closes Soju06#976
* fix(ci): ignore stale rebased codex inline comments * fix(ci): ignore superseded duplicate check runs * docs(openspec): document codex label evidence * fix(ci): ignore resolved Codex inline findings * fix(ci): keep current commit Codex evidence * ci: resync codex labels after thread resolution
* fix(models): hide unsupported API models * fix(proxy): filter hidden codex allowlist models * fix(models): add Codex models data alias * feat(models): expose speed tiers in v1 metadata * fix(models): type service tier metadata * docs: add @KakatkarAkshay as contributor * fix(models): omit absent speed tier metadata * fix(models): stabilize codex model alias timestamps * fix(models): keep spark in bootstrap catalog --------- Co-authored-by: Akshay Kakatkar <[email protected]>
* fix(dashboard): count exhausted accounts in weekly pace * fix(ui): clarify weekly pace over-plan wording * fix(dashboard): exclude reauth accounts from weekly pace * fix(dashboard): show weekly pace recommendations * fix(dashboard): avoid calendar-blind pause estimate * fix(docker): upgrade openssl runtime packages * fix(docker): install legacy openssl provider explicitly * fix(dashboard): label forecast shortfall danger
…rprint (Soju06#1089) * feat(proxy): normalize non-native upstream requests to Codex CLI fingerprint Non-native http clients (e.g. the openai Python SDK) reach the ChatGPT/Codex backend with a non-first-party fingerprint, so their requested `priority` service tier is downgraded to `auto` (~20-29% vs ~3-6% for native Codex clients) and `auto`-tier requests overload at ~85%, surfacing `server_is_overloaded` on gpt-5.5. Normalize the upstream client fingerprint to the Codex CLI (`codex_cli_rs`) persona in `_build_upstream_headers` for non-native http requests: - Rewrite `User-Agent` to `codex_cli_rs/<version> (<os>; <arch>) <terminal>` using a new sync, network-free `CodexVersionCache.cached_version_or_default()` and operator-configurable os/arch/terminal settings. - Strip SDK-only `x-openai-client-*` headers and any inbound `originator` (the real Codex CLI omits originator for the default and lets the backend read it from the User-Agent prefix). - Emit PascalCase `ChatGPT-Account-Id`. Native Codex clients (User-Agent prefix or `x-codex-*`/native originator headers) and websocket upstream requests are left unchanged. The original client User-Agent is still recorded in `request_logs.useragent`. Adds OpenSpec change `normalize-upstream-codex-fingerprint` (outbound-http-clients delta). * fix(proxy): base native exemption on UA/originator, not turn-state headers Address Codex P2: an HTTP SDK client replays the upstream-issued x-codex-turn-state continuity token, so keying the native exemption on x-codex-* transport headers let non-native SDK follow-ups skip fingerprint normalization and reach upstream with the downgraded OpenAI/Python + x-openai-client-* fingerprint intact. Restrict native detection to a first-party Codex User-Agent prefix or a native originator header; continuity/transport headers are no longer a native signal. The x-codex-turn-state header is still preserved (only the fingerprint is normalized). Updates spec scenario + regression tests. * fix: normalize non-native fingerprint on websocket upstream path The auto stream transport routes a non-native SDK follow-up carrying an x-codex-turn-state continuity token onto the websocket path, where _build_upstream_websocket_headers forwarded the inbound OpenAI SDK fingerprint (User-Agent + x-openai-client-*) unchanged. That bypassed the HTTP-path normalization and let the priority-downgrade mitigation be defeated for exactly the continuity-token scenario (Codex P1). Make fingerprint normalization transport-agnostic: apply the same codex_cli_rs persona rewrite, x-openai-client-* strip, originator strip, and PascalCase ChatGPT-Account-Id in the websocket builder as in the HTTP builder, gated on _is_native_codex_request. Native Codex clients and continuity headers (x-codex-turn-state) are preserved on both paths. Replace the test that asserted the websocket builder leaves fingerprints untouched with regression tests covering websocket non-native turn-state normalization and native websocket preservation. Update OpenSpec spec to require normalization on every upstream transport path. * fix(proxy): strip x-stainless SDK headers and keep account-id diagnostics Address Codex P2/P3 on the upstream fingerprint normalization: - P2: OpenAI SDKs send an x-stainless-* fingerprint family that the API layer (_is_openai_sdk_request) treats as an SDK signal. Strip every x-stainless-* header by prefix on both the http and websocket upstream builders so a normalized request cannot still be identified as SDK traffic and downgraded. - P3: normalized non-native requests carry the account id under PascalCase ChatGPT-Account-Id, but the upstream request start/complete log helpers read it case-sensitively as chatgpt-account-id, logging account_id=None for exactly the SDK traffic this feature investigates. Add a case-insensitive _account_id_for_upstream_log helper and use it in both log paths. Regression tests cover x-stainless strip on http + websocket and the case-insensitive account-id lookup. OpenSpec delta updated for both. * fix(proxy): normalize fingerprint on client-facing responses websocket egress The /v1/responses websocket egress builder in proxy_websocket.py is a third upstream egress path alongside the http and internal auto-transport builders. A non-native SDK connecting directly to the responses websocket reached upstream with its OpenAI/Python + x-openai-client-* / x-stainless-* fingerprint intact, bypassing the priority-downgrade mitigation. Apply the shared non-native normalization (UA persona rewrite, SDK header strip, PascalCase account header) on that builder too; native Codex websocket clients are unchanged. Add regression tests and extend the OpenSpec change to require normalization on all three egress paths. Addresses Codex review P2 on PR Soju06#1089. * fix(proxy): treat codex_sdk_ts as a native first-party originator Codex review P2: codex_sdk_ts is a first-party Codex originator the backend whitelists (named in the change proposal), but it was missing from both the native originator allowlist and the native User-Agent prefix list. A genuine Codex SDK (TypeScript) client was therefore classified non-native and had its User-Agent rewritten to codex_cli_rs and its originator stripped, violating the native-client exemption. Add codex_sdk_ts to both native-detection sets, document it in the OpenSpec native definition, and add regression tests for the originator header and User-Agent prefix paths.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…oju06#1093) * feat: add smart HTTP transport routing * fix(proxy): preserve auto transport mode for WS handshake fallback
…06#1067) Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](softprops/action-gh-release@b430933...718ea10) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-version: 3.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps pgautoupgrade/pgautoupgrade from 18-alpine to 18-alpine. --- updated-dependencies: - dependency-name: pgautoupgrade/pgautoupgrade dependency-version: 18-alpine dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…1069) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 7.1.0 to 7.2.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](docker/build-push-action@v7.1.0...f9f3042) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: 7.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [astral-sh/uv](https://github.com/astral-sh/uv) from 0.11.21 to 0.11.23. - [Release notes](https://github.com/astral-sh/uv/releases) - [Changelog](https://github.com/astral-sh/uv/blob/main/CHANGELOG.md) - [Commits](astral-sh/uv@0.11.21...0.11.23) --- updated-dependencies: - dependency-name: astral-sh/uv dependency-version: 0.11.23 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 7.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@de0fac2...9c091bb) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.35.5 to 4.36.2. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@9e0d7b8...8aad20d) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.36.2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps the frontend-minor-patch group in /frontend with 6 updates: | Package | From | To | | --- | --- | --- | | [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) | `1.18.0` | `1.21.0` | | [react-hook-form](https://github.com/react-hook-form/react-hook-form) | `7.79.0` | `7.80.0` | | [react-router-dom](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router-dom) | `7.17.0` | `7.18.0` | | [globals](https://github.com/sindresorhus/globals) | `17.6.0` | `17.7.0` | | [react-doctor](https://github.com/millionco/react-doctor/tree/HEAD/packages/react-doctor) | `0.5.6` | `0.5.8` | | [typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint) | `8.61.1` | `8.62.0` | Updates `lucide-react` from 1.18.0 to 1.21.0 - [Release notes](https://github.com/lucide-icons/lucide/releases) - [Commits](https://github.com/lucide-icons/lucide/commits/1.21.0/packages/lucide-react) Updates `react-hook-form` from 7.79.0 to 7.80.0 - [Release notes](https://github.com/react-hook-form/react-hook-form/releases) - [Changelog](https://github.com/react-hook-form/react-hook-form/blob/master/CHANGELOG.md) - [Commits](react-hook-form/react-hook-form@v7.79.0...v7.80.0) Updates `react-router-dom` from 7.17.0 to 7.18.0 - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/[email protected]/packages/react-router-dom/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/[email protected]/packages/react-router-dom) Updates `globals` from 17.6.0 to 17.7.0 - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](sindresorhus/globals@v17.6.0...v17.7.0) Updates `react-doctor` from 0.5.6 to 0.5.8 - [Release notes](https://github.com/millionco/react-doctor/releases) - [Changelog](https://github.com/millionco/react-doctor/blob/main/packages/react-doctor/CHANGELOG.md) - [Commits](https://github.com/millionco/react-doctor/commits/[email protected]/packages/react-doctor) Updates `typescript-eslint` from 8.61.1 to 8.62.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.62.0/packages/typescript-eslint) --- updated-dependencies: - dependency-name: lucide-react dependency-version: 1.21.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend-minor-patch - dependency-name: react-hook-form dependency-version: 7.80.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend-minor-patch - dependency-name: react-router-dom dependency-version: 7.18.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: frontend-minor-patch - dependency-name: globals dependency-version: 17.7.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: frontend-minor-patch - dependency-name: react-doctor dependency-version: 0.5.8 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: frontend-minor-patch - dependency-name: typescript-eslint dependency-version: 8.62.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: frontend-minor-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…u06#1074) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 25.9.3 to 26.0.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 26.0.0 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pydantic-settings](https://github.com/pydantic/pydantic-settings) from 2.14.1 to 2.14.2. - [Release notes](https://github.com/pydantic/pydantic-settings/releases) - [Commits](pydantic/pydantic-settings@v2.14.1...v2.14.2) --- updated-dependencies: - dependency-name: pydantic-settings dependency-version: 2.14.2 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#1075) Bumps the python-minor-patch group with 7 updates: | Package | From | To | | --- | --- | --- | | [certifi](https://github.com/certifi/python-certifi) | `2026.5.20` | `2026.6.17` | | [greenlet](https://github.com/python-greenlet/greenlet) | `3.5.1` | `3.5.2` | | [pydantic-settings](https://github.com/pydantic/pydantic-settings) | `2.14.1` | `2.14.2` | | [pytest](https://github.com/pytest-dev/pytest) | `9.1.0` | `9.1.1` | | [ruff](https://github.com/astral-sh/ruff) | `0.15.17` | `0.15.18` | | [ty](https://github.com/astral-sh/ty) | `0.0.49` | `0.0.51` | | [openai](https://github.com/openai/openai-python) | `2.41.1` | `2.43.0` | Updates `certifi` from 2026.5.20 to 2026.6.17 - [Commits](certifi/python-certifi@2026.05.20...2026.06.17) Updates `greenlet` from 3.5.1 to 3.5.2 - [Changelog](https://github.com/python-greenlet/greenlet/blob/master/CHANGES.rst) - [Commits](python-greenlet/greenlet@3.5.1...3.5.2) Updates `pydantic-settings` from 2.14.1 to 2.14.2 - [Release notes](https://github.com/pydantic/pydantic-settings/releases) - [Commits](pydantic/pydantic-settings@v2.14.1...v2.14.2) Updates `pytest` from 9.1.0 to 9.1.1 - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest@9.1.0...9.1.1) Updates `ruff` from 0.15.17 to 0.15.18 - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](astral-sh/ruff@0.15.17...0.15.18) Updates `ty` from 0.0.49 to 0.0.51 - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](astral-sh/ty@0.0.49...0.0.51) Updates `openai` from 2.41.1 to 2.43.0 - [Release notes](https://github.com/openai/openai-python/releases) - [Changelog](https://github.com/openai/openai-python/blob/main/CHANGELOG.md) - [Commits](openai/openai-python@v2.41.1...v2.43.0) --- updated-dependencies: - dependency-name: certifi dependency-version: 2026.6.17 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: python-minor-patch - dependency-name: greenlet dependency-version: 3.5.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-minor-patch - dependency-name: pydantic-settings dependency-version: 2.14.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: python-minor-patch - dependency-name: pytest dependency-version: 9.1.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: python-minor-patch - dependency-name: ruff dependency-version: 0.15.18 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: python-minor-patch - dependency-name: ty dependency-version: 0.0.51 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: python-minor-patch - dependency-name: openai dependency-version: 2.43.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: python-minor-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
## Summary - add request_logs.upstream_transport and expose it through the request logs API/dashboard - record upstream transport decisions via Prometheus across retry, websocket, bridge success, connect-failure, and pending-failure paths - keep downstream transport and upstream transport distinct in persistence, API, and UI ## Verification - CI green on current head c4904a0 - Codex review clean on current head c4904a0 - unresolved review threads: 0 - local targeted gates: 232 tests passed, ty/ruff/OpenSpec strict passed
|
This pull request has been automatically marked as stale because it has had no activity for 7 days. It will be closed in 23 more days unless there is new activity. If this is still relevant, please:
Thanks for the contribution 🙏 |
Summary: - Repair account-bound upstream egress routing and installation identity propagation - Preserve smart HTTP/WS upstream auto-fallback behavior after the downstream transport policy changes - Keep fingerprint and account header normalization consistent across HTTP, internal WS, and direct WS egress paths - Reconcile Alembic migration ancestry with current main Validation: - GitHub CI passed on b402842 - Local targeted proxy, bridge, migration, ruff, and OpenSpec checks passed before merge - Current-head substitute Codex review found no blockers
OAuth bootstrap passed account_id=None to the resolver, bypassing per-account proxy routing. Token exchange went direct while all subsequent API calls used the per-account proxy, causing OpenAI to invalidate sessions after hours/days. - _oauth_route() forces strict=True when active bindings exist, requiring a default pool or failing closed - _refresh_tokens() raises RefreshError when an account has a binding but route resolution returns None - Both binding-check helpers guard OperationalError for missing tables
* feat(reports): fill gaps and sort daily breakdown * feat(reports): polish summary and export sorting * fix test * update test * Move aria-sort onto the column header Move aria-sort onto the column header * feat(reports): add useragent distributions * fix(reports): preserve unknown user-agent bucket * ruff * separate Unknown with actually Unknown useragent * feat(report): add donut value in report * report: update donut tooltip behavior * report: remove donut tooltip * fix test
* feat(banked-reset): initial commit * ui adjustments * review * ui adjustments * feat(banked-reset): add api for query and redeem the credit (not in codex format) * fix api to get all redeemable credit * ty & ruff * review * fix(reset-credits): invalidate stale snapshots for ineligible accounts * fix(reset-credits): critical consume hardening and zero-db migration adaptation * fix(test): mock timers to prevent input-otp leaks in auth-gate * fix(web): add space between datetime and countdown in reset credit dialog * chore(web): remove auto-generated package-lock.json * fix(api): address codex review findings for rate limit reset credits * Align reset-credit eligibility and confirmation-dialog specs with current cache invalidation and redeem UX behavior. * Disable default retries for reset credit redemption * fix(reset-credits): stop status writes on 401, suppress stale reauth credits Reset-credit polling must not mutate account status (spec rate-limit-reset-credits: polling failures including 401 log and retain the prior snapshot; usage refresh owns token refresh and deactivation). The forced auth_manager.ensure_fresh(force=True) retry on a 401 flowed into AuthManager.refresh_account, which persists REAUTH_REQUIRED / DEACTIVATED on permanent refresh failure. Remove the auth_manager retry loop from _refresh_account_reset_credits so a 401 logs and keeps the cache in a single attempt. This also covers the dashboard GET cache-miss path that reuses the helper. Add REAUTH_REQUIRED to the account-summary ineligible set so a reauth-required account with a stale cached snapshot no longer surfaces available_reset_credits in list/header/dashboard badges, matching the scheduler skip set and the GET/consume eligibility checks. * Treat false force-refresh results as failures * Fix reset-credit consume audit and refresh cache invalidation * Clear skipped account snapshots before they can be reused * Invalidate stale reset-credit cache on empty fresh fetch * ruff & ty * ruff * Refresh usage after v1 reset-credit redemption * Refresh account tokens before redeeming reset credits * Handle refresh failures before redeeming reset credits * Preserve successful reset-credit redemption response * ruff * Gate dashboard redemption on cached snapshot * ruff * docs: add @ellentane as a contributor # Conflicts: # .all-contributorsrc # README.md * fix reset-credit eligibility and confirm dialog closing * Keep reset-credit GET cache-only * Revert " Keep reset-credit GET cache-only" This reverts commit 6fd64f45f17ca9b81354dd0ed735ce9d5e73ac3b. * Serialize reset-credit redemption across replicas * Re-select credits from the fresh upstream snapshot * Treat null reset-credit details as unavailable * Preserve skipped reset-credit snapshots and clear stale v1 conflicts * feat(dashboard): add reset count bubble on the account list * Badge Validate the redeem id before resolving proxy route * Keep dashboard detail GET cache-only --------- Co-authored-by: ellentane <[email protected]>
…alpine (Soju06#1109) Dependabot dependency update. Merged after live GitHub gate check and local targeted validation.
Dependabot dependency update. Merged after live GitHub gate check and local targeted validation.
Dependabot dependency update. Merged after live GitHub gate check and local targeted validation.
Dependabot dependency update. Merged after live GitHub gate check and local targeted validation.
… updates (Soju06#1113) Dependabot dependency update. Merged after live GitHub gate check and local targeted validation.
…6#1114) Dependabot dependency update. Merged after live GitHub gate check and local targeted validation.
Persist dashboard account list sort and document the behavior in OpenSpec. - persist the dashboard account list sort selection alongside the existing card/list view preference - wire DashboardPage to restore/update the saved sort column and direction - update add-dashboard-account-list-view OpenSpec proposal, tasks, and frontend-architecture delta to cover sort persistence Verification: - git diff --check origin/main...HEAD - openspec validate add-dashboard-account-list-view --strict - openspec change show add-dashboard-account-list-view --json --deltas-only - openspec validate --specs - npx --yes [email protected] run test src/features/dashboard/components/account-list.test.tsx src/features/dashboard/components/dashboard-page.test.tsx src/hooks/use-dashboard-preferences.test.ts - npx --yes [email protected] run typecheck - npx --yes [email protected] run lint - npx --yes [email protected] run build - local OmO/OpenCode substitute review: VERDICT: SHIP Supersedes Soju06#1035 because the contributor branch has maintainer edits disabled. Closes Soju06#1035
Revive the Simplified Chinese frontend i18n work on top of current main. - add i18next/react-i18next wiring, locale detection, html lang updates, and the language toggle - add English and Simplified Chinese locale bundles plus translated auth/settings/status/header strings - add the Simplified Chinese README and contributor metadata for the preserved translation work - keep current-main settings/auth/routing/dashboard behavior while resolving stale branch conflicts - add regression coverage for locale bootstrap, localized validation, status labels, and settings surfaces Refs Soju06#671 Refs Soju06#780
- Add API-key usage section controls for `/v1/usage` - Add pooled account usage visibility with privacy-toggle precedence - Add API-key limit usage backfill from successful request logs - Add dashboard/API/frontend settings for hiding upstream quota from API-key clients - Refresh Alembic migrations and OpenSpec coverage Validation: - CI green on head 3787798 - Local Codex review APPROVE - OpenSpec strict validation passed for all three active changes - Targeted backend/frontend/migration checks passed
# feat(request-logs): record client IP (Soju06#985) ## Summary - add nullable `request_logs.client_ip` plus an index and API/dashboard schema exposure - capture client IPs through HTTP/SSE Responses, WebSocket Responses, compact requests, image compatibility routes, chat completions, and signed HTTP bridge owner forwarding - add nullable `request_logs.archive_request_id` and expose it as `archiveRequestId` for dashboard request-log archive lookups - keep response-id `requestId` semantics intact for continuity lookup, while the archive panel uses `archiveRequestId ?? requestId` - show request metadata in the dashboard details table with field-specific copy buttons and search coverage - add OpenSpec coverage for both request-log metadata contracts Fixes Soju06#953 Fixes Soju06#962 Absorbs Soju06#984 ## Validation - `uv run pytest tests/integration/test_request_logs_api.py tests/integration/test_request_logs_filters.py tests/unit/test_request_logs_repository.py tests/unit/test_proxy_http_bridge.py`: 205 passed - `uv run pytest tests/unit/test_proxy_http_bridge.py`: 178 passed - `cd frontend && bun run test src/features/dashboard/components/recent-requests-table.test.tsx src/features/dashboard/schemas.test.ts`: 37 passed - `uv run ruff check app/modules/proxy/_service/request_log.py app/modules/proxy/_service/http_bridge/streaming.py app/modules/request_logs tests/unit/test_proxy_http_bridge.py tests/unit/test_request_logs_repository.py tests/integration/test_request_logs_api.py tests/integration/test_request_logs_filters.py`: passed - `uv run openspec validate add-request-log-client-ip --strict`: valid - `uv run openspec validate fix-request-log-archive-lookup --strict`: valid - `uv run openspec validate --specs`: 30 passed - `git diff --check`: passed Head: `dc41de33bd6f878dc31ec269f4f1c360dd05d6c3` --- ## Maintainer Refresh - 2026-06-30 # PR Soju06#985 refresh verification ## Strategy - Used a merge refresh: `git merge --no-ff origin/main`. - Rationale: this is an existing PR branch with prior repair/merge commits, so preserving PR branch context with one current-main merge commit is cleaner than rebasing the old repair history. - Final commit: `f5815214d2b1e52912582163401a0c4b841e078c` (`Merge remote-tracking branch 'origin/main' into fix/issue-953-request-log-ip`). - Push: not pushed. ## Conflicts resolved - `app/modules/proxy/_service/compact.py`: kept current main request-kind logging and added PR `client_ip`. - `app/modules/proxy/_service/http_bridge/request_submit.py`: kept current main installation-id, SDK-contract, and request-kind behavior; layered archive request-id send context and PR `client_ip`; changed archive-id fallback to explicit request-log id or generated request-state id. - `app/modules/proxy/_service/http_bridge/streaming.py`: kept current main `enforce_openai_sdk_contract` and affinity policy paths; threaded `client_ip`. - `app/modules/proxy/_service/streaming/mixin.py`: kept current main SDK-contract propagation; threaded `client_ip`. - `app/modules/proxy/_service/streaming/retry.py`: kept current main upstream transport metrics and settlement guard; threaded `client_ip`. - `app/modules/proxy/_service/websocket/mixin.py`: kept current main installation-id injection and upstream transport metrics; added archive request-id context around websocket sends and kept `client_ip` in log writes. - `app/modules/proxy/api.py`: kept current main SDK-contract handling; threaded `client_ip`. - `tests/unit/test_proxy_utils.py`: merged current main installation-id assertions with PR archive request-id assertions. ## Files changed by me beyond the mechanical merge - Added `app/db/alembic/versions/20260630_000000_merge_request_log_client_ip_and_dashboard_hot_path_heads.py` to restore a single Alembic head. - Adjusted `app/modules/proxy/_service/http_bridge/request_submit.py` conflict resolution, including deterministic `archive_request_id=request_log_id or resolved_request_id`. - Updated `tests/unit/test_proxy_http_bridge.py` stale test double signature for `client_ip`. - Restored `frontend/bun.lock` after `bun install` rewrote it locally. ## Final PR diff vs `origin/main` `git diff --stat origin/main...HEAD` reports 50 files changed, 1574 insertions, 82 deletions. Major areas: - Request log DB migrations/model/schema/repository/mappers. - Proxy HTTP/SSE/WS client IP and archive request-id capture paths. - Dashboard recent request metadata schema/table/tests. - OpenSpec changes: `add-request-log-client-ip`, `fix-request-log-archive-lookup`. - Tests for request logs, proxy HTTP bridge, websocket archiving, forwarding signatures, and migration coverage. ## Commands run - `git fetch origin main fix/issue-953-request-log-ip`: passed. - `git merge --no-ff origin/main`: conflicted in proxy stream/bridge/websocket files and `tests/unit/test_proxy_utils.py`; resolved manually. - `uv run alembic heads` and `uv run python -m alembic heads`: failed because repo root Alembic CLI lacks `script_location`; used project migration helper instead. - `uv run python - <<'PY' ... ScriptDirectory ... PY`: initially reported two heads; after adding the merge revision, passed with one head `20260630_000000_merge_request_log_client_ip_and_dashboard_hot_path_heads` and policy `()`. - `uv run openspec validate add-request-log-client-ip --strict`: passed. - `uv run openspec validate fix-request-log-archive-lookup --strict`: passed. - `uv run openspec validate --specs`: passed, 30 specs valid. - `uv run pytest tests/integration/test_migrations.py -q`: passed, 12 passed / 3 skipped. - `uv run ruff check <touched Python files/tests>`: first failed on one unused conflict import; after cleanup passed. - `uv run pytest tests/unit/test_request_logs_repository.py tests/integration/test_request_logs_api.py tests/integration/test_request_logs_filters.py tests/unit/test_proxy_http_bridge.py tests/integration/test_proxy_websocket_responses.py -q`: first failed 2 tests; after fixes passed, 276 passed / 1 warning. - `bun run test src/features/dashboard/components/recent-requests-table.test.tsx src/features/dashboard/schemas.test.ts`: first failed because `vitest` was missing; after `bun install`, passed, 2 files / 37 tests. - `uv run pytest tests/unit/test_proxy_utils.py::test_retry_http_bridge_request_on_fresh_upstream_uses_archive_request_id tests/unit/test_proxy_utils.py::test_submit_http_bridge_request_uses_archive_request_id_during_inline_and_send tests/unit/test_proxy_utils.py::test_websocket_archive_request_id_for_non_text_uses_single_pending_request tests/unit/test_proxy_utils.py::test_websocket_archive_request_id_for_non_text_keeps_ambiguous_frames_unattributed -q`: failed due stale test id. - `uv run pytest tests/unit/test_proxy_utils.py::test_retry_http_bridge_request_on_fresh_upstream_uses_archive_request_id tests/unit/test_proxy_utils.py::test_submit_http_bridge_request_reinlines_final_text tests/unit/test_proxy_utils.py::test_websocket_archive_request_id_for_non_text_uses_single_pending_request tests/unit/test_proxy_utils.py::test_websocket_archive_request_id_for_non_text_keeps_ambiguous_frames_unattributed -q`: passed, 4 passed. - `git diff --check`: passed. - `git commit --no-edit`: passed, created `f5815214d2b1e52912582163401a0c4b841e078c`. ## Remaining blockers - None known locally. - Local test warnings observed: FastAPI/TestClient deprecation warning for `httpx`; existing environment warning that `VIRTUAL_ENV=/home/ubuntu/.hermes/hermes-agent/venv` is ignored in favor of `.venv`.
# perf(usage): avoid repeated history cache scans (Soju06#902) ## Summary - Avoid re-reading/fingerprinting the full cached SQLite usage-history window on dashboard bulk-history cache hits; append only rows newer than the cached max ID. - Keep compact SQLite aggregate metadata for the cached row range so same-ID corrections, deletes, and ID reuse invalidate stale cached history before dashboard depletion state is reused. - Clear the SQLite bulk-history cache when account merge/delete paths mutate `usage_history` ownership. - Add a SQLite fast path for additional-usage latest-per-account reads so additional quota lookups avoid `row_number()` window scans while preserving the depletion tie-breaker for same-timestamp rows. - Avoid concurrent usage-history reads on one SQLAlchemy `AsyncSession`, fixing the PostgreSQL sticky-session fallback case when a pinned account is rate-limited. Mitigates Soju06#708. ## Maintainer Update - Rebased onto current `main`; current head is `629a2aba0a67f99c7508ad91f217f81b33b3ead6`. - This PR no longer carries PostgreSQL CI narrowing changes; Soju06#899 remains the dedicated PR for that CI-only work. - The branch contains the usage-cache/proxy behavior and its tests/spec, plus a current-head Codex follow-up that makes the SQLite additional-usage fast path match the SQLAlchemy ordering: `recorded_at desc, used_percent desc, id desc`. ## Validation ```bash uv run openspec validate optimize-usage-history-cache --strict uv run pytest tests/unit/test_additional_usage_repo.py::test_latest_by_account_sqlite_fast_path_uses_depletion_tie_breaker tests/unit/test_additional_usage_repo.py::test_latest_by_account_merges_alias_rows_conservatively -q uv run pytest tests/integration/test_usage_repository.py tests/unit/test_additional_usage_repo.py -q uv run pytest tests/integration/test_proxy_sticky_sessions.py::test_proxy_sticky_switches_when_pinned_rate_limited -q uv run ruff check app/modules/usage/repository.py app/modules/accounts/repository.py app/modules/proxy/load_balancer.py tests/integration/test_usage_repository.py tests/unit/test_additional_usage_repo.py uv run ruff check app/modules/usage/repository.py tests/unit/test_additional_usage_repo.py uv run ty check app/modules/usage app/modules/accounts app/modules/proxy/load_balancer.py uv run ty check app/modules/usage/repository.py tests/unit/test_additional_usage_repo.py ``` --- ## Maintainer Refresh - 2026-06-30 # PR Soju06#902 Refresh Verification ## Strategy - Strategy used: `git rebase origin/main` - Rationale: the PR had three commits on an old base and no upstream configured; rebasing kept the existing PR history linear and maintainer-friendly. - Original PR head before refresh: `6ef31e9d5c88baa7243fae1dc3c564e7e7f0e68e` - New base: `origin/main` at `70576a1eeedc8f41b52548714391ba11167c1f93` - Final branch head: `88d6e794eb2c369705469b25434eb7c27458f895` ## Conflicts Resolved - `app/modules/usage/repository.py` - Conflict occurred while replaying `c9056402 perf(usage): avoid repeated history cache scans`. - Resolution preserved current `origin/main` PostgreSQL additional-usage canonical query plus raw-alias fallback. - Resolution preserved the PR SQLite fast path for additional latest-per-account reads. - Resolution kept the generic non-SQLite window-function fallback. ## Files Changed By This Refresh - Rebased PR changes retained: - `app/modules/accounts/repository.py` - `app/modules/usage/repository.py` - `openspec/changes/optimize-usage-history-cache/proposal.md` - `openspec/changes/optimize-usage-history-cache/specs/query-caching/spec.md` - `openspec/changes/optimize-usage-history-cache/tasks.md` - `tests/integration/test_usage_repository.py` - `tests/unit/test_additional_usage_repo.py` - Additional refresh commit added: - `tests/unit/test_additional_usage_repo.py` - Added `test_latest_by_account_sqlite_fast_path_preserves_newer_raw_alias` for the critical canonical-older/raw-alias-newer SQLite fast-path case. ## Commands Run - `git status --short --branch` - Pass: clean before rebase on `fix/usage-history-cache-708`; clean after final commit. - `git fetch origin main` - Pass: fetched `origin/main`. - `uv run openspec status --change optimize-usage-history-cache --json` - Pass: change exists; 8/8 tasks complete. - `uv run openspec instructions apply --change optimize-usage-history-cache --json` - Pass: change state `all_done`. - `git rev-parse HEAD origin/main FETCH_HEAD` - Pass: confirmed original head, `origin/main`, and fetched head. - `git merge-base HEAD origin/main` - Pass: old merge base was `2830b7d51956872795f2ebbdeff08cb67fe5a3c9`. - `git log --oneline --left-right --cherry-pick HEAD...origin/main | sed -n '1,120p'` - Pass: confirmed branch had three unique PR commits and `origin/main` had advanced. - `git diff --stat origin/main...HEAD` - Pass: reviewed stale PR diff before rebase. - `git rebase origin/main` - Pass after one conflict resolution in `app/modules/usage/repository.py`. - `rg -n "<<<<<<<|=======|>>>>>>>" app/modules/usage/repository.py` - Pass: no conflict markers after resolution. - `uv run python -m py_compile app/modules/usage/repository.py` - Pass: resolved file compiled. - `git diff --check` - Pass: no whitespace/conflict-marker issues. - `GIT_EDITOR=true git rebase --continue` - Pass: rebase completed and updated `fix/usage-history-cache-708`. - `uv run pytest tests/unit/test_additional_usage_repo.py::test_latest_by_account_sqlite_fast_path_preserves_newer_raw_alias -q` - Pass: `1 passed in 0.46s`. - `uv run openspec validate optimize-usage-history-cache --strict` - Pass: `Change 'optimize-usage-history-cache' is valid`. - `uv run openspec validate --specs` - Pass: `30 passed, 0 failed`. - `uv run ruff check app/modules/usage/repository.py app/modules/accounts/repository.py app/modules/proxy/load_balancer.py tests/integration/test_usage_repository.py tests/unit/test_additional_usage_repo.py` - Pass: `All checks passed!`. - `uv run pytest tests/unit/test_additional_usage_repo.py tests/integration/test_usage_repository.py tests/integration/test_proxy_sticky_sessions.py::test_proxy_sticky_switches_when_pinned_rate_limited -q` - Pass: `45 passed, 1 skipped in 4.39s`. - Skip: `tests/integration/test_usage_repository.py:304` PostgreSQL-only query plan test. - `uv run ty check app/modules/usage app/modules/accounts app/modules/proxy/load_balancer.py` - Pass: `All checks passed!`. - `for f in app/modules/usage/repository.py app/modules/accounts/repository.py tests/integration/test_usage_repository.py tests/unit/test_additional_usage_repo.py; do printf '%s ' "$f"; awk '!/^[[:space:]]*$/ && !/^[[:space:]]*(#|\\/\\/|--)/' "$f" | wc -l; done` - Pass: measured touched source/test file sizes. - Results: `app/modules/usage/repository.py 1134`, `app/modules/accounts/repository.py 778`, `tests/integration/test_usage_repository.py 719`, `tests/unit/test_additional_usage_repo.py 915`. - `git commit -m "test(usage): cover sqlite latest raw aliases"` - Pass: created `88d6e794eb2c369705469b25434eb7c27458f895`. ## Final Commits On Branch - `88d6e794 test(usage): cover sqlite latest raw aliases` - `d732664d docs(usage): align cache spec tie-breaker` - `a8144b44 fix(usage): preserve sqlite depletion tie-breaker` - `57af7adc perf(usage): avoid repeated history cache scans` ## Remaining Blockers - None found locally. - Not pushed.
# feat(warmup): add staggered idle limit prestart (Soju06#905) ## Summary - add an opt-in `limitWarmupStaggeredIdleEnabled` setting, API field, migration, and dashboard toggle - let the background usage-refresh warm-up service pre-start healthy idle primary 5h windows in deterministic account slots across each 300-minute cycle - require a fresh in-cycle idle usage sample before sending staggered idle warm-up traffic, catch deterministic slots between refresh ticks, and label `primary_idle` as the 5h window in the dashboard - preserve the staggered-idle flag across full dashboard settings saves after rebasing onto the current settings payload shape Closes Soju06#433. ## Maintainer Update - Rebased onto current `main`; current head is `1fec57b8717af3e67a50e60d6b51ebd8b24e6b49`. - The Alembic revision now follows `20260604_000000_add_reauth_required_account_status`, leaving a single head: `20260603_000000_add_limit_warmup_staggered_idle`. - The Codex review findings are addressed: `primary_idle` renders as the primary 5h window, idle warm-up requires a fresh usage sample for the account/cycle, and the stagger slot window now follows the configured refresh cadence so nonzero refresh duration does not skip a deterministic slot. ## Validation ```bash uv run ruff check app/modules/settings app/modules/limit_warmup app/core/usage/refresh_scheduler.py tests/unit/test_limit_warmup.py tests/integration/test_settings_api.py tests/integration/test_settings_audit_changed_fields.py tests/integration/test_migrations.py uv run ruff check app/modules/limit_warmup/service.py app/core/usage/refresh_scheduler.py tests/unit/test_limit_warmup.py uv run pytest tests/unit/test_limit_warmup.py -q uv run pytest tests/integration/test_settings_api.py tests/integration/test_settings_audit_changed_fields.py tests/integration/test_migrations.py -q uv run ty check app/modules/limit_warmup app/core/usage/refresh_scheduler.py tests/unit/test_limit_warmup.py uv run openspec validate database-migrations --strict uv run openspec validate frontend-architecture --strict uv run openspec validate usage-refresh-policy --strict uv run python - <<'PY' from alembic.script import ScriptDirectory from app.db.migrate import _build_alembic_config cfg = _build_alembic_config('sqlite:///tmp/alembic-head-check.db') script = ScriptDirectory.from_config(cfg) heads = script.get_heads() print('heads', heads) if len(heads) != 1: raise SystemExit(1) PY make typecheck npm run typecheck npm run lint npm test -- src/features/dashboard/components/account-card.test.tsx src/features/settings/schemas.test.ts src/features/settings/components/routing-settings.test.tsx src/features/settings/components/session-settings.test.tsx src/features/settings/components/totp-settings.test.tsx npm test ``` --- ## Maintainer Refresh - 2026-06-30 # PR 905 Refresh Verification ## Strategy - Refreshed `fix/issue-433-staggered-warmup` by rebasing the existing PR branch onto current `origin/main` (`70576a1eeedc8f41b52548714391ba11167c1f93`). - Chose rebase because the PR branch was linear and this keeps the existing PR history maintainer-friendly. - Did not push. ## Conflicts Resolved - `app/core/usage/refresh_scheduler.py` - Conflict occurred while applying `fix(warmup): require fresh idle usage samples`. - Resolution preserved current main's one-account-at-a-time usage refresh scheduler and added the PR's `refresh_started_at` timestamp before refreshing the selected account. - The timestamp is passed to `LimitWarmupService.run_after_usage_refresh(...)` so staggered idle warmup still requires an in-cycle fresh usage sample. ## Files Changed By Me During Refresh - `app/core/usage/refresh_scheduler.py` - Manual rebase conflict resolution, now included in rebased commit `a8076d87`. - `app/db/alembic/versions/20260630_000000_add_limit_warmup_staggered_idle.py` - Renamed from `20260603_000000_add_limit_warmup_staggered_idle.py`. - Updated revision id to `20260630_000000_add_limit_warmup_staggered_idle`. - Updated `down_revision` to current main head `20260629_000000_add_dashboard_query_hot_path_indexes`. ## Commands Run - `git fetch origin main` - PASS: fetched current `origin/main`. - `git rebase origin/main` - PASS after resolving one conflict in `app/core/usage/refresh_scheduler.py`. - `uv run alembic heads` - FAIL: plain Alembic config has no `script_location`; replaced with project migration checks below. - `uv run python - <<'PY' ... ScriptDirectory.from_config(...).get_heads() ... PY` - PASS: single Alembic head is `20260630_000000_add_limit_warmup_staggered_idle`. - `uv run python - <<'PY' ... check_migration_policy('sqlite:///unused.sqlite') ... PY` - PASS: `violations= ()`. - `uv run openspec validate limit-warmup-staggered-idle --strict` - PASS: change is valid. - `uv run openspec validate --specs` - PASS: 30 specs passed, 0 failed. - `uv run pytest tests/unit/test_limit_warmup.py tests/integration/test_settings_api.py tests/integration/test_settings_audit_changed_fields.py tests/integration/test_migrations.py -q` - PASS: 83 passed, 3 skipped. Skips were PostgreSQL-only migration tests. - `uv run ruff check app/core/usage/refresh_scheduler.py app/db/models.py app/db/alembic/versions/20260630_000000_add_limit_warmup_staggered_idle.py app/modules/limit_warmup/service.py app/modules/settings/api.py app/modules/settings/repository.py app/modules/settings/schemas.py app/modules/settings/service.py tests/unit/test_limit_warmup.py tests/integration/test_settings_api.py tests/integration/test_settings_audit_changed_fields.py tests/integration/test_migrations.py` - PASS: all checks passed. - `uv run ty check app/modules/limit_warmup app/core/usage/refresh_scheduler.py app/modules/settings tests/unit/test_limit_warmup.py` - PASS: all checks passed. - `bun run test ...` - FAIL initially: `vitest: command not found` because frontend dependencies were not installed. - `bun run lint ...` - FAIL initially: `eslint: command not found` because frontend dependencies were not installed. - `bun install --frozen-lockfile` - PASS: installed frontend dependencies from existing lockfile. - `bun run test src/features/dashboard/components/account-card.test.tsx src/features/dashboard/components/account-list.test.tsx src/features/settings/components/routing-settings.test.tsx src/features/settings/components/session-settings.test.tsx src/features/settings/components/totp-settings.test.tsx src/features/settings/payload.test.ts src/features/settings/schemas.test.ts` - PASS: 7 test files passed, 69 tests passed. - `bun run lint src/features/dashboard/components/account-card.tsx src/features/dashboard/components/account-card.test.tsx src/features/dashboard/components/account-list.tsx src/features/dashboard/components/account-list.test.tsx src/features/settings/components/routing-settings.tsx src/features/settings/components/routing-settings.test.tsx src/features/settings/components/session-settings.test.tsx src/features/settings/components/settings-page.tsx src/features/settings/components/totp-settings.test.tsx src/features/settings/payload.ts src/features/settings/payload.test.ts src/features/settings/schemas.ts src/features/settings/schemas.test.ts src/test/mocks/factories.ts src/test/mocks/handlers.ts` - PASS. - `bun run typecheck` - PASS: `tsc -b`. - `rg -n "<<<<<<<|=======|>>>>>>>" app tests frontend openspec || true` - PASS for merge-conflict purposes: no conflict markers found; matches were existing separator comments. - `git commit -m "fix(db): refresh staggered warmup migration head"` - PASS: final commit created. ## Final Commit - `a6fc6c65f8299d6a2885bd9a4ea5e62606cd6157` - `fix(db): refresh staggered warmup migration head` ## Remaining Blockers - None known locally. - Branch was not pushed, per instruction.
## Summary - merge the two Alembic heads left after the Soju06#985/Soju06#902/Soju06#905 batch landed on `main` - keep the migration graph single-headed for startup migration upgrade targets ## Validation - `uv run python - <<'PY' ... ScriptDirectory.get_heads()` -> `20260630_010000_merge_warmup_and_request_log_dashboard_heads` - `uv run pytest tests/integration/test_migrations.py -q` -> 12 passed, 3 skipped - `uv run pytest tests/integration/test_migrations.py tests/unit/test_limit_warmup.py tests/unit/test_request_logs_repository.py tests/integration/test_usage_repository.py -q` -> 66 passed, 4 skipped - `uv run ruff check app/db/alembic/versions/20260630_010000_merge_warmup_and_request_log_dashboard_heads.py` -> pass - `git diff --check` -> pass
Resolve conflicts from syncing upstream Soju06/codex-lb into the fork (PR #7): - app/db/models.py: keep both new ApiKey columns (upstream usage_sections, fork force_include_usage). - app/modules/accounts/service.py: keep both module constants. - app/modules/proxy/api.py: keep both import groups (auth_manager/repository and token_vending). - app/modules/accounts/auth_manager.py & app/modules/usage/updater.py: on permanent refresh/usage failure, run both upstream routing-unavailable + cache invalidation and the fork's reauth status-transition recording. - frontend account-actions.tsx: keep the fork's probeDisabled 404 carve-out plus upstream's reset-credit controls. - .github/workflows/ci.yml: keep the fork's removal of the contributors, beta-release-guard and stable-release-guard jobs. Add Alembic merge migration uniting the two heads (add_api_key_force_include_usage + merge_warmup_and_request_log_dashboard_heads); verified single head with no schema drift. Fix test_auth_manager.py cooldown-reuse fixtures so the SimpleNamespace settings mock includes account_token_vending_authority_base_url, which the fork's follower-mode gate in ensure_fresh now consults.
Follow-up to the conflict-resolution merge, fixing CI on PR #7: - frontend: add the now-required onResetCredit prop to the force-probe AccountActions test render (merge combined upstream's reset-credit prop with a fork test render that predated it). Unblocks frontend-build, frontend-typecheck, package, docker and every pytest job (they build the frontend first). - ruff format: normalize three auto-merged files (app/core/config/settings.py, tests/unit/test_api_keys_service.py, tests/unit/test_proxy_utils.py). - ty: declare force_include_usage on ApiKeysRepositoryProtocol.update (the concrete repo and the service call already had it; the fork's flag was never added to the Protocol and main-push CI never type-checked it), and satisfy the type checker in the fork's reauth/probe tests via cast()/ setattr — pre-existing gaps the sync PR's pull_request CI surfaced.
…dropped by merge The auto-merge of settings/repository.py silently dropped the write block that persists additional_quota_routing_policies_json in SettingsRepository .update() (both parents had it; the keyword param survived but the assignment was lost). As a result PUT /api/settings ignored additionalQuotaRoutingPolicies overrides, so they never persisted. Restore the two-line assignment in its original position (between the sticky-reallocation-secondary and warmup-model blocks), fixing the two integration-core failures: - test_settings_api_returns_known_additional_quota_policies - test_accounts_list_returns_additional_quotas
maisi
pushed a commit
that referenced
this pull request
Jun 30, 2026
PR #7 was squash-merged as ce66bec, so the 40 upstream commits it integrated were not recorded as ancestors of main, leaving main 'behind' the sync branch and causing the nightly upstream sync to re-evaluate (and re-conflict on) those already-integrated commits. This is an ours-merge: it keeps main's tree exactly as-is (identical to the squashed content) and only records b2bf733 — and thus upstream tip a2290f2 and the 40 commits — as ancestors, so future syncs see only new commits.
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.
Automated daily upstream sync could not land on main cleanly (git conflict, or it would leave multiple Alembic migration heads). main was left untouched. Resolve the conflicts here — add a merge migration if the Alembic graph has more than one head — then merge.