Repository navigation
refactor(video): deduplicate generation contracts - #130635
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 27, 2026, 12:35 AM ET / 04:35 UTC. ClawSweeper reviewWhat this changesThe PR makes core’s video-generation types the single declaration owner and has the plugin SDK re-export those existing contracts while deleting the duplicate SDK copies. Merge readinessNo blocking source-level finding remains: the revised topology resolves the prior SDK-to-core back-edge while preserving the public type names. Keep this maintainer-owned PR open for exact-head CI completion and normal maintainer review. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherVideo provider plugins consume the public video-generation SDK contract, while core validates provider requests and dispatches generation. The PR changes declaration ownership between those layers without changing provider execution. flowchart LR
P[Provider plugins] --> S[Plugin SDK contract]
S --> C[Core video contracts]
C --> V[Video runtime validation]
V --> O[Provider generation result]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -223, Other -1. Total -224 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the core type leaf as the sole contract definition, retain the SDK’s stable re-export path, and merge only after the exact-head package/declaration checks are green or any failure is resolved as unrelated. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a declaration-ownership refactor rather than a reported runtime failure; source inspection traces the unchanged runtime and package declaration boundary. Is this the best way to solve the issue? Yes: core is already the runtime contract owner, and the SDK’s type-only re-export preserves its public path without the prior facade cycle. Exact-head generated-declaration verification remains required before merge. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 71d4a8c3e305. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
The revised cleanup keeps the existing core video contract module as the single owner and makes the SDK a type-only reexport. This removes 223 net production lines (tests unchanged) without adding a module or changing the 31 SDK export identities. The old SDK-owner back-edge was caught by CI, reproduced, and removed; the architecture guard was not weakened. Validation for head
Four full consumer package projects pass. DeepInfra and OpenRouter reproduce the same existing nominal private-dispatcher declaration error on both baseline and candidate; both implicated generated chunks are byte-identical. This is a separate declaration-builder follow-up, not a six-project pass. No external provider API was invoked and no live generation behavior is claimed. Exact-head CI run 33039188417 completed successfully on attempt 2. Attempt 1's compact test job stopped before tests because UI startup gzip was 343,457 B against a 343,442 B budget; another job in the same run built the same merge at 343,416 B and passed. One standard failed-jobs retry passed, including the aggregate gate, with no budget increase, source change or suppression. The 41 B variability is observed; its attribution to per-build metadata is an inference. UI-budget fragility is recorded as a separate follow-up. ClawSweeper's updated review of this exact head reports no source findings. Its first rank-up move is satisfied by completed green exact-head CI and the inspected compact-job failure/recovery. For its second move, the same merge-candidate build actually executed the SDK declaration writer and export check: the declaration graph was 3,387,415 B and all 147 public plugin-SDK subpaths were verified. The hosted plugin-contract shards passed the nine extension-package project-boundary tests and 19 SDK package-contract guardrails (1,071 tests across 45 files overall). Built-plugin singleton smoke and the core-support boundary suite (120 tests across 11 files) also passed. The dedicated before/after private video declaration closure and package inventory proof is described above; the two reproduced baseline consumer failures remain explicit. |
|
Merged via squash.
|
…-retirement-v13 * origin/main: (243 commits) fix: preserve Gateway error reasons in text logs (#130645) refactor(video): deduplicate generation contracts (#130635) fix(agents): preserve direct-message sender identity (#124548) fix(agents): preserve silent reply after settled tools (#130675) fix(talk): preserve replacement speech when an old utterance is canceled (#130687) fix(browser): preserve literal names and formatter-owned snapshot refs (#130599) fix(auth): reset only the profile replaced by a successful login (#124014) fix: bind session creation to admitted Gateway (#130686) refactor(qa-lab): reuse model reference splitter (#130317) docs(gateway): clarify independent HTTP endpoint switches (#130690) fix(ui): Control UI smooth scrolling ignores the reduced-motion preference (#130428) refactor(lmstudio): remove unreachable catalog merge (#130689) fix(crabbox): restore cloud machine CPU and RAM (#130684) fix(secrets): compare proxy bearer tokens directly (#127054) fix(matrix): show recovery key availability in text status (#128051) fix(ios): restore approval settings navigation and remove duplicate shell state (#130651) refactor(agents): use fixed tool-loop defaults directly (#130681) refactor(qa-lab): share process tree metric reader (#130419) refactor(models): simplify prepared owner access (#130683) fix(parallels): main install and update smoke cannot complete (#130658) ...
* refactor(video): reuse SDK generation types * refactor(video): keep shared contracts in core type leaf
What Problem This Solves
Video-generation contracts were duplicated between core and the plugin SDK, with a private assignability tuple and unused runtime binding keeping the copies in sync. This cleanup removes 223 net production lines while retaining the existing SDK contract.
Why This Change Was Made
The existing
src/video-generation/types.tscontract module is the canonical owner. The SDK reexports its 15 shared types, matching image/music ownership. The declaration bodies and JSDoc are preserved exactly; both internal normalization types, the SDK builder-options type, and all runtime helper bodies are unchanged. No new module or SDK export is introduced.The first published version incorrectly made the SDK runtime facade canonical. Ordinary CI caught a static type-import cycle despite zero runtime value cycles. That failure was reproduced locally and retained as evidence; this revision removes the reverse dependency instead of weakening the architecture guard. It addresses the ClawSweeper finding and rank-up move using the existing contract-only owner, so an additional neutral module is unnecessary.
The original local SDK copies came from a package-boundary repair. This revision therefore checks the generated declaration graph and real plugin package projects, not just source-level assignability. The ClawSweeper vector/embedding storage heuristic does not apply: this change has no persistent-store, schema, migration, or runtime-state surface.
User Impact
No intended behavior or API change. Provider contracts, export names and type/value namespaces, request fields, runtime helpers, private workspace declaration bridge, and package exclusions remain unchanged. Tests are retained. There is no external provider API change or live video-generation claim.
Production: +68/-291, net −223. Tests: 0. One required, canonically pruned assertion-baseline line is bookkeeping and excluded from the production count.
Evidence
Revised implementation proof, fresh independent published-head review and exact-head CI are complete as described below. Native preparation and merge remain separate steps; this is not a merge assertion.
AI-assisted implementation and review using Codex.