Skip to content

Instantly share code, notes, and snippets.

View aaronschachter's full-sized avatar

Aaron Schachter aaronschachter

  • San Francisco, CA
View GitHub Profile

Single Item Publish Investigation — Site 65e89895c5a4b8d764c0d710

Site: Synthesia staging (synthesia-staging-eaffee4c3a254eec5b5e4) Workspace ID: 6387b01c79342a04d2fec9fe Domain: www.synthesia.io Reported behavior: "Publish now" spins, eventually shows success toast, but CMS doesn't update on live page and items remain in "Changes in draft."


Root cause (likely): updateLocalizedCMSItemsByPrimary swallows secondary locale failures

@aaronschachter
aaronschachter / field-groups-backend-spec.md
Last active May 20, 2026 04:32
CMS Collection Field Groups — Backend Spec (slim)

CMS Collection Field Groups — Backend Spec (slim)

CMS Collection Field Groups — Backend Spec

Epic: CMSAUTH-5112 | Full spec: Tech Spec — CMS Collection Field Groups (V2) | Public API RFC: RFC v2

This is a backend-focused subset of the full tech spec. It covers the data model, persistence, HTTP API, validation, and gating. Frontend (Flux stores, action creators, UI) and public API V2 details live in the full spec.


@aaronschachter
aaronschachter / cms-locale-linked-item-creation.md
Last active May 19, 2026 20:38
CMS Items API: Locale-Linked Item Creation (1-pager)

CMS Items API: Locale-Linked Item Creation

Author: Aaron Schachter Date: 2026-05-19 Status: Proposal (Beta first)


Motivation

@aaronschachter
aaronschachter / wrkspcs-stays-dailyplans-agendaitems.md
Created May 18, 2026 17:48
wrkspcs: Stays + DailyPlans + AgendaItems implementation prompt

wrkspcs: Stays + DailyPlans + AgendaItems implementation prompt

Codebase: /Users/aaronschachter/Code/wrkspcs. Before writing anything, read:

  • src/collections/Todos.ts — most recently added collection, closest pattern to follow
  • src/collections/Workspaces.ts — workspace capability flags
  • src/lib/workspaceSettings.ts + src/lib/workspaceSettingsAccess.ts — settings pattern
  • src/app/api/mcp/lib/handlers/todos.ts — most recently added MCP handler, closest pattern to follow
  • src/app/api/mcp/lib/toolDefinitions.ts — tool definition pattern
  • src/app/(frontend)/projects/[projectId]/ProjectShell.tsx — tab/shell pattern
  • src/app/(frontend)/projects/[projectId]/todos/ — most recently added frontend route, closest pattern to follow
@aaronschachter
aaronschachter / wrkspcs-daily-plans-agenda-items.md
Created May 17, 2026 23:04
wrkspcs: DailyPlans + AgendaItems implementation prompt

wrkspcs: DailyPlans + AgendaItems implementation prompt

Codebase: /Users/aaronschachter/Code/wrkspcs. Before writing anything, read:

  • src/collections/Notes.ts, src/collections/Docs.ts — collection patterns
  • src/collections/Todos.ts — most recently added collection, closest pattern to follow
  • src/collections/Workspaces.ts — workspace capability flags
  • src/lib/workspaceSettings.ts + src/lib/workspaceSettingsAccess.ts — settings pattern
  • src/app/api/mcp/lib/handlers/todos.ts — most recently added MCP handler, closest pattern to follow
  • src/app/api/mcp/lib/toolDefinitions.ts — tool definition pattern
  • src/app/(frontend)/projects/[projectId]/ProjectShell.tsx — tab/shell pattern
@aaronschachter
aaronschachter / wrkspcs-todos.md
Created May 16, 2026 06:50
wrkspcs: Todos collection — implementation prompt

wrkspcs: Todos collection — implementation prompt

Codebase: /Users/aaronschachter/Code/wrkspcs. Before writing anything, read:

  • src/collections/Notes.ts, src/collections/Docs.ts — collection patterns
  • src/collections/Workspaces.ts — workspace capability flags
  • src/app/api/mcp/lib/handlers/notes.ts — MCP handler pattern
  • src/app/api/mcp/lib/toolDefinitions.ts — tool definition pattern
  • src/app/(frontend)/projects/[projectId]/ProjectShell.tsx — tab/shell pattern

@aaronschachter
aaronschachter / wrkspcs-dailyplans-agendaitems-todos.md
Last active May 16, 2026 06:49
wrkspcs: DailyPlans + AgendaItems + Todos — full prompt (ARCHIVED, see smaller todos-only gist)

wrkspcs: DailyPlans + AgendaItems + Todos implementation prompt

wrkspcs: DailyPlans + AgendaItems + Todos — full implementation prompt

Codebase: /Users/aaronschachter/Code/wrkspcs. Before writing anything, read:

  • src/collections/Notes.ts, src/collections/Docs.ts — collection patterns
  • src/collections/Workspaces.ts — workspace capability flags
  • src/lib/workspaceSettings.ts + src/lib/workspaceSettingsAccess.ts — settings pattern
  • src/app/api/mcp/lib/handlers/notes.ts — MCP handler pattern
  • src/app/api/mcp/lib/toolDefinitions.ts — tool definition pattern

Single Page Publishing (SPP) and CMS Publication ID Analysis

Summary

Single Page Publishing reuses existing publication records via Publication.findLatestForDatabase(), which is a simple "newest by timestamp" query with no filtering by publish type, domain, or strategy. Combined with the fact that multiple publications can be "live" simultaneously across different domains, this creates a class of bugs where SPP can cross-pollinate publication IDs between domains and cause CMS content inconsistencies.

The Core Problem

  1. Each custom domain has its own lastPublicationId field
  2. Full site publishes only update lastPublicationId on domains included in customDomainsTargets (the domains selected for that publish)

Enterprise Publishing Workflow vs. Scheduled SIP

What is the "Enterprise Publishing Workflow"?

The "enterprise publishing workflow" is a multi-stage publishing system gated by the ALLOW_PUBLISHING_WORKFLOWS entitlement (Enterprise plans only). It introduces a staging-to-production promotion model that fundamentally changes how publishing works in the Designer.

How it differs from regular (self-serve) publishing

Aspect Regular (Self-Serve) Enterprise Publishing Workflow

Plan Prompt: CustomDomainService manifest verification in Dynamo Admin

Goal: Extend CustomDomainService with foundational methods (getSubdomainAndDomains, getManifest), then use them in the Dynamo admin database detail page to show which publication each domain is rendering and warn when the manifest's publicationVersion drifts from the custom domain model's lastPublicationId.

Context

  • CustomDomainService lives at packages/domains/custom-domains/server/src/custom-domain.service.ts. It currently has findBySiteId (delegates to FIND_CUSTOM_DOMAINS_BY_SITE_ID) and SITE_FILES_DOMAIN injected. It does NOT yet have READ_DOMAIN_MANIFEST injected.
  • The manifest lives at {domain}/manifest.json in the site-files S3 bucket. It's a Record<string, unknown> with fields like publicationVersion, redirectDomain, cosmic, redirects, localization, etc. We care about publicationVersion for now.
  • A DAL function to read a single domain's manifest already exists in the legacy layer