Social approval gates (outbound Meta publish)
Human approval is required before AI-generated image posts (social_posts) are published to Facebook or Instagram — except the daily post cron (19:00 Europe/London, carousel on alternate days, #1378), which runs the full generate → render → Meta pipeline with an explicit autopublish flag.
Curated catalogue videos (social_videos from social/videos/catalog.json) are not gated: seed → ready → social-video-publish.yml → Meta (unchanged). Their intros were cut once in R2 by social/trim-video-intros.mjs (#1381).
Models
| Model | Content | Approval? | Publish path |
|---|---|---|---|
| A — AI outbound posts | Claude-generated image posts in D1 | Yes — draft → human approve → approved | social-publish-approved-post.yml |
| A′ — Scheduled image autopublish | Same posts, VPS 19:00 UK on carousel days | Bypass — SOCIAL_SCHEDULED_IMAGE_AUTOPUBLISH in workflow only | social-generate-render-publish.yml |
| B — Engagement (future) | Replies / comments on others’ content | Yes — planned social_engagement_drafts + executor | Not implemented |
| C — Curated videos | Operator-maintained catalog JSON | No — new rows status = ready | social-video-publish.yml (workflow_dispatch) |
Pipelines (Model A — drafts)
| Step | Workflow / script |
|---|---|
| Generate + render + R2 (no Meta) | social-generate-render.yml (VPS cron every 12h UTC → scripts/dispatch-social-generate-render.mjs) |
| Approve | social-approve-post.yml → social/approve-social-content.mjs (entity_type=post) |
| Publish approved image post | social-publish-approved-post.yml → social/publish-social-image.mjs |
Pipeline (Model A′ — scheduled image autopublish)
| Step | Workflow / script |
|---|---|
| Generate + render + R2 + Meta | social-generate-render-publish.yml (VPS 19:00 Europe/London on carousel days → scripts/dispatch-social-daily-post.mjs) |
Pipeline (Model C — videos)
| Step | Workflow / script |
|---|---|
| Sync catalog | social/seed-social-videos.mjs |
Publish next ready video | social-video-publish.yml → social/publish-social-video.mjs (optional video_number = catalogue sortOrder; blank = rotation) |
No approval workflow or approved status for catalogue videos.
VPS cron (manual apply after merge)
Two independent installers — run both on the scheduler VPS after git pull:
Draft generate (every 12 hours UTC, no Meta publish):
cd /path/to/home-dashboard && git pull
sudo bash scripts/vps-install-social-generate-cron.shVerify the crontab line calls node scripts/dispatch-social-generate-render.mjs.
Daily post (19:00 Europe/London, Reel and carousel on alternate days):
cd /path/to/home-dashboard && git pull
sudo bash scripts/vps-install-social-daily-post-cron.shVerify the crontab line calls node scripts/dispatch-social-daily-post.mjs. This installer also removes the old 16:00/20:00 image line and any line that starts social-video-publish.yml or social-generate-render-publish.yml directly.
Each installer only replaces lines tagged with its own # lovely-home-social-*-cron marker (the daily-post installer also the old image marker and direct post lines); re-running one must not remove the other’s job.
Environment flags
| Variable | Effect |
|---|---|
SOCIAL_PUBLISH_DISABLED=true | Emergency kill switch — blocks Meta writes in image publisher (publish-social-image.mjs) |
SOCIAL_REQUIRE_APPROVAL=false | Ignored in production for image posts (LOVELY_HOME_ENV=production, GitHub main, etc.) |
SOCIAL_SCHEDULED_IMAGE_AUTOPUBLISH=true | Only in social-generate-render-publish.yml — allows publishing a freshly generated draft post |
LOVELY_HOME_ENV | production enforces post approval; sandbox / test / dev allow explicit bypass when configured |