Repository navigation
fix(context): preserve images with duplicate basenames - #154
Open
OUAO-FRANK wants to merge 1 commit into
Open
OUAO-FRANK wants to merge 1 commit into
OUAO-FRANK wants to merge 1 commit into
Conversation
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.
Preserve image evidence when a rollout produces files such as
Q1/chart.pngandQ2/chart.png. The context builder currently copies both toimages/chart.png, silently replacing the first. Prefix each copied image with its position in the selected image list so destinations are distinct; the existing eight-image limit is unchanged.The regressions use different valid PNGs, the real JobBench adapter's raw-text fallback, and
context.build(). They check the copied bytes for repeated basenames, distinct basenames, and source names that already contain a numeric prefix.Validation on Linux/WSL, Python 3.12.3:
python3 -B -m unittest discover -s tests -v: all 8 tests pass.ruff check harness2/core/context.py tests/test_context_images.py: passes.ruff format --check harness2/core/context.py tests/test_context_images.py: both files formatted.git diff --check: passes.Native Windows validation hits the existing raw-text extraction path's backslash handling before reaching these assertions; Windows support is not claimed by this change.
Fixes #153.