Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(atoms-restore): the restore revert publishes without the retired atom file (ghost exemption list)

garrytan2eff028df5c8
diff --git a/src/core/persistence/prepared-maintenance.ts b/src/core/persistence/prepared-maintenance.ts
index 1ef505282c..aa7be9ae59 100644
--- a/src/core/persistence/prepared-maintenance.ts
+++ b/src/core/persistence/prepared-maintenance.ts
@@ -200,10 +200,11 @@ export function maintenanceDriftRefusal(sourceId: string, slug: string): Operati
/**
* #6696 (A12): maintenance kinds whose preparer passes `allowMissingFile` (chronicle, stale-atom retirement, ghost-page
- * retirement, which exists to soft-delete pages whose canonical file is gone): a missing canonical file publishes, so it is no ghost.
+ * retirement, which exists to soft-delete pages whose canonical file is gone, and the atoms-restore revert of a retired
+ * atom, whose file the retirement removed): a missing canonical file publishes, so it is no ghost.
*/
export const PUBLISHES_WITHOUT_FILE: ReadonlySet<string> = new Set(['managed_maintenance_chronicle_event', 'managed_maintenance_chronicle_retire', 'managed_maintenance_retire_stale_atoms',
- 'managed_maintenance_retire_ghost_page']);
+ 'managed_maintenance_retire_ghost_page', 'managed_maintenance_restore_reextract_atom']);
/** #6696 (A12): `source_changed` / `canonical_file_missing` before admission: the page's recorded file is gone; never a new request. */
export function maintenanceGhostRefusal(sourceId: string, slug: string): OperationError {