Skip to content

Separate session evidence retrieval from analysis - #61

Merged
devhims merged 2 commits into
mainfrom
refactor/separate-evidence-retrieval-analysis
Sep 19, 2026
Merged

devhims merged 2 commits into
mainfrom
refactor/separate-evidence-retrieval-analysis

Conversation

@devhims

@devhims devhims commented Sep 19, 2026

Copy link
Copy Markdown
Owner

A new question about saved transcripts or images currently goes through tools that combine retrieval and analysis. Split those operations so the agent can analyze saved evidence directly, and an analyst failure does not require another provider retrieval.

  • get_video_transcript, get_video_frames, and get_video_storyboard retrieve or reuse raw assets and return saved versions, coverage, and previews without running an analyst. Single-video inspection still reads timed captions directly in the main model.
  • Research passes saved transcript versions to analyze_video_transcripts. New analyze_video_frames and analyze_video_storyboard tools take saved image versions and a focus. They read session payloads only, validate asset kind/video/availability, and never call YouTube.
  • Explicit refresh requires retrieval in the current run before analysis. Deletion is checked before and after inference. Partial/empty transcripts remain unavailable for reusable storage. Existing citation validation, analysis concurrency, model budgets, and the shared finalizer remain in place.
  • Persist retrieval and analysis as separate activity records. Bound their durable quotas independently, preserve old preview artifacts, and support asset-version arrays in dashboard traces.

Billing: successful retrieval keeps its existing credit charge even if later analysis fails, since the raw assets remain saved. Analysis adds no provider credit charge. No new bindings or migrations are required.

Validation:

  • Platform TypeScript build and 639 unit tests passed (7 existing skips).
  • 68 Workerd integration tests passed against local SQLite/R2, including independent quotas, settlement, persistence across reconstruction, and saved evidence reuse.
  • Web production build, 32 web tests, and 4 Chrome dashboard regressions passed, including separate activity rows and previews after refresh.
  • Live Fireworks tests with synthetic assets completed a frame retrieval/analysis followed by an analysis-only follow-up, and a two-video transcript retrieval/analysis/finalization flow. Earlier live attempts encountered analysis or finalization fallbacks; each transcript was still retrieved only once. These tests verify the separation, not inference reliability. Live scripts and outputs remain local rather than being added to this PR.

@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 5:38pm UTC

@devhims
devhims merged commit d511e3a into main Sep 19, 2026
7 checks passed
@devhims
devhims deleted the refactor/separate-evidence-retrieval-analysis branch September 19, 2026 17:46
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