feat(discovery): index open_contest submissions into contest_submissions#14358
Open
dylanjeffers wants to merge 1 commit into
Open
feat(discovery): index open_contest submissions into contest_submissions#14358dylanjeffers wants to merge 1 commit into
dylanjeffers wants to merge 1 commit into
Conversation
Adds an 'open_contest' event_type and a SubmitToContest ManageEntity action that writes to the contest_submissions table (created by the api repo, migration 0203). Open contests don't have a remix-parent track, so submissions can't be inferred via the remixes-table join that powers remix_contest; SubmitToContest provides an explicit submission record instead. - Add open_contest to EventType enum + extend the event_type DB enum in a discovery-side migration so SQLAlchemy values round-trip. - Skip parent-entity / track-owner validation in create_event for open_contest, since entity_id/entity_type are intentionally null. - Add Action.SUBMIT_TO_CONTEST and its non-CID metadata exception, pre-fetch the referenced track in collect_entities_to_fetch, and route to a new submit_to_contest handler that validates the track ownership / event state and inserts the contest_submissions row. - Teach get_remixes_of to surface contest_submissions rows when a caller passes contest_id (no track_id) for open_contest entries. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Companion PR: api repo branch `claude/gifted-tereshkova-989bfa` (table + action constant + endpoint).
Test plan
🤖 Generated with Claude Code