tsk-x2gd2w0146jm Done Maity Coder Claude 004
Hardening from the security rounds (tsk-v9kheekgq115). An upload the image decoder refuses should count against the uploader's limits, as hub/context/images.md (b293dec9) already says for avatars.
To do:
routes/attachments.py: keep the charge whendecoderefuses the image (a 400: undecodable, dimensions, timeout). Give it back only for the slot-busy 429 and for refusals before decoding (quota, closed project).- Optional, decide in the PR: a per-membership decode limiter that counts refusals, and fair sharing of the decode slots (
avatars.py) instead of try-once. - Tests: repeated refused images run into the upload limit; a slot-busy 429 still refunds.
- Re-check
hub/context/attachments.mdd079ff73 (needs-review) against the new behaviour and bring it in line with images.md. Add a changelog entry under Security.