Skip to content
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

[Bug] Ensure grammar.match raises appropriately on incomplete input #1016

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

hudson-ai
Copy link
Collaborator

Force-feed ByteParser an EOS token if it's not done by the time all input has been consumed. This lets us raise an exception when a string fails to complete a grammar

@hudson-ai hudson-ai changed the title Ensure grammar.match raises appropriately on incomplete input [Bug] Ensure grammar.match raises appropriately on incomplete input Sep 10, 2024
@hudson-ai
Copy link
Collaborator Author

@riedgar-ms would you mind taking a quick glance at the introduced test (which fails on main)?

@codecov-commenter
Copy link

codecov-commenter commented Sep 10, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.30%. Comparing base (c0a0bfb) to head (e89fc08).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1016      +/-   ##
==========================================
- Coverage   70.14%   61.30%   -8.84%     
==========================================
  Files          62       62              
  Lines        4441     4443       +2     
==========================================
- Hits         3115     2724     -391     
- Misses       1326     1719     +393     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@riedgar-ms riedgar-ms left a comment

Choose a reason for hiding this comment

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

Looks OK to me... and the first round of tests at least are passing?

@hudson-ai
Copy link
Collaborator Author

Looks OK to me... and the first round of tests at least are passing?

Yeah, this passes all tests for me locally -- just an edge case we hadn't covered before. Thanks for the feedback

@hudson-ai hudson-ai merged commit 418fc03 into guidance-ai:main Sep 10, 2024
100 checks passed
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.

3 participants