refactor(handlers): thorough modularization of imageGeneration.ts (#3594)#4706
Closed
oyi77 wants to merge 46 commits into
Closed
refactor(handlers): thorough modularization of imageGeneration.ts (#3594)#4706oyi77 wants to merge 46 commits into
oyi77 wants to merge 46 commits into
Conversation
…C+D) (diegosouzapw#4622) C — scripts/quality/validate-release-green.mjs (npm run check:release-green): reproduces the release-equivalent validation (typecheck, eslint, db-rules, public-creds, full unit, vitest, ratchets, optional --with-build package-artifact) against the current working tree and classifies each red as HARD (real defect, exit 1) vs DRIFT (ratchet — reported, never affects exit / never blocks). Pure helpers exported + orchestration behind a direct-run guard; unit-tested. D — .github/workflows/nightly-release-green.yml: runs C on the active release branch nightly (and on workflow_dispatch) and opens/updates a single tracking issue on HARD failures. Never a required check, never touches a contributor PR. Closes the gap where the full gate (ci.yml) only ran on the release PR, so reds accrued silently on release/** and surfaced in 40-min layers at release time. Non-blocking by construction; drift is the maintainer's to rebaseline at release. Co-authored-by: Diego Rodrigues de Sa e Souza <diego.souza@cdwasolutions.com.br>
Integrated into release/v3.8.34
Integrated into release/v3.8.34
Integrated into release/v3.8.34
…#4599) Integrated into release/v3.8.34
…ative gate (diegosouzapw#4527) Integrated into release/v3.8.34 (supersedes diegosouzapw#4445)
Integrated into release/v3.8.34
…iegosouzapw#4564) Integrated into release/v3.8.34 (rebuilt onto tip)
…osouzapw#4561) Integrated into release/v3.8.34 (rebuilt onto tip)
…9router#951) (diegosouzapw#4566) Integrated into release/v3.8.34 (rebuilt onto tip)
…uzapw#1043) (diegosouzapw#4553) Integrated into release/v3.8.34 (rebuilt onto tip)
…ect fails (diegosouzapw#4562) Integrated into release/v3.8.34 (rebuilt onto tip)
…gosouzapw#4555) Integrated into release/v3.8.34 (rebuilt onto tip)
Integrated into release/v3.8.34 (rebuilt onto tip)
…w#4588) Integrated into release/v3.8.34 (rebuilt — bundled commits stripped)
Integrated into release/v3.8.34 (rebuilt — bundled commits stripped)
…pw#4590) Integrated into release/v3.8.34 (rebuilt — bundled commits stripped)
…s=0 (diegosouzapw#4615) Integrated into release/v3.8.34 (rebuilt onto tip)
…ouzapw#4525) Integrated into release/v3.8.34 (rebuilt — kept only the prefix rename, dropped stale-base reverts)
Integrated into release/v3.8.34 (rebuilt onto tip; merge before diegosouzapw#4612)
Integrated into release/v3.8.34 (rebuilt + reconciled with diegosouzapw#4593)
…e 3) (diegosouzapw#4645) * docs(compression): Phase 3 per-request header design spec Approved brainstorming output for the x-omniroute-compression header: header-first precedence, name-first combo matching (Decision A), explicit value bypasses auto-trigger (Decision B), DerivedPlan.source, and the X-OmniRoute-Compression response header. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(compression): Phase 3 per-request header implementation plan 4-task TDD plan (resolver header-first + source, parser, chatCore wiring + response header, docs/file-size) with full code and exact commands. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(compression): header-first resolver + plan source (Phase 3 core) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(compression): resolveCompressionHeader parser (Phase 3) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(compression): wire x-omniroute-compression header + response header (Phase 3) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(compression): extract plan-resolution leaf (planResolution.ts) under size cap (Phase 3) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs(compression): document x-omniroute-compression header (Phase 3) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(compression): harden named-combo map + trim engine: header id (Phase 3 review) Addresses gemini-code-assist review on diegosouzapw#4645: - Extract buildNamedComboLookup (pure) so a blank/whitespace/null combo name contributes only its id key (no '' key, no throw that disables all combos). - Trim the engine:<id> header value so 'engine: rtk' resolves. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Diego Rodrigues de Sa e Souza <diego.souza@cdwasolutions.com.br> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Diego Rodrigues de Sa e Souza <souzamiriamrodrigues790@gmail.com>
Integrated into release/v3.8.34 (rebuilt + opt-in gate fix)
Integrated into release/v3.8.34 (rebuilt + test added)
Integrated into release/v3.8.34 (rebuilt + jsdom test)
…iegosouzapw#4606) Integrated into release/v3.8.34 (rebuilt + jsdom test)
…diegosouzapw#4563) Integrated into release/v3.8.34 (rebuilt onto tip; UI-cosmetic per owner)
…(extracted from diegosouzapw#4428) (diegosouzapw#4691) Integrated into release/v3.8.34 (cleanup core extracted from diegosouzapw#4428, credit @oyi77)
… unreachable (diegosouzapw#4604) (diegosouzapw#4687) Co-authored-by: Diego Rodrigues de Sa e Souza <souzamiriamrodrigues790@gmail.com>
diegosouzapw#4674) (diegosouzapw#4677) Co-authored-by: Diego Rodrigues de Sa e Souza <souzamiriamrodrigues790@gmail.com>
Integrated into release/v3.8.34
…text retention (diegosouzapw#4644) Integrated into release/v3.8.34
…gosouzapw#4638) Integrated into release/v3.8.34 (authored by Rahul Sharma, AI co-author trailer stripped per project policy)
…cher (diegosouzapw#4580) (diegosouzapw#4684) Co-authored-by: Diego Rodrigues de Sa e Souza <souzamiriamrodrigues790@gmail.com>
…iegosouzapw#4692) Integrated into release/v3.8.34
…sh + best-free template (diegosouzapw#4621) Integrated into release/v3.8.34 (dead getFirstRegistryModelId dropped, rebuilt onto tip)
) (diegosouzapw#4618) Integrated into release/v3.8.34 (adapted onto diegosouzapw#4606's extracted topology section: default-hidden flip + enabled gate on useLiveDashboard)
…egosouzapw#4597) (diegosouzapw#4619) Integrated into release/v3.8.34 (data-dir.mjs refactor reconciled with diegosouzapw#4607; loadEnvFile aligned to getDefaultDataDir)
…eepseek-web.ts 1117->1125) (diegosouzapw#4695) file-size reconcile for diegosouzapw#4644
…#4642) Integrated into release/v3.8.34 (Ollama Cloud + OpenCode Go dashboard quota scraping; rebuilt onto tip, gates green: typecheck/public-creds/file-size/lint/docs-sync + 31 tests)
…iegosouzapw#4042) (diegosouzapw#4696) Land M365 pure modules ahead of draft diegosouzapw#4400
…diegosouzapw#4697) Incorporates Dependabot diegosouzapw#4667 + diegosouzapw#4668 + js-yaml v5 ESM migration into release/v3.8.34
…o 25 modules (diegosouzapw#3594) Complete extraction of the 3776-line imageGeneration handler: - imageGeneration/core.ts — main handler orchestration - imageGeneration/openai.ts — OpenAI/DALL-E provider - imageGeneration/chatgptWeb.ts — ChatGPT web provider - imageGeneration/blackForestLabs.ts — BFL provider - imageGeneration/codex.ts — Codex provider - imageGeneration/gemini.ts — Gemini provider - imageGeneration/imagen3.ts — Imagen 3 provider - imageGeneration/kie.ts — Kie provider - imageGeneration/stability.ts — Stability provider - imageGeneration/fal.ts — Fal provider - imageGeneration/specialty/* — specialty providers (8 files) - imageGeneration/logging.ts — logging utilities - imageGeneration/utils.ts — general utilities - imageGeneration/index.ts — re-exports Pure extraction, no behavioral changes. Supersedes diegosouzapw#4609/diegosouzapw#4703. Part of diegosouzapw#3594.
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
This was referenced Jun 22, 2026
Merged
… test (pre-existing)
Contributor
Author
|
Closing — v3.8.35 already extracted imageGeneration provider handlers (PR #4582 batch). This PR is now obsolete. |
17 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Recreation of #4407 rebased onto release/v3.8.34. Complete extraction of 3776-line handler into 25 modules (vs #4609's 9 modules). All CI gates pass. Supersedes #4609 and #4703. Part of #3594.