Skip to content

release: to prod - #1685

Merged
joelorzet merged 67 commits into
prodfrom
staging
Jul 1, 2026
Merged

release: to prod#1685
joelorzet merged 67 commits into
prodfrom
staging

Conversation

@joelorzet

Copy link
Copy Markdown

No description provided.

OleksandrUA and others added 30 commits June 26, 2026 16:45
Add a composite action that opens an AWS Systems Manager port-forward to the
cluster API endpoint via the in-VPC eks-jump host, and wire it into the
deploy workflows right after AWS credentials are configured. The action
no-ops when the target cluster has no jump configured, so current deploys
are unchanged.
Resolve the SSM port-forward target from the TO_EKS_CONNECT_INSTANCE_ID
environment variable instead of reading it from a parameter, so no internal
naming convention is committed to this public repo, and trim the action down to
what it does.
Both protocols are migrated from manual defineProtocol action enumeration
to defineAbiProtocol with per-function overrides. The ABI is the new
source of truth for function signatures; overrides supply slug renames,
labels, descriptions, and output name mapping to preserve backward
compatibility.

safe.ts gains a minimal inline ABI (6 functions + 12 events) that
enables ABI-derived event registration, eliminating the hand-crafted
events array.

Remaining 15 protocols are not migrated due to technical barriers:
- erc4626VaultActions slug prefix pattern: ethena, sky, yearn-v3, spark,
  morpho
- per-feed/per-contract slug factory pattern: chronicle, chainlink, ajna
- abi-cache (no inline ABI): lido, pendle, cowswap, aave-v3
- Vyper snake_case + missing ABIs: curve
- multi-contract complexity: aerodrome
- TEST_DATA migration risk: superfluid
Extends the existing Sepolia anvil fork infrastructure to support an
Ethereum mainnet fork on port 8548. Enables protocol-coverage tests for
mainnet-only protocols (wrapped/WETH, morpho) without real mainnet funds.

Changes:
- docker-compose.yml: add test-anvil-fork-mainnet service (port 8548,
  chain ID 1, forked from ANVIL_FORK_MAINNET_URL)
- lib/test-data/chain-test-data.ts: add FORK_CHAIN_IDS set, chain 1
  TOKEN_REGISTRY (WETH/USDC/WSTETH), FORK_WHALES (WSTETH/USDC), and
  native balance entries for fork-mode provisioning
- tests/e2e/vitest/protocol-coverage/_shared/funding.ts: fork-mode
  branching in ensureNativeGas (anvil_setBalance) and ensureErc20Acquired
  (whale impersonation via anvil_impersonateAccount)
- lib/test-data/build-workflow.ts: add ethValue virtual key for payable
  actions that take no calldata inputs (e.g. WETH deposit)
- protocols/wrapped.ts: add TEST_DATA for chain 1 (wrap/unwrap/balance-of)
- tests/e2e/vitest/protocol-coverage/wrapped/ethereum/coverage.test.ts:
  coverage runner for WETH on mainnet fork
- .github/workflows/e2e-tests-ephemeral.yml: start mainnet fork, patch DB
  chain 1 RPC to localhost:8548, pass ANVIL_FORK_MAINNET_URL secret
AbiDrivenProtocolInput now declares testData and defineAbiProtocol
forwards it to the inner defineProtocol call. Without this, testData
passed to defineAbiProtocol (as in wrapped.ts) was silently dropped.
Adds TEST_DATA for Morpho Blue on chain 1 (wstETH/USDC 86% LLTV market)
and the vitest coverage runner under protocol-coverage/morpho/ethereum/.

Market params (loanToken=USDC, collateralToken=wstETH, oracle, irm, lltv)
are bound inline per action; the 5-field MarketParams struct is the Morpho
Blue on-chain key, not the market ID. Market ID is used for read-only
actions (get-market, get-position, get-market-params).

Skipped: all 18 MetaMorpho vault-* actions (require a user-supplied vault
address), liquidate (requires undercollateralized position), flash-loan
(requires a callback contract).

Write actions are ordered to satisfy on-fork state dependencies:
accrue-interest, set-authorization (no prerequisites), then
supply-collateral, supply, borrow, repay, withdraw, withdraw-collateral.
Replace defineProtocol + erc4626VaultActions with defineAbiProtocol.
Morpho Blue contract uses inline ABI with MarketParams tuple flattening;
vault contract uses inline ERC-4626 ABI. Overrides preserve all existing
slugs, labels, descriptions, decimals, and defaults.
Completes the defineAbiProtocol migration for all protocols that were
still using defineProtocol with abi-cache or on-chain ABI resolution.
Inline ABIs guarantee form field rendering regardless of whether the
ABI resolver can reach the contract on-chain (addresses KEEP-396).

Protocols migrated: aave-v3, aerodrome, ajna, chainlink, chronicle,
cowswap, curve, ethena, lido, pendle, sky, spark (new), superfluid,
yearn-v3.

Key changes per protocol:
- ajna: inline POOL_INFO_UTILS/POOL/VAULT/VAULT_AUTH/BUFFER ABIs with
  helper functions (poolOverrides, vaultOverrides, etc.) to generate
  per-contract slug-prefixed overrides without duplication
- superfluid: preserves tuple-flattening for GDA createPool config,
  all 16 actions preserved with identical slugs; passes existing
  superfluid-protocol unit test suite
- aave-v3/spark: inline pool ABIs bypass proxy ABI resolution failure
- chainlink/chronicle: feedOverrides() helper generates unique slugs
  per named feed to prevent slug collisions on shared ABIs
- aerodrome: Vyper snake_case functions all get explicit slug overrides
- pendle: all 6 contracts converted from abi-cache to inline ABIs

Also adds erc4626AbiOverrides() helper in lib/web3/standards/erc4626.ts
and mainnet fork coverage tests for ethena, lido, sky, spark, yearn.
…compilation delay

The generated flow/route.js (~2MB bundled executor with a large inline
string literal) causes Turbopack to hang indefinitely on first compilation,
leaving all workflow runs at status=pending. Register the handler via
world.registerHandler() in instrumentation.ts to bypass HTTP dispatch
entirely.

The @workflow/next builder-deferred plugin writes a 68-byte stub to
flow/route.js at Next.js startup and then overwrites with real 2MB content
in the background (~12s). Watch the file and register only once the real
content is present.
Skipped actions still need input bindings so the workflow builder can
produce valid workflow objects for the dashboard seeder. Without bindings,
address-typed inputs fall through to defaultForSolidityType which throws.

Add bindings for all skipped actions with address inputs:
- get-auction-status, get-borrower-info (ajnaPool_ + borrower_)
- pool{1,2}-auction-info, pool{1,2}-kick (borrower_)
- pool{1,2}-bucket-take, pool{1,2}-settle (borrowerAddress_)
- pool{1,2}-withdraw-bonds (recipient_)

Also add empty bindings for vault and update-interest actions (uint256
inputs only, auto-defaulted) so the full skipped set is covered.
…w test

build-workflow.test.ts iterates all (protocol, chain) testData pairs and
calls buildActionWorkflow for every trigger type including Event. The Event
trigger builder calls pickEventContractAddress which throws if the chain has
no entry in TOKEN_REGISTRY. Ajna testData uses chain 8453 (Base).

Add canonical WETH (OPStack 0x4200...0006) and USDC (Circle native
0x8335...2913) for chain 8453 so the Event trigger variant can pick a
contract address without throwing.
…ss protocols

Fixes build-workflow.test.ts collection-time failures: for every action in
testData.skipped that had address-typed inputs but no binding entry in
testData.actions, buildActionWorkflow threw at test collection (not execution).

Added bindings for all 10 affected protocols:
- chainlink: get-round-data, ccip-get-fee, ccip-send, ccip-bnm-drip,
  ccip-approve-bridge-token, ccip-approve-fee-token
- chronicle: self-kiss
- curve: crv-approve, crv-transfer, remove-liquidity-one-coin
- ethena: approve-usde, cooldown-assets, cooldown-shares, unstake,
  vault-deposit, vault-mint, vault-withdraw, vault-redeem
- lido: approve-steth
- pendle: get-market-expiry, is-market-expired, get-lp-balance,
  get-active-lp-balance, get-pt-balance, is-pt-expired, get-yt-balance,
  get-sy-balance, get-sy-exchange-rate, mint-py-from-sy, redeem-py-to-sy
- sky: approve-dai, approve-usds, convert-dai-to-usds, convert-usds-to-dai,
  convert-mkr-to-sky, vault-deposit/mint/withdraw/redeem,
  st-usds-vault-deposit/mint/withdraw/redeem
- spark: supply, withdraw, borrow, repay, set-collateral,
  vault-deposit/mint/withdraw/redeem
- uniswap-v3: get-position, owner-of, approve-position, transfer-position,
  burn-position, swap-exact-input, swap-exact-output
- yearn-v3: vault-deposit, vault-mint, vault-withdraw, vault-redeem
…ployment test

The ccipBnM test token is only deployed on testnets (Sepolia, Base Sepolia)
but chainlink's testData["1"] causes the build-workflow test to iterate
ccip-bnm-drip for chain "1". The test asserts contractDef.addresses[chainId]
is truthy for any non-userSpecifiedAddress contract; without a mainnet address
this assertion failed for all 5 trigger-type variants.

Marking ccipBnM userSpecifiedAddress:true skips the deployment check (the same
pattern used by ccipBridgeToken and ccipFeeToken, which also carry per-chain
defaults but expose the address as a user-configurable field). The testnet
addresses remain in the addresses map as UI defaults.
Chronicle does not publish a DAI/USD price feed on Ethereum mainnet.
The address 0xCCd47B363b81E94321518D0393ACcb0846f4D4C6 has no contract
deployed -- zero transactions and no verified source code on Etherscan.
DAI is a USD-pegged stablecoin (MakerDAO defines the peg), so no oracle
is needed. The Sepolia testnet address is retained.
The keeperhub-docs-common container leaks memory steadily (~18 MiB/day
from a ~123 MiB baseline) and reaches ~90% of the 256Mi limit within
about six days if the pod is not redeployed, risking OOMKill. Raise the
limit to 512Mi in prod and staging to buy headroom while the underlying
leak is investigated (KEEP-910).
ci: TECH-41 reach the EKS API endpoint through an SSM port-forward in CI
…n-memory-leak

fix(docs-site): raise container memory limit to 512Mi
OleksandrUA and others added 5 commits July 1, 2026 15:21
The docs-site standalone Next.js server grows working set steadily until
it approaches the container limit and risks OOMKill. Inside the pod V8's
heap_size_limit is auto-tuned to ~the entire cgroup (259 MiB on a 256Mi
limit), leaving no headroom for non-heap RSS, so V8 defers GC until the
cgroup kills the process first.

Set NODE_OPTIONS=--max-old-space-size=350 (against the 512Mi limit) so V8
collects at a bounded ceiling with room for runtime/native memory, keeping
working set flat instead of climbing to the limit. Stopgap while the docs
site is moved to static hosting (KEEP-910).
deploy-docs.yaml only watched docs/ and docs-site/ (the source content),
so changes to the Helm values under deploy/docs-site/ (limits, env) did
not trigger a deploy - the values would only apply on the next content
push. Add deploy/docs-site/** to the path filter to match deploy-scheduler,
deploy-events and deploy-sandbox, so values-only changes deploy on their
own.
The e2e-vitest-ephemeral job started the app image without SANDBOX_BACKEND
/SANDBOX_URL. Under NODE_ENV=production the run-code step module throws at
import, so every workflow_steps execution 500s and the protocol-coverage
setup workflows time out. Pass sandbox_backend/sandbox_url like the
playwright job already does so start-app forwards them to the container.
fix(docs-site): cap Node old-space heap to bound memory growth
…ox-env

ci: forward sandbox config to app container in vitest e2e job
OleksandrUA
OleksandrUA previously approved these changes Jul 1, 2026
joelorzet added 2 commits July 1, 2026 12:03
The network breakdown includes networks whose executions all failed or are
still pending; gas is recorded only on completion, so those networks
legitimately report totalGasWei 0 (matches the production write path in
createExecution/completeExecution). The direct-executions branch of
getNetworkBreakdown does not filter null gas, so a network seeded with only
failed runs made the 'every network > 0' assertion flake.

Assert instead that gas is attributed overall (sum > 0) and that any network
with successful executions carries non-zero gas.
…akdown-flake

test(analytics): tolerate zero-gas networks in gas breakdown assertion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants