Repository navigation
feat(browser): add retained scenario summaries and paged views - #7120
Conversation
Add shared CLI/MCP summary delivery with complete parent Evidence retained. Page exact steps, events, transaction metadata/content and UTF-16 text without replaying the browser. Preserve omissions and unknown network selection, and reuse immutable source validation within the retained parent's lifetime. Reuse the scenario prototype from ab3893d, adapting it to current delivery and cleanup owners, bounded page allocation and real-browser verification. Refs #6167 Co-authored-by: Kaoru0822 <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 247897c723
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
[Medium impact] The reviewed changes appear safe to merge, with both previous findings addressed. SummaryAdds browser scenario summaries while keeping complete Evidence available for later reads.
No new actionable issues were found. Checks used source review; no tests were run. Checking for a replacement PR was blocked by unavailable GitHub authentication. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
Capture[Browser scenario capture] --> Parent[Complete Evidence]
Parent --> MCP[MCP session]
Parent --> File[CLI Evidence bundle]
Parent --> Summary[Summary reply]
MCP --> Views[Selected steps, events, transactions or text]
File --> Views
Reviews (2) · Last reviewed commit: "fix(browser): preserve cleanup diagnosti..." · Reviewed by Greptile |
This reverts commit 7336a56 (#7119). After #7120 and the other merges of 2026-10-25 grew inspect_analysis_view's complete input schema (71,762 bytes plus 3,003 bytes of examples), the 64 KiB fitting from #7119 could no longer keep instance level 3 and fell back to level 2. That summarized the inline Evidence source and the view selector collections, so main CI failed in toolInputReferences, toolSchemaValidity, analysisViewMcp, absoluteLocalPathSchema, javascriptFactsViewMcp and godotPckMcp. #7119's own CI ran against bc14312, before that growth. Reverting restores the complete full-profile advertisement while the size limit is redesigned against these contracts (#4081 stays open). Co-Authored-By: Claude Opus 5.5 <[email protected]> Refs: #7135
This reverts commit 7336a56 (#7119). After #7120 and the other merges of 2026-10-25 grew inspect_analysis_view's complete input schema (71,762 bytes plus 3,003 bytes of examples), the 64 KiB fitting from #7119 could no longer keep instance level 3 and fell back to level 2. That summarized the inline Evidence source and the view selector collections, so main CI failed in toolInputReferences, toolSchemaValidity, analysisViewMcp, absoluteLocalPathSchema, javascriptFactsViewMcp and godotPckMcp. #7119's own CI ran against bc14312, before that growth. Reverting restores the complete full-profile advertisement while the size limit is redesigned against these contracts (#4081 stays open). Co-authored-by: Claude Opus 5.5 <[email protected]>
Summary
Fixes #6167. A ten-action TodoMVC capture returned about 628 KB / 395k estimated tokens even when the analyst needed only the final screen and selected records.
capture_browser_scenarionow acceptsdetail: "summary", retains the complete parent Evidence, and returns step outcomes, the focus accessibility tree and retained event/network counts. Complete delivery remains the default.CLI uses
--detail summary --evidence_output FILE.inspect_analysis_viewadds browser-scenario steps, events, transactions and UTF-16 text pages. Filters and artifact/content selection preserve original record identities and source omissions; exhausting a page never upgrades capture completeness.Change and scope
ab3893d48prototype with attribution retained. feat(analysis-view): page retained browser scenario steps and text #4163 overlaps record views and proposes broader producer/state contracts; this PR uses current producers.Contract and boundary impact
The named CLI/MCP contracts share canonical scenario semantics and projections. The SDK's structural admission stays separate from canonical semantic diagnostics so full/compact clients retain precise field paths. Browser views explicitly have no file artifact (
artifact: null). Transaction identity is parent Evidence + transaction ID; text pages retain the complete artifact digest. Authored guidance/docs are updated; generated catalogs and packaged skills remain build outputs.Validation performed
npm run check— passed, including typecheck, lint, format, Knip, architecture/module boundaries and typed lint of 5,402 files. An earlier run hit the 8 GiB family-RSS guard; returning to the checker's existing 1 GiB Go soft target completed the full check without changing its configuration or coverage.npm run docs:check— passed, including nine README consistency tests.npm run check:fastpassed after these changes.ff43b02e59dfa604386bb382034b2cd07c2bcd8a: two alternating sessions per revision, each with cold/warm captures, all checked 11 completed steps, 36 events, 12 transactions and the final five todo labels. Separate real-browser checks passed failed-step focus, CLI summary/bundle publication and MCP evidence-file text readback, including a fresh post-review run with the stronger limitation/transaction checks. Reproducer:experiments/analysis-efficiency/browser-scenario-summary.mjsand its adjacent guide.Baseline
160d821ac; performance feature247897c72(before the small review/cleanup fixes), based onbc143125e. Linux x64, Node 24.22.1/npm 11.16.0, two CPUs. Each session includes discovery, two captures, complete-parent export and verification; summary sessions additionally perform five retained queries per capture.These are serialization estimates, not actual model usage; protocol framing, prompts and client rendering are unmeasured. RSS sums the process family every 100 ms, may count shared pages more than once and can miss short peaks. The first generic-view call also pays ~3.4 s of client schema compilation; three warmed step reads totalled 27–44 ms. No latency or memory improvement is claimed. OS file caches were not cold. Windows/macOS and other browsers were not verified.
Author readiness
Human owner: @gensokyo-dev