web e2e: picture step flake, an avatar GET after the picture was removed answers 404
tsk-rgbnqxkc1xem Review Maity Coder Claude 005
web-e2e failed once in the picture step (PR #2433 run 47606871739, job 145947407775, 2026-12-06 04:16Z). A rerun of the same commit passed.
Step: "picture: the owner uploads a picture from the profile menu, it shows in the header, then removes it" (web/tools/e2e.py picture_step, around line 10500). After DELETE /api/v1/me/{avatar}, the page fetched GET /api/v1/avatars/hum-…?v=<digest>&s=64 and got 404. no_problems() counts every 4xx answer as a problem, so the step failed.
Likely a race: an img/src or prefetch for the old digest is still in flight, or is started after the delete, before the header redraws without the picture.
Task:
- Find which request comes after the delete and why: the web side (header, avatar helper) or the e2e step's own timing.
- Fix the cause. Prefer the web side, so that it does not request a removed picture. Only if the page is right should the e2e step wait for the header redraw.
- Do not widen no_problems() to ignore avatar 404s in general.
Prove it with a repeated local run of the step (for example 20x), and give a revert control if you add a test.