Conversation
…o-decimals feat: show analytics success rate to two decimals
- Run the vitest and playwright e2e jobs in parallel. - Split e2e into staging/prod paths so the prod path does not wait on build-images. - build-images runner is selectable via the USE_SELF_HOSTED_BUILD repo variable (defaults to GitHub-hosted ubuntu-latest); remote builder endpoint comes from the BUILDKITD_ENDPOINT variable. KEEP-883
…anels-overlap fix: resize page content when nav flyout panels open
Drop the e2e-tests-staging/e2e-tests-prod split and restore one e2e-tests job (needs: [build-images]). Keeps the e2e job behaviour identical; only removes the prod build/e2e overlap, favouring the simpler single-job dependency graph.
Rename USE_SELF_HOSTED_BUILD -> USE_SELF_HOSTED_RUNNERS and use it to also route the vitest and playwright e2e jobs to the self-hosted runners. e2e self-hosted is restricted to non-pull_request events so PR runs stay on GitHub-hosted runners. The should-run gate job stays hosted. Deploy is unchanged (hosted). Default (variable unset) keeps everything on ubuntu-latest.
…-min ci: parallelize e2e jobs and overlap prod e2e with image build
Polygon gas is paid in POL but was priced with an ETH/USD feed, overstating its sponsored USD cost by orders of magnitude. Map each chain to its native gas-token/USD feed (POL/USD for Polygon, ETH/USD elsewhere) and rename the feed map and price helper to reflect that they price the native gas token. Also unify testnet detection with SPONSORSHIP_CHAINS so Polygon Amoy and Arbitrum Sepolia are recognised as testnets; previously they fell through to the mainnet path and were recorded at the $3000 fallback price.
Persist per-(org, month, chain) sponsored-gas rollups so history survives past month-end. Closed months are aggregated from the gas_credit_usage ledger once into gas_sponsorship_monthly and served from there; the current month is recomputed live. Add a read API for it. UI: a collapsible monthly, per-network digest embedded in the gas-credits card on Billing, with a "Show testnets" toggle (testnets show native gas, no USD). The Analytics "Gas Spent" card now references how much of the gas was sponsored. Network labels are unified to a single source: "Ethereum Sepolia" (was the ambiguous "Sepolia") and concise mainnet names, removing a hardcoded list that had drifted (its testnet list was missing Arbitrum Sepolia).
Sponsored amounts are routinely sub-cent, so render USD at micro-dollar precision (trailing zeros trimmed) instead of rounding to "$0.00" while the spend accrues against the cap. The gas-credit bar now rounds used to the nearest cent instead of ceiling, so it tracks the exact history total rather than jumping a near-full cent. Merge the informative "Sponsored networks" row and the monthly-history dropdown into a single panel: the network chips are the always-visible header, expanding reveals the per-month, per-network history. The chevron points right when collapsed and rotates down when open.
The sponsored-gas sub-line on the Gas Spent card was muted gray and easy to miss; give it a clear color and an info tooltip explaining what it is (worded without assuming Billing access). Top-align the KPI card icon so the Gas Spent icon stays in line with the other cards when the sponsored sub-line adds a row.
A workflow run can span several chains, so the runs table no longer collapses it to a single network or a misleading wallet-side "0.0000 ETH". The Network column now lists the distinct networks the run touched, and the Gas column shows the single-network total in that chain's native token (ETH, POL, ...) or "Composed" when the run spans more than one network. Expanding a run lazily loads its steps (with a loading skeleton) and shows, per gas-consuming step, its own network, the exact native gas amount, and a mark on the transactions KeeperHub sponsored, so a run mixing sponsored and unsponsored chains reads correctly per transaction.
Add a getMonthlySponsorship unit test for the merge logic: closed months are persisted once while the current month is recomputed live, and testnets are excluded from the USD total (and hidden unless requested). Derive the runs-table gas-token symbol from SPONSORSHIP_CHAINS (new symbol field) instead of a hardcoded POL map, so the chain list stays the single source of truth. Document the known approximations surfaced in review: the analytics sponsored figure sums native gas across chains and renders as ETH; per-step gas is keyed by (execution, chain); the history read persists closed-month rollups as a side effect; and month_start is UTC midnight in a tz-naive column.
…-history feat(billing): store monthly gas sponsorship history and fix per-chain pricing
The runs API allowlisted every normalized status except system_error, so the dedicated System Error filter was silently dropped to undefined and the list returned all runs unfiltered. Add it to VALID_STATUSES; the query layer and the UI filter already supported it.
…-error-filter fix(analytics): accept system_error in runs status filter
…logs The per-network gas breakdown was the last /analytics reader still extracting network and gasUsed from the double-encoded input/output JSONB on every log row in the window, then grouping and summing those re-parsed expressions. That is unindexable and, on a large org over a 30d range, runs past the 100s edge timeout (the networks-endpoint error). Add first-class network (text) and gas_used_wei (numeric) columns to workflow_execution_logs, mirroring the run-total gas denormalisation already on workflow_executions. network is populated from input at step start, gas_used_wei from output at step complete, via JS extractors that match the SQL extraction value-for-value. A partial index on started_at keyed to gas-bearing rows lets the breakdown skip the non-gas majority.
Batched, idempotent, keyset-paged backfill that fills the new workflow_execution_logs columns from the existing JSONB for historical rows. COALESCE preserves any value the live writer already set and the WHERE only touches rows with a JSONB value to fill, so non-web3 rows are never written and re-runs are no-ops. Mirrors backfill-workflow-gas.ts, including the --dry-run / --yes / --after-id guards.
Switch the workflow branch of computeNetworkBreakdown to aggregate the network and gas_used_wei columns directly instead of re-parsing the input/output JSONB per row. Same output shape and merge logic; the query now reads only gas-bearing rows via the partial index rather than scanning and detoasting every log row in the window.
The per-network breakdown reads network and gas_used_wei only for rows where gas_used_wei is not null, so those are the only historical rows worth denormalising. Gas steps are a tiny fraction of the logs table, so scoping the backfill to them turns a multi-million-row rewrite into a handful of updates and keeps the walk off the non-gas majority. network on non-gas rows stays null on purpose; nothing reads it.
…ks-timeout fix(analytics): eliminate networks-breakdown timeout via denormalised log columns
joelorzet
requested review from
a team,
OleksandrUA,
eskp and
suisuss
and removed request for
a team
June 23, 2026 20:54
The per-network breakdown now reads the denormalised network / gas_used_wei columns on workflow_execution_logs, so the seeds must populate them, not just the input/output JSONB. Both the e2e seed and the dev seed compute the gas value once and write it to the column and the JSONB, and set network on web3-write rows. Without this, the seeded gas rows are invisible to the column-based read and the network-breakdown e2e fails.
…e-seed test(analytics): mirror network and gas columns in analytics seeds
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.