Skip to content

Count an ignored image against a spec try and report the drop - #29

Merged
peterbjohnson merged 3 commits into
mainfrom
wb/t32
Sep 21, 2026
Merged

peterbjohnson merged 3 commits into
mainfrom
wb/t32

Conversation

@peterbjohnson

Copy link
Copy Markdown
Member

t24 (report each image a spec marked ignore, rewrite the spec once with that finding, and say on the coverage line how many images a set dropped) was built against the old spec loop and could not be merged after t28 replaced that loop with spec.iterate_spec. Do it again on the current main, inside the loop:

  • package.ignored_images(draft) as t24 wrote it: one finding per ignored block whose lines hold ![, message b10 (lines 29-30) holds an image and is marked ignore. (keep t24's tests in tests/test_package.py).
  • In iterate_spec, after each try's spec run, count those findings into the try's score beside the unassigned blocks and errors, and show them to the next call in the revision prompt as coverage findings, so a spec that ignores a figure is revised like one that leaves a block unassigned.
  • The coverage stage line of the chosen try names the images still dropped: ...; 2 images dropped: b10 (lines 29-30), b14 (lines 41-42), and the run continues.
  • spec.py's system prompt says a paragraph holding an image is content, never ignore (t24's wording).
  • docs/how-it-works.md: the coverage line's dropped-images form, and the try score's third term.
    Tests: tests/test_spec.py runs a source with a figure paragraph through a fake backend whose tries all ignore it and asserts the score, the revision prompt and the coverage line. Done when in2lambda-agent run over a sheet whose spec ignores a figure revises the spec and reports the drop.

Workbench ticket t32.

@peterbjohnson
peterbjohnson merged commit 8fca5cf into main Sep 21, 2026
1 check passed
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