Skip to content

Add expected-value uncertainty modeling#30

Merged
div0rce merged 4 commits into
mainfrom
codex/pr12-uncertainty-modeling
Apr 29, 2026
Merged

Add expected-value uncertainty modeling#30
div0rce merged 4 commits into
mainfrom
codex/pr12-uncertainty-modeling

Conversation

@div0rce
Copy link
Copy Markdown
Owner

@div0rce div0rce commented Apr 29, 2026

Summary

  • Add numeric-only uncertainty distributions, deterministic seeded sampling, realization, and validation policy.
  • Add expected-value horizon rollout as a separate overlay on deterministic rollout.
  • Add utility aggregation, variance risk adjustment, expected-value explanations, docs, tests, and engine behavior v8 replay/index updates.

Testing

  • PATH=/Users/nasr/.nvm/versions/node/v24.15.0/bin:$PATH CHERRY_TMP_ROOT=/Users/nasr/.cherry-tmp/codex-pr12 npm run check -> passed
  • PATH=/Users/nasr/.nvm/versions/node/v24.15.0/bin:$PATH CHERRY_TMP_ROOT=/Users/nasr/.cherry-tmp/codex-pr12 npm test -> passed
  • PATH=/Users/nasr/.nvm/versions/node/v24.15.0/bin:$PATH CHERRY_TMP_ROOT=/Users/nasr/.cherry-tmp/codex-pr12 CHERRY_VINE_SIGNATURE_MODE=enforce npm run build -> passed

Risk

  • Changed domains: engine uncertainty primitives, horizon EV wrapper, objective utility aggregation/risk helper, expected-value explanations, engine behavior version/replay index, simulation docs.
  • Possible regressions: exported engine surface expands; deterministic rollout should remain unchanged, with point-distribution EV tests and replay coverage guarding deterministic parity.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cherry Ready Ready Preview, Comment Apr 29, 2026 6:26pm

@div0rce div0rce changed the title [codex] Add expected-value uncertainty modeling Add expected-value uncertainty modeling Apr 29, 2026
@div0rce
Copy link
Copy Markdown
Owner Author

div0rce commented Apr 29, 2026

@codex review

Copy link
Copy Markdown

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

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: d3af694777

ℹ️ 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 lib/engine/uncertainty/policy.ts Outdated
Comment on lines +114 to +115
if ('label' in current) {
throw new Error(`Invalid uncertain number at ${pathString(segments)}`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Permit ordinary label fields in uncertainty traversal

collectUncertaintyAssumptions throws whenever it sees any object with a label key unless the object is an UncertainNumber, which makes expected-value rollout fail on normal engine state shapes that legitimately contain labels (for example NormalizedCard.label and EngineObjectiveProfile.label in lib/engine/types.ts). In practice, calling runExpectedValueHorizonRollout with a realistic EngineState will error with Invalid uncertain number ... before any sampling, so EV rollout is unusable for the primary state model.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

this is why you're the goat 😭

@div0rce div0rce marked this pull request as ready for review April 29, 2026 18:35
@div0rce
Copy link
Copy Markdown
Owner Author

div0rce commented Apr 29, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ 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".

@div0rce div0rce merged commit 19ec86d into main Apr 29, 2026
7 checks passed
@div0rce div0rce deleted the codex/pr12-uncertainty-modeling branch April 29, 2026 19:11
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