Skip to content

Commit 5d567da

Browse files
committed
migrations: track the source-agnostic prompt hashes across prior stage-prompt migrations
Making the pipeline + story-builder prompts source-agnostic (migrations 054/055) changed the live data.reference bodies. Per the repo convention, every prior migration that ships a NEW_SHIPPED_MD5 for one of those prompts must keep that hash pointing at the current reference and accumulate the prior hash in its accepted-old lineage — otherwise the drift-catch tests fail and an install at the pre-054 hash wouldn't recognize the upgrade path. Bumped NEW + appended the prior hash for the four pipeline stage prompts in migrations 003/004/013/025/027 and the story-builder idea prompt in 043, and mirrored both into the setup-data.js drift table.
1 parent 06435f9 commit 5d567da

6 files changed

Lines changed: 31 additions & 21 deletions

scripts/migrations/003-update-pipeline-stage-prompts.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,18 @@ export const ACCEPTED_OLD_MD5 = {
2323
'aee25112b2c596f643b17c559b772c22', // pre-003 (original)
2424
'41facefbc0c0549d456bef9111f95ab9', // post-003 / pre-004 — the hash this migration originally produced
2525
'1ee44cf95851ff8debf18729ebcd40b4', // post-004 / pre-025
26+
'1f3c5d077a5ef9a4b610335d5e3edd9c', // post-025 / pre-054
2627
],
2728
'pipeline-prose.md': [
2829
'bfea5aeeb471aae9749baee765b473a7', // pre-003 (original)
2930
'30ac30ec2b9d3e2a9eb869c181732cc6', // post-003 / pre-027 — the hash this migration originally produced
31+
'd1f8e3f1d214725b5aa67f309a81cd7d', // post-027 / pre-054
3032
],
3133
'pipeline-comic-script.md': [
3234
'40e5fdc1a1e68a7419b7dad936366c1a', // pre-003 (original)
3335
'beab031951859ca13579cdb9c4dbe769', // post-003 / pre-013 — the hash this migration originally produced
3436
'1e0af305c27d0c80c4b482d2ebcb4a0d', // post-013 / pre-027
37+
'133d200d069c2e8173b7c129eea58f53', // post-027 / pre-054
3538
],
3639
'pipeline-tv-script.md': ['3f6fecc25573ed054b47db392250034a'],
3740
'pipeline-season-episodes.md': [
@@ -41,9 +44,9 @@ export const ACCEPTED_OLD_MD5 = {
4144
};
4245

4346
export const NEW_SHIPPED_MD5 = {
44-
'pipeline-idea-expansion.md': '1f3c5d077a5ef9a4b610335d5e3edd9c', // post-025
45-
'pipeline-prose.md': 'd1f8e3f1d214725b5aa67f309a81cd7d', // post-027
46-
'pipeline-comic-script.md': '133d200d069c2e8173b7c129eea58f53', // post-027
47+
'pipeline-idea-expansion.md': 'b5c47c94ffc74637983c95761ab0c66c', // post-054
48+
'pipeline-prose.md': 'bef1bc2767b78f585f2bd89f3d615130', // post-054
49+
'pipeline-comic-script.md': 'e530fc76b89cedaef848ad7ec99c934c', // post-054
4750
'pipeline-tv-script.md': '376f779f4687b598f1c92ca4e770fd5a', // retired upstream (no data.reference)
4851
'pipeline-season-episodes.md': '50c68a29c3ebc275db3095d06bd87100', // post-005
4952
};

scripts/migrations/004-augment-idea-expansion-context.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ export const ACCEPTED_OLD_MD5 = {
1515
'pipeline-idea-expansion.md': [
1616
'1ee44cf95851ff8debf18729ebcd40b4', // post-004 / pre-025 — the hash this migration originally produced
1717
'41facefbc0c0549d456bef9111f95ab9', // post-003 / pre-004
18+
'1f3c5d077a5ef9a4b610335d5e3edd9c', // post-025 / pre-054
1819
],
1920
};
2021

2122
export const NEW_SHIPPED_MD5 = {
22-
'pipeline-idea-expansion.md': '1f3c5d077a5ef9a4b610335d5e3edd9c', // post-025
23+
'pipeline-idea-expansion.md': 'b5c47c94ffc74637983c95761ab0c66c', // post-054
2324
};
2425

2526
const { applyMigration, up } = makePromptReplaceMigration({

scripts/migrations/013-comic-script-back-cover.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ export const ACCEPTED_OLD_MD5 = {
1818
'40e5fdc1a1e68a7419b7dad936366c1a', // pre-003 (original)
1919
'beab031951859ca13579cdb9c4dbe769', // post-003 (length-profile feature)
2020
'1e0af305c27d0c80c4b482d2ebcb4a0d', // post-013 / pre-027 — the hash this migration originally produced
21+
'133d200d069c2e8173b7c129eea58f53', // post-027 / pre-054
2122
],
2223
};
2324

2425
export const NEW_SHIPPED_MD5 = {
25-
'pipeline-comic-script.md': '133d200d069c2e8173b7c129eea58f53', // post-027
26+
'pipeline-comic-script.md': 'e530fc76b89cedaef848ad7ec99c934c', // post-054
2627
};
2728

2829
const { applyMigration, up } = makePromptReplaceMigration({

scripts/migrations/025-idea-stage-character-detail.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ export const ACCEPTED_OLD_MD5 = {
2929
'1ee44cf95851ff8debf18729ebcd40b4', // post-004 shipped — current pre-025
3030
'41facefbc0c0549d456bef9111f95ab9', // post-003, pre-004, still in setup-data.js OLD list
3131
'aee25112b2c596f643b17c559b772c22', // pre-003, still in setup-data.js OLD list
32+
'1f3c5d077a5ef9a4b610335d5e3edd9c', // post-025 / pre-054
3233
],
3334
};
3435

3536
// New shipped hash — what data.reference carries post-migration.
3637
export const NEW_SHIPPED_MD5 = {
37-
'pipeline-idea-expansion.md': '1f3c5d077a5ef9a4b610335d5e3edd9c',
38+
'pipeline-idea-expansion.md': 'b5c47c94ffc74637983c95761ab0c66c', // post-054
3839
};
3940

4041
const { applyMigration, up } = makePromptReplaceMigration({

scripts/migrations/027-text-stage-prompts-entities-summary.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,28 @@ export const ACCEPTED_OLD_MD5 = {
4040
'pipeline-prose.md': [
4141
'30ac30ec2b9d3e2a9eb869c181732cc6', // post-003 / pre-027 shipped
4242
'bfea5aeeb471aae9749baee765b473a7', // pre-003 (in setup-data OLD list)
43+
'd1f8e3f1d214725b5aa67f309a81cd7d', // post-027 / pre-054
4344
],
4445
'pipeline-teleplay.md': [
4546
'376f779f4687b598f1c92ca4e770fd5a', // pre-027 shipped
4647
'3f6fecc25573ed054b47db392250034a', // pre-shape (in setup-data OLD list)
48+
'1280ef6b1ad68fa44070ca7478ec2a5f', // post-027 / pre-054
4749
],
4850
'pipeline-comic-script.md': [
4951
'1e0af305c27d0c80c4b482d2ebcb4a0d', // post-011 / pre-027 shipped
5052
'beab031951859ca13579cdb9c4dbe769', // pre-011 (in setup-data OLD list)
5153
'40e5fdc1a1e68a7419b7dad936366c1a', // pre-003 (in setup-data OLD list)
54+
'133d200d069c2e8173b7c129eea58f53', // post-027 / pre-054
5255
],
5356
'universe-character-expand.md': [
5457
'ef109eb8e12ddb664c11c790271b5139', // pre-027 shipped
5558
],
5659
};
5760

5861
export const NEW_SHIPPED_MD5 = {
59-
'pipeline-prose.md': 'd1f8e3f1d214725b5aa67f309a81cd7d',
60-
'pipeline-teleplay.md': '1280ef6b1ad68fa44070ca7478ec2a5f',
61-
'pipeline-comic-script.md': '133d200d069c2e8173b7c129eea58f53',
62+
'pipeline-prose.md': 'bef1bc2767b78f585f2bd89f3d615130', // post-054
63+
'pipeline-teleplay.md': '2568e14beaa574d43f8018a5def51d04', // post-054
64+
'pipeline-comic-script.md': 'e530fc76b89cedaef848ad7ec99c934c', // post-054
6265
'universe-character-expand.md': '67b6e73ed47f318451a730088b4cff14',
6366
};
6467

scripts/setup-data.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,16 +141,17 @@ const SHIPPED_PROMPT_OLD_MD5 = {
141141
// idea-expansion: aee… (pre-003), 41fa… (post-003, pre-004), and
142142
// 1ee44c… (post-004, pre-025) all auto-updatable to the post-025
143143
// (role/physicalDescription/personality/background plumbing) hash.
144-
'pipeline-idea-expansion.md': ['aee25112b2c596f643b17c559b772c22', '41facefbc0c0549d456bef9111f95ab9', '1ee44cf95851ff8debf18729ebcd40b4'],
144+
// post-054 ({{#sourceMaterials}} source-agnostic block) appends the prior
145+
// post-025/post-027 hashes to each chain.
146+
'pipeline-idea-expansion.md': ['aee25112b2c596f643b17c559b772c22', '41facefbc0c0549d456bef9111f95ab9', '1ee44cf95851ff8debf18729ebcd40b4', '1f3c5d077a5ef9a4b610335d5e3edd9c'],
145147
// prose: bfea5a… (pre-003) and 30ac30… (post-003, pre-027) both auto-
146-
// updatable to the post-027 ({{worldEntitiesSummary}}) hash.
147-
'pipeline-prose.md': ['bfea5aeeb471aae9749baee765b473a7', '30ac30ec2b9d3e2a9eb869c181732cc6'],
148+
// updatable to the post-054 (source-agnostic) hash.
149+
'pipeline-prose.md': ['bfea5aeeb471aae9749baee765b473a7', '30ac30ec2b9d3e2a9eb869c181732cc6', 'd1f8e3f1d214725b5aa67f309a81cd7d'],
148150
// comic-script: 40e5fd… (pre-003), beab03… (post-003, pre-011), and 1e0af3…
149-
// (post-011, pre-027) all auto-updatable to the post-027 ({{worldEntitiesSummary}}) hash.
150-
'pipeline-comic-script.md': ['40e5fdc1a1e68a7419b7dad936366c1a', 'beab031951859ca13579cdb9c4dbe769', '1e0af305c27d0c80c4b482d2ebcb4a0d'],
151-
// teleplay: 3f6fec… (pre-027) auto-updatable to the post-027
152-
// ({{worldEntitiesSummary}}) hash. Original 376f77… is the post-027 prior.
153-
'pipeline-teleplay.md': ['3f6fecc25573ed054b47db392250034a', '376f779f4687b598f1c92ca4e770fd5a'],
151+
// (post-011, pre-027) all auto-updatable to the post-054 (source-agnostic) hash.
152+
'pipeline-comic-script.md': ['40e5fdc1a1e68a7419b7dad936366c1a', 'beab031951859ca13579cdb9c4dbe769', '1e0af305c27d0c80c4b482d2ebcb4a0d', '133d200d069c2e8173b7c129eea58f53'],
153+
// teleplay: 3f6fec… (pre-027) auto-updatable to the post-054 hash.
154+
'pipeline-teleplay.md': ['3f6fecc25573ed054b47db392250034a', '376f779f4687b598f1c92ca4e770fd5a', '1280ef6b1ad68fa44070ca7478ec2a5f'],
154155
// season-episodes: 6e349a… (pre-003) and c4928e… (post-003, pre-005) both
155156
// auto-updatable to the post-005 (shape-aware) hash.
156157
'pipeline-season-episodes.md': ['6e349ad26bed8a0ccb042571f03f03eb', 'c4928e2a5f833358116b29d2d669888d'],
@@ -193,10 +194,10 @@ const SHIPPED_PROMPT_OLD_MD5 = {
193194
],
194195
};
195196
const SHIPPED_PROMPT_NEW_MD5 = {
196-
'pipeline-idea-expansion.md': '1f3c5d077a5ef9a4b610335d5e3edd9c',
197-
'pipeline-prose.md': 'd1f8e3f1d214725b5aa67f309a81cd7d',
198-
'pipeline-comic-script.md': '133d200d069c2e8173b7c129eea58f53',
199-
'pipeline-teleplay.md': '1280ef6b1ad68fa44070ca7478ec2a5f',
197+
'pipeline-idea-expansion.md': 'b5c47c94ffc74637983c95761ab0c66c',
198+
'pipeline-prose.md': 'bef1bc2767b78f585f2bd89f3d615130',
199+
'pipeline-comic-script.md': 'e530fc76b89cedaef848ad7ec99c934c',
200+
'pipeline-teleplay.md': '2568e14beaa574d43f8018a5def51d04',
200201
'pipeline-season-episodes.md':'50c68a29c3ebc275db3095d06bd87100',
201202
'pipeline-arc-overview.md': '0a1f6ffa6908522e3690c5e9e53a6ee0',
202203
'pipeline-arc-verify.md': '36aa70cdfc25d7549573a4d556e7702c',

0 commit comments

Comments
 (0)