Skip to content

fix(capture): bound preview headlines by source format - #7832

Merged
morluto merged 2 commits into
mainfrom
codex/fix-har-preview-headlines
Oct 28, 2026
Merged

morluto merged 2 commits into
mainfrom
codex/fix-har-preview-headlines

Conversation

@morluto

@morluto morluto commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes #7395. HAR capture previews no longer include nested extension payloads when those extensions use headline-like field names; complete records retain the original data.

Problem and expected behavior

A HAR entry can contain arbitrary extension fields named name or type, and request/response extensions can share other formats' headline names. The prior preview promoted those values, including nested objects, into the compact result.

Change and scope

The shared preview projection selects scalar headlines by producer format and request/response role. Qlog event headlines and SAZ/mitmproxy HTTP fields retain their own mappings; complete captured records remain available.

Contract and boundary impact

  • Semantic owner and earliest changed stage: capture view preview projection; its CLI and MCP consumers use the same projection.
  • Contribution scope and maintainer decision: read-only capture inspection; no scope decision required.
  • CLI/MCP contract: preview contents are narrower; complete selection is unchanged.
  • Provider and target compatibility: HAR, qlog, SAZ, and mitmproxy format-specific headline selection.
  • Evidence and provenance: the parent capture retains complete source fields and provenance.
  • Target authority and cleanup: reads selected captures only; no target execution or mutation.
  • Generated metadata/package impact: none.

Expected effects:

  • Read existing files or captured data.
  • Launch or attach to a process.
  • Inject instrumentation or run scripts/code.
  • Change process memory, registers, files, or configuration.
  • Contact network services.
  • Recover protected code or work around protections.
  • Documentation or usability only; no target interaction.
  • Not sure yet; investigation or maintainer guidance needed.

Evidence and regression coverage

  • HAR CLI/MCP regression compares preview and complete views on nested and scalar headline-like extensions; their markers are absent only in the preview.
  • A qlog control keeps its event name and time without promoting HTTP-shaped extensions. Existing native mitmproxy projection cases remain covered.
  • This is a projection-boundary regression. A live external capture producer was not tested.

Validation performed

  • npm run test:focused -- src/domain/analysisView/webNetworkCaptureView.test.ts tests/acceptance/tools/harBoundaryFacts.test.ts — 55 passed.
  • npm run test:focused -- tests/acceptance/tools/harBoundaryFacts.test.ts — 3 passed after adding scalar extension controls.
  • npx oxlint tests/acceptance/tools/harBoundaryFacts.test.ts — passed.
  • npm run check:fast — passed before the test-only follow-up.
  • git diff --check — passed.

Compatibility, safety, and release

  • Breaking changes or migration: none; preview omits fields previously promoted from unrelated extension data.
  • Real browser/provider coverage: no live capture producer tested; fixture-based CLI/MCP and qlog controls passed.
  • Package or release metadata impact: none.
  • Security/privacy/containment: no added network or target activity.

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, with the previous test coverage gap addressed.

Summary

Capture previews now select scalar headline fields by source format and request/response role. Complete records remain unchanged.

  • Capture previews show scalar headlines chosen for their source format.

Reviews (2) · Last reviewed commit: "test(capture): cover scalar HAR preview ..." · Reviewed by Greptile

@morluto
morluto marked this pull request as ready for review October 28, 2026 15:40
@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-28T15:46:38.456194Z 8c97012 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 0a272d5 into main Oct 28, 2026
42 of 46 checks passed
@morluto
morluto deleted the codex/fix-har-preview-headlines branch October 28, 2026 17:56
@morluto morluto added area: runtime Process capture and runtime observation bug Something isn't working labels Nov 23, 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.

[Bug] HAR capture previews include nested payloads from unknown name and type extensions

1 participant