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

address review (claude): correct the changelog's upload claim, pin non-rewrite on a write path

[._.]/ Adam Eivy66d45783fd50
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 72c6a6ab2b..1f6b15c4ed 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -25,7 +25,7 @@
## Sprite Manager
-- **[issue-2996] A character you'd started but not locked now begins at the turnaround sheet too** — when turnaround sheets landed, characters already in progress kept the old flow: they'd still ask for a main reference first, and only pick up sheets afterward. Now a character that hasn't frozen anything yet simply starts at step 1 like a new one — nothing of yours is lost, because nothing was locked. Characters that *have* frozen a main reference are untouched: their locked artwork stays exactly as it is, and they still backfill a sheet from it. Uploading a design image is now accepted only on the turnaround step, where it actually seeds the render — attaching one to the main reference used to be quietly ignored.
+- **[issue-2996] A character you'd started but not locked now begins at the turnaround sheet too** — when turnaround sheets landed, characters already in progress kept the old flow: they'd still ask for a main reference first, and only pick up sheets afterward. Now a character that hasn't frozen anything yet simply starts at step 1 like a new one — nothing of yours is lost, because nothing was locked. Characters that *have* frozen a main reference are untouched: their locked artwork stays exactly as it is, and they still backfill a sheet from it. Uploading a design image is now accepted only on the turnaround step, since that's the render it actually seeds — the main reference and every anchor are drawn from the sheet, so attaching a separate image to them has nowhere to go and is rejected with a clear message.
- **[issue-2979] Characters now start from a turnaround sheet, so accessories stop jumping sides** — directional anchors used to be drawn from a single front-facing reference, which meant the AI had to invent every side it hadn't seen: a hip bag on the character's front would migrate to their back in the north view, and pockets or straps would swap sides between the east and west profiles. The reference workflow is now three ordered steps. **1 · Turnaround sheet**: describe the character (or attach a design image) and generate one image showing them from four angles — front, right, back, left — with every accessory pinned to the same side of the body in each panel. Lock it, and it becomes the character's identity root. **2 · Main reference**: redrawn from the sheet's front panel with one click, no separate design input. **3 · Directional anchors**: each pose is now redrawn from the sheet's panel for *that* side, so the model can see the hip bag instead of guessing at it. Picking the chroma-key background also moved to the sheet lock, where it can see the character from every angle — so a green backpack that's only visible from behind is accounted for up front instead of surprising you later. Forking a character now seeds the new one's sheet from the original's, inheriting every side.
- **[issue-2979] Existing characters can backfill a turnaround sheet from their locked main** — a character you built before this shows the same three steps, with step 1 offering **Generate from locked main**: it expands the front view you already froze into the full four-view sheet, keeps your existing chroma key exactly as-is, and unblocks the directional anchors you haven't locked yet — which are then drawn from the sheet like a new character's. Already-locked references and anchors are untouched (they're immutable by design), so the benefit applies to whatever poses you still have left to derive.
- **[issue-2977] Loop Trimmer frames now render pixel-crisp** — the frame thumbnails and the playback preview in the Loop Trimmer looked soft and washed-out, as if the artwork had been compressed, which made it impossible to judge a frame before saving a trim. Your artwork was never affected — the trimmer was shrinking each frame to a fraction of its real size to draw it, then blurrily stretching that back up. Frames now draw at their full source resolution with the same crisp pixel scaling every other sprite view uses, so what you review is exactly what gets saved. The transparency checkerboard behind each frame is drawn by the page now instead of being baked into the shrunken frame, so its squares stay crisp and a fixed size rather than coming out blurry and oversized.
diff --git a/server/routes/sprites.test.js b/server/routes/sprites.test.js
index 51eac8d708..5b8b58f843 100644
--- a/server/routes/sprites.test.js
+++ b/server/routes/sprites.test.js
@@ -244,7 +244,8 @@ describe('sprites routes', () => {
it('POST /:id/reference/generate rejects an upload for main — the sheet is the only seedable target', async () => {
// #2996: the main derives from the locked turnaround, so a seed sent with it
- // has nowhere to go. Accepting one silently discarded it.
+ // has nowhere to go — reject at the route rather than let it reach a service
+ // that would have to discard it.
const boundary = '----spritetest';
const res = await request(app)
.post('/api/sprites/pioneer/reference/generate')
diff --git a/server/services/sprites/reference.test.js b/server/services/sprites/reference.test.js
index d231089b0a..40c0b45b8c 100644
--- a/server/services/sprites/reference.test.js
+++ b/server/services/sprites/reference.test.js
@@ -269,6 +269,15 @@ describe('startReferenceGeneration', () => {
expect(manifest.chromaKey).toBe('#FF00FF');
// Locked evidence is never rewritten as a side effect of a read.
expect(await readFile(abs, 'utf8')).toBe(before);
+
+ // …nor through a WRITE path: the backfill's generate saves the manifest, so
+ // this is where an over-eager upgrade would actually land on disk.
+ await startReferenceGeneration(id, { target: 'turnaround' });
+ const afterWrite = JSON.parse(await readFile(abs, 'utf8'));
+ expect(afterWrite.schemaVersion).toBe(1);
+ expect(afterWrite.turnaround).toBeUndefined();
+ expect(afterWrite.mainReference.locked).toBe(true);
+ expect(afterWrite.chromaKey).toBe('#FF00FF');
});
it('derives anchors from the locked turnaround via i2i with the selected key in the prompt', async () => {