Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: bump the music video sync version so v21 peers stop overwriting newer fields (#12430)

[._.]/ Adam Eivy74f743216f06
diff --git a/server/lib/schemaVersions.js b/server/lib/schemaVersions.js
index 2737b0fa4c..6167c57ac2 100644
--- a/server/lib/schemaVersions.js
+++ b/server/lib/schemaVersions.js
@@ -696,7 +696,23 @@ export const PORTOS_SCHEMA_VERSIONS = Object.freeze({
// would collapse the mode to footage and discard the authored scene.
// v21 adds compressed lyric timing warnings (`lyricCues[].suspect`). Older
// normalizers drop the warning on edits. Absent remains legacy; no backfill.
- musicVideoProjects: 21,
+ // v22 = stored shape added since v21 that a v21 build rebuilds as an explicit
+ // object (or copies by an explicit field list) and so drops on its next save;
+ // the whole-record LWW merge then returns that loss to the upgraded peer as
+ // the newer record. Covered: the title card's end-credits showing
+ // (`titleCard.outro`/`outroStartSec`/`outroEndSec`); `statsOutro`'s custom
+ // `title`/`subtitle`/`hidden` lines; catalog links on creative-setup subjects
+ // (`concept.subjects[].ingredientId`/`localOnly`, which a v21 strict subject
+ // schema also rejects with a 400); the `video:runway` automation tool id
+ // (`normalizeMusicVideoAutomation` filters unknown ids); and the per-shot
+ // fields a v21 re-plan (`replaceScenes`) or split (`splitScene`) discards:
+ // `endImageId`/`endFramePrompt` (style-break end frame, take kind `endImage`,
+ // which a v21 take selection files under a bogus slot), `frameFit`, `speedFps`,
+ // `offsetFrames`, `reverse`, `holdLastFrame`, `filmLook`, `transitionIn`/
+ // `transitionOut`, `glitches`, `cutEffect`, `imageEffect`/`imageEffectSec`,
+ // `stillMove` and `performanceStyle`. Optional fields on the same layout; no
+ // migration or backfill. A field added to these normalizers later needs v23.
+ musicVideoProjects: 22,
// v1 = Creative Commission FEEDBACK federation (PostgreSQL `commission_feedback`)
// via the per-record peer-sync push pipeline (record kind `commissionFeedback`,
// sync category `commissionFeedback`, #2686 — split-record follow-up to #2657).
diff --git a/server/lib/schemaVersions.test.js b/server/lib/schemaVersions.test.js
index 71b70b1a71..8509fd598e 100644
--- a/server/lib/schemaVersions.test.js
+++ b/server/lib/schemaVersions.test.js
@@ -64,13 +64,17 @@ describe('PORTOS_SCHEMA_VERSIONS', () => {
});
describe('buildPortosMeta', () => {
- it('rejects repair, timing, narrative event and lyric warning metadata on older music-video peers', async () => {
+ it('rejects repair, timing, narrative event, lyric warning and title/ending/subject/tool metadata on older music-video peers', async () => {
const meta = await buildPortosMeta();
- expect(meta.schemaVersions.musicVideoProjects).toBe(21);
- for (const receiverV of [13, 14, 15, 16, 17, 18, 19, 20]) {
+ expect(meta.schemaVersions.musicVideoProjects).toBe(22);
+ // v21 builds re-normalize the v22 fields away; the gate must stop that peer receiving them.
+ for (const receiverV of [13, 14, 15, 16, 17, 18, 19, 20, 21]) {
expect(compareSchemaVersions(meta.schemaVersions, { ...meta.schemaVersions, musicVideoProjects: receiverV }).ahead)
- .toContainEqual({ category: 'musicVideoProjects', senderV: 21, receiverV });
+ .toContainEqual({ category: 'musicVideoProjects', senderV: 22, receiverV });
}
+ const olderPeer = { ...meta.schemaVersions, musicVideoProjects: 21 };
+ expect(scopeVersionDiff(compareSchemaVersions(meta.schemaVersions, olderPeer), RECORD_KIND_SCHEMA_CATEGORIES.musicVideoProject))
+ .toMatchObject({ compatible: false, ahead: [{ category: 'musicVideoProjects', senderV: 22, receiverV: 21 }] });
});
it('advertises lyric provenance to pause track transfers to caption-only peers', async () => {