Repository navigation
fix(browser): validate wide scenario reference lists - #10359
Merged
Merged
Conversation
2 tasks done
Contributor
[Medium impact] The reviewed changes appear safe to merge. SummaryThis PR removes call-argument limits from browser scenario reference collection and reports each missing secret ID once.
Reviews (1) · Last reviewed commit: "fix(browser): validate wide scenario ref..." · Reviewed by Greptile |
3 tasks
kaoru0822-kitauji
marked this pull request as ready for review
November 13, 2026 14:08
Codex Review Summary: ✅ CompletedThis 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. |
kaoru0822-kitauji
deleted the
codex/n13-0938-scenario-references-8545
branch
November 13, 2026 14:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #8545. This changes the scenario reference owner, independently of #10355/#10356 and the other submitted inventory fixes.
Problem and change
An admitted list of 130,000 declared references throws
RangeErrorduring scenario validation. Undeclared references returnUNKNOWNin the compiled CLI or raw stack-overflow text over stdio MCP. Initial queries, cookie destination queries, and both storage collections share this failure.Collect storage references through one iterator and normalize reference IDs once into a Set before global declaration validation. This removes the superseded array collector and all call spreads in this flow. Every source use remains in the parsed scenario; first-seen distinct IDs retain their order. Each missing ID now produces one global
secretsdiagnostic. Previously, repeated uses produced identical diagnostics exceeding MCP's existing 10 MiB response allowance even after replacing the spreads with loops.The diagnostic multiplicity change is intentional; no accepted data, advertised schema shape, input/response budget, redaction policy, provider, target execution, or mutation authority is added. Ordinary correctness fix; advance maintainer scope approval is not applicable.
Executed verification
Base
bbe2bcc979be747698d9ad9ce87af017b92e0f10, macOS arm64, Node 24.22.1 / npm 11.16.0.npm run test:focused -- tests/boundary/browser/browserScenarioReferenceCapacity.test.ts tests/acceptance/browserScenarioReferenceDiagnostics.test.ts src/domain/browserScenario.test.ts tests/boundary/mcp/browserScenarioInputDiagnosticsMcp.test.ts— 26 passed in 4 files.invalid_requestdiagnostics; MCP remains responsive after each refusal. Existing full/compact input diagnostics pass.npm run check— passed; typed lint: 7,254 files, 0 errors, 4,987 advisory warnings.npm run verify:test-discovery— 3,508 test files exactly once;git diff --checkpassed.Cost control: equivalent source-parser batches (10,000 references in each of four placements) took 22.3/21.2 ms before/after on the first batch (CPU 57.3/57.7 ms; cumulative Node peak RSS 132.5/129.8 MiB), then 8.8/10.1 ms on a repeated batch (CPU 16.6/20.4 ms; peaks 139.4/134.0 MiB). These single observations exclude imports; no speedup is inferred. Startup, agent tokens, process-family peak, and variance were not measured. The wide base task cannot complete for comparison.
Author readiness
Human owner: @kaoru0822-kitauji
The author is exempt from the declaration check under CONTRIBUTING.md. Ready status records technical readiness; no human review is attested here.
The
PR readinessstatus passes under the verified author-ID exemption.