Skip to content

fix(browser): validate wide scenario reference lists - #10359

Merged
kaoru0822-kitauji merged 1 commit into
mainfrom
codex/n13-0938-scenario-references-8545
Nov 13, 2026
Merged

kaoru0822-kitauji merged 1 commit into
mainfrom
codex/n13-0938-scenario-references-8545

Conversation

@kaoru0822-kitauji

@kaoru0822-kitauji kaoru0822-kitauji commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

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 RangeError during scenario validation. Undeclared references return UNKNOWN in 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 secrets diagnostic. 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.

  • Final new regressions on clean base: 13 failed at the original stack failures or duplicate global diagnostics.
  • 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.
  • Four main-thread producer cases preserve all 130,000 declared source entries. Another case retains distinct missing IDs once across query/storage uses. Eight compiled CLI/real stdio cases now return actionable invalid_request diagnostics; MCP remains responsive after each refusal. Existing full/compact input diagnostics pass.
  • CLI controls use a real JSON-file argument, avoiding host argv limits. Wide MCP controls explicitly select the documented 1,000,000-element allowance; the default remains 1,024. The response allowance remains 10 MiB.
  • 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 --check passed.
  • Tests exercise validation with a nonexistent browser selection. No real browser capture, secret value, Linux/Windows, or external-provider workflow was verified locally. Latest-head Actions checks completed: 25 successful checks, 22 skipped, none failed or pending. Automated review has no actionable findings; human review remains outstanding.

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

  • 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.

The author is exempt from the declaration check under CONTRIBUTING.md. Ready status records technical readiness; no human review is attested here.

The PR readiness status passes under the verified author-ID exemption.

@greptile-apps

greptile-apps Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The reviewed changes appear safe to merge.

Summary

This PR removes call-argument limits from browser scenario reference collection and reports each missing secret ID once.

  • Browser scenarios now validate wide reference lists and report missing IDs once.

Reviews (1) · Last reviewed commit: "fix(browser): validate wide scenario ref..." · Reviewed by Greptile

@kaoru0822-kitauji
kaoru0822-kitauji marked this pull request as ready for review November 13, 2026 14:08
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-13T14:10:21.541801Z 6eb9426 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.

@kaoru0822-kitauji
kaoru0822-kitauji merged commit e841fb1 into main Nov 13, 2026
53 checks passed
@kaoru0822-kitauji
kaoru0822-kitauji deleted the codex/n13-0938-scenario-references-8545 branch November 13, 2026 14:17
@morluto morluto added bug Something isn't working area: runtime Process capture and runtime observation labels Nov 22, 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.

2 participants