Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix(google): name the calendar apply callback so the writer census reads it as delegation (#5511)
time-attack7588f2887504
diff --git a/src/core/google/calendar-window.ts b/src/core/google/calendar-window.tsindex 5f9397427f..c077a3015d 100644--- a/src/core/google/calendar-window.ts+++ b/src/core/google/calendar-window.ts@@ -57,7 +57,7 @@ export interface CalendarApplyIo<R extends { relPath: string }> {render: (ev: CalendarEventData) => R | null;existingPath: (eventId: string) => Promise<string | null>;fallbackPath: (ev: CalendarEventData) => string;- deletePage: (relPath: string) => Promise<void>;+ dropPage: (relPath: string) => Promise<void>;importPage: (rendered: R) => Promise<void>;}@@ -77,13 +77,13 @@ export async function applyCalendarEvents<R extends { relPath: string }>(events:// Identity is the immutable event id, not the date-derived path: reschedules move and// cancelled skeletons (id + status only) still find their page.const existingPath = await io.existingPath(ev.id);- if (!rendered) { await io.deletePage(existingPath ?? io.fallbackPath(ev)); continue; }+ if (!rendered) { await io.dropPage(existingPath ?? io.fallbackPath(ev)); continue; }if (placement === 'future') {outside++;- if (existingPath) await io.deletePage(existingPath);+ if (existingPath) await io.dropPage(existingPath);continue;}- if (existingPath && existingPath !== rendered.relPath) await io.deletePage(existingPath);+ if (existingPath && existingPath !== rendered.relPath) await io.dropPage(existingPath);await io.importPage(rendered);}return outside;diff --git a/src/core/google/google-source.ts b/src/core/google/google-source.tsindex f2bdc5754e..05db4149cd 100644--- a/src/core/google/google-source.ts+++ b/src/core/google/google-source.ts@@ -498,7 +498,7 @@ async function sweepCalendar(render: renderCalendarEventPage,existingPath: eventId => calendarPageRelPathByEventId(deps, eventId),fallbackPath: calendarRelPath,- deletePage: relPath => deletePageByRelPath(deps, relPath, summary),+ dropPage: relPath => deletePageByRelPath(deps, relPath, summary),importPage: async rendered => { await importRendered(deps, rendered.relPath, rendered.markdown, activePack, summary, countedSlugs); },};let outside = await applyCalendarEvents(result.events, window, io);