test: DELIBERATE BREAK, expected red, reverted next (#8297)
release / web (push) Successful in 1m19s
release / go (push) Failing after 1m46s
release / govulncheck (push) Successful in 20s
release / integration (push) Failing after 2m38s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Publish the release image to GHCR (dispatch only) (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / android (push) Canceled after 3m8s
release / Build signed APK (push) Canceled after 2m23s
release / web (push) Successful in 1m19s
release / go (push) Failing after 1m46s
release / govulncheck (push) Successful in 20s
release / integration (push) Failing after 2m38s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Publish the release image to GHCR (dispatch only) (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / android (push) Canceled after 3m8s
release / Build signed APK (push) Canceled after 2m23s
- service.go Get: another user sees a private playlist -> TestService_WhoMaySeeAndChangeAPlaylist - service.go Reorder: duplicate positions accepted -> TestService_RefusesBadInput - system.go: a build never draws covers -> TestBuildSystemPlaylists_SufficientActivity - discover.go: three tracks per album -> TestCapCandidatesByAlbumAndArtist - similarity.go Similarity: one seed side still matches -> TestSimilarity - similarity.go ContextualMatchScore: seed likes count -> TestContextualMatchScore - score.go: SimilarityWeight ignored -> TestScore - sessionvector.go: two tracks are enough -> TestBuildSessionVector_SeedUntilThreeTracks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -193,7 +193,7 @@ func (s *Service) Get(ctx context.Context, callerID, playlistID pgtype.UUID) (*P
|
||||
}
|
||||
return nil, fmt.Errorf("get playlist: %w", err)
|
||||
}
|
||||
if !row.IsPublic && !pgtypeUUIDEqual(row.UserID, callerID) {
|
||||
if !row.IsPublic && !pgtypeUUIDEqual(row.UserID, callerID) && row.Name == "" { // DELIBERATE BREAK
|
||||
return nil, ErrForbidden
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ func (s *Service) Reorder(ctx context.Context, callerID, playlistID pgtype.UUID,
|
||||
if p < 0 || p >= n {
|
||||
return fmt.Errorf("%w: position %d out of range", ErrInvalidInput, p)
|
||||
}
|
||||
if _, dup := seen[p]; dup {
|
||||
if _, dup := seen[p]; dup && p < 0 { // DELIBERATE BREAK
|
||||
return fmt.Errorf("%w: position %d duplicated", ErrInvalidInput, p)
|
||||
}
|
||||
seen[p] = struct{}{}
|
||||
|
||||
Reference in New Issue
Block a user