text mode: skip image-only files; add per-run logging - #4
Merged
Conversation
send_mode text now never ships an image. extract_image returns no content in text mode without decoding, and the pipeline separates nothing-to-send-in-this-mode (a skip) from a genuine extraction failure (an error). Adds a skipped_no_content stat in plan/run output; image-only files in text mode are skipped without a terminal ledger status, so they are reconsidered if vision is later enabled. Verified live against a text-only llama-server: a PNG drawing now reports skipped_no_content=1, errors=0 (previously errors=1 from a rejected image request). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Each plan/run writes a fresh timestamped log file (logging.enabled true by default, logging.log_dir for location). It records per file whether it was sent to the LLM, skipped (already judged, already named / criteria, or nothing-to-send in this mode), processed successfully, or failed, plus an end-of-run summary of the counts. Failures log full diagnostics: the AI client now raises AIError carrying status code, URL, attempts, the request (base64 image data redacted to a size summary), and the response body. Selection skips (already-named, ignored, too-new files) are now counted, not silently dropped. New runlog module; new sent and proper skipped_selection accounting in PlanStats. Verified live against a text-only llama-server: log shows SEND/OK/SKIP lines and the summary. 105 tests, 96% coverage. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
Author
|
Added per-run logging to this PR (config toggle |
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.
Fixes a bug where
extraction.send_mode: textstill rasterized and sent image-only files (PNG/JPG) to the model, which errors against a text-only endpoint.Change
extract_imagereturns no content intextmode (without even decoding the image) — nothing to send.skipped_no_contentstat surfaced inplan/runoutput (factored the stats line into one helper).send_modedocs in both config templates.Verified live
Against a text-only llama-server (Qwen3.6-35B), a PNG drawing now reports
skipped_no_content=1, errors=0— previouslyerrors=1from a rejected image request. The two text-bearing samples still produce proposals.96 tests pass, 96% coverage, ruff clean.
🤖 Generated with Claude Code