GitNexus/gitnexus/test
Abhigyan Patwari 39e0ced68d
test(server): make the opaque repo id assertion deterministic (#3625)
`publicRepoId` is an HMAC under a key drawn once per process
(`randomBytes(32)`), so the 22-character base64url id is effectively
random on every run. The test asserted `not.toContain('ws')` to show the
id does not leak the path, but any id contains "ws" by chance with
probability 21/4096 (~0.5%). CI hit it on #3624 with
`gt5f4oNtpcwsi6vep8lzQN`.

Across 20,000 fresh keys the old assertion failed 118 times and the new
one 0 times. The test now checks the base64url shape and that the full
path is absent; '/' is outside the alphabet, so a chance match cannot
happen.

Co-authored-by: Gergo Magyar <gergomagyar0@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 13:43:33 +01:00
..
fixtures fix(routes): resolve Express receivers and router mount paths (#3603) 2026-10-16 18:25:40 +01:00
helpers fix(taint): report inline and factory handler flows (#3612) 2026-10-17 20:22:58 +00:00
integration test(lbug): guard max DB size accounting across repeated checkpoints (#3529) (#3624) 2026-10-18 12:09:16 +01:00
unit test(server): make the opaque repo id assertion deterministic (#3625) 2026-10-18 13:43:33 +01:00
utils feat(storage): add configurable index storage and content retention tiers (#3060) 2026-09-12 20:31:55 +00:00