Repository navigation
fix(environment): retain conflicting scenario MIME uncertainty - #7994
ShuaixinHuang wants to merge 1 commit into
Conversation
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. |
|
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 change reaches browser-scenario MIME use in environment workflows. The production change appears safe to merge; matching the test fixtures to header-only capture settings would strengthen coverage. Findings
Fix with agent prompt### Issue 1
tests/boundary/cli/scenarioManifestCoverage.test.ts:136-146
This case leaves `scenarioCaptureFixture` at its defaults: `header_values: false` and `response_body: true`. The real browser does not retain headers with those settings, and this capture passes admission through the body flag rather than the header-only path.
Pass an explicit selection with `header_values: true` and both body flags false. Use the same selection for the new header-only domain cases. That would cover the advertised capture mode instead of relying on inconsistent fixture settings.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryThis PR stops header order from choosing a MIME type when retained
Reviews (1) · Last reviewed commit: "fix(environment): retain conflicting sce..." · Reviewed by Greptile |
| const capture = scenarioCaptureFixture([ | ||
| { | ||
| method: "GET", | ||
| url: "/download", | ||
| status: 200, | ||
| responseHeaders: values.map((value) => ({ | ||
| name: "Content-Type", | ||
| value, | ||
| })), | ||
| }, | ||
| ]); |
There was a problem hiding this comment.
Header-only test enables body capture
This case leaves scenarioCaptureFixture at its defaults: header_values: false and response_body: true. The real browser does not retain headers with those settings, and this capture passes admission through the body flag rather than the header-only path.
Pass an explicit selection with header_values: true and both body flags false. Use the same selection for the new header-only domain cases. That would cover the advertised capture mode instead of relying on inconsistent fixture settings.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/boundary/cli/scenarioManifestCoverage.test.ts
Line: 136-146
Comment:
**Header-only test enables body capture**
This case leaves `scenarioCaptureFixture` at its defaults: `header_values: false` and `response_body: true`. The real browser does not retain headers with those settings, and this capture passes admission through the body flag rather than the header-only path.
Pass an explicit selection with `header_values: true` and both body flags false. Use the same selection for the new header-only domain cases. That would cover the advertised capture mode instead of relying on inconsistent fixture settings.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Superseded by #8016 at the author's request. Same unchanged feature head
a709e628and three-file scope; prior verification and discussion are retained below.Problem and result
Replaces #7357 at the author's request, refreshed on pinned main
9593bc53. Only the original three feature files remain; historical shared CI repairs and unrelated imports are excluded.When a browser scenario records conflicting response Content-Type declarations, preserve MIME uncertainty rather than selecting the first header. Every matching value must remain retained and exactly agree; an excluded value or conflict keeps the type unknown. Identical repeats and independently captured body metadata retain their existing behavior. Original headers and capture evidence remain unchanged.
This is the same existing environment-manifest/replay projection fix. No new MIME parser, dependency, provider, operation, public schema or browser execution authority is added.
Verification
Windows x64, pinned Node24.22.1/npm11.16.0, fresh locked dependencies:
npm run check:fast: 2/2 passed,32.671seconds; normal pre-commit and pre-push type/lint2/2passed(cached236ms).npm run check: 5/6 tasks, failing only on unchanged upstreamHexRecordRegionMetadataunused type, also tracked by fix: remove unused hex record metadata type #7718. It is not a complete green check; no unrelated fix was imported. The same earlier pinned clean baseline failure was independently reproduced during this resubmission series.The CLI coverage calls the production registered handler in-process, not a separate compiled CLI/MCP session. No live browser or Linux/macOS local run is claimed. Previous #7357 hosted checks are historical; this head needs its own CI. Net change: 3 files,151 additions/4 deletions.
Author readiness
Human owner: @ShuaixinHuang
The human owner explicitly confirmed that review of this published PR was complete in this chat on 2026-10-27. The prior ownership and responsibility confirmation remains in force. This records initial readiness for the published change; subsequent validation remains documented above.
The existing initial human declaration is retained for this same feature and upstream refresh.
Before merge