Skip to content

fix: return video agent receipts before runtime startup - #25

Merged
devhims merged 3 commits into
mainfrom
fix/agent-admission-latency
Sep 5, 2026
Merged

fix: return video agent receipts before runtime startup#25
devhims merged 3 commits into
mainfrom
fix/agent-admission-latency

Conversation

@devhims

@devhims devhims commented Sep 5, 2026

Copy link
Copy Markdown
Owner

New conversation requests waited for a cold AgentRuntimeDO before returning run IDs. Production instrumentation measured 1,331 ms in runtime startup in the sampled request. Admission now returns HTTP 202 after UserAccountDO durably records the request, IDs, session entry, and deletion registry. A durable alarm starts the conversation runtime afterward.

Polling and session restoration can read queued admissions immediately. Delivery retries reuse the same IDs, account deletion blocks late writes, and the execution deadline remains anchored to the original admission time. Existing conversation follow-ups retain synchronous validation. The route also avoids a duplicate admin check.

Validation:

  • Local HTTP receipts took 57–211 ms; retries took 12–39 ms and preserved IDs. A real video inspection completed successfully. These are local measurements, not production latency claims.
  • Workers tests cover retry recovery, catalog rollback, deletion races, interrupted startup, and expired admissions.
  • Tested together with the adaptive-response branch in an isolated merge: build, 360 unit tests, and 16 Workers integration tests passed with no merge conflicts.

The timing-only commit was already deployed directly through Wrangler with approval. The actual latency fix has not been deployed. Production verification will follow after both PRs merge and deploy. An unrelated classifier validation failure for the prompt "Hello" was observed during local testing and is outside this change.

@vercel

vercel Bot commented Sep 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
video2ctx-web Ready Ready Preview Sep 5, 2026 7:56pm UTC

@devhims
devhims merged commit 171e395 into main Sep 5, 2026
7 checks passed
@devhims
devhims deleted the fix/agent-admission-latency branch September 5, 2026 20:04
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.

1 participant