Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(doctor): register atom_provenance_drift as a wave check so the banner and remediate name stale-atoms

garrytanfa9352373930
diff --git a/src/commands/doctor/wave-checks.ts b/src/commands/doctor/wave-checks.ts
index 9b1ab717fc..0622791c93 100644
--- a/src/commands/doctor/wave-checks.ts
+++ b/src/commands/doctor/wave-checks.ts
@@ -147,7 +147,15 @@ export const WAVE_CHECKS: readonly WaveCheckSpec[] = [
count: d => Number(d.stale_effects ?? 0),
impact: 'A committed write still has a stale queued or failed embedding effect that blocks compaction and activation',
run: async (engine, scope) => (await import('./checks/stale-embedding-effects.ts')).staleEmbeddingEffectsCheck(engine, scope.sourceIds),
- }, {
+ },
+ {
+ id: 'atom_provenance_drift', resolution: 'repair', registration: 'doctor.ts',
+ hostOnly: 'Retiring stale atoms is a host-side, explicit-only repair.',
+ count: d => Number(d.drifted ?? 0),
+ impact: 'Some atoms reference a source page that is gone or was edited, and still surface in search with a quote no current page contains',
+ run: async engine => (await import('./checks/extraction-sync.ts')).computeAtomProvenanceDriftCheck(engine),
+ },
+ {
id: 'extractor_facts_expired', resolution: 'repair', registration: 'wave',
hostOnly: 'Restoring expired extractor facts is a host-side, explicit-only repair.',
count: d => Number(d.evidenced ?? 0) + Number(d.ambiguous ?? 0),