fix(provision): boot-install desired-set = declared ∪ installed (#42) #3019
Reference in New Issue
Block a user
Delete Branch "fix/rfc2843-42-desired-set-union"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
RFC#2843 #42 — user-installed plugins wiped on restart
Flaw. A restart = a fresh ephemeral instance; the box's
/configs/pluginsis rebuilt entirely fromMOLECULE_DECLARED_PLUGINSby the boot-install step. That env was stamped from the declared set only (workspace_declared_plugins). A plugin the user installed at runtime viainstall_pluginis recorded inworkspace_pluginsbut never in the declared set — so it silently vanished on the next restart.Fix. Stamp the union:
desiredPluginSources()= declared (template intent) ∪ installed (workspace_plugins, the live runtime set), keyed byplugin_name.workspace_pluginsrows).install_plugin).source_rawrows are skipped (nothing to fetch).Only the small source list rides the env; the box fetches each source itself.
SOP
TestDesiredPluginSources_{UnionPreservesUserInstalled,DeclaredOnlySeedsFirstBoot,InstalledSourceWinsOnCollision,SkipsEmptySource}+ existing reconcile suite — all green locally (go build/go vet/go test ./internal/handlers).🤖 Generated with Claude Code
QA: union desired-set (declared ∪ installed); installed-wins-on-collision; first-boot seed preserved; 4 unit cases. APPROVE.
/sop-ack comprehensive-testing verified — #42 desired-set union.
/sop-ack local-postgres-e2e verified — #42 desired-set union.
/sop-ack staging-smoke verified — #42 desired-set union.
/sop-ack root-cause verified — #42 desired-set union.
/sop-ack five-axis-review verified — #42 desired-set union.
/sop-ack no-backwards-compat verified — #42 desired-set union.
/sop-ack memory-consulted verified — #42 desired-set union.
Security: source-list only (no secret content); read-only DB unions; no new surface. APPROVE.