Skip to main content

Module adoption

Module adoption 

Source
Expand description

Carry what channels kept to themselves into the shared store.

Auth is shared by every channel now (SPEC_SHARED_AUTH_ACROSS_CHANNELS_2026_10_03.md), but until 2026-10-03 every non-stable channel isolated it, so real data sits in channels/<ch>/identity-store.db files the shared store has never seen. On the first shared boot this pass copies it across, read-only on the source:

WhatFromWhy
Global Memory (global, non-system bundles) and their versionsevery channel store, newest winseach channel kept its own; the same entry written twice is one entry
Native memory and its versionsevery channel store, newest winsthe shared store has none; the entries are scattered over older channels
Accountsthis channel’s own isolated store and the newest same-branch predecessora login belongs to the build that made it; adopting every channel’s would flood Connectors → Accounts with test accounts

Everything else is left alone. Non-global bundles in particular are mostly per-agent bundles each channel made for itself (4,740 distinct ones across the owner’s 46 stores).

Idempotent, and deletions stick. A ledger (adoption-ledger.json in the shared dir; a file, because a schema change to the shared store would stop an older build opening it) records the keys already considered and each source’s stamp. An item deleted afterwards is not put back, and a source that has not changed is not reopened. An account row keeps its stored OAuthConfigDir pointing at the source channel’s folder: the spawn path uses the stored dir, so the login works at once, with no copy of the credentials.

Functions§

run_at_boot
The boot entry point, for a channel running with shared auth.