Skip to content

fix: residuals — image widths, summary length, diagram export - #32

Merged
bits-bytes-nn merged 4 commits into
mainfrom
fix/residuals-2026-11-01
Nov 1, 2026
Merged

bits-bytes-nn merged 4 commits into
mainfrom
fix/residuals-2026-11-01

Conversation

@bits-bytes-nn

Copy link
Copy Markdown
Owner

Follow-up to #23–#31 (merged and deployed 2026-11-01).

  • Image widths: the probe reads each image's width from its first 64KB (Pillow, header only); an image narrower than the 712px column keeps its own width instead of being stretched. Measured on a real AWS post: 1870/1858/2369/300px; the 300px figure is no longer upscaled. A header past Pillow's decompression-bomb limit is kept with unknown width (regression test fails without the fix).
  • Summary length: a summary over 1.1x the limit is sent back once to be shortened (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.
  • Filter output cap: no change needed — measured max 214 output tokens at default effort and 1,944 at thinking_effort: max on the five longest prod candidates, against a cap of 8,192.
  • Diagram: pipeline-flow.png re-exported from its updated source with Excalidraw's own export in headless Chrome.
  • Corrections: greeting revision prompt no longer asks for the removed hand-off line; CHANGELOG no longer attributes the 0.79 → 0.95 rubric gain to the prompt change (the old prompt scores 0.95 today too).

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).

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.
@bits-bytes-nn
bits-bytes-nn merged commit cc75450 into main Nov 1, 2026
3 checks passed
@bits-bytes-nn
bits-bytes-nn deleted the fix/residuals-2026-11-01 branch November 1, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant