Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

Merge remote-tracking branch 'origin/capy/large-pages-segmented-storage' into capy/large-pages-1d

garrytan05f80e4c94e4
diff --cc scripts/page-body-readers-baseline.tsv
index bf8fadf83c,1a4ae854e8..cf61120631
--- a/scripts/page-body-readers-baseline.tsv
+++ b/scripts/page-body-readers-baseline.tsv
@@@ -312,18 -312,10 +312,16 @@@ src/core/oversized-backfill.ts reindexP
src/core/page-body/body-scan.ts scanMarkdownString field NONE not a stored body: scans an incoming markdown string for the segmenter
src/core/page-body/content-hash-stream.ts ContentHashStream.fromState field NONE not a stored body: resumes the streaming content hash over incoming text
src/core/page-body/content-hash-stream.ts streamingContentHash field NONE not a stored body: hashes an incoming page streamed region by region
+src/core/page-body/ingest.ts materializeSegmentedBody field STREAM the segment reader's string form, for single-string write paths; callers materialize only bodies within PAGE_MAX_BYTES
+src/core/page-body/ingest.ts stageBody field NONE not a stored body: the write's region byte streams and the per-region leads it computes
src/core/page-body/page-shape.ts pageBodyBytes field INLINE inline branch of pageBodyBytes; a segmented page answers body_bytes
src/core/page-body/schema.ts PAGE_GENERATION_BUMP_FN_SQL sql STREAM trigger DDL: compares the body columns of inline rows; segmented rows compare body_generation (lane 1a)
+src/core/page-body/segmenter.ts Segmenter.blocked field NONE not the page body: st.timeline is the segmenter's timeline-run parser state
+src/core/page-body/segmenter.ts Segmenter.line field NONE not the page body: st.timeline is the segmenter's timeline-run parser state
+src/core/page-body/segmenter.ts Segmenter.piece field NONE not the page body: st.timeline is the segmenter's timeline-run parser state
+src/core/page-body/streamed-import.ts importScanned field LEAD bounded heads of the streamed file's regions for the sanity and type checks; the body itself streams to the segmenter
- src/core/page-embedding-budget.ts pageBytes field META lane 1e file: body_bytes for segmented pages
src/core/page-embedding-budget.ts planPageEmbedding field META lane 1e file: body_bytes for segmented pages
src/core/page-embedding-budget.ts readPageSizeStates sql META lane 1e file: body_bytes for segmented pages
- src/core/page-embedding-budget.ts sizeStateField field META lane 1e file: body_bytes for segmented pages
src/core/page-snapshot-batch.ts readPageSnapshotsBatch field STREAM same as readPageSnapshot: overlay skipped for a segmented page
src/core/page-snapshot-batch.ts readPageSnapshotsBatch sql STREAM p.* feeds rowToPage; the byte budget counts a segmented row as 0 (no body shipped); fingerprint over a NULL body is empty
src/core/page-state/credential-reseal.ts PENDING sql STREAM regex over NULL is false: segmented pages postdate the v189 unseal and are chunked by the credential-safe segment chunker; pem regions in PR 2
diff --cc src/core/persistence/page-prepare.ts
index ff8232be6a,58c266d270..6c06eda13f
--- a/src/core/persistence/page-prepare.ts
+++ b/src/core/persistence/page-prepare.ts
@@@ -39,9 -39,10 +39,11 @@@ import type { PreparedMutation } from '
import type { SqlEngine, WriteRequest } from './model.ts';
import { isUnboundSourcePage } from './unbound-source.ts';
import { sealImportedPage, sealPageTextProjection } from '../page-state/projections.ts';
+import { materializedSnapshot, sealSegmentedPage } from './segmented-apply.ts';
import { pipelined } from '../page-state/transactions.ts';
import { overlayCanonicalBodies } from '../page-state/snapshot.ts';
+ import { segmentedRevertRefusal } from '../page-state/versions.ts';
+ import { isSegmentedPage } from '../page-body/page-shape.ts';
import { materializeTimeline, prepareCanonicalProjections, type TimelineRowsRemoved } from './canonical-projections.ts';
import { assertTimelineNotOmitted, timelineWritePolicy } from './timeline-omission.ts';
import { preserveProtectedTakes } from './protected-takes.ts';