Fix the flaky LLM key browser journey (hex sentinel)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- testing-qa, typescript
- Domain
- testing
Research direction
Start at line 154 of app/e2e/settings/llm-key.e2e.ts, where the Member page is checked with not.toContain(KEY.slice(-4)), and at the KEY constant the test defines. Pick a key ending that cannot match random hex, or assert on a longer slice, then check the other key-slice assertions in that file. Done when the Member journey passes repeatedly on pages with many hex ids and still fails when the real key tail is rendered.
Written by the indexing model from the issue text.
Description
Found while working on PR #300 (review finding F6). Not related to that change.
Problem
The browser journey app/e2e/settings/llm-key.e2e.ts ("a Member sees only whether reviews have a key and is refused when they try to change it") fails at random. It asserts expect(await member.content()).not.toContain(KEY.slice(-4)) (line 154). The test key ends in ...abcdefabcd, so the sentinel is the four hex characters abcd, and any hex-like token in the page HTML (a build id, a hash, a framework payload) can contain it by chance. It failed once in CI on a pull request that did not touch app/e2e or the settings pages, and passed on re-run of the failed jobs.
Design
- Make the sentinel impossible to produce by chance: end the test key with characters outside the hex alphabet (for example
-wxyz), or assert on a longer slice, and keep every other assertion about the key unchanged. - Check the other assertions in
llm-key.e2e.tsfor the same pattern (a short slice of a key that is searched for in page content). - Do not add retries.
Test cases
| ID | kind | level | case | expected |
|---|---|---|---|---|
| T01 | regression | e2e | the Member journey run 50 times against a page that holds many hex ids | never fails on the sentinel |
| T02 | security | e2e | the page of a Member does hold the end of the real key | the test still fails (the sentinel can still detect a leak; prove it once by temporarily rendering it) |
| T03 | review | code | other key-slice assertions in llm-key.e2e.ts |
none can collide with random hex |
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- Avg merge
- 1h 18m
- Merged PRs (30d)
- 186
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ExpidetGames/code-reviewer
-
type: docs
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ExpidetGames/code-reviewer#94 ·
Maintainers usually reply within 1 day
-
area: app post-mvp type: feature
Difficulty 5/5 Over a week Newbie friendliness 12/100
ExpidetGames/code-reviewer#339 ·
Maintainers usually reply within 1 day
-
area: runner post-mvp type: feature
Difficulty 5/5 Over a week Newbie friendliness 18/100
ExpidetGames/code-reviewer#338 ·
Maintainers usually reply within 1 day
-
area: runner post-mvp type: feature
Difficulty 5/5 Over a week Newbie friendliness 12/100
ExpidetGames/code-reviewer#337 ·
Maintainers usually reply within 1 day
-
area: runner post-mvp type: chore
Difficulty 4/5 3-5 days Newbie friendliness 20/100
ExpidetGames/code-reviewer#336 ·
Maintainers usually reply within 1 day
All issues in ExpidetGames/code-reviewer
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
QuantumNous/new-api#7839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug p2 triaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getpaseo/paseo#7071 · 1 comment ·
Maintainers usually reply within 1 day
-
test: make the #3408 Claude OAuth token fixture obviously fake so secret scanners stop flagging itOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
code-yeongyu/senpi#3436 ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 78/100
lingdojo/kana-dojo#32505 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day