Repository navigation
fix(qoder): bound CN PNG raster dimensions - #8021
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Enforce PNG dimension bounds src/adapters/qoder/image-input.ts:7-8, src/adapters/qoder/image-input.ts:30-32, src/adapters/qoder/adapter.ts:283 |
boundedPngDataUrl rejects PNGs that exceed either edge limit or the total-pixel limit. The unsupported-input error message in the adapter hunk is unchanged. |
Cover and document the limits tests/providers/qoder-cn-image-validation.test.ts:2-128, docs-site/src/content/docs/guides/providers.md:1453, structure/providers/chat-compat.md:584 |
Tests cover dimensions above the limits and accepted boundary-sized rasters within the 1 MiB encoded-size ceiling. Both documentation sources state the new dimension limits. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- lidge-jun/opencodex#7536: This PR adds forwarding of supported Qoder CN raw images into the CLI flow, which is the image path where the new PNG validation applies.
Suggested reviewers: chilung-cgu
Merge Risk: 
Minimal · up to 33dad
-
The PNG dimension limits are enforced on reachable Qoder CN inputs, with boundary coverage and no established merge-blocking risk.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passedFull details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 3 files. (2 skipped: 2 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Comment @coderabbitai help to get the list of available commands.
|
✅ Deterministic PR hygiene checks passed. |
|
Maintainer dev-integration decision: the owner (@lidge-jun) authorized admin integration of this PR into
Cross-platform coverage comes from the batched |
Summary
Bound Qoder CN PNG raster dimensions before CLI discovery: at most 8,192 pixels per edge and 16,000,000 pixels total, preserving existing decoded-byte (1 MiB), compressed-input and IHDR validation. The rejection message names all three limits. Accepted boundary fixtures, architecture documentation and the public provider guide preserve the supported contract.
Migrated from luvs01/opencodex#794, preserving HEAD
33dad092c460fb514619f7f965b55f443e0dec5fand original commits. The source includes current observed devc34d26ff2bde9516517fe7fd58c2bcda70ca5e03with a focused five-file delta and no GUI changes. The reviewed error-message omission was addressed in this head.Verification
bun test tests/providers/qoder-cn-image-validation.test.ts tests/providers/qoder-image-input.test.ts. Exact-event tests assert the complete rejection message; oversize width/height/total pixels and accepted boundary cases remain covered.Checklist
Upstream readiness
Initially submitted Draft. Exact upstream CI/Catalog succeeded; no merge, deployment or fork closure is requested.
Exact upstream validation — 2026-10-30 20:57 UTC
Exact head
33dad092c460fb514619f7f965b55f443e0dec5f: Cross-platform CI41126106202 and Catalog41126106165 completed successfully. Hygiene passed; current dev remains c34d26f and the branch is zero behind. Inline review threads are zero; CodeRabbit skipped while Draft, not approval. Ready-event reviews will be tracked. Scoped native/local limitations and separate maintainer/security acceptance remain above.Summary by CodeRabbit