WebP artifact file must be excluded from artifacts and not attempted to be parse as issues file

Open
#3,365 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
devtools

Research direction

Start at code_review_bot/cli.py:218 and follow the revision ingestion path through workflow.py:244, backend.py:141, and init.py:205, where file content is read for hashing. Trace how artifacts and issues files are identified; done means WebP artifacts are excluded and no UnicodeDecodeError occurs when processing them.

Written by the indexing model from the issue text.

Description

May 13 10:58:46Z 34.53.64.82 code-review/production/bot 2026-05-13 10:58:46 cli.py: [error ] Static analysis failure error=UnicodeDecodeError('utf-8', b'RIFF\xac=\x00\x00WEBPVP8X\n\x00\x00\x000\x00\x00\x00o\x00\x00s\x00\x00ICCP\xc8\x01\x00\x00\x00\x00\x01\xc8\x00\x00\x00\x00\x040\x00\x00mntrRGB XYZ \x07\xe0\x00\x01\x00\x01\x00\x00\x00\x00\x00\x00acsp\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\xf6\xd6\x00\x01\x00\x00\x00\x00\xd3-...

...\xf7\xcc\xfb\xde\x05WJ\x04\x00\x00', 4, 5, 'invalid start byte') revision=9c869ccd7de6f73021555fcd105a6415b40333db@https://hg.mozilla.org/integration/autoland Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/code_review_bot-1.11.5-py3.13.egg/code_review_bot/cli.py", line 218, in main w.ingest_revision(revision, settings.generic_group_id) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/code_review_bot-1.11.5-py3.13.egg/code_review_bot/workflow.py", line 244, in ingest_revision self.backend_api.publish_issues(issues, revision) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/code_review_bot-1.11.5-py3.13.egg/code_review_bot/backend.py", line 141, in publish_issues if issue.hash is None: ^^^^^^^^^^ File "/usr/local/lib/python3.13/functools.py", line 1026, in get val = self.func(instance) File "/usr/local/lib/python3.13/site-packages/code_review_bot-1.11.5-py3.13.egg/code_review_bot/init.py", line 205, in hash file_content = f.read() File "", line 325, in decode UnicodeDecodeError: 'utf-8' codec can't decode byte 0xac in position 4: invalid start byte

is a WebP file and CRB must not try to parse it as issues file.

Dominant language
Python
Stars
67
Forks
52
Avg merge
3d 23h
Merged PRs (30d)
54

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/code-review

All issues in mozilla/code-review

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.