Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/schema-drift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Schema drift PR gate (#373 v2)
# TS 상수 ↔ DB CHECK constraint 정합성을 PR 단계에서 검증
# 자세한 운영 가이드: docs/database/schema-drift-sot.md
name: Schema drift gate

on:
pull_request:
paths:
- "supabase/migrations/**"
- "packages/api-server/migration/**"
- "packages/web/lib/api/admin/**.ts"
- "scripts/check-schema-drift.ts"
- ".github/workflows/schema-drift.yml"
- "docs/database/schema-drift-sot.md"

permissions:
contents: read
pull-requests: write

jobs:
drift:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17
env:
POSTGRES_PASSWORD: testpass
POSTGRES_DB: drift
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
LOCAL_DATABASE_URL: postgresql://postgres:testpass@localhost:5432/drift
steps:
- uses: actions/checkout@v6

- uses: oven-sh/setup-bun@v2
with:
bun-version: "1.3.10"

- name: Install postgresql-client 17
run: |
set -euo pipefail
sudo apt-get update -qq
sudo apt-get install -y curl ca-certificates lsb-release gnupg
curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \
| sudo gpg --dearmor -o /usr/share/keyrings/postgresql.gpg
echo "deb [signed-by=/usr/share/keyrings/postgresql.gpg] http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" \
| sudo tee /etc/apt/sources.list.d/pgdg.list
sudo apt-get update -qq
sudo apt-get install -y postgresql-client-17
psql --version

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run schema drift check
id: drift
# drift-bypass label → step failure를 무시하여 job green 유지
# 단, drift report 는 항상 PR comment 로 게시
continue-on-error: ${{ contains(github.event.pull_request.labels.*.name, 'drift-bypass') }}
run: bun run scripts/check-schema-drift.ts | tee /tmp/drift.md

- name: Comment PR with drift report
if: always() && hashFiles('/tmp/drift.md') != ''
uses: marocchino/sticky-pull-request-comment@v2
with:
header: schema-drift
path: /tmp/drift.md
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ packages/web/.playwright/

# Local dev log files (optional tail -f workflows)
.logs/
packages/web/.local/

# Orval generated API client (regenerated from OpenAPI spec)
packages/web/lib/api/generated/
Expand Down
15 changes: 11 additions & 4 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions docs/agent/api-v1-routes.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ Params: `q`, `context`, `media_type`, `sort`, `page`, `limit`.
| `/api/v1/tries` | POST | Current user's VTON result save |
| `/api/v1/post-magazines/[id]` | GET | Post magazine data |
| `/api/v1/post-magazines/generate` | POST | Trigger editorial generation for a post (admin only, proxy → Rust) |
| `/api/v1/content/assets/videos` | POST | Content Studio short-form scene video generation (admin only, xAI → Supabase Storage) |
| `/api/v1/content/assets/video-jobs` | GET/POST | List recent persisted xAI short-form video jobs by `packetId`; create an admin-only job and persist scene request IDs. |
| `/api/v1/content/assets/video-jobs/[jobId]` | GET | Load a persisted short-form video job for resume. |
| `/api/v1/content/assets/video-jobs/[jobId]/poll` | POST | Poll running xAI scenes once and persist completed Storage URLs or failures. |
| `/api/v1/content/assets/video-jobs/[jobId]/compose` | POST | Compose completed scene clips into one final 9:16 ffmpeg export, with optional voiceover/BGM URLs. |
| `/api/v1/content/assets/video-jobs/[jobId]/scenes/[sceneId]/retry` | POST | Restart one failed or expired xAI scene. |

## Solutions & spots

Expand Down
Loading
Loading