Skip to content

Unify diagnostics error flow#10

Open
lawsonoates wants to merge 6 commits intodevfrom
unify-diagnostics-error-flow
Open

Unify diagnostics error flow#10
lawsonoates wants to merge 6 commits intodevfrom
unify-diagnostics-error-flow

Conversation

@lawsonoates
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ddf9672335

ℹ️ 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".

Comment on lines +147 to +149
if (
parsed.diagnostics.some((diagnostic) => diagnostic.severity === 'error')
) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve usageError fallback for legacy grep diagnostics

This branch only checks diagnostic.severity, but the previous IR shape for grep diagnostics (changed in this commit) did not include severity; those payloads still rely on usageError. Because execute.ts already documents that step.args can be legacy until compiler artifacts are rebuilt, this can silently skip the usage-error path and run grep with invalid arguments (e.g., unknown/missing options) instead of returning deterministic error status 2 with diagnostics. Keep a parsed.usageError fallback here to avoid mixed-version regressions.

Useful? React with 👍 / 👎.

@lawsonoates
Copy link
Copy Markdown
Owner Author

@codex review pls

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb00e6bd69

ℹ️ 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".

Comment on lines +150 to +152
if (
parsed.diagnostics.some((diagnostic) => diagnostic.severity === 'error')
) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve legacy usage-error handling in grep diagnostics

runGrepCommandInner now gates compile-time failures on diagnostic.severity === 'error', but this path drops legacy GrepArgsIR.diagnostics objects that only have {code,message,token,tokenIndex} (the compatibility case already documented in execute.ts about stale compiler outputs). In that case, invalid invocations like unknown options can bypass the early error return, proceed through normal matching, and return success/nomatch statuses without emitting stderr diagnostics. Please keep a fallback to parsed.usageError (or normalize legacy diagnostics) so pre-rebuild/legacy parse results still fail deterministically.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant