Skip to content

feat: add error recovery to action parser#16

Closed
google-labs-jules[bot] wants to merge 1 commit intodevfrom
jules/action-parser-error-recovery-6759689772035151301
Closed

feat: add error recovery to action parser#16
google-labs-jules[bot] wants to merge 1 commit intodevfrom
jules/action-parser-error-recovery-6759689772035151301

Conversation

@google-labs-jules
Copy link

This PR implements error recovery in the action parser using Chevrotain. When an invalid action is encountered in a semicolon-separated list of actions, the parser will now skip the invalid tokens until the next semicolon and continue parsing subsequent actions. This prevents the entire parse from failing due to a single syntax error. The errors are logged to the console, and the valid actions are returned. The debug method has also been updated to correctly report strings containing recovered errors as invalid.


PR created automatically by Jules for task 6759689772035151301 started by @7185

- Update `action.parser.ts` to include `consumeError` rule.
- `consumeError` skips tokens until a semicolon is found, allowing the parser to continue after an error.
- Update `actions` rule to optionally match `consumeError` if a valid action is not found.
- Update `Action.parse` to log errors but return the partially valid CST result.
- Update `debug` method to detect if `consumeError` was triggered.
- Update visitor to handle potential missing nodes gracefully.
- Revert unintended changes to duplicate action handling (keep first).
@google-labs-jules
Copy link
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@7185 7185 closed this Jan 23, 2026
@7185 7185 deleted the jules/action-parser-error-recovery-6759689772035151301 branch January 23, 2026 22:40
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