Skip to content

feat(decisions): add neutral provider seam and answer validator (DM1) - #324

Closed
lg2m wants to merge 5 commits into
docs/eng-985-decision-architecturefrom
feat/eng-1062-dm1-neutral-seam
Closed

lg2m wants to merge 5 commits into
docs/eng-985-decision-architecturefrom
feat/eng-1062-dm1-neutral-seam

Conversation

@lg2m

@lg2m lg2m commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

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 5ce104ab4bbc vs c7082522; 13 changed file(s); scope: full workspace.

Gate Result Tests Time Command
fmt pass 1.4s cargo fmt --all -- --check
lint pass 1.8s cargo xtask lint
clippy pass 2.2s cargo clippy --color never --workspace --all-targets --all-features -- -D warnings
test pass 2479/2479 passed, 14 skipped 254.8s cargo nextest run --color never --profile default --workspace
doctest pass 1.7s cargo test --color never --workspace --doc
minimal-clippy pass 3.7s cargo clippy --color never -p qq-provider --no-default-features --features test-support --all-targets -- -D warnings
minimal-test pass 214/214 passed, 0 skipped 4.4s cargo nextest run --color never --profile default -p qq-provider --no-default-features --features test-support

All 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread crates/qq-provider/src/decision.rs Resolved
Comment thread crates/qq-decision/src/lib.rs Resolved
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T06:28:59.645813Z 9ea9627 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lg2m
lg2m added this pull request to stack #326 October 16, 2026 01:21
@lg2m
lg2m force-pushed the feat/eng-1062-dm1-neutral-seam branch from 5ce104a to ee45e4a Compare October 16, 2026 06:05
@lg2m

lg2m commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review — latest 9ea9627 restacks the accepted Boolean/winner fixes on updated docs. No open conversations currently; please review latest head. Full workspace local gate remains red on unchanged goals/perf timeout tests; not claiming a clean gate.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +60 to +63
let Some(probabilities) = &answer.probabilities else {
return Err(AnswerError::MissingDistribution {
question_id: question.id.clone(),
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@lg2m lg2m closed this Oct 19, 2026
@lg2m
lg2m deleted the feat/eng-1062-dm1-neutral-seam branch October 19, 2026 23:17
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.

1 participant