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([med-pipeline-server-routes-pipeline-js-1416-1452]): address codex review

[._.]/ Adam Eivye040fd4395b0
diff --git a/server/routes/pipeline.test.js b/server/routes/pipeline.test.js
index 8f5abafebf..f475459afe 100644
--- a/server/routes/pipeline.test.js
+++ b/server/routes/pipeline.test.js
@@ -1182,6 +1182,12 @@ describe('pipeline routes', () => {
.send({ target: 'final', useProofAsBase: true });
expect(second.status).toBe(200);
expect(second.body.backCover.script).toBe('Quiet rain over the empty market');
+ // Explicit empty string clears — distinct from absent.
+ const cleared = await request(app)
+ .post(`/api/pipeline/issues/${iss.body.id}/stages/comicPages/back-cover/render`)
+ .send({ backCoverScript: '' });
+ expect(cleared.status).toBe(200);
+ expect(cleared.body.backCover.script).toBe('');
});
it('POST /series/:id/seasons/:seasonId/cover/render preserves persisted cover.script when body omits coverScript', async () => {
@@ -1198,6 +1204,11 @@ describe('pipeline routes', () => {
.send({ target: 'final', useProofAsBase: true });
expect(second.status).toBe(200);
expect(second.body.season.cover.script).toBe('Collected arc hero shot');
+ const cleared = await request(app)
+ .post(`/api/pipeline/series/${ser.body.id}/seasons/${sea.body.id}/cover/render`)
+ .send({ coverScript: '' });
+ expect(cleared.status).toBe(200);
+ expect(cleared.body.season.cover.script).toBe('');
});
it('POST /series/:id/seasons/:seasonId/back-cover/render preserves persisted backCover.script when body omits backCoverScript', async () => {
@@ -1214,6 +1225,11 @@ describe('pipeline routes', () => {
.send({ target: 'final', useProofAsBase: true });
expect(second.status).toBe(200);
expect(second.body.season.backCover.script).toBe('Atmospheric companion image');
+ const cleared = await request(app)
+ .post(`/api/pipeline/series/${ser.body.id}/seasons/${sea.body.id}/back-cover/render`)
+ .send({ backCoverScript: '' });
+ expect(cleared.status).toBe(200);
+ expect(cleared.body.season.backCover.script).toBe('');
});
// -----------------------