Skip to content

fix(browser): disclose opaque redirect coverage gaps - #7943

Merged
morluto merged 1 commit into
mainfrom
codex/redirect-coverage-gap-7410
Oct 28, 2026
Merged

morluto merged 1 commit into
mainfrom
codex/redirect-coverage-gap-7410

Conversation

@morluto

@morluto morluto commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Related to #7410. An opaque manual redirect can omit its response from Playwright network events while the step error promises that the capture contains its Location and event coverage appears complete. The capture now reports the uncertainty and marks selected event coverage incomplete.

Problem and expected behavior

An HTTP 302 answer to a request step is not followed. In the observed Chromium case, Playwright exposes opaqueredirect to the page and emits requestfailed without a response event. The step must not claim to have captured a Location or offer complete event coverage when that response may be absent.

Change and scope

Propagate opaque-redirect observation from the request owner to the event collector. When network capture is selected, add a coverage limitation; use the existing shared completeness owner to mark events missing. Correct the step error and scenario guide. The redirect response is not recovered: #7410 remains open.

The Playwright public Request does not expose its CDP request ID. A direct request.response() probe returned null; route.fetch() makes a separate HTTP request. This change does not infer identity from URL or method or issue another request.

Contract and boundary impact

  • Semantic owner and earliest changed stage: request step observes the opaque response; the event collector owns coverage limitations.
  • Contribution scope fit and linked maintainer decision: existing browser scenario capture behavior; no new authority.
  • CLI and MCP/tool-catalog contract: output schema unchanged; selected network coverage can now be incomplete.
  • Provider, bridge, target-format, or platform compatibility: existing Playwright scenario provider, launch and attach paths.
  • Evidence, artifact, provenance, or reconstruction contract: limitations and completeness retain uncertainty instead of asserting absent evidence was captured.
  • Target selection, authority, upstream behavior, and cleanup details: unchanged; redirects are not followed.
  • Generated metadata, package, or installation impact: none.

Expected effects:

  • Launch or attach to a process.
  • Contact network services.

Evidence and regression coverage

A source-CLI replay against loopback and a real Chrome browser returned a failed request step, missing_sections including events, an opaque-redirect limitation, zero destination hits, and terminated-owned-process cleanup. Its transaction contained request, request-content and request-failed events, with no response. Tests cover request callback and network-selected versus unselected event coverage.

The status and Location remain unavailable, and no real connected-browser or MCP workflow was verified. The gap is conservatively reported even if a browser happens to expose a response; the implementation does not claim a specific transaction was omitted.

Validation performed

  • npm run test:local -- src/browser/PlaywrightScenarioRequest.test.ts src/browser/PlaywrightScenarioEvents.sharedContext.test.ts src/browser/PlaywrightScenarioSession.test.ts src/browser/PlaywrightBrowserScenarioProvider.test.ts — 195 passed.
  • npm run check:fast — passed.
  • git diff --check — passed.
  • Real Chrome, source CLI and loopback HTTP replay — passed as described above.

Compatibility, safety, and release

No schema migration. Consumers can see incomplete event coverage where it was previously reported complete. Real connected-browser, MCP, other browser versions and write-method redirects remain unverified.

Author readiness

Human owner: @morluto

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; it reports missing evidence without changing request behavior.

Summary

The PR reports uncertainty when a request step receives an opaque redirect instead of promising that its status and Location were captured.

  • Opaque redirects make selected network-event coverage incomplete.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A["Page fetch returns opaqueredirect"] --> B["Request owner calls onOpaqueRedirect"]
  B --> C{"Network capture selected and collector unsealed?"}
  C -->|Yes| D["Collector records coverage limitation"]
  C -->|No| E["No added event limitation"]
  B --> F["Request step fails without following redirect"]
  D --> G["Existing completeness owner marks events missing"]
Loading

Reviews (1) · Last reviewed commit: "fix(browser): disclose opaque redirect c..." · Reviewed by Greptile

@morluto
morluto marked this pull request as ready for review October 28, 2026 23:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T23:25:55.715391Z 6f5f523 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@morluto
morluto merged commit 0179d94 into main Oct 28, 2026
43 of 44 checks passed
@morluto
morluto deleted the codex/redirect-coverage-gap-7410 branch October 28, 2026 23:57
@morluto morluto added the bug Something isn't working label Nov 22, 2026
@morluto morluto added the area: runtime Process capture and runtime observation label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: runtime Process capture and runtime observation bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant