Repository navigation
fix(provider): support optional System One boolean criteria - #11062
Merged
Soulter merged 1 commit intoNov 18, 2026
Merged
Conversation
Allow callers to provide noul criteria and include both outcome keys in the connection test for System One-compatible endpoints that require them. Verified with all 37 tests in tests/test_decision_provider.py. Fixes AstrBotDevs#10920
Contributor
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Linked issues
#10920 [Bug] 决策模型协议 SystemOne 的 noul 类型请求未兼容标准格式 · 1 of 2 met
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Include the required true/false criteria in noul requests. | 🟡 Partly met | Callers can supply criteria, but requests without them still omit the field; for example, DecisionService.yes_no constructs a boolean question without criteria. |
| 2 | Make the provider connection test work with endpoints that require criteria. | ✅ Met | The connection test now sends both true and false criteria. |
Sourcery assessment
Approved.
Soulter
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10920.
The System One–compatible endpoint reported in #10920 requires both
trueandfalseinnoul.criteria. AstrBot's connection test omitscriteria, so the endpoint returns HTTP 400.Modifications
criteriatoDecisionBooleanQuestion. The System One adapter validates the supplied keys and descriptions before adding them to the request.The optional argument follows the maintainer's feedback on #10930.
Screenshots or test results
The connection-test regression reproduced HTTP 400 on the base revision using
httpx.MockTransport. It passes with the patch. Ruff lint, the repository-wide format check, andgit diff --checkalso passed.Summary by Sourcery
Support optional boolean criteria in System One decision requests and include both outcomes in provider connection tests.
New Features:
Bug Fixes:
Tests: