veza/veza-backend-api/migrations/rollback
senke d5152d89a2
Some checks failed
Veza CI / Rust (Stream Server) (push) Successful in 5m28s
Security Scan / Secret Scanning (gitleaks) (push) Failing after 53s
Veza CI / Backend (Go) (push) Failing after 7m59s
Veza CI / Frontend (Web) (push) Failing after 17m43s
Veza CI / Notify on failure (push) Successful in 4s
E2E Playwright / e2e (full) (push) Failing after 20m55s
feat(stream): HLS default on + marketplace 30s pre-listen + FLAC tier checkbox (W4 Day 17)
Three pieces shipping under one banner since they're the day's
deliverables and share no review-time coupling :

1. HLS_STREAMING default flipped true
   - config.go : getEnvBool default true (was false). Operators wanting
     a lightweight dev / unit-test env explicitly set HLS_STREAMING=false
     to skip the transcoder pipeline.
   - .env.template : default flipped + comment explaining the opt-out.
   - Effect : every new track upload routes through the HLS transcoder
     by default ; ABR ladder served via /tracks/:id/master.m3u8.

2. Marketplace 30s pre-listen (creator opt-in)
   - migrations/989 : adds products.preview_enabled BOOLEAN NOT NULL
     DEFAULT FALSE + partial index on TRUE values. Default off so
     adoption is opt-in.
   - core/marketplace/models.go : PreviewEnabled field on Product.
   - handlers/marketplace.go : StreamProductPreview gains a fall-through.
     When no file-based ProductPreview exists AND the product is a
     track product AND preview_enabled=true, redirect to the underlying
     /tracks/:id/stream?preview=30. Header X-Preview-Cap-Seconds: 30
     surfaces the policy.
   - core/track/track_hls_handler.go : StreamTrack accepts ?preview=30
     and gates anonymous access via isMarketplacePreviewAllowed (raw
     SQL probe of products.preview_enabled to avoid the
     track→marketplace import cycle ; the reverse arrow already exists).
   - Trust model : 30s cap is enforced client-side (HTML5 audio
     currentTime). Industry standard for tease-to-buy ; not anti-rip.
     Documented in the migration + handler doc comment.

3. FLAC tier preview checkbox (Premium-gated, hidden by default)
   - upload-modal/constants.ts : optional flacAvailable on UploadFormData.
   - upload-modal/UploadModalMetadataForm.tsx : new optional props
     showFlacAvailable + flacAvailable + onFlacAvailableChange.
     Checkbox renders only when showFlacAvailable=true ; consumers
     pass that based on the user's role/subscription tier (deferred
     to caller wiring — Item G phase 4 will replace the role check
     with a real subscription-tier check).
   - Today the checkbox is a UI affordance only ; the actual lossless
     distribution path (ladder + storage class) is post-launch work.

Acceptance (Day 17) : new uploads serve HLS ABR by default ;
products.preview_enabled flag wires anonymous 30s pre-listen ;
checkbox visible to premium users on the upload form. All 4 tested
backend packages pass : handlers, core/track, core/marketplace, config.

W4 progress : Day 16 ✓ · Day 17 ✓ · Day 18 (faceted search)  ·
Day 19 (HAProxy sticky WS)  · Day 20 (k6 nightly) .

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 09:56:02 +02:00
..
076_create_gear_items_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
077_create_live_streams_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
078_add_missing_indexes_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
082_create_api_keys_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
125_follow_counts_triggers_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
129_playlist_editorial_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
132_quiet_hours_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
133_notification_grouping_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
134_weekly_digest_prefs_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
900_triggers_and_functions_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
910_create_audit_logs_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
920_add_performance_indexes_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
930_add_missing_foreign_keys_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
931_add_refresh_tokens_updated_at_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
940_performance_indexes_v0951_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
941_notification_prefs_defaults_v0105_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
942_create_co_listening_sessions_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
943_create_track_stems_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
944_create_data_exports_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
945_creator_analytics_v0110_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
946_advanced_analytics_v0111_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
947_moderation_advanced_v0112_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
948_marketplace_complete_v0120_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
949_subscription_plans_v0121_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
950_distribution_platforms_v0122_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
951_education_courses_v0123_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
960_performance_indexes_v0124_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
970_password_login_history_v0130_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
971_security_advanced_v0133_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
972_seller_kyc_v0135_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
973_support_tickets_v0135_down.sql chore: cleanup old e2e tests, playwright configs, reorganize down migrations 2026-03-18 11:35:26 +01:00
980_void_unpaid_subscriptions_down.sql chore(release): v1.0.6.2 — subscription payment-gate bypass hotfix 2026-04-17 12:21:53 +02:00
981_seller_transfers_stripe_reversal_id_down.sql refactor(connect): persist stripe_transfer_id on create + retry — v1.0.7 item A 2026-04-17 13:08:39 +02:00
982_seller_transfers_reversal_pending_index_down.sql feat(marketplace): seller transfer state machine matrix — v1.0.7 item B day 1 2026-04-17 14:13:02 +02:00
983_seller_transfers_reversal_pending_not_null_down.sql feat(marketplace): stripe reversal error disambiguation + CHECK constraint + E2E — v1.0.7 item B day 3 2026-04-18 02:12:03 +02:00
984_hyperswitch_webhook_log_down.sql feat(webhooks): persist raw hyperswitch payloads to audit log — v1.0.7 item E 2026-04-18 02:44:58 +02:00
985_tracks_storage_backend_down.sql feat(storage): add track storage_backend column + config prep (v1.0.8 P0) 2026-04-23 19:54:28 +02:00
986_user_subscriptions_pending_payment_index_down.sql feat(subscription): pending_payment state machine + mandatory provider (v1.0.9 item G — Phase 1) 2026-04-26 10:02:00 +02:00
987_orders_hyperswitch_payment_id_backfill_down.sql fix(ci): unblock CI red — gofmt + e2e webserver reuse + orders.hyperswitch_payment_id (Day 4) 2026-04-27 12:03:55 +02:00
988_dmca_notices_down.sql feat(legal): DMCA notice handler + admin queue + 451 playback gate (W3 Day 14) 2026-04-28 15:39:33 +02:00
989_products_preview_enabled_down.sql feat(stream): HLS default on + marketplace 30s pre-listen + FLAC tier checkbox (W4 Day 17) 2026-04-29 09:56:02 +02:00