Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

docs: key-files entry for the no-op embedding check (#7866)

garrytand7fe43db14d9
diff --git a/docs/architecture/key-files/core-persistence-continued.md b/docs/architecture/key-files/core-persistence-continued.md
index 88b0488c36..0787b07723 100644
--- a/docs/architecture/key-files/core-persistence-continued.md
+++ b/docs/architecture/key-files/core-persistence-continued.md
@@ -23,7 +23,7 @@ The #6188 fence check and fence repair live in [fence repair](core-fence-repair.
- `src/core/connectors/connector-text.ts` — #5752 render boundary: prose sanitized with `sanitizeForJsonb` before the no-op screen; identity fields refuse with `invalid_connector_text`.
- `src/core/persistence/connector-account.ts` — resolves the credential's account before any service runs: Google through `probeGoogleAccount` in `google/api-access.ts` (Gmail profile, Calendar primary calendar or People `me`, first enabled service that answers, else OAuth userinfo, #7073), returning the probe with every per-service error; when nothing names the account it rethrows `api_not_enabled` first, then another credential error, then the first other failure, so `connector_account_changed` means a resolved account that differs from the pin (test/google-api-access-managed-7073.test.ts), GitHub App installation id from the minted token, or the `/user` login for token auth under `scope: auto`.
- `src/core/persistence/connector-errors.ts` — `connector_account_changed` with its two-exit hint, the retired-intent messages, and `receiptDeliveredHint`, which rebuilds `suggestion`/`detail`/`docs` for codes delivered through a stored receipt (the coordinator persists only code and message); `writeResponse` applies it.
-- `src/core/persistence/noop-kernel.ts` — the #5470 no-op kernel. `inspectUnchanged` takes a preparer's `PreparedMutation` for an unadmitted `screeningRequest` and returns `contentUnchanged`, `projectionWorkRequired` (safe-chunk fence, text projection behind the knowledge revision, embedded page without a contextual mode), `metadataWorkRequired` (source path) and `observedRevision`; bound pages also need local file bytes equal to the serialized page. The page's current `knowledge_revision`, read with the projection flags, must still equal the snapshot's revision (a write after the screen's snapshot admits as `revision_moved`). Callers run the preparer's own `validate` before counting a skip. An optional `waive` list (#5751) lets a caller skip two admit reasons its no-op publication can never resolve, a pending contextual-mode stamp and file bytes that differ from the prepared content (never a missing file); the result lists each waiver applied in `waived`; only managed working-tree sync entries and `put-page-screen.ts` pass it. Used by connector sync, `import-mutations.ts`, `sync-run.ts` (working-tree and company-profile entries; renames and overlays always admit) and `put-page-screen.ts` (the managed transcript import's `put_page`, waiving `canonical_file_differs` for a file the preparer accepted). Tests: `test/noop-kernel-paths.test.ts`, `test/connector-wave3.test.ts`.
+- `src/core/persistence/noop-kernel.ts` — the #5470 no-op kernel. `inspectUnchanged` takes a preparer's `PreparedMutation` for an unadmitted `screeningRequest` and returns `contentUnchanged`, `projectionWorkRequired` (safe-chunk fence, text projection behind the knowledge revision, embedded page without a contextual mode), `metadataWorkRequired` (source path) and `observedRevision`; bound pages also need local file bytes equal to the serialized page. The page's current `knowledge_revision`, read with the projection flags, must still equal the snapshot's revision (a write after the screen's snapshot admits as `revision_moved`). Callers run the preparer's own `validate` before counting a skip. An optional `waive` list (#5751) lets a caller skip two admit reasons its no-op publication can never resolve, a pending contextual-mode stamp and file bytes that differ from the prepared content (never a missing file); the result lists each waiver applied in `waived`; only managed working-tree sync entries and `put-page-screen.ts` pass it. Used by connector sync, `import-mutations.ts`, `sync-run.ts` (working-tree and company-profile entries; renames and overlays always admit) and `put-page-screen.ts` (the managed transcript import's `put_page`, waiving `canonical_file_differs` for a file the preparer accepted). `chunksEmbeddedAsIs` (#7866) says whether a content no-op leaves the page no embedding work (text projection sealed at its revision and at or above the safe-chunk fence, and every current-generation chunk holding a vector for its exact text); `sync-prepare.ts` then sets `embeddingCurrent` and `queuePublicationEffects` (`effect-journal.ts`) queues no embedding effect (`embedding_state: current`). Tests: `test/noop-kernel-paths.test.ts`, `test/connector-wave3.test.ts`, `test/git-canonical-conversion-strict-pass-7866.test.ts`.
- `src/core/persistence/put-page-screen.ts` — #6741 B: `unchangedPutPage` screens a trusted local put_page (the transcript import) through `preparePageAdmission` (unadmitted), the page publication preparer and the no-op kernel; skips admission only on a genuine no-op with no pending request, no segmented body and no projection work. Tests: `test/transcripts-managed-noop.test.ts`.
- `src/core/persistence/import-reads.ts` — GBRA-75 wave 10: `readImportSnapshots` reads a run of pages as `readPageSnapshot(slug, { sourceId, includeDeleted: true })` returns each (soft-deleted rows, withdrawals and purge markers included) through `readPageSnapshotsBatch({ includeDeleted, absentIsNull })`, looping over its byte-budget prefixes; the managed import screen uses it for two or more new members. `importGroupReads` serves an import group's preparation (`group-publish.ts` `preparationReads`): each member's first own snapshot read comes from one batch, and `findDuplicatePage` calls that arrive together (all members, or a 2 ms window) are answered by one `findDuplicatePages` (`engine-sql/pages.ts`, same predicate and ranking per input); a failed batch falls back to each member's single read; with `reread` (the read-only screen) a member's later reads of its page come from the batch too. GBRA-108: `sliceReads` answers a screened slice's per-page reads (the origin claimants of `sync-origin.ts`, the stored timeline and take collisions of `canonical-projections.ts`, the safe-chunk fence of `page-state/projections.ts`, matched by their exported statements) from one statement per kind over the slice, row for row; a page with stored takes, a page or path outside the slice, a signalled call or a failed slice read runs its own statement (test `test/sync-legacy-sweep-gbra108.test.ts`). Tests: `test/import-reads.test.ts`, Postgres arm `test/e2e/import-reads.test.ts`.