refactor!: drop the legacy region aliases — siteId is the only wire key - #120
Conversation
Removes every remaining `region` alias from the API (follow-up to #119, per decision: no backward compatibility needed): - Request bodies read `siteId` ONLY (eval-schedules, workflow run, clash event/token/schedule). The legacy `region` body key is dead. - Token create reads `regionLocationBaseId` ONLY (drops the pre-refactor `region` base-id body alias). - Clash-runner wire: register + assignment payloads emit only `siteId`. Verified safe: the runner daemon never read the site field at all (consumes id/state/match.{id,topic,maxDurationSeconds} only), so no runner redeploy is required. Eval-agentd fleet already upgraded. - Tests: all request bodies flipped to canonical keys (~70 sites); site-id-wire now asserts the legacy key is REJECTED, with a canonical control proving the 400 is the missing key. Gate: tsc clean, unit 1557/1557 (agora-e2e 13/13 + health 281/281 re-verified after a lingering remote ConvoAI session timed out and the local daemon was restarted), audio 12/12, E2E 133 passed / 0 failed. 🤖 Built with SMT <smt@agora.build>
🤖 Codex Code ReviewFindings
Notes
|
🤖 Claude Code ReviewThe change is mechanical and correct. I traced every consumer of the dropped keys before concluding. Verified safe
Deploy-ordering check (the one thing worth confirming before merge) The removed comments at the clash-runner register/assignment responses said the alias must stay "until the next runner redeploy (vox-upgrade.sh)". I checked: Issues
Adjacent leftover (pre-existing, not introduced here)
I could not run |
Summary
Follow-up to #119, per decision (no backward compatibility needed): every remaining
regionalias is removed from the API —siteIdis now the only wire key for site values.siteIdonly — eval-schedules, workflow run, clash event/token/schedule. The legacyregionbody key is dead (400 on the missing-site path, pinned by a wire-contract test with a canonical-key control).regionLocationBaseIdonly — drops the pre-refactorregionbase-id body alias.siteId(register + assignment payloads). Verified safe: the runner daemon never read the site field at all (it consumesid/state/match.{id,topic,maxDurationSeconds}only), so no runner redeploy is required. The eval-agentd fleet is already upgraded.site-id-wire.test.tsnow asserts the legacy key is rejected.Breaking change
Any external script still POSTing
region(orregionas a token-create base id) will get a 400. Therun-your-owncurl example was already updated tositeIdin #119.Test plan
npm run checkclean; unit 1557/1557; audio 12/12; E2E 133 passed / 0 failed (the previously flaky admin-login test passed in-suite this run).Generated with SMT smt@agora.build