fn prune_entries_removed_from_manifest(
store: &Arc<Store>,
manifest: &SeedManifest,
)Expand description
A row for an entry AgentMux itself removed (or renamed to a new id) in a
later release must not linger as a seeder-owned is_system row forever —
it would keep being injected into every future agent indefinitely,
exactly the “stale Operator Config actively misleads an agent” failure
mode this whole seeding mechanism exists to prevent (Codex P2, PR #3244).
Only prunes rows still owned by this seeder AND whose own recorded
generation is <= this process’s manifest version (bundle_delete_system_ if_owned checks both atomically) — on a machine sharing store.db across
multiple AgentMux builds/versions, an OLDER build’s manifest simply
doesn’t mention an entry a NEWER build already added; without the
generation gate, the older build would misread “not in my manifest” as
“removed” and delete the newer build’s own addition. Same “never clobber
a local edit” posture as the reseed path for a human-edited row: left in
place, orphaned from the manifest but not clobbered, for a human to
clean up. Codex P2, PR #3244.