Skip to content

chore: remove hardcoded path - #2535

Merged
Lightning00Blade merged 1 commit into
mainfrom
no-hardcoded
Aug 10, 2026
Merged

Lightning00Blade merged 1 commit into
mainfrom
no-hardcoded

Conversation

@Lightning00Blade

Copy link
Copy Markdown
Collaborator

No description provided.

@Lightning00Blade
Lightning00Blade requested a review from OrKoN August 10, 2026 11:48
@OrKoN OrKoN changed the title chore: remove hardcoded parth chore: remove hardcoded path Aug 10, 2026
@Lightning00Blade
Lightning00Blade added this pull request to the merge queue Aug 10, 2026
Merged via the queue into main with commit aca6327 Aug 10, 2026
31 of 33 checks passed
@Lightning00Blade
Lightning00Blade deleted the no-hardcoded branch August 10, 2026 13:23
pull Bot pushed a commit to nuo-ai/chrome-devtools-mcp that referenced this pull request Aug 28, 2026
…evTools#2625)

## Summary

Puppeteer already subscribes to `Audits.issueAdded`.
`overrideDevToolsGlobals` did not stop the DevTools frontend from
enabling its own `Audits` domain, so a second consumer of the same
stream was created on session setup. Against a target holding a large
retained issue backlog, that second subscription replays the entire
backlog through `IssuesManager`, logging `No handler registered for
issue code PerformanceIssue` per unsupported entry and delaying
unrelated page work.

This stubs `Audits.invoke_enable` on the agent prototype exactly the way
the Network emulation commands are already stubbed, so the redundant
subscription is never enabled. The four identical no-op command bodies
are collapsed into one `noopAgentCommand` helper while adding the
fourth.

## Why this matters

Closes ChromeDevTools#2556

The guard added in ChromeDevTools#2535 covers `PageEventSubscriber.#onIssueAdded`, the
collector's own subscription. It does not cover the frontend's
`IssuesManager` path, which is the other consumer of the same CDP event,
so the warning and the backlog replay both survive it. Fixing it at the
`invoke_enable` boundary means the frontend never receives the replay at
all, rather than filtering each issue after the fact.

## Testing

`node scripts/test.js tests/devtools/DevtoolsUtils.test.ts` -> 20
passing. `npm run build` and `npm run typecheck` both clean.

The added case builds a real 500-issue `PerformanceIssue` backlog on a
page, detaches, then constructs the target universe and asserts the
warning is never emitted while `Runtime.evaluate` still works.

It pins the defect rather than just covering the path. Reverting only
`src/devtools/DevtoolsUtils.ts`, rebuilding, and re-running:

```
warn('No handler registered for issue code PerformanceIssue') at createIssuesFromProtocolIssue
  (build/third_party/devtools-frontend/front_end/models/issues_manager/IssuesManager.js:164:13)
  ... (repeated)
at assert2.<computed> [as neverCalledWithMatch]
✖ createTargetUniverse (1533.363458ms)
  '1 subtest failed'
```

Not tested: no measurement of the tool-call timeout the report describes
on a long-lived session. The test asserts the backlog is no longer
replayed, which is the mechanism, not the end-to-end latency.

AI was used for assistance.
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.

2 participants