- [Enhancement] Speed up
Contract#callby ~1.25x for minimal and ~1.4x for fully populated data: resolve rule paths with a singleHash#fetchper level instead ofkey?+[], inline the per-rule type dispatch into the rules loop, and compare the dig sentinel via#equal?so#==is never dispatched to the validated (user-provided) values. This is the per-message validation path in WaterDrop producers. - [Fix]
Contract#callwith rule paths of 3+ keys no longer raisesNoMethodErrorwhen an intermediate value is not aHashand reports the path as missing instead, consistent with the 2-key path behavior. - [Change] Reject reserved setting names with an
ArgumentErrorinConfigurable::Node#settingand#register: internal state names (node_name,children,nestings,compiled,configs_refs,local_defs) and the node public API names (setting,configure,to_h,deep_dup,register,compile). Previously such names silently shadowed the node own accessors, breakingdeep_duporto_h, and assignments likeconfig.children = valuecorrupted the node internal state. - [Enhancement] Skip the event name mapping hash lookup in
Monitor#instrumentwhen no namespace is used and the event id is already aString, which is the case for all events in the Karafka ecosystem (~1.2x faster dispatch on the common no-subscribers path). Symbol event ids and namespaced monitors keep going through the mapping. - [Enhancement] Mirror config values into instance variables and use
attr_readerbased readers inConfigurable::Node, yielding ~1.4x faster flat and ~1.6x faster nested settings reads on hot paths.@configs_refsremains the canonical store; non-identifier setting names (e.g. registered names with dashes) keep the previous hash-based accessors. - [Enhancement] Instantiate each
Configurable::Nodethrough a per-layout anonymous subclass so the ivar-backed settings do not grow object shape variations on the sharedNodeclass (which would degrade ivar access and trigger Ruby performance warnings).deep_dupreuses the template's subclass, so duplicated configs share object shapes. - [Fix] Symbolize setting names at definition time (
setting, same asregister) and on config store writes soStringsetting names work end to end (accessors,#to_h, recompilation state) and cannot corrupt node internal state when matching reserved internal names (previously string-named settings were quietly broken as accessors and the store disagreed on the key type). - [Change] Config nodes are now instances of anonymous
Nodesubclasses:is_a?(Karafka::Core::Configurable::Node)still holds, butinstance_of?(Node)is nowfalseandnode.class.nameisnil. - [Change] Assigning a setting on a frozen config node now raises
FrozenError(previously the write silently mutated internal storage despite the freeze).