Skip to content

test(analyze-runs): deterministic correlation tests (kill Math.random flake)#122

Merged
tangletools merged 1 commit into
mainfrom
fix/0.50.1-deterministic-test
May 27, 2026
Merged

test(analyze-runs): deterministic correlation tests (kill Math.random flake)#122
tangletools merged 1 commit into
mainfrom
fix/0.50.1-deterministic-test

Conversation

@tangletools
Copy link
Copy Markdown
Contributor

Two correlation tests in tests/contract-analyze-runs.test.ts used Math.random() to seed engagement values. The first ("linear reward model") could occasionally fail when random noise pushed Pearson below 0.9; the second ("weak correlation") could occasionally pass when random sampling correlated >0.3 with composite by chance. Both now use deterministic noise / alternating pattern instead.

Tests: 11 / 11 passing locally, 1427 / 1427 overall.

Copy link
Copy Markdown
Contributor

@drewstone drewstone left a comment

Choose a reason for hiding this comment

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

✅ Auto-approved tangletools PR — 988bde92

This PR was opened by the trusted tangletools automation account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

tangletools · auto-approval · reason: tangletools_author · 2026-05-27T19:32:54Z

@tangletools tangletools merged commit 4500661 into main May 27, 2026
1 check passed
@tangletools tangletools deleted the fix/0.50.1-deterministic-test branch May 27, 2026 19:35
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.

2 participants