Skip to content

Beta to master#19997

Merged
seanbudd merged 3 commits intomasterfrom
beta
Apr 22, 2026
Merged

Beta to master#19997
seanbudd merged 3 commits intomasterfrom
beta

Conversation

@seanbudd
Copy link
Copy Markdown
Member

No description provided.

andy72039 and others added 3 commits April 22, 2026 09:20
Closes #19984
Summary of the issue:

Once an add-on is installed, VirusTotal scan results would be cached in a different format than what was served by the server.
This would cause issues in unpacking the scanned data.
This would cause scan results to fail to be loaded for installed add-ons.
Description of user facing changes:

Viewing scan results for installed add-ons should be fixed
Description of developer facing changes:

None
Description of development approach:

    Added a toDict method to the VirusTotalScanResults class in scanResults.py, enabling conversion of scan result objects to a dictionary format matching the original scan results structure.
    Updated the asdict method in AddonStoreModel to use toDict for VirusTotalScanResults fields, ensuring correct serialization.
@seanbudd seanbudd requested a review from a team as a code owner April 22, 2026 04:10
@seanbudd seanbudd merged commit 2c434d9 into master Apr 22, 2026
19 of 20 checks passed
@github-actions github-actions Bot added this to the 2026.2 milestone Apr 22, 2026
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 updates zh_TW locale symbol mappings and improves add-on store model serialization by enabling round-tripping of VirusTotal scan results to the original API/cache JSON shape.

Changes:

  • Updated zh_TW symbols.dic header date and added several missing symbol pronunciation mappings.
  • Added VirusTotalScanResults.toDict() to serialize scan stats back into the expected scanResults structure.
  • Updated add-on model serialization/type hints to emit vtScanUrl + scanResults in the expected cached/JSON format.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
source/locale/zh_TW/symbols.dic Updates edit date and adds new symbol pronunciation entries.
source/addonStore/models/scanResults.py Adds toDict() for serializing scan results back to the expected dict structure.
source/addonStore/models/addon.py Updates typing and asdict() to correctly serialize VirusTotalScanResults and vtScanUrl for caching/interop.

Comment on lines +48 to +50
"""Store scan data in the same format as the original add-on scan results.

:return: A dictionary representing the scan results.
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

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

The docstring for toDict says it stores data "in the same format as the original add-on scan results", but this method only serializes the scanResults structure and does not include the vtScanUrl/scanUrl portion (which is stored separately on the add-on dict). Please clarify the wording to reflect that it returns the format for addon["scanResults"] (or explicitly document how vtScanUrl is handled elsewhere).

Suggested change
"""Store scan data in the same format as the original add-on scan results.
:return: A dictionary representing the scan results.
"""Store scan data in the format used for ``addon["scanResults"]``.
This serializes only the VirusTotal scan results payload. The scan URL
(``vtScanUrl``, represented by :attr:`scanUrl`) is stored separately on the
add-on dictionary and is not included in this return value.
:return: A dictionary representing ``addon["scanResults"]``.

Copilot uses AI. Check for mistakes.
@github-actions github-actions Bot requested a deployment to snapshot April 22, 2026 04:55 Abandoned
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.

3 participants