[codex] Persist provider quota refresh state#665
Conversation
c0ae1a8 to
cd2f1ab
Compare
Rebase complete — ready for CIRebased What was done
Prior CI notePrevious failure was only the unrelated flaky Gateway test ( Ready for review. |
CI note (unrelated failures)Post-rebase CI run
All data-layer jobs green: Format, Clippy (Data), Test (Data), all Data Adapter tests, Data Feature checks, MySQL/SQLite smoke. Cannot |
Final babysit statusDone
Fix still present after rebaseSQLite + MySQL
(Paths on current main: CI blockers (unrelated to this PR)Both post-rebase runs failed only on:
All data-layer jobs for this change are green (Format/Clippy/Test Data/adapters/feature checks/MySQL+SQLite smoke). MergeCould not merge: authenticated as PR is mergeable from git POV (no conflicts). |
Main intentionally treats bulk auth snapshot list results as authoritative for API key leaderboards so deleted historical IDs do not trigger unbounded per-id N+1 lookups. Update the stale single-lookup-fallback test to assert that default filtering hides missing bulk rows and include_inactive surfaces legacy usage names.
CI fix: Gateway admin stats leaderboard testRoot cause (Test Gateway)
The existing test This is a main-branch regression in test expectations, not caused by this PR's quota refresh persistence changes. FixUpdated the gateway integration test to assert the intended product behavior:
Commit: Data DB Smoke (Postgres)
Same infra flake is failing on recent Local verification
|
CI status after fix (
|
| Check | Result |
|---|---|
| Test (Gateway) | ✅ PASS (was the merge-blocking code failure) |
| Test / Clippy / Format / Data / Integration | ✅ PASS |
| Data DB Smoke (Postgres) | ❌ still failing — infra flake only |
Postgres failure remains:
timed out waiting for local postgres: Connection refused (os error 111)
Same failure is present on recent main runs. Not introduced by this PR; no related SQL/code change in the fix.
Merge
Attempted gh pr merge 665 --squash --delete-branch as Avilianb → permission denied (does not have the correct permissions to execute MergePullRequest). Needs a maintainer with write access on fawney19/Aether (or admin override of the Postgres smoke required check if it is branch-protected).
ManagedPostgresServer now prefers AETHER_TEST_POSTGRES_URL when set and creates an isolated database per fixture so sequential lifecycle tests can share the GHA postgres:16 service without clobbering each other. Wire that URL into the Postgres API key lifecycle CI step so CI no longer depends on a local initdb/postgres child process that times out.
Fix: Data DB Smoke (Postgres) lifecycle infra flakeRoot causeJob has a healthy Step Run Postgres API key lifecycle tests only set Fix (
|
Default admin stats windows are calendar-day based. Using now-10m for recent fixtures can land on yesterday right after UTC midnight and empty the default 1-day window. Clamp recent fixtures to stay inside today's UTC bounds.
Follow-up: Gateway UTC-midnight flakePostgres smoke is green on CauseDefault admin stats window is calendar today (1 day when env is test/dev). The test used Fix (
|
CI fully green on
|
Summary
update_keywrites SQLite/MySQL rows.Root cause
persist_provider_quota_refresh_state()updatesupstream_metadata, OAuth invalid markers, andstatus_snapshoton the in-memory key before calling the generic provider catalog key update. The SQLite/MySQLupdate_keySQL omitted those runtime columns, so the refresh response could briefly show quota progress, then the next list reload read the old row without quota windows and the progress bar disappeared.Validation
cargo fmt --checkgit diff --checkcargo test -p aether-data sqlite_repository_writes_provider_catalog_contract_views -- --nocapturecargo test -p aether-data provider_catalog -- --nocapture