Repository navigation
Conversation
The image_analyze tool held the original image bytes yet let the vision model guess the image size from the picture, which matters for downstream layout and analysis reasoning. The tool result now carries the image's pixel width and height plus a format label, read with the image crate's header-only image_dimensions probe so no pixel decode is needed; the format label comes from the same extension decision as the mime detection. Animated GIF/WebP report the first frame's size. The probe is best-effort: when the header cannot be parsed — including BMP, whose decoder is not compiled in — the fields are omitted and the tool still succeeds, since the vision request itself does not depend on the metadata. The tool description now tells the model to take image size from that metadata instead of guessing by eye, names the fields as the stored dimensions (camera rotation metadata is not applied), and scopes the promise to images whose container can be sized. Tests: a wiremock-backed end-to-end case asserts real PNG and JPEG dimensions and the format label reach the result payload; an unparsable-bytes case pins the degradation (tool succeeds, no width/height/format keys); a well-formed minimal BMP pins the no-decoder-feature omission boundary. Signed-off-by: asto <asto18089@126.com>
Hmbown
enabled auto-merge (squash)
October 6, 2026 00:16
Hmbown
pushed a commit
that referenced
this pull request
Oct 6, 2026
Reconcile the complete contributions from #6832 (@aboimpinto), #6867 (@hodeswildsmith455-boop), and #6805 (@LIghtJUNction) with the current Engine, provider identities, reviewed-plugin policy, and task lifecycle. Original contributor histories are recorded by subsequent resolved merges. Fix the already integrated contributor cases: snapshot corruption is an explicit unavailable/error result (#6817), malformed locales cannot select an incidental script (#6860), image metadata uses the exact uploaded bytes and respects available decoders (#6858), automation deletion waits for actual scheduler reconciliation (#6864), and blocking trust/skill reads stay off the async executor (#6869). Preserve #6857's compaction regression. Extend #6872's human-wait lifecycle guard to approval/elevation cards; retire only the matching ended parent request and refresh activity only after a delivered decision. Enforce configured finite approval deadlines in the Engine, including deadline/cancellation races and durable receipts. Serialize Native Windows ACL admission/retirement across Core processes with a logon-scoped kernel mutex, preserving exact SID/object validation. Add an actual child-process lock test; serialize DSH host tests in the existing extension-host lane. Windows execution proof remains hosted CI. Reconcile the vendored computer-use plugin with canonical main a656f67455fc while preserving Core's 0.12.1 embedding contract. Canonical b47/a656 tree passed Ubuntu/macOS/Windows source and package gates, including 28/28 Windows-focused tests and the controlled desktop fixture; this is separate from the new Engine head's CI verdict. Partial adaptation of the discovery-cache priority portion from PR #6393 by @AdityaVG13 (original ac33dd4). Preserve the best match under count and byte limits without importing the unfinished echolocation/fork design; the broader draft remains open. Validation: - npm test: 1286 passed, 0 failed, 7 skipped; web 767/767. - npm run check:web: lint, typecheck and production build passed. - Affected Rust selection: 801/803 initially passed; the two fixture/lifecycle expectation failures were corrected and each passed a focused rerun. - Additional focused Rust: approval 28/28, discovery cache 11/11, OrcaRouter synthetic catalog 3/3, and 33/33 lifecycle/API/routing checks. - Final CI-repair selection: 37/39 initially passed; the BMP feature-proxy and feature-registry summary failures were corrected; both corrected tests passed (2/2, 0 failures). - Qualified Clippy: six packages, all targets/all features, passed with the CI style allowances. Portable no-default-feature check passed; portable policy verifier 6/6 passed; formatting and diff checks passed. - Runtime contract: 55 measured metrics passed after explicit remeasurement; all 21 structural identities were unchanged. Twelve byte/token-estimate budgets account for bounded child-wait disclosure and contributor locale descriptions; no runtime field/prompt was removed to lower the budget. - Persistence budget was not qualified locally: the checker requires a clean tree and this shared checkout retains an unrelated operator file. Clean hosted CI, fresh stamped build and real DeepSeek TUI acceptance remain required before the integration PR can merge to main. Refs #6872, #6843, #6795. Co-authored-by: Paulo Aboim Pinto <paulo.aboim.pinto@gmail.com> Co-authored-by: hodeswildsmith455-boop <hodeswildsmith455-boop@users.noreply.github.com> Co-authored-by: LIghtJUNction <lightjunction.me@gmail.com> Co-authored-by: AdityaVG13 <adityavgcode@gmail.com> Signed-off-by: CodeWhale Bot <bot@codewhale.net>
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.
Summary
image_analyzeheld the original bytes but let the vision model guess the image size by eye. The result now carries header-derivedwidth/height(viaimage::image_dimensions— header-only, no pixel decode; the container is identified from the file extension, same decision as the mime detection) plus aformatlabel; animated GIF/WebP report the canvas size.The probe is best-effort: unparsable headers — including BMP, whose decoder is not compiled in — omit the fields and the tool still succeeds. The tool description tells the model to take size from the metadata (as stored; rotation metadata not applied) instead of guessing. No new dependency: the
imagecrate is already a tui dependency with png/jpeg/webp/gif features.Testing
cargo test -p codewhale-tui --lib vision::tools— wiremock end-to-end pinning real 64×48 PNG / 30×20 JPEG dimensions and labels through an actualexecuteround-trip; an unparsable-bytes degradation case; a minimal-BMP omission case that doubles as a decoder-feature canarycargo clippy -p codewhale-tui --all-targets --all-features --lockedAdapted from the Pinvou fork's surface-alignment audit (Pinvou/CodeWhale
6f780290f, the vision dimension slice).Checklist
CHANGELOG.mdchangesNo-Issue: Complete vision result metadata while keeping existing image analysis behavior.