[codex] Fix image target id parsing#2722
Draft
sedghi wants to merge 1 commit into
Draft
Conversation
jbocce
requested changes
May 6, 2026
jbocce
left a comment
Collaborator
There was a problem hiding this comment.
The code changes look fine. However, the PR is still in draft and there are code conflicts and failing checks.
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.
Summary
Fix delimiter-unsafe parsing of stack image target IDs. Target IDs use the
imageId:<imageId>format, but several call sites usedsplit('imageId:')[1], which truncates valid image IDs when the underlying URL or query string also containsimageId:.This change adds a shared
BaseToolhelper that removes only the fixed prefix withslice, updates the runtime call sites that parsed image target IDs, and adds regression coverage for an image ID containing the delimiter.Impact
Valid stack image IDs containing the literal
imageId:are preserved for cached stats, probe index calculation, magnification, and rectangle ROI threshold annotations. This avoids incorrect viewport/image lookup and stale or missing measurement recalculation for otherwise valid images.Validation
split('imageId:')call sites underpackages/tools/srcorpackages/core/src.node_modules,yarn/npm/npxare not onPATH, and the pre-commit hook also depends onyarn.@prettier/plugin-oxcwithout the repo dependency tree installed.