Skip to content

fix: validate build uuid overrides#197

Merged
vigneshrajsb merged 1 commit intomainfrom
vb/validate-build-uuid-overrides
May 5, 2026
Merged

fix: validate build uuid overrides#197
vigneshrajsb merged 1 commit intomainfrom
vb/validate-build-uuid-overrides

Conversation

@vigneshrajsb
Copy link
Copy Markdown
Contributor

Summary

  • Validate UUID availability before applying PR comment UUID overrides.
  • Move UUID validation into OverrideService.updateBuildUuid so all callers get the same safety check.
  • Add PATCH /api/v2/builds/{uuid} for updating build UUIDs using the v2 response shape.
  • Document the v2 request/response schemas in OpenAPI.
  • Add focused coverage for duplicate UUID rejection from PR comments and the v2 endpoint.

Root Cause

PR comment edits could update a build UUID without checking whether the requested UUID was already used by another build. That allowed duplicate UUID changes to reach build/deployable/deploy update logic and cause downstream conflicts.

Validation

  • pnpm test -- --runTestsByPath src/server/services/__tests__/activityStream.test.ts 'src/app/api/v2/builds/[uuid]/route.test.ts'
  • pnpm run lint
  • pnpm run ts-check was run and still fails on existing repo-wide TypeScript strictness issues unrelated to this change.

@vigneshrajsb vigneshrajsb marked this pull request as ready for review May 5, 2026 05:45
@vigneshrajsb vigneshrajsb requested a review from a team as a code owner May 5, 2026 05:45
@vigneshrajsb vigneshrajsb merged commit 4af1007 into main May 5, 2026
1 check passed
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.

2 participants