Skip to content

Fix comparison scope and reserve 60 seconds for finalization - #62

Merged
devhims merged 3 commits into
mainfrom
fix/comparison-finalization
Sep 19, 2026
Merged

devhims merged 3 commits into
mainfrom
fix/comparison-finalization

Conversation

@devhims

@devhims devhims commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Follow-up video comparisons could lose the earlier subject, exceed the final answer token limit, and exhaust the shared deadline during repair. The fallback then displayed arbitrary, sometimes repeated transcript fragments as a completed partial answer.

This change preserves explicit comparison subjects independently of the video needing retrieval. The finalizer loads saved transcripts for every subject without provider calls, validates source coverage, and reports both subjects in coverage. Named comparisons skip discovery. Citation aliases are applied before measuring the context budget, and oversized transcripts retain sampled passages across their timeline with an explicit coverage warning.

Finalization now has a persisted 60-second deadline. Context gathering is bounded to 10 seconds, and the first synthesis attempt reserves up to 20 seconds for one repair. Structured output allows 3,000 standard or 4,000 detailed tokens, with another 1,000 on repair, plus the existing reasoning allowance. Recovery and cancellation retain the original deadline.

Fallback results preserve deduplicated analyzed findings or visual observations. Raw transcript fragments no longer substitute for an answer; without useful findings the run fails clearly and saved assets remain reusable. Failed and partial responses explain output-limit exhaustion, finalization timeouts, or answer-validation failures and retain retry guidance. An output-limit failure followed by a repair timeout preserves both causes. Partial answers display an alert above the findings and retain the cause in saved text after refresh.

Validation:

  • Platform typecheck and unit suite: 654 passed, 7 opt-in tests skipped.
  • Finalizer regressions cover output limits, repair timeouts, validation failures, and original deadline preservation in direct and research paths.
  • Web production build and all 31 Chrome dashboard tests passed, including failed and partial messages after refresh. The error-display fixture uses distinct session/run IDs and isolated history so earlier follow-up tests cannot alter its run identity.
  • Local Workers integration tests: 56 passed, including saved transcript citation reuse, deletion, and persisted deadlines.
  • One live Fireworks Priority check using synthetic transcripts: passed in about 18 seconds including classification and finalization, cited both videos, and made no provider retrieval calls. This is a smoke check, not a reliability benchmark.
  • Generated API docs updated; docs:check and docs:verify passed.

@vercel

vercel Bot commented Sep 19, 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 19, 2026 7:33pm UTC

@devhims
devhims merged commit 9824d41 into main Sep 19, 2026
6 checks passed
@devhims
devhims deleted the fix/comparison-finalization branch September 19, 2026 19:56

This branch was successfully deployed

1 active deployment
Preview 7aa276b8 Deployed Sep 19, 2026 by vercel[bot]
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