Execute provider actions through a real transport and executor #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/ram-48-provider-execution"
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?
Closes RAM-48.
Provider relief was the biggest memory win breadram had and it could not happen: the adapters could describe an operation and the coordinator could execute one, but there was no transport to send it and no executor to turn an
AdapterOperationinto a write.What this adds
adapter::HttpTransport, the real bounded loopback transport: one connection per request, connect/read/write timeouts,Connection: close, content-length and chunked parsing, a response size cap, credentials never rendered, and every resolved address tried in turn.Transportcarries probes andOperationTransportcarries writes, so a read-only path cannot be handed a write request. 13 tests.adapter::AdapterExecutor, anExecutorfor the provider-backed actions: it revalidates the capability and the workload generation, refuses a release that needs proven idleness when activity is unknown, active, or too recent, checks every URL against the configured endpoints before anything is sent, applies, confirms with a read-only probe, and reports the memory the provider holds before and after so the effect is measured. 17 tests.coordinator::ChainedExecutor, so host controls and provider actions run in one pass, dispatched by what each executor claims, with the first real measurement winning on either memory axis. 4 tests.WorkloadAdapter::observewithProbeOutcome,AdapterRegistry::observe,adapter::refresh_adapters, andinventory_is_current. The daemon refreshes every configured endpoint once per tick, records a failed read as a failure rather than leaving the previous success in place, and an empty current reading is a measured zero rather than a missing reading.crates/breadram-core/tests/provider_execution.rs) against an in-process fake Ollama service on a real socket: an idle release planned, performed, confirmed, and journalled with a measured effect; a backend with a live request never written to; an unreachable provider reported and unable to release; a provider that ignores the unload journalled as unconfirmed; monitor mode writing nothing.No provider is installed on this host, so the end-to-end release is proven over a real socket against the fake, and the daemon's own read path is covered by a unit test against a closed port.
Verification
cargo fmt --all --checkclean,cargo clippy --workspace --all-targets -- -D warningsclean,cargo test --workspace376 passed, 0 failed (up from 349).Deviations, stated rather than dropped
unix:endpoints are not supported, and say so: the hook protocol is a process protocol rather than HTTP, and needs a framed message format and a permission check that does not exist yet (RAM-15).TrackingCompleteness::Unknowna resident model reportsActive, so nothing is planned against it. Correct and conservative, but it means the release path is planned-never-executed until request tracking is declared: noted on RAM-45.