Repository navigation
fix(cli): retain browser and Inspector input correction details - #2230
Conversation
Reuse the shared safe issue projection for all six CLI validation boundaries and cover malformed inputs, credential safety, and parser diagnostics. Fixes morluto#2180 Developed with assistance from OpenAI Codex.
|
Keeping this earlier PR and your commit as the canonical #2180 contribution. Maintainer edits are disabled on your branch, so I opened 369Apps#1 against this exact branch with the adjacent browser diagnostics from #2247 and expanded tests. It changes only two files, retains your commit as parent and credits @chqcjq as a coauthor. The exact contribution head passed 16 public CLI tests and the full source checks. Standards and issue-spec review found no remaining actionable findings. #2247 will stay open while this contribution is pending, so its useful work remains tracked until it is integrated here. |
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. |
|
Squash-merged as 916ac97 after CI passed. The additional browser-command diagnostics from #2247 are now offered in #2294 against main, with @chqcjq credited as coauthor. This preserves the original contribution and gives the adjacent fixes their own follow-up. The fork-target contribution PR is superseded. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05ba40e3cb
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…2294) * fix(cli): retain correction details across browser commands Fold the complementary implementation from #2247 into the earlier #2230 proposal, retaining the original contribution history. Co-authored-by: LouisChen <3361008+chqcjq@users.noreply.github.com> * fix(browser): retain diagnostics from the selected input branch * fix(cli): recognize incomplete browser scenarios by their owned fields --------- Co-authored-by: LouisChen <3361008+chqcjq@users.noreply.github.com>
Summary
Fixes #2180.
Preserve safe correction details when supplied arguments fail the named input contracts for
list-browser-targets,inspect-web-page,analyze-web-bundle,observe-web-session,list-javascript-runtime-targets, andobserve-javascript-runtime.Problem and expected behavior
For example,
rea list-browser-targets 'not a url' --jsoncorrectly exits 1 withinvalid_request, but its remediation asks callers to correct listed arguments without returning any issues. The handler discards issues already produced by its input contract.The same rejection should identify the field and authored correction or bound without echoing rejected values. This patch adds
details.operationanddetails.issuesthrough the existing shared projection. Classification, retryability, message, and exit status remain unchanged.Change and scope
analysisInputErrorFromIssues.Contract and boundary impact
Evidence and regression coverage
Executed locally on Linux x64 using pinned Node.js 24.18.0 and npm 11.16.0, against fork base
bfa805decf83744bd3ecb0d1402667cf3ed5c3b2.{"operation":"list_browser_targets","issues":[{"path":["cdp_endpoint"],"reason":"invalid_value","message":"Invalid CDP endpoint URL"}]}{"path":["target_id"],"reason":"out_of_range","minimum":1}.Validation performed
npm run check: passed, including typecheck, formatting, metadata/dependency checks, lint, module boundaries, and architecture guards. Repository-wide lint reported 911 warnings and 0 errors; no warnings named the changed files.npm run verify:test-discovery: all 933 test files discovered exactly once; this is discovery validation, not full-suite execution.oxlinton the three changed files andgit diff --check: passed.Dependencies were installed with lifecycle scripts disabled. Turbo telemetry was disabled during local checks.
docs:check, package checks, and real-provider lanes were not run; this patch changes no schema, package, or generated-metadata source.Compatibility, safety, and release
Review checklist
AI assistance
The implementation, regression tests, and PR description were developed with OpenAI Codex assistance. The local validation listed above was executed, and a separate AI-assisted source review found no actionable findings. Maintainer review is pending.