Skip to content

Add parser regression tests for candidate selection - #35

Merged
Vedantgitbot merged 3 commits into
Vedantgitbot:mainfrom
rk042:test/parser-regressions
Nov 14, 2026
Merged

Vedantgitbot merged 3 commits into
Vedantgitbot:mainfrom
rk042:test/parser-regressions

Conversation

@rk042

@rk042 rk042 commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

What does this change?

Adds regression tests for JSON candidate ordering, top-level and nested objects, fallback behavior, retries, and sync/async consistency.

Related to #33.

Why?

The tests capture the behavior discussed for the planned v0.5.9 parser changes. In particular, nested objects should not be selected as answers, and an invalid outer answer should produce a parse failure rather than falling back to a nested object.

Checklist

  • I ran the full test suite locally (pytest -v) and it passes.
  • I added new tests that fail without the planned parser changes.
  • This does not modify any existing test’s behavior or assertions.
  • If this changes public behavior, I added a CHANGELOG.md entry following the existing format.
  • If this is a bug fix, I can point to how I reproduced the original bug.

This is a tests-only PR. The maintainer is preparing the parser implementation and changelog entry separately.

Anything else worth knowing?

Against the current BOOTH 0.5.8 code, the new test file reports 13 passed and 8 failed. The failures are expected until the parser changes are available. I’ll rerun the tests and full suite after integrating the implementation.

@Vedantgitbot

Vedantgitbot commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Thanks @rk042, looks good to me. CI is red because the 8 new tests need the parser change that isn't on main yet. I'll push that first, then update this branch so CI re-runs, then merge. No changes needed from you.

@Vedantgitbot

Copy link
Copy Markdown
Owner

Thanks, @rk042! I've updated my branch on my end. It should be good to pull in the latest upstream changes and push the updates again.

@rk042

rk042 commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Thanks! I merged the latest upstream changes into my branch. The parser regression tests now pass: 21 passed. The full suite reports 436 passed and 6 skipped, and mypy is clean.

@rk042
rk042 marked this pull request as ready for review November 14, 2026 05:11
@Vedantgitbot

Copy link
Copy Markdown
Owner

@rk042 LGTM! I'll merge this PR. I'll make a few minor tweaks to the documentation and possibly some code adjustments, then aim to release v0.5.9 on PyPI tomorrow.

@Vedantgitbot
Vedantgitbot merged commit 8eac47d into Vedantgitbot:main Nov 14, 2026
8 checks passed
@rk042
rk042 deleted the test/parser-regressions branch November 14, 2026 05:20
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.

2 participants