Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

chore(wave): move atom-origin.ts under persistence so the pglite-snapshot cache keys cover it; weigh the three new Postgres-arm files

garrytanb4831b9fba98
diff --git a/scripts/postgres-arm-weights-postgres-only.json b/scripts/postgres-arm-weights-postgres-only.json
index 012090627d..a5fe8b0afe 100644
--- a/scripts/postgres-arm-weights-postgres-only.json
+++ b/scripts/postgres-arm-weights-postgres-only.json
@@ -43,6 +43,7 @@
"test/embedding-completion-atomic.serial.test.ts": 9621,
"test/engine-sql-facts-keyset.test.ts": 2267,
"test/extract-all-stamp-intersection.serial.test.ts": 10381,
+ "test/extract-atoms-concurrent-run-7923.test.ts": 14424,
"test/extract-atoms-input-truncated-6503.test.ts": 11495,
"test/extract-endpoint-revision.serial.test.ts": 6202,
"test/extract-entities-managed.test.ts": 34227,
@@ -332,9 +333,11 @@
"test/purge-global-marker.test.ts": 5204,
"test/purge-missing-cache-6911.test.ts": 10826,
"test/purge-read-surfaces.test.ts": 15834,
+ "test/purge-root-metafile-7613.test.ts": 13254,
"test/recall-page-fill.test.ts": 7624,
"test/receipt-compaction-newest-sync-gbra130.test.ts": 4363,
"test/remediation-manual-only.test.ts": 8860,
+ "test/rename-atom-lineage-7462.test.ts": 6903,
"test/repair-apply-pending-6543.test.ts": 35070,
"test/repair-embedding-effects.test.ts": 6872,
"test/repair-failed-writes-conflict-6429.test.ts": 3959,
diff --git a/scripts/postgres-arm-weights.json b/scripts/postgres-arm-weights.json
index 6832690539..9b6ed6eaaf 100644
--- a/scripts/postgres-arm-weights.json
+++ b/scripts/postgres-arm-weights.json
@@ -47,6 +47,7 @@
"test/embedding-completion-atomic.serial.test.ts": 7835,
"test/engine-sql-facts-keyset.test.ts": 4005,
"test/extract-all-stamp-intersection.serial.test.ts": 6588,
+ "test/extract-atoms-concurrent-run-7923.test.ts": 14424,
"test/extract-atoms-input-truncated-6503.test.ts": 13228,
"test/extract-endpoint-revision.serial.test.ts": 5562,
"test/extract-entities-managed.test.ts": 18391,
@@ -359,10 +360,12 @@
"test/purge-global-marker.test.ts": 12254,
"test/purge-missing-cache-6911.test.ts": 7947,
"test/purge-read-surfaces.test.ts": 12587,
+ "test/purge-root-metafile-7613.test.ts": 13254,
"test/purge-sync-tombstone-hold-7130.test.ts": 32010,
"test/recall-page-fill.test.ts": 15026,
"test/receipt-compaction-newest-sync-gbra130.test.ts": 4159,
"test/remediation-manual-only.test.ts": 11868,
+ "test/rename-atom-lineage-7462.test.ts": 6903,
"test/repair-apply-pending-6543.test.ts": 48045,
"test/repair-embedding-effects.test.ts": 7141,
"test/repair-failed-writes-conflict-6429.test.ts": 7077,
diff --git a/src/commands/doctor/checks/derived-visibility.ts b/src/commands/doctor/checks/derived-visibility.ts
index 5a07fcc81b..feefa3dd65 100644
--- a/src/commands/doctor/checks/derived-visibility.ts
+++ b/src/commands/doctor/checks/derived-visibility.ts
@@ -20,7 +20,7 @@ import type { BrainEngine } from '../../../core/engine.ts';
import type { Check } from '../../doctor.ts';
import { derivationPrivateSql, privateSnapshotFilterFragment, readHonorAliases } from '../../../core/search/private-visibility.ts';
import { aliasOnlyPagesSql, PLAN_STATEMENT_MS, worldFactsFromPrivateSources } from '../../../core/repair/visibility.ts';
-import { atomOriginSlugSql, atomOriginSlugsSql } from '../../../core/page-state/atom-origin.ts';
+import { atomOriginSlugSql, atomOriginSlugsSql } from '../../../core/persistence/atom-origin.ts';
const FACT_SAMPLE = 50;
diff --git a/src/core/page-state/atom-origin.ts b/src/core/persistence/atom-origin.ts
similarity index 100%
rename from src/core/page-state/atom-origin.ts
rename to src/core/persistence/atom-origin.ts
diff --git a/src/core/repair/stale-atoms.ts b/src/core/repair/stale-atoms.ts
index 869278eaea..c700a961cd 100644
--- a/src/core/repair/stale-atoms.ts
+++ b/src/core/repair/stale-atoms.ts
@@ -42,7 +42,7 @@ import { authorizeWrite } from '../persistence/authority.ts';
import { preparePageMutation } from '../persistence/page-prepare.ts';
import { bumpAtomGeneration, managedAtomCompletedSql, managedAtomSession, publishManagedAtomGeneration, type AtomOrigin } from '../persistence/atom-maintenance.ts';
import { atomGenerationAdapter, atomOwnerKey, readAtomInput } from '../generations/adapters/atoms.ts';
-import { atomOriginSlugSql } from '../page-state/atom-origin.ts';
+import { atomOriginSlugSql } from '../persistence/atom-origin.ts';
import { publishGeneration } from '../generations/publish.ts';
import { clearApprovedSet, loadApprovedSet, previewChangedError, previewHash, saveApprovedSet } from '../persistence/preview-approval.ts';
import { afterCursor, type RepairHandler, type RepairItem, type RepairItemOutcome, type RepairPlan, type RepairScope } from './core.ts';
diff --git a/src/core/repair/visibility.ts b/src/core/repair/visibility.ts
index 9d38622b94..0daef10c77 100644
--- a/src/core/repair/visibility.ts
+++ b/src/core/repair/visibility.ts
@@ -43,7 +43,7 @@ import type { WriteRequest } from '../persistence/model.ts';
import { managedPersistenceEnabled } from '../persistence/ownership.ts';
import { maintenancePreflight, submitDatabaseMaintenanceIntent } from '../persistence/prepared-maintenance.ts';
import { isSegmentedPage } from '../page-body/page-shape.ts';
-import { atomOriginSlugSql } from '../page-state/atom-origin.ts';
+import { atomOriginSlugSql } from '../persistence/atom-origin.ts';
import { afterCursor, repairRequestId, type RepairHandler, type RepairItem, type RepairPlan, type RepairPlanOptions, type RepairScope, type RepairCursor } from './core.ts';
import { clearApprovedSet, loadApprovedSet, previewChangedError, previewHash, saveApprovedSet } from '../persistence/preview-approval.ts';
import { createProgress, startHeartbeat } from '../progress.ts';
diff --git a/src/core/search/private-visibility.ts b/src/core/search/private-visibility.ts
index cba249f6bd..28fe4a9bc8 100644
--- a/src/core/search/private-visibility.ts
+++ b/src/core/search/private-visibility.ts
@@ -23,7 +23,7 @@
import { AsyncLocalStorage } from 'node:async_hooks';
import type { BrainEngine } from '../engine.ts';
import { isValidSourceId } from '../source-id.ts';
-import { atomOriginSlugsSql } from '../page-state/atom-origin.ts';
+import { atomOriginSlugsSql } from '../persistence/atom-origin.ts';
export const REMOTE_PRIVATE_PAGES_KEY = 'search.remote_private_pages';