Repository navigation
fix: residuals — image widths, summary length, diagram export - #32
Merged
Merged
Conversation
Every summary image got width=712 so Outlook keeps wide charts inside the column, which also stretched a 300px figure to 712px. The image probe already fetches each image; it now reads the width from the first 64KB and returns it, and an image narrower than the column keeps its own width. Wide or unreadable images are sized as before.
The budget is in the prompt, yet one dense article ran about 7,500 characters against the 6,000 limit under both the old and the new prompt. Like the greeting, the length is measured in code: past 1.1x the limit the summarization model gets the measured count and shortens it once, keeping numbers, parameters, code, tables and sections. The rewrite is kept only if it is usable and shorter. Regenerated, that article went from 7,682 to 6,041 characters with specificity unchanged. Also drop the greeting revision's "keep the hand-off line", which the greeting prompt no longer asks for, and correct the changelog: the 0.79 -> 0.95 rubric gain was model drift since the stored run, not the prompt change.
The PNG still showed Claude Sonnet as the filter and SNS as a status channel; rendered from pipeline-flow.excalidraw with Excalidraw's own export in headless Chrome.
Reading the width with Pillow made a header past its decompression-bomb limit raise DecompressionBombError, which is not an OSError, so the whole summary was filed as invalid. Treat it as a displayable image of unknown width. Also bound the probe's total time (the timeout covers each read, not a host that drips bytes), cache probe results per run so a shortened rewrite does not re-probe the same images, keep the draft's style in the shortening prompt, and make the unsafe-scheme test assert None.
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.
Follow-up to #23–#31 (merged and deployed 2026-11-01).
SummaryLengthPrompt), kept only if usable and shorter. The 2026-10-10 Pinterest summary ran ~7,500 chars under both the old and new prompt; regenerated it went 7,682 → 6,041 with specificity unchanged.thinking_effort: maxon the five longest prod candidates, against a cap of 8,192.pipeline-flow.pngre-exported from its updated source with Excalidraw's own export in headless Chrome.Adversarial review of this diff: one MAJOR (the decompression-bomb case) found and fixed; MINORs fixed (probe deadline, per-run probe cache, test tightness, shortener style).