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

refactor([issue-2924]): name the synthesized run's manifest field for its own schema

[._.]/ Adam Eivyc3b185e4f5fa
diff --git a/client/src/components/sprites/WalkWorkflow.jsx b/client/src/components/sprites/WalkWorkflow.jsx
index a97167397f..6bcb4c2491 100644
--- a/client/src/components/sprites/WalkWorkflow.jsx
+++ b/client/src/components/sprites/WalkWorkflow.jsx
@@ -33,7 +33,7 @@ const WALK_DURATIONS = [6, 10];
*/
function stripGeometry(stripPreview) {
const rawCount = Math.round(Number(stripPreview?.frameCount));
- const frameCount = Number.isInteger(rawCount) && rawCount > 1 ? rawCount : WALK_PHASES.length;
+ const frameCount = rawCount > 1 ? rawCount : WALK_PHASES.length; // NaN > 1 is false
const fps = Number(stripPreview?.fps) > 0 ? Number(stripPreview.fps) : 12;
const cellWidth = Number(stripPreview?.cellWidth);
const cellHeight = Number(stripPreview?.cellHeight);
diff --git a/server/services/sprites/walk.js b/server/services/sprites/walk.js
index 0d717c216d..2526d45a2d 100644
--- a/server/services/sprites/walk.js
+++ b/server/services/sprites/walk.js
@@ -159,7 +159,10 @@ async function loadRedrawRun(recordId, direction, entry) {
characterId: recordId,
direction,
createdAt: entry.approvedAt,
- postprocessManifest: manifestRel,
+ // Deliberately NOT `postprocessManifest`: that field names a packaged grok
+ // manifest (frames[] + alignment), and approve/trim resolve it as one. A
+ // redraw manifest is a different schema, so it gets a distinct field.
+ redrawManifest: manifestRel,
stripPreview: {
stripPath,
frameCount,
diff --git a/server/services/sprites/walk.test.js b/server/services/sprites/walk.test.js
index 2aab909af6..f33bc92144 100644
--- a/server/services/sprites/walk.test.js
+++ b/server/services/sprites/walk.test.js
@@ -471,7 +471,7 @@ describe('getWalkState', () => {
direction: 'east',
status: 'approved',
kind: 'imported-redraw-walk-cycle',
- postprocessManifest: REDRAW_MANIFEST_REL,
+ redrawManifest: REDRAW_MANIFEST_REL,
stripPreview: {
stripPath: 'imagegen/v19/clean-alpha.png',
frameCount: 12,
@@ -505,18 +505,12 @@ describe('getWalkState', () => {
expect((await getWalkState(id)).runs).toEqual([]);
});
+ // The selection is written by the real approval path, so the shadowing
+ // check runs against the entry shape production actually produces.
it('does not shadow a direction that DOES have a scanned grok run', async () => {
const id = await characterWithLockedAnchors(newId(), ['east']);
- const { runId } = await startWalkGeneration(id, { direction: 'east' });
- await mkdir(join(TEST_ROOT, 'sprites', id, 'walk'), { recursive: true });
- await writeFile(join(TEST_ROOT, 'sprites', id, 'walk', `${id}-walk-selection-v1.json`), JSON.stringify({
- schemaVersion: 1,
- characterId: id,
- status: 'in-progress',
- directions: {
- east: { status: 'approved', runId, runManifest: `grok/${runId}/animation-run.json` },
- },
- }));
+ const { runId } = await makeCandidateRun(id, 'east');
+ await approveWalkDirection(id, { direction: 'east', runId });
const { runs } = await getWalkState(id);
expect(runs).toHaveLength(1);
expect(runs[0].kind).toBe('grok-game-animation-frames-run');