Repository navigation
fix(environment): retain conflicting scenario MIME uncertainty - #8016
ShuaixinHuang wants to merge 3 commits 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 runtime change is contained to browser-scenario analysis workflows. The PR is not ready to merge because the previously reported MCP test mismatch remains. Findings
Fix with agent prompt### Issue 1
tests/boundary/mcp/bundleComparisonMcp.test.ts:171-172
Relative paths fail the SDK schema check, and `normalizeSdkValidationError` turns that failure into one issue with `path: []` and `reason: "invalid_value"`. `projectAnalysisError` preserves those values. Expecting `[rejectedField]` and `"invalid_format"` therefore makes this test fail on its first relative-path case.
Match the existing error contract and check the retained message for the rejected field.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryPreserves unknown MIME types when captured
Reviews (3) · Last reviewed commit: "test(mcp): assert typed selector and std..." · Reviewed by Greptile |
| path: [rejectedField], | ||
| reason: "invalid_format", |
There was a problem hiding this comment.
Relative paths fail the SDK schema check, and normalizeSdkValidationError turns that failure into one issue with path: [] and reason: "invalid_value". projectAnalysisError preserves those values. Expecting [rejectedField] and "invalid_format" therefore makes this test fail on its first relative-path case.
Match the existing error contract and check the retained message for the rejected field.
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/boundary/mcp/bundleComparisonMcp.test.ts
Line: 171-172
Comment:
**MCP error assertion fails**
Relative paths fail the SDK schema check, and `normalizeSdkValidationError` turns that failure into one issue with `path: []` and `reason: "invalid_value"`. `projectAnalysisError` preserves those values. Expecting `[rejectedField]` and `"invalid_format"` therefore makes this test fail on its first relative-path case.
Match the existing error contract and check the retained message for the rejected field.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Re-submitted from #7994 at the human owner's request. This is the same three-file MIME uncertainty fix at unchanged head
a709e628; no new code or expanded scope. #7994 had successful required CI, title and readiness checks, but this replacement must run its own checks before those results can be reported for this PR.Problem and result
Originally 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. The local results above were executed for the existing feature. #7994 hosted CI (run 40823169389) passed for this same head; replacement-PR CI is separate and pending. Net change: 3 files,151 additions/4 deletions.
CI integration follow-up
The original 36-case MIME/source/registered CLI validation above remains evidence for the unchanged three-file feature. On this replacement PR's old head
a709e628, its own hosted CI run40842606435failed in one shared MCP test:bundleComparisonMcp.test.tsexpected an English field/message concatenation, while the newer upstream SDK reports the exact field and reason through structureddetails.issues.The actual executed merge was
07046aa59e5d839c2c04bacb34add96ee7c26986. That test and its MCP diagnostic producers match the already investigated failure family. Updating only the assertion to require the typed code, category, operation, exact rejected field path andinvalid_formatreason passes the complete 9/9 MCP file on that exact merge; all relative refusal combinations, absolute success and CLI/cwd controls remain. No production files or unrelated main changes were imported.Follow-up
0cddadbeadds only this test correction (9 additions / 5 deletions). Normal pre-commit and pre-push typecheck/lint passed 2/2 (53.584 seconds). The integration test was run against the actual CI merge with the same patch, not claimed against the older standalone SDK on the feature branch. New hosted checks for this follow-up head are still required.Remaining SDK diagnostic regressions
Run
40848792761at old head0cddadbefailed in two other tests that expected concatenated SDK error text: the compiled CLI/stdio bundle-comparison boundary and Flutter's ABI selector grammar boundary. Its actual executed merge was65d42a1c482f9887eb4a7f5a3d99d6f95db2212a; hosted results were 2 failed / 2035 passed / 11 skipped in that shard.Follow-up
bcebcd23changes only those two existing tests (29 additions / 17 deletions). The existing strict error-envelope parser now checks code, category, operation and exact issue path, plus the precise ABI reason: empty isout_of_range, slash-containing isinvalid_format, and overlong Unicode/line-terminated values areinvalid_value. All Ajv rejection/acceptance cases, stdio relative-path refusals, absolute-path success and CLI cwd controls remain.On that exact CI merge with the identical patch, both complete files pass 19/19, with the matching three build tasks successful. No MIME, Flutter or path production code changed. Normal pre-commit passed and normal pre-push typecheck/lint passed 2/2 (1m13.607s). Earlier feature and full-check evidence retains its original execution point; the new head requires its own hosted CI.
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