fix: expand plugin aliases in Pod macro before escaping#239
Merged
mikehostetler merged 2 commits intoagentjido:mainfrom Mar 29, 2026
Merged
fix: expand plugin aliases in Pod macro before escaping#239mikehostetler merged 2 commits intoagentjido:mainfrom
mikehostetler merged 2 commits intoagentjido:mainfrom
Conversation
Evaluate the user-provided :plugins option with Definition.expand_and_eval_literal_option and store it in user_plugins, then merge pod_plugins with (user_plugins || []) when building agent_opts. This ensures literal plugin lists are expanded/evaluated correctly and avoids nil/unevaluated values when concatenating plugin lists.
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.
Summary
Jido.Pod.__using__/1by runningexpand_and_eval_literal_optionon the user-supplied:pluginslist before merging it intoagent_optsProblem
The
Jido.Pod.__using__/1macro correctly expands AST aliases for:name,:default_plugins, and:topologyviaDefinition.expand_and_eval_literal_option, but the user-supplied:pluginslist was passed through raw. WhenMacro.escape(agent_opts)runs inside thequoteblock, it double-escapes the{:__aliases__, meta, segments}tuples, so downstream code likeJido.Agent.__extract_plugin_module__/1receives raw AST tuples instead of resolved module atoms.Fix
Expand user-supplied
:pluginswithexpand_and_eval_literal_option(the same helper already used for:name,:default_plugins, and:topology) before concatenation: