fix(flaky): enforce manual seed to reduce flakiness (#43794)
This change aims to reduce flakiness in CI tests. We identified two causes of nondeterministic behavior:
- Some tests were not using a fixed RNG seed, which reduced determinism.
- The cli tests were occasionally triggering I/O errors due to writes on a closed stdout.
This branch was run multiple times and appears to reduce flakiness in all previously unseeded tests. While there’s no deterministic way to prove the improvement, using fixed seeds is still a best practice.