Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

piece-runs: fix log phase payload shape — nest events under data

/api/piece-log's log branch reads data.events, but disk.mjs was posting
{ events } at the top level, so the server always saw an empty array
and never $pushed anything. Verified against prod: 0 of 8669 piece-runs
had an events field.

Both call sites (per-tick flush and end-of-piece complete) now wrap
events in { data: { events } }, matching start's { meta } and
complete's { data: {...summary} } shapes.

This unblocks the cam/init and cam/frame diagnostics from cap.mjs —
they can now actually be read back via ac-piece-logs-events.

+2 -2
+2 -2
system/public/aesthetic.computer/lib/disk.mjs
··· 1021 1021 if (run.flushTimer) { clearTimeout(run.flushTimer); run.flushTimer = null; } 1022 1022 if (run.events.length) { 1023 1023 const events = run.events.splice(0, run.events.length); 1024 - post("log", run.pieceId, { events }); 1024 + post("log", run.pieceId, { data: { events } }); 1025 1025 } 1026 1026 post("complete", run.pieceId, { 1027 1027 data: { duration: Date.now() - run.startedAt, ...summary }, ··· 1046 1046 if (run.flushTimer) { clearTimeout(run.flushTimer); run.flushTimer = null; } 1047 1047 if (!run.events.length) return; 1048 1048 const events = run.events.splice(0, run.events.length); 1049 - post("log", run.pieceId, { events }); 1049 + post("log", run.pieceId, { data: { events } }); 1050 1050 }; 1051 1051 current = run; 1052 1052 post("start", pieceId, {