Skip to content

Add description for vacuum segments_changed repair issue#167463

Closed
JamieMagee wants to merge 1 commit into
home-assistant:devfrom
JamieMagee:fix-vacuum-segments-changed-description
Closed

Add description for vacuum segments_changed repair issue#167463
JamieMagee wants to merge 1 commit into
home-assistant:devfrom
JamieMagee:fix-vacuum-segments-changed-description

Conversation

@JamieMagee
Copy link
Copy Markdown
Contributor

Proposed change

The segments_changed repair issue has an empty description field in strings.json. The issue is created with is_fixable=False, and the test framework requires non-fixable issues to have a description translation. Empty strings get stripped during translation compilation, so the key is missing at runtime and the translation validation fails.

Added a description explaining what changed and what the user should check.

Type of change

  • Bugfix (non-breaking change which fixes an issue)

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • I understand the code I am submitting and can explain how it works.
  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

To help with the load of incoming pull requests:

The segments_changed issue was created with an empty description,
but non-fixable issues require a description translation. This
caused test failures in the translation validation framework.
@JamieMagee JamieMagee requested a review from a team as a code owner April 5, 2026 18:43
Copilot AI review requested due to automatic review settings April 5, 2026 18:43
@home-assistant
Copy link
Copy Markdown
Contributor

home-assistant Bot commented Apr 5, 2026

Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration (vacuum) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of vacuum can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign vacuum Removes the current integration label and assignees on the pull request, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) to the pull request.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component, problem in config, problem in device, feature-request) on the pull request.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a translation-validation failure in the vacuum integration by ensuring the non-fixable segments_changed repair issue includes a non-empty description in strings.json (empty strings are stripped during translation compilation).

Changes:

  • Add a user-facing description for the segments_changed repair issue to prevent the translation key from being stripped at build time.
Show a summary per file
File Description
homeassistant/components/vacuum/strings.json Adds a non-empty description for the segments_changed repair issue translation.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

Copy link
Copy Markdown
Member

@arturpragacz arturpragacz left a comment

Choose a reason for hiding this comment

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

This change doesn't look correct. What problem does it solve? Is it AI generated?

@home-assistant home-assistant Bot marked this pull request as draft April 5, 2026 19:57
@home-assistant
Copy link
Copy Markdown
Contributor

home-assistant Bot commented Apr 5, 2026

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@JamieMagee
Copy link
Copy Markdown
Contributor Author

@arturpragacz  This test fails on dev right now. You can reproduce it with:

$ uv run python -m pytest tests/components/vacuum/test_init.py::test_segments_changed_issue -x

ERROR tests/components/vacuum/test_init.py::test_segments_changed_issue - Failed: Translation not found for vacuum: `issues.segments_changed.description`

The segments_changed issue is created with is_fixable=False, so the test framework's check_translations fixture requires a non-empty description key. The current description in strings.json is "", which means the translation lookup fails.

We ran into this while going through the nixpkgs Home Assistant test suite, where the ecovacs, roborock, and vacuum component tests all fail on this. (We've been carrying them as ignored tests: https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/home-assistant/tests.nix)

I wrote the description text. If you'd rather handle it differently (make the issue fixable, or change the test framework to allow empty descriptions), happy to go that route instead.

@JamieMagee JamieMagee marked this pull request as ready for review April 6, 2026 13:50
@home-assistant home-assistant Bot requested a review from arturpragacz April 6, 2026 13:50
@arturpragacz
Copy link
Copy Markdown
Member

I cannot reproduce the test failure locally. It also does not fail in our CI.

The segments_changed issue is handled specially by the frontend, that's why it doesn't need a description here.

@arturpragacz arturpragacz marked this pull request as draft April 7, 2026 14:12
@JamieMagee
Copy link
Copy Markdown
Contributor Author

@arturpragacz The issue only shows up when compiled translations are present. Apologies, I skipped that step earlier:

  • strings.json has "description": "" for segments_changed
  • script/translations/download.py passes --export-empty-as skip to Lokalise, which drops empty strings from the compiled en.json
  • So in the published PyPI sdist, issues.segments_changed.description is missing entirely
  • The test framework then fails because is_fixable=False issues require a description

The develop script preserves the empty string so tests pass locally, but the Lokalise export strips it, which is what ends up in the sdist.

@JamieMagee JamieMagee marked this pull request as ready for review April 9, 2026 20:57
@arturpragacz arturpragacz marked this pull request as draft April 10, 2026 17:02
@arturpragacz
Copy link
Copy Markdown
Member

Better solution: #167928.

@JamieMagee JamieMagee closed this Apr 10, 2026
@JamieMagee JamieMagee deleted the fix-vacuum-segments-changed-description branch April 10, 2026 17:44
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants