Skip to content

Fix video agent API citations and local container reloads - #20

Merged
devhims merged 5 commits into
mainfrom
fix/video-agent-citations
Sep 5, 2026
Merged

Fix video agent API citations and local container reloads#20
devhims merged 5 commits into
mainfrom
fix/video-agent-citations

Conversation

@devhims

@devhims devhims commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Agent runs could collect useful transcript and visual evidence, then lose their final answer because GLM omitted the application's inline citation syntax. Both normal and recovery finalization now return structured answer blocks with evidence IDs; application code renders markers and resolves them against persisted excerpts. The public response format is unchanged.

Recovery uses a forced structured tool call, short request-scoped evidence aliases, and a shorter answer prompt. It allows one schema/reference repair within the existing 20-second finalization phase and 60-second run deadline. Exhausted recovery preserves supported transcript findings and visual evidence while retaining the explicit PARTIAL_EVIDENCE warning. Structured logs identify validation failures separately from timeouts.

Local testing also reproduced container HTTPS failures after Wrangler hot reload on both 4.120.0 and 4.129.0. Development scripts now use a local-only entry point that recreates warm stateless processor containers on Worker reinitialization. Production keeps its existing entry point and lifecycle; dependency versions are unchanged. A code reload can interrupt an in-flight local provider read, which should be retried.

Validation:

  • TypeScript build and generated-doc checks pass.
  • 315 unit tests pass, including exact reference resolution, invalid/missing references, bounded repair, clarification compatibility, and transcript/visual fallback coverage.
  • 10 local Durable Object/account integration tests pass.
  • Final localhost GLM smoke tests both pass without PARTIAL_EVIDENCE: research 51.5s / 14 citations; inspect 51.3s / 13 citations, including transcript and storyboard references. Times include polling.
  • Previously failing transcript and channel reads return HTTP 200 after repeated local Worker reloads. An uncached transcript read was used to avoid a cache-only false positive.
  • Smoke tests now reject partial answers and use three-second polling with 429 backoff.

Earlier local attempts exposed finalization timeouts; these are not a guarantee of timing under all provider/model conditions. The admin-denial live check was skipped because these tests used the local demo account. No production test or deployment was performed; the final production smoke test is planned after merge.

The five commits separate local networking, citation finalization, fallback quality, recovery compaction, and live-test/documentation changes. Transcript window grouping and the analyst architecture are unchanged.

@mintlify

mintlify Bot commented Sep 5, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
video2ctx 🟢 Ready View Preview Sep 5, 2026, 12:48 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@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 12:47pm UTC

@devhims
devhims merged commit c5a454f into main Sep 5, 2026
7 checks passed
@devhims
devhims deleted the fix/video-agent-citations branch September 5, 2026 13:13
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