Repository navigation
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5ce104ab4b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
5ce104a to
ee45e4a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ea96274ed
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let Some(probabilities) = &answer.probabilities else { | ||
| return Err(AnswerError::MissingDistribution { | ||
| question_id: question.id.clone(), | ||
| }); |
There was a problem hiding this comment.
Accept scalar Boolean distributions
When DM2 maps a System One noul response, the documented wire supplies one yes/no probability (docs/design/decision-models.md:53), which this API can preserve in AnswerValue::Boolean::probability_true without populating DecisionAnswer::probabilities. This unconditional return therefore rejects a complete Boolean probability response before the Boolean branch runs, forcing the adapter either to synthesize a vector the vendor did not return or to treat every noul answer as unsupported. Use probability_true and its complement as the binary distribution when the generic vector is absent.
Useful? React with 👍 / 👎.
Refs ENG-1062. Stacked on #249; merge docs first. Owner explicitly authorized DM1 on 2026-10-16.
Result
Adds provider-neutral text/JSON state, Boolean/Choice/Score questions, raw responses, capability limits, requested/reported model and request provenance, nullable usage, and typed not-dispatched versus uncertain-send errors. Concrete DecisionProvider binds admission to its own DecisionTransport before dispatch. qq-decision validates complete question sets, answer kinds, finite values, normalized clipped rounding feasibility, choice winners and jointly feasible scalar scores without rewriting raw observations. No validator returns authorization.
Useful PR319 concepts are represented neutrally: actual identity provenance and unknown usage. Its weaker duplicate conformance parser was not copied; tests exercise production validation.
Scope / compatibility
No runtime wiring, live transport adapter, activation, threshold change, egress, paid inference, wire/schema bump or dependency version bump. Existing Jev behavior unchanged. No hot path changed. Media/pricing and transport response/cancellation enforcement remain later adapter work. New crate depends only on qq-provider and thiserror; no config/auth or AWS closure in its standalone dependency tree.
Verification
Acceptance tests first failed on absent API, then passed. Eight focused behavioral tests pass. Independent source review found and fixed unbound admission and joint rounding defects with regressions. Earlier workspace gate had one unchanged side-question timeout (isolated pass); source fixture uses a 200ms deadline before tool-entry under load. Final full workspace gate uses NEXTEST_TEST_THREADS=8, without assertion/config changes. A 2-thread attempt exceeded the 600s command budget. No runtime smoke claimed because seam is not installed.
cargo xtask check
Head
5ce104ab4bbcvsc7082522; 13 changed file(s); scope: full workspace.cargo fmt --all -- --checkcargo xtask lintcargo clippy --color never --workspace --all-targets --all-features -- -D warningscargo nextest run --color never --profile default --workspacecargo test --color never --workspace --doccargo clippy --color never -p qq-provider --no-default-features --features test-support --all-targets -- -D warningscargo nextest run --color never --profile default -p qq-provider --no-default-features --features test-supportAll gates passed in 270.0s.
Follow-up
DM2 owns fixture-backed System One transport; DM3 moves consumers without behavior changes. Qualification/calibration and authority remain separately gated. This PR is foundation only, not model-quality evidence.