-
Notifications
You must be signed in to change notification settings - Fork 3
fix: patch lex CLI to properly exit on validation failures
#38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Without this patch, the `lex` CLI exits with code 0 even when validation fails, causing CI to incorrectly report success. This is a problem because validation failures should cause the CI workflow to fail, alerting developers to issues in their lexicon definitions. This patch solves the problem by monkey-patching the `lex` CLI's `util.js` file to replace the `// skip` line with `throw e;`, ensuring that validation errors are properly propagated and cause the workflow to fail. Co-authored-by: Cursor <[email protected]>
WalkthroughA CI workflow step is added to patch a runtime dependency by replacing "// skip" with "throw e;" in the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touchesImportant Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error)
✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧠 Learnings (6)📓 Common learnings📚 Learning: 2025-12-15T10:13:17.689ZApplied to files:
📚 Learning: 2025-12-09T16:09:09.119ZApplied to files:
📚 Learning: 2025-12-09T16:09:09.119ZApplied to files:
📚 Learning: 2025-12-09T16:09:09.119ZApplied to files:
📚 Learning: 2025-12-09T16:09:09.119ZApplied to files:
🔇 Additional comments (1)
Comment |
|
Submitted #39 to eliminate confusion from CodeRabbit and others. |
Without this patch, the
lexCLI exits with code 0 even when validation fails, causing CI to incorrectly report success.This is a problem because validation failures should cause the CI workflow to fail, alerting developers to issues in their lexicon definitions.
This patch solves the problem by monkey-patching the
lexCLI'sutil.jsfile to replace the// skipline withthrow e;, ensuring that validation errors are properly propagated and cause the workflow to fail.Co-authored-by: Cursor [email protected]
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.