Skip to content

Conversation

@NicoHinderling
Copy link
Contributor

@NicoHinderling NicoHinderling commented Feb 9, 2026

Closes EME-724

Copy link
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 9, 2026
@NicoHinderling NicoHinderling marked this pull request as ready for review February 9, 2026 23:05
@NicoHinderling NicoHinderling requested a review from a team as a code owner February 9, 2026 23:05
@linear
Copy link

linear bot commented Feb 9, 2026

Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

cutoff = get_size_retention_cutoff(project.organization)
artifact = comparison_obj.head_size_analysis.preprod_artifact
if artifact.date_added < cutoff:
return Response({"detail": "This build's size data has expired."}, status=404)
Copy link
Contributor

Choose a reason for hiding this comment

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

Compare download only checks head artifact retention, not base

Medium Severity

The retention check in the compare download endpoint only validates the head artifact's date_added against the cutoff, while the sibling compare endpoint at project_preprod_size_analysis_compare.py correctly checks both head_artifact.date_added < cutoff or base_artifact.date_added < cutoff. If the base artifact's data has expired but the head hasn't, this endpoint will still serve the comparison data, bypassing the intended data retention policy.

Additional Locations (1)

Fix in Cursor Fix in Web

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

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant