Skip to content

Fix random bound validation and harden CI - #25

Merged
rblake2320 merged 2 commits into
masterfrom
agent/harden-random-bounds-ci
Jul 30, 2026
Merged

Fix random bound validation and harden CI#25
rblake2320 merged 2 commits into
masterfrom
agent/harden-random-bounds-ci

Conversation

@rblake2320

Copy link
Copy Markdown
Owner

What changed

  • validate secureRandomInt bounds before entering rejection sampling
  • add regression coverage for zero, negative, fractional, non-finite, over-uint32, and full-domain bounds
  • cancel superseded CI runs and cap the exhaustive protocol job at 60 minutes

Why

The random integer helper used a 32-bit entropy source but accepted arbitrary JavaScript numbers. A bound above 2^32 made the rejection limit zero, causing a non-terminating loop. Invalid fractional and non-finite inputs were also not rejected explicitly.

Validation

  • npm run build
  • npm run typecheck
  • npm test
  • server contract and unit suites
  • npm run test:ha
  • npm run test:pack
  • npm audit
  • git diff --check

@rblake2320
rblake2320 marked this pull request as ready for review July 30, 2026 18:48
@rblake2320
rblake2320 merged commit bd4938a into master Jul 30, 2026
2 of 3 checks passed
@rblake2320
rblake2320 deleted the agent/harden-random-bounds-ci branch July 30, 2026 18:53
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