Skip to main content

Module m0021_backfill_agent_bundles

Module m0021_backfill_agent_bundles 

Source
Expand description

Bind an agent definition to the bundle another channel already recorded for it (docs/specs/SPEC_MEMORY_FOLLOWS_THE_AGENT_2026_09_24.md §2.1.6).

This migration used to mint a dedicated, empty “ — ABF” bundle for every definition without one (docs/specs/ARCHITECTURE_MANDATORY_ABF_RETHINK_2026_08_14.md). It no longer does: a new agent has no bundle of its own, and a fresh channel must not fill the shared store with an empty one per agent (docs/reports/REPORT_AGENT_BUNDLES_REFINE_OR_DROP_2026_11_03.md: 881 of 926 bundles on one machine were empty and unreferenced). The record other channels wrote (agent_bundle_sidecar) is still bound, so an agent that already has a bundle keeps it in every channel; m0046 removes the empty ones nothing points at.

Local-channel only: DefinitionRecordV1 doesn’t carry memory_id, so a definition that exists only in the global registry has no row here to bind to. The registry is still attached so the agents it lists are seen.

Idempotent: only a definition still at memory_id='' is touched, and agent_def_set_memory_id_if_empty refuses to overwrite a binding.

Structs§

M0021BackfillAgentBundles