fix(workflows): refetch non-UTF-8 catalog caches - #3901
Conversation
Assisted-by: GitHub Copilot (model: GPT-5.6 Sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Ready to approve
The focused exception handling and parameterized regression test correctly cover the reported failure.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Pull request overview
Handles non-UTF-8 workflow and step catalog caches as invalid entries rather than leaking decoding errors.
Changes:
- Catch
UnicodeDecodeErrorduring fresh-cache reads. - Verify both catalog types refetch and replace invalid caches.
File summaries
| File | Description |
|---|---|
src/specify_cli/workflows/catalog.py |
Falls back to fetching when cached JSON is non-UTF-8. |
tests/test_workflows.py |
Tests refetching and cache replacement for both catalog types. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
There was a problem hiding this comment.
🟢 Ready to approve
The focused fix correctly covers both catalog implementations with matching regression tests.
This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Balanced
We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.
|
Thank you! |
Summary
UnicodeDecodeErrorTesting
uvx ruff@0.15.0 check src tests.venv/bin/pytest tests/test_workflows.py -q(874 passed).venv/bin/pytest -q(6107 passed, 176 skipped)AI disclosure
GitHub Copilot helped identify the missing cache decode boundary and review the implementation. I reproduced the failures and validated the final change with targeted and full test suites.