You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Flaky test: core profile test fails when random ciphertext hex contains 2345 #146
packages/core/test/profile.test.ts, "a sealed value opens only with its key and for its own kind", seals the made-up ID number 1-2345-6789 under a random key and then asserts expect(sealed).not.toContain("2345").
The sealed value is hex from a random key and nonce, so now and then the ciphertext itself contains the four characters 2345 and the test fails. It is rare per run, but with many CI runs it shows up. It was seen once during a local pnpm test while reviewing #133, and a rerun passed.
Why it matters
A flaky test trains people to rerun until green, which hides real failures.
Possible fix
Check the right thing: decode the sealed payload and assert the plaintext bytes (or their hex) are absent, or use a fixed test key and nonce so the ciphertext is the same every run. Checking only for the whole value 1-2345-6789 would not work, because hex can never contain a dash, so that check could never fail.
Done when
The assertion can't fail by chance, and the test still fails if sealProfileValue ever stores the value in the clear.
Activity
fix(core): stop the profile test failing on a chance hex match (DojoC…
fix(core): stop the profile test failing on a chance hex match (DojoC…