Use FactoryRegistry for production provider startup #56

Open
opened 2026-10-04 17:44:25 +00:00 by kayg · 0 comments
Owner

Problem and evidence

The infraternal-agent production startup still builds a closed Docker/Podman list in crates/agent/src/lib.rs:1298 and connects each entry through LegacyProvider::new at :1319-1335. The current FactoryRegistry::new and connect_configured call sites are in crates/agent/tests/provider_runtime.rs:656-693; no production composition root calls them. This leaves defaults on a second connect/recovery/watch path.

Recommendation

Make the explicit compiled factory registry the production composition root for defaults and configured instances. Load configuration once, share connect/recovery/watch ownership, and retire LegacyEngineCache/LegacyProvider runtime dispatch while keeping the v1 address/response projection.

Payoff and estimate

One lifecycle path to review and operate for Docker and Podman and future compiled providers. Estimate: 3–5 engineering days, including rootful/rootless tests and embedded/remote parity.

Priority: Next milestone (PLAN step 4).

2026-10-04 owner decisions: Matches the decision to use compiled-in providers and unify embedded and remote infraternal-agent paths through one signed provider path. No dynamic plugin framework is part of this work. Related: #49.

Report: arch-review report
Source: arch-review 2026-10-04

## Problem and evidence The infraternal-agent production startup still builds a closed Docker/Podman list in `crates/agent/src/lib.rs:1298` and connects each entry through `LegacyProvider::new` at `:1319-1335`. The current `FactoryRegistry::new` and `connect_configured` call sites are in `crates/agent/tests/provider_runtime.rs:656-693`; no production composition root calls them. This leaves defaults on a second connect/recovery/watch path. ## Recommendation Make the explicit compiled factory registry the production composition root for defaults and configured instances. Load configuration once, share connect/recovery/watch ownership, and retire `LegacyEngineCache`/`LegacyProvider` runtime dispatch while keeping the v1 address/response projection. ## Payoff and estimate One lifecycle path to review and operate for Docker and Podman and future compiled providers. Estimate: 3–5 engineering days, including rootful/rootless tests and embedded/remote parity. **Priority:** Next milestone (PLAN step 4). **2026-10-04 owner decisions:** Matches the decision to use compiled-in providers and unify embedded and remote infraternal-agent paths through one signed provider path. No dynamic plugin framework is part of this work. Related: #49. **Report:** [arch-review report](/mnt/hdd/infraternal/jobs/arch-review/report.md) **Source: arch-review 2026-10-04**
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/infraternal-v0#56
No description provided.