Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
fix(slack): private re-stamp refuses a segmented page; reviewed page-body reader row
garrytan3ccaa4898b20
diff --git a/scripts/page-body-readers-baseline.tsv b/scripts/page-body-readers-baseline.tsvindex cd77d82d89..810ce63658 100644--- a/scripts/page-body-readers-baseline.tsv+++ b/scripts/page-body-readers-baseline.tsv@@ -604,6 +604,7 @@ src/core/search/safe-chunks.ts protectedBodyFilter sql META segmented page: bodysrc/core/shared-skills/migration-export.ts exportInventory call:serializeMarkdown INLINEsrc/core/shared-skills/migration-export.ts exportInventory field INLINEsrc/core/shared-skills/migration-projection.ts assertExportProjectionRoundtrip field INLINE+src/core/slack/slack-source.ts runSlackSyncInner call:serializePageToMarkdown INLINE T23 private re-stamp republishes the stored day page; assertInlineBody refuses a segmented page first (the day is held), and Slack day pages are at most 2 MiBsrc/core/sweep.ts runLinksTimelinePass field INLINE inline arm; a segmented page streams its links (segment-links.ts) and timeline (bodyBlocks)src/core/sweep.ts runMaintenanceSweep sql STREAM LIKE over NULL never matches a segmented page (skip)src/core/think/gather.ts renderPagesBlockDetailed field LEAD segmented page: getter throws page_body_segmenteddiff --git a/src/core/slack/slack-source.ts b/src/core/slack/slack-source.tsindex 5fa190aef8..8efc04e42b 100644--- a/src/core/slack/slack-source.ts+++ b/src/core/slack/slack-source.ts@@ -32,6 +32,7 @@ import { connectorDbCursorKey, readConnectorDbCursor, writeConnectorDbCursor } fimport { resolveApiToken } from '../connectors/credentials.ts';import { connectorRender } from '../connectors/connector-text.ts';import { serializePageToMarkdown } from '../markdown.ts';+import { assertInlineBody } from '../page-body/page-shape.ts';import { ConnectorAccessDeniedError, ConnectorAuthError, ConnectorRateLimitedError, ConnectorRunLimitError } from '../connectors/client.ts';import {afterConnectorPublish, closeCoverageWindow, deleteConnectorPage, openCoverageWindow, publishConnectorPage, recordRateLimit, runScoped,@@ -237,6 +238,7 @@ async function runSlackSyncInner(engine: BrainEngine, sourceId: string, cfg: Slaawait handle(`${channelId}/${day}`, async () => {const page = await engine.getPage(slug, { sourceId });if (!page) return;+ assertInlineBody(page, 'slack private re-stamp');const markdown = serializePageToMarkdown(page, await engine.getTags(slug, { sourceId }), { frontmatterOverrides: { visibility: 'private' } });await publishConnectorPage(ctx, { relPath, markdown: connectorRender(markdown, { path: relPath, slack_channel_id: channelId }),commitMessage: `slack(${sourceId}): ${channelId} ${day} is private`, privateMessage: `slack(${sourceId}): ${channelId} ${day} is private; database only`,