Skip to content

fix(agent): restore compile-time signal_routes and preserve callback compatibility#170

Merged
mikehostetler merged 2 commits into
mainfrom
codex/sync-signal-routes-docs
Feb 21, 2026
Merged

fix(agent): restore compile-time signal_routes and preserve callback compatibility#170
mikehostetler merged 2 commits into
mainfrom
codex/sync-signal-routes-docs

Conversation

@mikehostetler
Copy link
Copy Markdown
Contributor

@mikehostetler mikehostetler commented Feb 21, 2026

Summary

  • fix real bug where signal_routes: passed to use Jido.Agent was silently ignored
  • add first-class signal_routes option to agent config schema with default []
  • preserve advanced callback usage and add compatibility for legacy signal_routes/0
    • default signal_routes/0 now returns compile-time routes
    • default signal_routes/1 delegates to signal_routes/0
    • both arities are optional callbacks and overridable
  • keep runtime routing contract stable (SignalRouter still calls signal_routes/1 with %{agent_module: module})
  • align callback docs to actual runtime context shape
  • sync docs/examples to compile-time signal_routes: style for static routing
  • add regression tests for:
    • compile-time routes via use Jido.Agent, signal_routes: [...]
    • /1 override extending compile-time routes via super(ctx)
    • legacy /0 callback compatibility through delegated /1
    • signal router builds routes correctly for both compile-time and legacy callback agents

Validation

  • mix compile
  • mix test
  • mix quality
  • mix test test/jido/agent/agent_test.exs
  • mix test test/jido/agent_server/signal_router_test.exs
  • mix test --include example test/examples/signals/context_aware_routing_test.exs

@mikehostetler mikehostetler changed the title docs(routing): sync signal route docs to compile-time-first style fix(agent): restore compile-time signal_routes and preserve callback compatibility Feb 21, 2026
@mikehostetler mikehostetler merged commit a83a1a1 into main Feb 21, 2026
6 checks passed
@mikehostetler mikehostetler deleted the codex/sync-signal-routes-docs branch February 21, 2026 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant