refactor(cloud-agent): remove legacy runtime#3957
Conversation
| await db | ||
| .update(cloud_agent_code_reviews) | ||
| .set({ agent_version: agentVersion }) | ||
| .set({ agent_version: 'v2' }) |
There was a problem hiding this comment.
Could this mark a review as V2 even when an older code-review worker handles the preceding request? During a web-first rollout, omitting agentVersion makes that worker select V1, so streaming and cancellation can target the wrong backend.
| return { | ||
| events: this.state.events || [], | ||
| }; | ||
| await this.getCloudAgentNextClient().interruptSession( |
There was a problem hiding this comment.
What happens if an already-running V1 Durable Object is cancelled during this rollout? Its persisted session ID belongs to the legacy worker, but this now always calls Cloud Agent Next, so the legacy run can keep posting after the review is marked cancelled.
| specifier: 'catalog:' | ||
| version: 4.98.0(@cloudflare/workers-types@4.20260605.1)(bufferutil@4.1.0)(utf-8-validate@6.0.6) | ||
|
|
||
| services/cloud-agent-next: |
There was a problem hiding this comment.
Can we also remove event-source-polyfill from apps/web/package.json and regenerate the lockfile? Its only application import was in the deleted cloud-agent-client.ts, and knip now reports the dependency as unused.
Summary
Verification
Visual Changes
Historicalstatus instead of waiting for live events.Reviewer Notes
agent_versionmetadata are intentionally retained and never select a runtime backend.