GLM-5.3 Flash · 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 Opus 5.5.
- Gold bugs found
- 3 of 5
- Comments published
- 3
- Comments matching a bug
- 3
- Comments not matching
- 0
- Cost of this PR
- $0.252
Published comments (3)
testIncorrectGrantType passes via incidental NPE, not grant-type validation — Catching `RuntimeException` swallows an incidental NPE: `before()` never calls `factory.postInit()`, so `sessionFactory` stays null and the unknown shortcut throws before the intended `IllegalArgumentException`. Assert on `IllegalArgumentException` and initialize the factory so the validation path actually runs.
Constructor guard re-validates grantType instead of rawTokenId — A null `rawTokenId` slips through this duplicate `grantType` check and later yields a corrupt token ID like "onrtna:null" in `DefaultTokenContextEncoderProvider.encodeTokenId` instead of failing fast. Make the second check require `rawTokenId`, matching its message.
isAccessTokenId grant check uses wrong substring and inverted polarity, so it never fails — The wrong `substring` bounds and inverted polarity turn this check into a no-op, so token IDs with a wrong or missing grant type still match the event. Use `substring(4, 6)` and return false on mismatch.