Repository navigation
feat(analysis-view): select HAR MIME types in capture previews - #3293
wunianze666-netizen wants to merge 10 commits into
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Medium impact] The PR appears safe to merge; no actionable issues remain in the reviewed changes. SummaryAdds optional
Reviews (16) · Last reviewed commit: "merge: keep schema profiles alongside in..." · Reviewed by Greptile |
deb75c9 to
a1c64ce
Compare
821e165 to
f3ba9e6
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
f3ba9e6 to
a2587c7
Compare
a2587c7 to
611cf39
Compare
611cf39 to
df3247c
Compare
There was a problem hiding this comment.
TL;DR: From the diff alone, the code change looks sound and is well covered by tests. The PR body skips most of the repo template, and the three readiness boxes are still empty. Please fix the body before maintainer review.
Edit: The author has since filled in the template body, ticked the readiness boxes and added the test in my nit. Details are in my reply. Checked at head 3c1d724.
Findings
Should fix
- PR body: Seven template sections are missing. Only Summary and Author readiness match it. The new option adds a field to the tool input schema. So the CLI and MCP contract line and the expected effects list should be filled in.
- PR body: The three readiness boxes are unchecked. The body names wunianze666-netizen as the human owner. The owner ticks them after a diff review, and that step is still open.
- PR body: The body says Windows and provider lanes were skipped. It also says the earlier Windows checks were not repeated on this head. Please list these under remaining proof gaps in the template.
Nit
- The tests cover an empty
mimeType. They also cover a null one and an object-valued one. No test selects the option on a record with noresponse.contentor nomimeTypekey. The docs say missing fields stay unknown. A test of it would back up the docs. See webNetworkCaptureView.test.ts.
Looks good
- webNetworkCaptureView.ts: Only a string or null
mimeTypeis copied, and only after a check on its pointer. Tests cover redaction at four pointers, a byte descriptor, and an object value. From the diff alone, I cannot see howusableScalaritself works. - The option is rejected for non-HAR captures. It is also rejected for complete pages. This matches the new text in the docs. The schema field is optional. It has no default. So old previews stay as they were. See webNetworkCaptureView.ts.
- web-network-captures.md: The docs describe the same rules as the code. They cover exact spelling, omitted headers and bodies, and the HAR preview limit.
- The test checks the advertised schema. It checks retained and inline sources. It also checks that large bodies and headers stay out of the output. See analysisViewMcp.test.ts.
Not run
- No build and no tests. This is a read-only review of the diff against main.
Thanks to wunianze666-netizen for all of the tests. They check that bodies and headers stay out of the preview.
🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊
|
Hi @morluto, I’ve completed the Author readiness declaration, and the readiness check is now passing. This PR is ready for initial maintainer review. Thanks! |
|
TL;DR: Thanks. Every point in my review is fixed. I have no open points left. Thanks, wunianze666-netizen. I checked the live body and your two commits after my review, a208431 and 3c1d724. The body now has all the template sections. The three readiness boxes are ticked. The Windows and provider gaps are listed under remaining gaps. The test I asked for is in: a selected preview on records with no Not run
🤖 Written with Claude Code (Sonnet 5.5, verified by Opus 5.5), posted with my OK 🦊 |
Current revision — independent schema-profile and input-limit test options
Head
784b24944488d312fedc748d62699527fc7142c1normally merges the specific conflicting upstream commitf60e42a9aece5119719e554715b012b5630735c0(#7905) into12cb9c36(local tree458bd1040689aea8767b31f73ad73a0213f50e4a). GitHub and an independent merge-tree confirmed a conflict only in the MCP test helper: its third positional argument meant a schema profile here and an input-element limit upstream.The helper now accepts named options for its two services, schema profile and input-element limit. All affected call sites were migrated together. Full remains the default profile; the existing upstream per-test limits (524,288 and 8,192) are retained exactly. Both MIME profiles still pass the actual advertised definition through the SDK's
toolDefinitionoption. No MIME production code, runtime setting, assertion or timeout was changed by this resolution; upstream's admission work belongs to its authors. The feature diff remains six files against the frozen upstream commit.The complete MCP view and compact-schema files passed 46 tests, zero skips (32 + 14), including both MIME profiles and the upstream admission controls.
check:fastpassed typecheck and lint; targeted formatting andgit diff --checkpassed. Runtime preparation passed three tasks, one cached. These are in-memory SDK boundary checks, not new provider or browser execution. The earlier 211-test, four-HAR/279-record and full-check results below were not rerun; the previously documented upstream architecture failure remains a validation gap, with #7967 still unmerged.The preceding
12cb9c36CI 40825576443 completed successfully (37 jobs: 17 successful, 20 skipped). Its inspected source job ranb5ca111e2e5acb79c7cdc66af30c641e76704132, parentsddefba83+12cb9c36, treee2b059720e244d9bcabdd668677c2401d23171af, and passed 21,676 source tests with 16 skips. That tree differs from the earlier local tree and is historical qualification only. CI 40839167320 completed with failure (37 jobs: eight successful, three failed, six cancelled, 20 skipped). Source tests passed 21,764 tests with 16 skips; build, static, documentation and the Windows native build also succeeded. Shard 4/8 failed one unchangedbundleComparisonMcp.test.tsassertion expecting the former flattenedfield: messagetext; it reported 2,346 passed, one failed and 41 skipped. The inspected source and failing-shard logs both check out3393153883c314d1598c3ec36cb8278add976946, parents2b85a4a2+784b2494, tree08984bb1fb73f080fc5061f0f74b9c81329c6cf2, different from the local tree. A clean checkout of that exact base2b85a4a2bafc82e3d8c8b4024f00216e9f9e8ff7independently reproduces the same assertion failure (one selected test failed, eight filtered tests unexecuted). The server now preserves separate field paths and messages, so the old string expectation is stale. @gensokyo-dev already owns the corresponding repair in open, unmerged #8018; it is not duplicated here. No gate, assertion or retry policy was weakened, and this CI remains red until a new revision is qualified. The resolved held-definition review and initial Author readiness remain unchanged.Previous production revision — source-specific preview integration (0a97b61)
Head
0a97b61f106ff172ca557831338d6bc7e172fef8normally merges frozen main429355ca4d1078579fca7d286de85c512bed0a96intodb243a02(treeefff3c1fc71faeaa9fa8ca2939441b8ac07124d4). GitHub and an independent merge-tree confirmed a production conflict inwebNetworkCaptureView.ts. The resolution retains upstream #7832's source-format headline tables and scalar-only selection, while preserving opt-in HAR MIME projection and its facet checks. The existing MIME regression now also supplies HARname/typecontainer extensions and verifies that they stay out of the selected preview. Upstream work remains attributed to its authors; the feature diff remains six files.On this exact local tree, all 211 tests in six related files passed, with zero skips: capture views 62, application service 68, compiled CLI 26, SDK MCP 32, compact-profile/schema checks 14, and README consistency 9. The build's three tasks passed. Complete/preview production stdio workflows passed for the same four pinned public HAR files and their 279 original records (eight workflows, four unique inputs), using TraceDelta 0.5.1 and an independent oracle. Original source SHA/bytes, ordinals, unknowns, selection, coverage and each path's query-name provenance were checked. No recording, replay or performance comparison was performed.
The six static tasks passed, including typecheck, lint/module boundaries, format, Knip and metadata. Production reachability, typed lint and documentation checks also passed; the repeated nine README tests are not added again. The complete
npm run checkis not green: its architecture guard rejects the unchanged upstreamelectronCallPathBlockPrefixes.tschild walker. The clean frozen429355cabaseline reproduces that same finding. @WenyuChiou's existing draft #7967 addresses it and remains unmerged; this PR does not duplicate or suppress that repair. The official 6.8 Windows native component passed the current PE/hash/N-API/ABI artifact verifier; broader Windows/provider execution is unverified.CI 40815811295 completed successfully for
0a97b61f(37 jobs: 17 successful, 20 optional skips). Its inspected source job checked out9b21b809f55a04e4bf9edddd9b932dd11d93229b, parents429355ca+0a97b61f, treeefff3c1fc71faeaa9fa8ca2939441b8ac07124d4, and passed 21,604 source tests with 16 skips, including the 62 capture-view tests. This run does not qualify the later test-only follow-up head. Older green CI and measurements below remain evidence only for their stated revisions. Initial Author readiness is preserved and is not a claim that the human owner reviewed every subsequent diff.Summary
Select recorded HAR response MIME types in capture previews with optional
include_response_content_type, keeping headers and bodies outside the selected output. No linked issue: this enhancement came from the TraceDelta consumer's need for MIME facts without complete body delivery.Problem and expected behavior
Previously MIME facts required complete records even when an analyst only needed headlines. Opted-in HAR previews now retain exact string/null MIME facts; absent, redacted, descriptor-hidden or malformed fields are not invented. Default and explicit false preserve existing previews.
Change and scope
Selection belongs to the existing capture projector over parsed producer facts, with matching authored guide and boundary tests. This is within the existing analysis-view scope; no new provider or target-execution authority requiring a separate maintainer decision.
Contract and boundary impact
webNetworkCaptureViewselects parsed HAR facts; it does not reparse HTTP or payload bytes.view.kind=capture, detail=previewon HAR. Complete pages and non-HAR formats reject the option. Example view:{kind:"capture",detail:"preview",include_response_content_type:true}.Expected effects of the feature:
Evidence and regression coverage
Ordinary merge
db243a02bb9d6144d17040585280d2670fffe045integrates frozen mainad7d4c1f4dd9cbd93229ee330e66c7a522e723e6on the original branch. Upstream fix(ci): align static checks and regression fixtures with current contracts #7349/fix(windows): restore native verification fixture coverage #7479 now contain the previously reproduced CI fixture/static-check repairs. The merge is conflict-free; relative to this main the MIME feature still differs in its original six files. Those upstream repairs are credited to their authors.Current local focused run: 214 passed, 0 failed, 0 skipped across nine files: the previous six MIME/CLI/full-MCP/compact-MCP/profile/docs files (148 controls), plus the three repaired source-fixture files (66 controls). The earlier four local timeouts were not observed in this run; their root cause was not isolated and no speed claim is made.
Full
npm run check,docs:checkand discovery passed. Ordinary knip's prior findings are absent on this tree; no ignore, assertion or timeout was relaxed. All 2,690 test files were discovered exactly once, not executed. The repeated docs9 are not added to214.A later controlled consumer verification completed all four original public HARs /279 records through both complete delivery and explicit MIME preview, against the independent standalone oracle. Source SHA/bytes, original ordinals, unknowns, selection/coverage and each query-name provenance were checked; the preview path was asserted explicitly. It used the unchanged local db243a0/tree10240299 source6.8 build and a consumer using the SDK's supported selected-tool definition option with full selected-output validation and the same60-second request budget. No REA source or server budget was changed. The earlier timeout and bounded-fixture attempts are retained below; this does not establish one cause for every old timeout.
Current-head code CI40637017728 completed success, attempt1:37jobs comprise17success/20optional skips. Source tests passed21,067 with15skips; all eight built shards, build/static/docs, native build, selected Linux package and final gates passed. Skipped providers/deep/Windows capability checks remain unqualified.
Raw primary, all eight shard, native-build and Linux-package checkouts bind this CI to merge
111a5c2acde0356599babbe414944cba50455863, parentsfbb0e79354d8cc138026d01de393652913f821bf+db243a02bb9d6144d17040585280d2670fffe045, tree9a987ee3b1621aae5c2df56a64951ad4792e08c7. That differs from local tree10240299cc74488d081524561749e621bc3d512a; local214 is not relabeled as remote execution. Remote capture61, CLI28, SDKMCP31 and compact14 are individually observed. CLI28 includes current upstream cases, unlike local26.The previously locally unavailable Linux process-capture lifecycle control, “retains collected observations when completion and cleanup both fail”, passed in shard1 job122646622461 (the file passed24 controls). This is fresh remote evidence, not a Windows reproduction or complete platform claim. The old40459754439 failure remains below as history.
Genuine official6.8 native artifact passed current PE/hash/NAPI8/ABI1 checks. Full local repository, broad provider/Windows capability and performance/token/peak-process-family measurements remain outside this run.
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Validation performed
Windows x64, pinned Node24.22.1/npm11.16.0 and current upstream locked dependencies; the feature does not change package/lock relative to frozen main. Builds and checks were serial.
node scripts/run-development-tests.mjs focused src/domain/analysisView/webNetworkCaptureView.test.ts tests/boundary/cli/analysisViewCli.test.ts tests/boundary/mcp/analysisViewMcp.test.ts tests/boundary/mcp/compactInputSchemaMcp.test.ts tests/conformance/contracts/mcpInputSchemaProfile.test.ts tests/conformance/readmeConsistency.test.ts src/domain/apple/appleApplication.test.ts src/windows/WindowsNativeLoader.test.ts tests/composition/analysis-sessions/providerBinding.test.ts— three build tasks and214 tests passed,0skip.npm run check— passed, including type/lint/module boundaries, formatting, metadata, ordinary knip, architecture, production reachability and typed lint.npm run docs:checkandverify:test-discoverypassed; repeated docs9 are not added again.node scripts/verify-windows-native-artifact.mjs— genuine official1173 source6.8 artifact accepted, without a fabricated manifest. This is component admission, not broad Windows execution qualification.Earlier consumer verification attempts (historical)
The optional full four-original-HAR parity rerun hit the SDK's unchanged60-second RequestTimeout and did not complete. No fresh279-record corpus pass is claimed. A separate bounded two-record generated HAR passed complete/preview parity with the independent oracle, preserving source SHA/original ordinals/unknown/selection/coverage and each path's query-name provenance; the old9239 complete/preview279-record result remains historical.
Four fixed public HARs through the historical-data consumer — incomplete because one SDK call timed out at its existing60-second limit; no retry or larger timeout. A separate two-record generated HAR passed complete/preview comparison against the independent oracle. The first generated fixture omitted a HAR1.2-required MIME key and was rejected by the oracle before REA started; its corrected valid empty-string MIME control preserves unknown. That fixture error is retained separately and is not a product failure.
Previous-head evidence and failed attempts (historical)
9239cbffaa314f13996de5c53b5752050f4a13d5integrates frozen main0a9d92a54bfa8f13eeed76d3296b0a9bf3c0608bon the original branch. The independently reproduced conflict was one test insertion: every MIME case and upstream's updated subject-digest regression are retained. The MCP case uses the file-owned schema-validation cache. Relative to that main, the feature still differs in six files; upstream changes are not attributed to this PR.0a9d92a5worktree with the same locked dependencies/runtime. The cause remains unestablished; these are not counted as passes or a green baseline.npm run checkstopped at three knip unused-export findings (staticFileUrlPath,AndroidManifestComponentInventory,ObjcClassImportBindingCoverage). The identical three findings were reproduced on the isolated main worktree. No export, ignore rule or timeout was changed. Independently run typecheck, lint/module boundaries, architecture guards, production reachability, typed lint and docs passed; formatting and metadata checks also passed. All 2,659 test files were discovered exactly once; that is discovery, not execution of the full suite.365fb03e(66 selected source controls: 49 pass / 17 fail). Shard2 reported six boundary failures: five were reproduced on that same unmodified base after its own build; the process-capture control was unavailable on Windows10 and was not reproduced locally. No fixtures, admission checks or timeouts were weakened. These baseline comparisons do not make the PR CI green.2a7623ef7c17a361e3d10c73872da9989b639b54, base365fb03e73ffb23f4394b7fb82776f7dd2045301, tree93a6301b9b61b05095df565c1469284aa5de3783. That tree differs from locally validated08f7f28cad5c04bbf5a9459fe40ae59beb7535ec. Remote capture-view61 and SDK MCP31 passed; the latter file completed within a subsequently cancelled shard, so it does not qualify that whole shard. Build/static/docs, bundled Windows native build and the selected Linux package baseline passed. Deep static/provider/Windows capability skips do not qualify those checks. The older green CI39821674880 remains head3c1 history only.checkremain red as described; no full local suite, complete provider/Windows capability run or new performance benchmark. The Linux process-capture failure remains unverified on this host; CI is blocked as recorded above. The genuine official6.8 native artifact passed the current shared PE/hash/ABI checker. Its C++ producer matches the frozen source, while build/checker integration changed upstream; the broader Windows functional verifier was not run.Windows x64, Node24.22.1/npm11.16.0, with the explicit pinned node and npm-cli entry. Locked upstream6.8 dependencies were installed with
ci --ignore-scripts --no-audit; package/lock are unchanged by the six-file feature relative to frozen main. Local builds/checks were serial.node scripts/run-development-tests.mjs focused src/domain/analysisView/webNetworkCaptureView.test.ts tests/boundary/cli/analysisViewCli.test.ts tests/boundary/mcp/analysisViewMcp.test.ts tests/boundary/mcp/compactInputSchemaMcp.test.ts tests/conformance/contracts/mcpInputSchemaProfile.test.ts tests/conformance/readmeConsistency.test.ts— build: three tasks passed; tests: 144 pass / 4 timeouts / 0 skip.npm run knipreproduced the same three unused exports. Neither command is reported green.npm run check— failed at knip. Separatenpm run typecheck,lint,verify:architecture-guards,knip:production,lint:typed,docs:checkandverify:test-discoverypassed. Documentation's repeated nine controls are not added again to the 148.node ../rea-analysis-20261014/verify-mime-public-corpus.mjs— four fixed public HAR inputs / 279 records, complete and preview, passed against independent standalone facts.node scripts/verify-windows-native-artifact.mjs— genuine official6.8 artifact from source1173 accepted by current PE/hash/NAPI8/ABI1 checks; no fabricated manifest.Earlier head3c1's 135 local checks, CI39821674880 and generated8MiB delivery control remain historical evidence, not current-head reruns. The original private API HARs remain unavailable.
Compatibility, safety, and release
Author readiness
Human owner: @wunianze666-netizen
AI-assisted preparation. The human owner has completed the author readiness declaration.
Before merge