Skip to content

test: make allocation shuffle check exercise tie-breaking - #991

Closed
Gajesh2007 wants to merge 4 commits into
masterfrom
fix/allocation-determinism-oracle
Closed

Gajesh2007 wants to merge 4 commits into
masterfrom
fix/allocation-determinism-oracle

Conversation

@Gajesh2007

@Gajesh2007 Gajesh2007 commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

The allocation determinism test's 5% account cap limited four accounts to 5M total from a 25M pool. Every candidate could receive its capped grant, so input order never affected payouts and removing the production ProviderKey tiebreaker still passed.

The existing fixture disables that independent cap and requires full use of the pool. Account names sort in reverse provider-key order, and exact expected grants require a=18M, b=7M, c=d=0. The same payouts must survive an input shuffle, so the fixture distinguishes the intended provider-key tiebreaker from both input order and account order. Dedicated per-account and cross-run cap tests remain unchanged, as does production code.

flowchart LR
  subgraph Before
    B1[AllocateDraws with 25M pool and 5 percent account cap] --> B2[Four accounts consume only 5M]
    B2 --> B3[Shuffle returns identical capped payouts]
    B3 --> B4[Missing ProviderKey tiebreaker passes]
  end
  subgraph After
    A1[Same fixture with account cap disabled] --> A2[Demand exceeds the 25M pool]
    A2 --> A3[Opposing account order and exact ProviderKey grants]
    A3 --> A4[Require identical payouts after shuffle and full pool use]
    A4 --> A5[Wrong tied ranking fails]
  end
Loading

Temporary Go overlays changed the actual allocator's final tie comparison:

Fault Reproduction Final fixture
Keep input order for equal scores Original capped fixture incorrectly passes, 0.278s Rejects different shuffled payouts, 0.269s
Compare AccountID instead of ProviderKey Matching-name fixture incorrectly passes, 0.254s Rejects d=18M instead of a=18M, 0.277s

Unmodified controls pass before and after. All six existing allocator/ranking tests pass with -race in 1.299s, zero failures or skips, using GOTOOLCHAIN=go1.25.0. This includes both account-cap fixtures. No permanent mutation tests were added. gofmt, git diff --check, and make docs-check (278 pages) pass; all commits are signed.

Independent source review is clean at b4a6160fba46fd8c196ca20332c676256cfe0a07, including the exact-grant refinement. Fresh Codex review is clean at head 64ff175bc1b3b3579d5ac354b5b8642f54ed5798, with an actual thumbs-up and no unresolved threads. Evidence is in /private/tmp/allocation-determinism-oracle-20260912/; this is a CPU-only assertion change with no database or model runtime involved.

The separate Threat Model Review CI job is blocked before review by an Anthropic HTTP 401 authentication error (invalid configured API key). This is recorded as a CI credential failure; no threat-model verdict was produced.

@vercel

vercel Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
d-inference Ready Ready Preview Sep 12, 2026 11:39pm UTC
d-inference-console-ui-dev Ready Ready Preview Sep 12, 2026 11:39pm UTC
d-inference-landing Ready Ready Preview Sep 12, 2026 11:39pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 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-09-12T23:41:22.580051Z 64ff175 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.

@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: 671e324c81

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

@Gajesh2007

Copy link
Copy Markdown
Member Author

@codex review

Please review current head 64ff175bc1b3b3579d5ac354b5b8642f54ed5798. The AccountID-order finding is fixed with opposing identity order and exact expected grants. Both actual comparator mutants are rejected, and all six allocator/ranking tests pass with the race detector.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 64ff175bc1

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

@Gajesh2007

Copy link
Copy Markdown
Member Author

Consolidated into #1056 for review and merge after #1094, #1095 and #1096. #1056 contains this branch's exact head (64ff175bc1b3b3579d5ac354b5b8642f54ed5798), including its reviewed fixes, with implementations and regressions reconciled into the coordinator subsystem owners. Closing the component PR to collapse the stack; its branch, commits and review history are retained. Follow #1056 for combined validation and merge status.

@Gajesh2007 Gajesh2007 closed this Sep 16, 2026

This branch had an error being deployed

1 failed and 3 active deployments
Preview – d-inference-console-ui-dev — 64ff175b Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference — 64ff175b Deployed Sep 12, 2026 by vercel[bot]
Preview – d-inference-landing — 64ff175b Deployed Sep 12, 2026 by vercel[bot]
benchmarks — 64ff175b Deployed Sep 12, 2026 by Gajesh2007 via E2E Benchmarks #1102
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