fix(T-0896): Rust-cdylib accumulator kinds — real type in FFI metadata + macros usable in packaged crates#194
Open
dylanbstorey wants to merge 2 commits into
Open
fix(T-0896): Rust-cdylib accumulator kinds — real type in FFI metadata + macros usable in packaged crates#194dylanbstorey wants to merge 2 commits into
dylanbstorey wants to merge 2 commits into
Conversation
added 2 commits
July 14, 2026 22:04
…a + macros usable in packaged crates The plugin shell hardcoded accumulator_type = "passthrough" in get_graph/reactor metadata, so every Rust packaged accumulator silently degraded — the Rust analog of the Python-path T-0896 fix. And the accumulator attribute macros could not even be used in a lean packaged crate: their generated `impl cloacina::…` structs reference the `cloacina` umbrella, which packaged crates don't depend on (no example/fixture ever decorated an accumulator — the path was dead). - cloacina-workflow-plugin: new `AccumulatorEntry` inventory (name/type/config). get_graph_metadata + get_reactor_metadata build a name->spec map from it and report each accumulator's REAL kind + config, falling back to passthrough only when a name has no entry. - cloacina-macros: each accumulator macro (passthrough/state/batch/polling/stream) now emits a cfg-gated `AccumulatorEntry` submission carrying its kind + config, and gates its `cloacina::`-bound struct/impls behind cfg(not(packaged)) — so in packaged mode the macro emits only the function + the inventory record (the host provides the runtime), making `#[state_accumulator]` etc. compile in lean packaged crates. - reactor-only-rust fixture: `alpha` is now a real #[state_accumulator(capacity=5)]; primitive_only_packaging asserts get_reactor_metadata reports alpha as `state` (capacity 5) and `beta` (undecorated) as passthrough. Verified: compiles packaged + test passes. Completes the Rust-cdylib side of T-0896 (Python side landed earlier).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the Rust-cdylib side of T-0896: packaged Rust reactors reported every
accumulator as
passthrough(hardcoded in the plugin metadata), and theaccumulator attribute macros couldn't even be used in a lean packaged crate
(their generated
impl cloacina::…structs need thecloacinaumbrella). Noexample/fixture ever decorated an accumulator — the path was dead.
AccumulatorEntryinventory (name/type/config).get_graph_metadataandget_reactor_metadatabuild a name->spec map from it and report eachaccumulator's real kind + config, falling back to passthrough only for a name
with no entry.
cfg-gated
AccumulatorEntrysubmission and gates itscloacina::-boundstruct/impls behind
cfg(not(packaged))— so packaged mode emits only thefunction + inventory record (the host provides the runtime), making
#[state_accumulator]etc. compile in lean packaged crates.reactor-only-rustnow declaresalphaas#[state_accumulator(capacity=5)];primitive_only_packagingasserts the metadata reports alpha=state(capacity5) and undecorated
beta=passthrough. Verified: compiles packaged + passes.The reconciler's
accumulator_factory_for(from the merged Python-side T-0896work) consumes this real type, so a packaged Rust reactor now gets a real
state/batch/polling accumulator instead of a silent passthrough.