feat(quoter-bot): deploy one railway service per chain - #203
feat(quoter-bot): deploy one railway service per chain#203haydenshively wants to merge 1 commit into
Conversation
A full run provisions the chain named by CHAIN_ID as quoter-bot-<chainId>; DEPLOY_ONLY re-ships every supported chain, naming any unprovisioned service before uploading and starting all services before waiting on any. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@julien-devatom regarding cutover step 2 -- can you handle this, or let me know who I should coordinate with to get the proper config? |
|
@codex review |
Will do this morning |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
BOTS-63. The mainnet code path landed in #173; this is the deployment half: the quoter-bot Railway
project now runs one
quoter-bot-<chainId>service per supported chain (quoter-bot-1,quoter-bot-8453), the way the liquidation bots runbot-<chainId>(#193).Shape
Unlike the liquidation bots, per-chain inputs are not
_<chainId>-suffixed. The quoter hasabout a dozen chain-specific inputs including two large JSON strategy arrays, so a full run keeps
every input under its runtime name and provisions the one chain named by
CHAIN_ID. Run it once perchain with that chain's environment.
CHAIN_IDis parsed with the bot's ownchainIdValue, so the script rejects exactlywhat the runtime rejects (
0x1,1.0, unsupported ids) before touching Railway. It thenprovisions
quoter-bot-<chainId>: service,/statevolume, Dockerfile path, variables.SUPPORTED_CHAIN_IDS.map(railwayServiceName), so thedeploy set cannot drift from the bot's chain set. It preflights that every service exists and
names the missing ones (deploy-only holds no secrets and cannot create), then re-ships through
reshipRailwayServices: every upload starts before any wait begins, a rejected start is recordedas
START_FAILEDand a failed status read asPOLL_FAILED, and the run exits non-zero unlessevery service reaches
SUCCESS. One chain's failure never blocks another's re-ship, which mattersbecause mainnet is expected to halt at readiness until its market is listed.
No workflow job change:
deploy-quoter-bot-production.ymlalready runs the script withDEPLOY_ONLY=trueand the Docker Hub / npm jobs hang off that single job. Only its header commentchanged. README and
docs/reference.mddeploy sections updated; the stalechainId: 8453log claimis now "the configured
chainId".Cutover (manual, not committed)
quoter-botservice has been renamed toquoter-bot-8453: the service id isunchanged, and
railway variable liststill showsRAILWAY_VOLUME_ID/RAILWAY_VOLUME_MOUNT_PATH,so the
/statevolume and all variables survived. A DEPLOY_ONLY preflight against productionfrom this branch now reports exactly:
Not provisioned in production: quoter-bot-1.quoter-bot-1still needs a full run with mainnet config (CHAIN_ID=1, mainnet RPC + archiveRPC, mainnet
MIDNIGHT_ADDRESS/RATIFIER_ADDRESS/ USDC /MARKET_IDS/ strategy arrays, itsown funded maker with an unbounded USDC approval, a second BetterStack heartbeat URL).
release-quoter-botlabel until step 2 is done: a labelled merge deploysimmediately and DEPLOY_ONLY fails while
quoter-bot-1is unprovisioned.Blocker outside this repo
No mainnet Midnight market is
listed=trueyet (/v0/midnight/markets?chain_ids=1&listed=truereturns
[]).getBookmapslistedtoallowlisted, setup-check reportsnot allowlisted, and anon-transient readiness failure halts the monitor, so
quoter-bot-1will exit at startup until themarket is listed. Provisioning ahead of listing is safe; calling the release done is not.
Verification
pnpm --filter @morpho-org/quoter-bot run typecheck,jsdoc:check, rootpnpm lint,pnpm format,pnpm knipclean.pnpm test: 3030 pass; the only failures are the four fork suites that needRPC_URL_8453(CI has it).
test/scripts/railway.utils.test.ts: 23 tests, including a runnablereshipRailwayServicestest where one start rejects, another's poll fails, the third succeeds,and the aggregate is non-zero.
one deferred: binding the deploy poll to the
railway up --jsondeployment id is pre-existing andserialized today by the workflow's concurrency group.
🤖 Generated with Claude Code