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: protect lyric render provenance from older sync peers (#11317)

[._.]/ Adam Eivy821af151b025
diff --git a/server/lib/schemaVersions.js b/server/lib/schemaVersions.js
index 226e18923b..655bcce7b9 100644
--- a/server/lib/schemaVersions.js
+++ b/server/lib/schemaVersions.js
@@ -313,7 +313,11 @@ export const PORTOS_SCHEMA_VERSIONS = Object.freeze({
// tracks v11 = exact local audio captions and labeled prompt additions on
// takes. Older sanitizers would erase the record of what the model received.
// Optional on older takes; no stored records need rewriting.
- tracks: 11,
+ // tracks v12 = exact local audio lyric sheets and labeled lyric additions
+ // on takes. A <=v11 peer would strip sentLyrics/lyricAdditions, including
+ // on newly received takes where the sender-behind merge cannot restore them.
+ // Optional on older takes; no stored records need rewriting.
+ tracks: 12,
// v1 = creative ingredients catalog (Postgres tables: catalog_scraps,
// catalog_ingredients, catalog_ingredient_sources, catalog_ingredient_refs).
// v2 = `catalog_ingredients.search_tsv` expanded to also index the
diff --git a/server/lib/schemaVersions.test.js b/server/lib/schemaVersions.test.js
index 59ebb6306c..d5046b67a7 100644
--- a/server/lib/schemaVersions.test.js
+++ b/server/lib/schemaVersions.test.js
@@ -73,6 +73,21 @@ describe('buildPortosMeta', () => {
}
});
+ it('advertises lyric provenance to pause track transfers to caption-only peers', async () => {
+ const meta = await buildPortosMeta();
+ expect(meta.schemaVersions.tracks).toBe(12);
+ const olderPeer = { ...meta.schemaVersions, tracks: 11 };
+ const diff = compareSchemaVersions(meta.schemaVersions, olderPeer);
+ expect(scopeVersionDiff(diff, RECORD_KIND_SCHEMA_CATEGORIES.track)).toEqual({
+ compatible: false,
+ ahead: [{ category: 'tracks', senderV: 12, receiverV: 11 }],
+ behind: [],
+ });
+ // This upgrade pauses only tracks; unrelated artist/album sync still works.
+ expect(scopeVersionDiff(diff, RECORD_KIND_SCHEMA_CATEGORIES.artist).compatible).toBe(true);
+ expect(scopeVersionDiff(diff, RECORD_KIND_SCHEMA_CATEGORIES.album).compatible).toBe(true);
+ });
+
it('returns { portosVersion, schemaVersions } with the live registry', async () => {
const meta = await buildPortosMeta();
expect(meta.portosVersion).toMatch(/^\d+\.\d+\.\d+/);