Skip to content

Restore static-by-default long Video Pack extraction; gate agentic mode and cap benchmark dispatches - #2926

Merged
groupthinking merged 5 commits into
mainfrom
codex/validate-long-video-pack-routing
Dec 5, 2026
Merged

groupthinking merged 5 commits into
mainfrom
codex/validate-long-video-pack-routing

Conversation

@Codex

@Codex Codex AI commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Canonical issue

Issue linking is handled by automation.

Outcome

Long Video Pack extraction no longer assumes synchronous one-call agentic processing by default. Routing now aligns with the validation requirement: static shards remain the production baseline, and agentic long-video mode is explicit and bounded for benchmark use.

Scope

  • Included:
  • - **Routing policy**: long-video agentic path now requires EXTRACT_LONG_VIDEO_AGENTIC=1; otherwise long videos use static shard extraction.
  • - **Benchmark guard**: extractVideoPackSpec accepts maxModelDispatches to hard-stop repeated model dispatches with a terminal benchmark-attempt-limit error.
  • - **Regression coverage**: tests updated to enforce static-by-default behavior, explicit agentic opt-in behavior, and guarded dispatch behavior under retry conditions.
  • Explicitly excluded:
  • - Live Gemini benchmark matrix execution
  • - Provider cost/latency/quality claims
  • - Rollout/deployment policy changes
await extractVideoPackSpec(
  { sourceUrl, videoId },
  {
    runVideoInteraction,
    maxModelDispatches: 1, // benchmark reservation guard
  },
);

Risk

  • Risk level: medium
  • Failure mode: environments expecting implicit long-video agentic behavior may route to static shards unless opt-in env is set.
  • Rollback: revert this PR, or set EXTRACT_LONG_VIDEO_AGENTIC=1 where agentic long-video extraction is intentionally required.

Verification

List exact automated and manual checks, tied to the current head SHA.

  • Focused tests
  • Required CI
  • Review threads resolved

Head SHA: 888ab9b

Production evidence

Not applicable for this change set. This PR adjusts extraction routing/guard behavior and test coverage; no production provider acceptance evidence is claimed here.

Agent handoff

  • One canonical issue is linked
  • No competing PR implements the same issue
  • Acceptance criteria are satisfied
  • Required checks pass on the current head
  • Human decision is requested only for product, security, irreversible infrastructure, or production approval

Security dependency evidence

Not applicable (no advisory-driven dependency changes).

@vercel

vercel Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
v0-uvai Ready Ready Preview, v0 Dec 5, 2026 8:13am UTC

Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
@Codex Codex AI changed the title [WIP] Validate long Video Pack agentic routing against official mode guidance Restore static-by-default long Video Pack extraction; gate agentic mode and cap benchmark dispatches Dec 3, 2026
@Codex
Codex AI requested a review from groupthinking December 3, 2026 07:14
@linear-code
linear-code Bot marked this pull request as ready for review December 4, 2026 06:56
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

🔍 PR Validation

⚠️ PR title should follow conventional commits format

@github-actions github-actions Bot added javascript Pull requests that update javascript code tests labels Dec 4, 2026
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

✅ E2E Test Results: ALL TESTS PASSED

Metric Value
Status 🟢 GREEN
Total Tests
Passed 14
Failed
Deployment https://v0-uvai-kq6q2upf5-garv1.vercel.app
Test Output
this warning.�[39m

�[1m�[30m�[46m RUN �[49m�[39m�[22m �[36mv5.1.1 �[39m�[90m/home/runner/work/EventRelay/EventRelay�[39m

 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mE2E request attribution�[2m > �[22madds the probe and GitHub run identity headers to every request�[32m 22�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mE2E request attribution�[2m > �[22mforwards the configured preview bypass on every request without persisting it�[32m 1�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mHomepage�[2m > �[22mhomepage returns 200 with HTML�[32m 291�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mVideo Pack Pipeline�[2m > �[22mPOST /api/video/pack accepts a YouTube URL without hanging�[33m 2609�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mVideo Pack Pipeline�[2m > �[22mGET /api/video/pack resolves to a ready pack with evidence lineage�[33m 1177�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22mmissing URL returns 400, not a hang�[33m 315�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22minvalid URL returns 400 quickly, not a hang�[33m 423�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22mPOST /api/video/pack with no body returns 400�[33m 430�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mRetired skin redirects�[2m > �[22m/features permanently redirects to /�[32m 36�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mRetired skin redirects�[2m > �[22m/dashboard permanently redirects to /studio�[32m 142�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mAPI Health�[2m > �[22mGET /api returns a response (not 404)�[33m 968�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mAPI Health�[2m > �[22mretired /api/pipeline routes are gone (no pipeline served)�[32m 150�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mStatic Assets�[2m > �[22mhomepage has proper meta tags�[32m 127�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mStatic Assets�[2m > �[22m/studio returns HTML when reachable�[33m 326�[2mms�[22m�[39m

�[2m Test Files �[22m �[1m�[32m1 passed�[39m�[22m�[90m (1)�[39m
�[2m      Tests �[22m �[1m�[32m14 passed�[39m�[22m�[90m (14)�[39m
�[2m   Start at �[22m 06:58:58
�[2m   Duration �[22m 8.77s�[2m (tests 99%, transform 1%)�[22m


@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

✅ E2E Test Results: ALL TESTS PASSED

Metric Value
Status 🟢 GREEN
Total Tests
Passed 14
Failed
Deployment https://v0-uvai-coz8gkchd-garv1.vercel.app
Test Output
s this warning.�[39m

�[1m�[30m�[46m RUN �[49m�[39m�[22m �[36mv5.1.1 �[39m�[90m/home/runner/work/EventRelay/EventRelay�[39m

 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mE2E request attribution�[2m > �[22madds the probe and GitHub run identity headers to every request�[32m 30�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mE2E request attribution�[2m > �[22mforwards the configured preview bypass on every request without persisting it�[32m 1�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mHomepage�[2m > �[22mhomepage returns 200 with HTML�[32m 99�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mVideo Pack Pipeline�[2m > �[22mPOST /api/video/pack accepts a YouTube URL without hanging�[33m 2703�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mVideo Pack Pipeline�[2m > �[22mGET /api/video/pack resolves to a ready pack with evidence lineage�[33m 1327�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22mmissing URL returns 400, not a hang�[32m 274�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22minvalid URL returns 400 quickly, not a hang�[32m 262�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22mPOST /api/video/pack with no body returns 400�[32m 255�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mRetired skin redirects�[2m > �[22m/features permanently redirects to /�[32m 21�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mRetired skin redirects�[2m > �[22m/dashboard permanently redirects to /studio�[32m 20�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mAPI Health�[2m > �[22mGET /api returns a response (not 404)�[33m 1047�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mAPI Health�[2m > �[22mretired /api/pipeline routes are gone (no pipeline served)�[32m 123�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mStatic Assets�[2m > �[22mhomepage has proper meta tags�[32m 93�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mStatic Assets�[2m > �[22m/studio returns HTML when reachable�[33m 322�[2mms�[22m�[39m

�[2m Test Files �[22m �[1m�[32m1 passed�[39m�[22m�[90m (1)�[39m
�[2m      Tests �[22m �[1m�[32m14 passed�[39m�[22m�[90m (14)�[39m
�[2m   Start at �[22m 17:25:47
�[2m   Duration �[22m 8.39s�[2m (tests 99%, transform 1%)�[22m


Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

SDK retries and auxiliary model calls can bypass the dispatch cap, and some budget-exhaustion errors incorrectly trigger further retries.

3 open issues
What changed in this PR

Restores static shards as UVAI’s default for long Video Pack extraction, keeping agentic processing experimental while validation remains pending under #2818.

Changes:

  • Requires EXTRACT_LONG_VIDEO_AGENTIC=1 for long-video agentic extraction.
  • Adds optional maxModelDispatches accounting for benchmark video-runner calls.
  • Updates routing, retry-guard, and Jev wiring tests.
File Description
apps/​web/​src/​lib/​video-pack-extractor.ts Adds agentic opt-in and dispatch accounting.
apps/​web/​src/​lib/​__tests__/​video-pack-extractor.test.ts Tests static defaults, agentic opt-in, and dispatch exhaustion.
apps/​web/​src/​lib/​__tests__/​video-pack-extractor-jev.test.ts Explicitly enables agentic mode in Jev wiring tests.

Review effort: Max

Comment on lines +989 to +991
const runVideoInteractionBase = deps.runVideoInteraction ?? runShardVideoInteraction;
const runVideoInteraction =
maxModelDispatches !== undefined
return async (call: ShardVideoCall) => {
if (dispatchCount >= maxModelDispatches) {
throw new VideoPackExtractError(
`benchmark attempt limit reached at ${maxModelDispatches} dispatches`,
Comment on lines +1000 to +1001
dispatchCount += 1;
return runVideoInteractionBase(call);
@github-actions

github-actions Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

✅ E2E Test Results: ALL TESTS PASSED

Metric Value
Status 🟢 GREEN
Total Tests
Passed 14
Failed
Deployment https://v0-uvai-nqs68knnv-garv1.vercel.app
Test Output
ess this warning.�[39m

�[1m�[30m�[46m RUN �[49m�[39m�[22m �[36mv5.1.1 �[39m�[90m/home/runner/work/EventRelay/EventRelay�[39m

 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mE2E request attribution�[2m > �[22madds the probe and GitHub run identity headers to every request�[32m 15�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mE2E request attribution�[2m > �[22mforwards the configured preview bypass on every request without persisting it�[32m 1�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mHomepage�[2m > �[22mhomepage returns 200 with HTML�[32m 140�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mVideo Pack Pipeline�[2m > �[22mPOST /api/video/pack accepts a YouTube URL without hanging�[33m 2679�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mVideo Pack Pipeline�[2m > �[22mGET /api/video/pack resolves to a ready pack with evidence lineage�[33m 881�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22mmissing URL returns 400, not a hang�[32m 173�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22minvalid URL returns 400 quickly, not a hang�[32m 151�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22mPOST /api/video/pack with no body returns 400�[33m 338�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mRetired skin redirects�[2m > �[22m/features permanently redirects to /�[32m 41�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mRetired skin redirects�[2m > �[22m/dashboard permanently redirects to /studio�[32m 33�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mAPI Health�[2m > �[22mGET /api returns a response (not 404)�[33m 990�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mAPI Health�[2m > �[22mretired /api/pipeline routes are gone (no pipeline served)�[32m 74�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mStatic Assets�[2m > �[22mhomepage has proper meta tags�[32m 78�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mStatic Assets�[2m > �[22m/studio returns HTML when reachable�[32m 136�[2mms�[22m�[39m

�[2m Test Files �[22m �[1m�[32m1 passed�[39m�[22m�[90m (1)�[39m
�[2m      Tests �[22m �[1m�[32m14 passed�[39m�[22m�[90m (14)�[39m
�[2m   Start at �[22m 08:13:58
�[2m   Duration �[22m 7.05s�[2m (tests 99%, transform 1%)�[22m


@groupthinking
groupthinking merged commit b252940 into main Dec 5, 2026
32 checks passed
@groupthinking
groupthinking deleted the codex/validate-long-video-pack-routing branch December 5, 2026 17:42

This branch was successfully deployed

1 active deployment
Preview — 61378fee Deployed Dec 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validate long Video Pack agentic routing against official mode guidance

3 participants