Repository navigation
fix: preserve grounded specs across video shards - #2638
groupthinking wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Please add a See governance: #898 |
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved merge defects can silently drop or mislink requirements and invalidate entire grounded specs through ID collisions, schema-limit overflow, and incorrect citation rebasing.
7 open issues
Preserve exact cited text when deduplicating rows · New Preserve source indices when parsing citation rows · New Namespace shard IDs and rewrite references before merging · New Prevent merged requirements from exceeding the schema limit · New Prefer shard metadata with populated name and purpose · New Validate citations against shard time bounds · New Align sectional prompt constraints with validation · New
What changed in this PR
Extends UVAI’s Video Pack extraction to carry grounded specifications through multi-shard video processing.
Changes:
- Requests partial grounded specs with section-local citation indices from shard workers.
- Combines available candidates and rebases citations against merged transcript and visual evidence.
- Adds fixture-based regression coverage and updates sectional prompt assertions.
| File | Description |
|---|---|
apps/web/src/test/real-aujzb1d-fag-evidence.ts |
Adds captured evidence and a grounded-spec fixture. |
apps/web/src/lib/video-pack-extractor.ts |
Requests partial grounded specs from sectional workers. |
apps/web/src/lib/video-pack-extract-merge.ts |
Merges grounded candidates and rebases citation indices. |
apps/web/src/lib/__tests__/video-pack-multishard-grounded-spec.test.ts |
Exercises multi-shard extraction through final pack binding. |
apps/web/src/lib/__tests__/video-pack-extractor.test.ts |
Updates expectations for the sectional extraction prompt. |
Review effort: Max
| requirements: dedupeBy(rebased.flatMap((candidate) => candidate.requirements), (requirement) => requirement.id || requirement.title), | ||
| acceptanceCriteria: dedupeBy(rebased.flatMap((candidate) => candidate.acceptanceCriteria), (criterion) => criterion.id), |
✅ E2E Test Results: ALL TESTS PASSED
Test Output |
|
Deployment failed for project v0-uvai with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
🔍 PR Validation |


Fixes #2639
Multi-shard extraction now retains available grounded specifications and their exact source references, including independent shards that reuse local IDs. This follow-up completes the shared sectional prompt constraints and chooses complete application metadata from a later candidate when the first candidate has empty fields.
Current correction
Head:
2f9649262539638e75104c6c318a69da72dfd326. Tree:a5227c5811fc773c9dfba6b0d180dcf533a8e51b, identical between the local staged merge and GitHub's created tree. This history-preserving integration retains prior head5d4375e2ef48261b44877a8ab3ea29189ac99373and current main512a2558f73d6281b6a880548bedf140b7e30292as parents. Application source and regression changes are unchanged by this integration; current main's manifests, lockfile and security workflow are retained byte-for-byte.aggregate-limitdiagnostic with the collection and count. No source-grounded rows are silently truncated.codex/fix-multishard-grounded-specthroughgit.deploymentEnabledin root and app Vercel configuration. The first follow-up used an invalidgithub.enabledobject; Vercel rejected it before building withgithub.enabled should be boolean. Configuration-only commit5d4375e2ef48261b44877a8ab3ea29189ac99373corrects that shape to the documented branch map: https://vercel.com/docs/project-configuration/git-configuration. This fixes the configuration error without enabling a preview.Earlier head
7dcc3642900aed3a700c898220d8010d4dd781ddalready added shard-local ID namespaces and reference rewriting, exact-case evidence preservation, raw-to-parsed citation rebasing, and shard-time-bound validation. Their regressions passed again with this correction.Verification — November 12, 2026 (America/Chicago)
The previous head's Security Scan 43346308028 failed the real high-severity npm-audit gate: 25 high, 22 moderate, zero critical. Its frozen install passed. That failure was caused by the old dependency baseline, including affected Undici, Zod, body-parser, Vite and other packages; it was not the expected missing-preview failure.
The clean integration imports current main's already-reviewed dependency fixes and preserves exactly its full-graph
npm audit --audit-level=highpolicy. No exception, severity downgrade, dev-dependency exclusion, or CI weakening is added. Relative to main, the PR remains eight files with the same 517 additions/30 deletions: the existing source/tests/evidence fixture and two branch deployment guards.Executed against the exact integrated tree:
npx --yes npm@10.8.0 ci --ignore-scripts --legacy-peer-deps --no-audit --no-fundcompleted, exit 0. The reviewed existing Workflow postinstall patch was run explicitly.npm --workspace=apps/web test -- src/lib/__tests__/video-pack-multishard-grounded-spec.test.ts src/lib/__tests__/video-pack-extractor.test.ts src/lib/__tests__/video-pack-extract-merge.test.ts src/lib/__tests__/grounded-spec-pipeline.test.ts src/lib/__tests__/video-pack-consolidator.test.ts src/lib/__tests__/dependency-runtime-compatibility.test.ts src/lib/__tests__/gemini-sdk-continuation.test.ts --maxWorkers=2 --reporter=dot: seven files, 110 tests passed, exit 0.npm --workspace=apps/web run type-check, full web lint, and cached diff whitespace check: exit 0.npx --yes npm@10.8.0 audit --audit-level=high --json: exit 0, zero critical, zero high, 29 moderate. Moderate findings remain; this is not a clean-audit claim.git.deploymentEnabled.a5227c5811fc773c9dfba6b0d180dcf533a8e51bequals GitHub's tree exactly. Existing branch update used an expected-head lease.Security dependency evidence
512a2558f73d6281b6a880548bedf140b7e30292, preserving its direct/transitive classification and floors, including Workflow-owned Undici >=7.30.1, Zod >=4.6.6, body-parser >=2.4.0 and Vite >=8.3.3.Remaining HOLD: aggregate capacity
The review request to keep all 66 requirements usable remains unresolved. The final schema allows at most 64 rows per collection. Three valid 22-row shards therefore produce a blocking diagnostic rather than an available grounded spec. Changing the supported aggregate bound or selecting a bounded partial result requires a separate reviewed decision; this patch preserves the existing bound and fail-closed behavior. The overflow thread remains open.
Seven other review threads are resolved using the implemented corrections and passing regressions. This remains a draft and unmerged, with this branch excluded from automatic deployments in both versioned configurations. No live extraction, paid provider call, server-side action or production acceptance was executed; the regression uses saved source evidence and offline test responses.