MiniMax M3 · Heavy
implement-access-token-context-encoding-framework-keycloak
Keycloak · Java · L · 300–799 lines · 6 files
The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Haiku 5.5.
- Gold bugs found
- 0 of 0
- Comments published
- 5
- Comments matching a bug
- 0
- Comments not matching
- 5
- Cost of this PR
- $0.506
Published comments (5)
isAccessTokenId reads wrong substring for grant shortcut — The matcher in `isAccessTokenId` extracts `substring(3, 5)` but the encoder's 2+2+2 layout puts the grant at indices 4-5, so the predicate compares the wrong field. Use `substring(4, 6)` to read the actual grant shortcut.
isAccessTokenId substring offset and predicate are inverted — `isAccessTokenId`'s comment, offset, and predicate disagree with the encoder's 2+2+2 layout where the grant occupies the last two chars. Realign the comment to `5th char`, slice `substring(4, 6)`, and invert the equality check.
isAccessTokenId must slice substring(4, 6) for grant-type field — `isAccessTokenId` reads `substring(3, 5)` while the encoder emits a 2-char session, 2-char token, and 2-char grant, placing the grant shortcut at indices 4-5. Switch to `substring(4, 6)` so the matcher inspects the real grant field.
isAccessTokenId returns false when grant shortcut matches, breaking token-id assertions — A token whose grant shortcut equals the expected value currently fails to match because `isAccessTokenId` returns false on equality, breaking `expectRefresh`, `expectDeviceCodeToToken`, and `expectAuthReqIdToToken`. Return `isUUID().matches(items[1])` when grants match and false otherwise.
Constructor null check on rawTokenId mistakenly re-checks grantType — The second `requireNonNull` re-checks `grantType` instead of `rawTokenId`, letting a null reach `encodeTokenId` where `':' + getRawTokenId()` becomes `"null"`. Pass `rawTokenId` to the check instead.
Gold bugs found (0)
None.
Gold bugs missed (0)
None.