Repository navigation
fix(test,api-keys): Unit Tests job runs jest; near-unique API key prefixes (D-0100, D-0527) - #133
Merged
Merged
Conversation
… key prefixes (D-0100, D-0527) test.yml ran 'pnpm test -- --coverage --ci --passWithNoTests'. pnpm forwards the literal '--', so jest read the flags as path patterns, matched nothing and exited 0. Run 'pnpm run test:ci' instead. jest now skips the ticket worktree folder so a main-checkout run does not also run every worktree's suite copy. API keys used nself_ + 2 letters as the lookup prefix and validated only the first record with it, so a colliding key never validated. New keys get 10 random base32 chars; validation checks every record with the prefix by hash, so legacy 2-letter keys keep working.
Lighthouse Audit Results
Score Guide
View full Lighthouse report |
Lighthouse Audit Results
Score Guide
View full Lighthouse report |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
D-0100
The Test workflow's Unit Tests job ran
pnpm test -- --coverage --ci --passWithNoTests. pnpm forwards the literal--, so jest gotjest -- --coverage ..., read the flags as path patterns, matched nothing and printedNo tests found, exiting with code 0(main run 38156402775). It now runspnpm run test:ci, the same command ci.yml and coverage.yml use (58 suites, 989 tests on main).jest also ignores
<rootDir>/.claude/: a run in the main checkout picked up every ticket worktree's copy of the suite (171 files instead of 56).Not changed here (outside this change's file scope, filed as debt): release.yml has the same
pnpm test -- ...line, and jest.config keepspassWithNoTests: trueuntil release.yml is fixed, since flipping it alone would fail every release run.D-0527
API keys used
nself_+ 2 random letters (676 values) as the lookup prefix andvalidateApiKeychecked only the first record with that prefix, so a second key sharing it never validated (and the rotation test flaked about 1 in 676).nself_+ 10 random base32 chars (a-z2-7, 50 bits, unbiased).validateApiKeychecks every record with the prefix by bcrypt hash.review: claude-only, cross-family pending