Repository navigation
refactor(media): share image and video geometry normalization - #119416
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: needs maintainer review before merge. Reviewed August 4, 2026, 11:16 PM ET / August 5, 2026, 03:16 UTC. ClawSweeper reviewWhat this changesThis PR centralizes image and video geometry normalization, removes redundant provider-registry wrappers, and factors equivalent internal TTS result fields without changing behavior. Merge readinessKeep open for protected maintainer review. The exact-head refactor preserves image/video-specific normalization choices while removing duplicate logic, and the previously missing runtime proof is now supplied. Priority: P3 Review scores
Verification
How this fits togetherImage and video generation convert requested dimensions and provider capabilities into safe provider requests and user-facing adjustment metadata. The shared media helper sits between per-mode capability selection and each provider call. flowchart LR
A[Generation request] --> B[Image or video runtime]
B --> C[Mode and model capabilities]
C --> D[Shared geometry normalization]
D --> E[Provider request]
D --> F[Adjustment metadata]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -202. Total -202 across 7 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Retain one shared geometry-normalization owner while keeping video-only duration, audio, watermark, resolution-order, and sentinel-reporting behavior in the video path. Do we have a high-confidence way to reproduce the issue? Not applicable; this PR refactors existing behavior. Its exact-head terminal transcript directly exercises the affected normalizers rather than demonstrating a reported failure. Is this the best way to solve the issue? Yes. The shared media owner removes duplicate geometry policy while explicit caller options preserve the image/video differences that existing runtime tests cover. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 1f3d45b76f51. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
Merged via squash.
|
* origin/main: fix(channels): honor explicit preview streaming settings refactor(telegram): consolidate outbound contracts and targets (#119438) fix(qa): retry transport cleanup and always stop owned labs (#119442) fix(mcp): guard stdio stdout frame parsing against oversized-buffer crash (#119379) refactor(auto-reply): centralize delivery deduplication and routing (#119436) fix(qa): preserve scenario isolation in serial suites (#119439) perf(xai): lazy-load optional capability runtimes (#119374) refactor(browser): consolidate browser CLI and normalization helpers (#119432) fix(qa): require ready transport accounts (#119431) refactor(media): share image and video geometry normalization (#119416) fix(config): preserve plugin metadata for missing config (#119421) fix: retry delivery when outbound adapter is unavailable (#119371) fix(cli): retire invalid secret flags and prove doctor recovery (#118926) refactor(signal): share outbound and reaction transport (#119415)
What Problem This Solves
Image and video generation duplicated geometry normalization and provider registry scaffolding, while TTS repeated equivalent result contracts. This is part of a maintainer-requested project-wide production LOC reduction campaign.
Why This Change Was Made
Move equivalent geometry normalization into its canonical shared media owner, remove empty provider wrappers, and consolidate structurally identical TTS result types without changing public contracts.
User Impact
Image/video aspect ratios, resolutions, model-specific capabilities, ignored overrides, and TTS behavior remain unchanged. Removes 202 production lines.
Evidence
gpt-5.6-solwithxhighreasoning; no accepted or actionable findings.git diff --check, scoped formatting, and direct before/after behavioral equivalence checks passed.Exact-head image and video normalization proof
The actual committed image normalizer, video normalizer, new shared geometry owner, and their canonical capability/duration helpers were loaded directly from the exact reviewed commit. The isolated fixture made no provider API calls and used no credentials. The output below was actually produced and all twelve production-path assertions passed.
The proof invokes the actual resolveImageGenerationOverrides and resolveVideoGenerationOverrides functions, including shared geometry fallback, provider-supported model-specific dimensions, closest resolution, supported duration rounding, false-valued unsupported overrides, and rejected adaptive sentinels.
ClawSweeper rank-up disposition: the requested after-fix runtime transcript is supplied above. Refreshing the branch onto current main is intentionally skipped: this exact reviewed head already passed 162 focused tests, the full Blacksmith changed gate, and the exact-head hosted ci-gate; the canonical maintainer merge workflow verifies current-main drift immediately before landing and treats it as advisory. Rebasing would discard validated exact-head CI and review evidence without fixing a conflict.