Repository navigation
fix(browser): treat module-import initiator positions as script positions - #1097
Merged
Merged
Conversation
…ions An empty script_id also marks a script-type initiator, such as a module import, whose url is the importing script file. Its position is a real script position without a session-script association. The previous wording called every empty-ID callsite parser markup with "no script position" and excluded it from the external-script conversion. Describe the empty ID as a missing session-script association, which only rules out joining captured source or resource_start, and keep the external-script conversion for script-file positions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
N0zoM1z0
approved these changes
Oct 8, 2026
N0zoM1z0
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed all three files and independently captured Chrome 153 CDP events for parser markup plus inline/external module imports. An empty script ID does not erase the reported resource position; the revised external conversion and inline association requirements match those observations. Values remain unchanged. The Apple DMG cleanup failure is in unchanged production code and is being investigated; all exact-head CI must pass before merge.
darsrc
pushed a commit
to darsrc/rea
that referenced
this pull request
Oct 10, 2026
…nitiators fix(browser): treat module-import initiator positions as script positions
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 #1096. This addresses its review comment (discussion r4221561065), which was posted after #1096 merged.
Problem
CdpRuntimeRequestsrecords everyNetwork.Initiatorposition with an emptyscript_id. That covers parser markup and also script-type initiators such as module imports, whoseurlis the importing script file. #1096 described every empty-ID callsite as parser markup with "no script position" and limited all conversions to a nonemptyscript_id. That tells callers to discard a valid external-script coordinate.Change
script_idnow says an empty value means no session-script association, so captured source andresource_startcannot be joined. It no longer implies the absence of a position.line_numberdescribes the resource named byurl: the script file for an external script, including a module-import initiator, or the HTML document for an inline script or parser markup.docs/web-runtime.md, the external-script conversion (line_number + 1) applies wheneverurlis the script file, including empty-script_idinitiator positions. The inline conversion still requires ascript_idand itsresource_start.Only schema descriptions and docs change.
Verification
npm run test:focused -- src/domain/webRuntime.test.ts tests/acceptance/webRuntimeCli.test.ts: passed.npm run check:fast,npm run docs:checkNo real Hopper or Ghidra verification was run, because this change does not touch those providers.
🤖 Generated with Claude Code