[video-engine] Per-project video_engine_enabled opt-in toggle

Mirrors ci_watch_enabled (migration 048): the global
ROBOCO_VIDEO_ENGINE_ENABLED flag arms the subsystem; the new
projects.video_engine_enabled column (migration 063) opts a repo into
authoring against its motion/ dir. VideoEngine._opted_in_project no-ops
open_video_task at the single chokepoint covering all three trigger
paths (on-release, on-spotlight, CEO on-demand) until the operator
flips it in the panel edit-project dialog. Existing projects stay
opted out (server_default=false).
This commit is contained in:
Renn F
2026-07-06 04:29:53 +02:00
parent 6ed4e1391b
commit ba646da07a
14 changed files with 136 additions and 8 deletions
@@ -0,0 +1,42 @@
"""Per-project video-engine opt-in column.
The video engine is armed by the global ``ROBOCO_VIDEO_ENGINE_ENABLED`` flag,
but authoring writes a HyperFrames composition into a project's ``motion/``
dir, so a project opts in via ``video_engine_enabled``. Additive and
default-off, mirroring ``ci_watch_enabled`` (migration 048): existing projects
keep today's behavior (no video authoring) until the operator flips it in the
panel.
Revision ID: 063_video_engine_project_toggle
Revises: 062_tiktok_credentials
Create Date: 2026-07-06
NOTE: revision id is 25 chars — alembic's ``alembic_version.version_num`` is
``VARCHAR(32)`` and a longer id raises at record time.
"""
from __future__ import annotations
import sqlalchemy as sa
from alembic import op
revision = "063_video_engine_project_toggle"
down_revision = "062_tiktok_credentials"
branch_labels = None
depends_on = None
def upgrade() -> None:
op.add_column(
"projects",
sa.Column(
"video_engine_enabled",
sa.Boolean(),
nullable=False,
server_default=sa.false(),
),
)
def downgrade() -> None:
op.drop_column("projects", "video_engine_enabled")