Skip to content

fix(integrations): preserve non-UTF-8 VS Code settings - #3833

Merged
mnriem merged 1 commit into
github:mainfrom
marcelsafin:fix/copilot-settings-encoding
Jul 29, 2026
Merged

fix(integrations): preserve non-UTF-8 VS Code settings#3833
mnriem merged 1 commit into
github:mainfrom
marcelsafin:fix/copilot-settings-encoding

Conversation

@marcelsafin

Copy link
Copy Markdown
Contributor

Fixes #3831

A non-UTF-8 .vscode/settings.json escapes the existing parse-failure fallback and aborts setup. This handles decode errors through the same preservation path used for malformed JSON, leaving the file unchanged and showing the manual settings guidance.

The regression test covers setup with non-UTF-8 settings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 29, 2026 00:59
@marcelsafin
marcelsafin requested a review from mnriem as a code owner July 29, 2026 00:59
@marcelsafin

Copy link
Copy Markdown
Contributor Author

@copilot review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Copilot setup crashes caused by non-UTF-8 VS Code settings while preserving user files.

Changes:

  • Handles UnicodeDecodeError through the existing preservation fallback.
  • Adds regression coverage for non-UTF-8 settings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/specify_cli/integrations/copilot/__init__.py Catches UTF-8 decoding failures during settings merge.
tests/integrations/test_integration_copilot.py Verifies preservation and warning behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review details

  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Medium

@mnriem
mnriem merged commit b7b0e96 into github:main Jul 29, 2026
14 checks passed
@mnriem

mnriem commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Copilot setup crashes on a non-UTF-8 VS Code settings file

3 participants