Conversation
…nd OTel instrumentation Four Pydantic AI-inspired features implemented as independent building blocks: - **UsageLimits** (neuron-types + neuron-loop): Token budget enforcement with request, tool call, input/output/total token limits. Checked at 3 points per loop iteration (pre-request, post-response, pre-tool-call) in both run() and run_stream() paths. - **TimeoutMiddleware** (neuron-tool): Per-tool execution timeout via tokio::time::timeout with default and per-tool overrides. Implements ToolMiddleware trait. - **StructuredOutputValidator + RetryLimitedValidator** (neuron-tool): JSON Schema validation returning ToolError::ModelRetry for self-correction, with atomic retry counting. Both implement ToolMiddleware trait. - **neuron-otel** (new crate): OtelHook implementing ObservabilityHook with gen_ai.* GenAI semantic convention tracing spans. Leaf node depending only on neuron-types. Also includes: - Fix: usage limit enforcement was missing from run_stream() path - 49 new tests (1042 total), full streaming parity - Comprehensive doc updates across all surfaces (mdBook, READMEs, llms.txt, CLAUDE.md, ROADMAP.md) - New test-audit skill for automated test coverage verification - All clippy warnings resolved workspace-wide including tests/examples
Run cargo fmt --all and add LICENSE-MIT/LICENSE-APACHE symlinks to neuron-otel to fix CI format and link checker failures.
…ease Add publish.yml that triggers on GitHub release creation, parses the release tag to determine the crate, and publishes it to crates.io with retry logic for index propagation delays. Also register the new neuron-otel crate in release-please config and manifest.
This was referenced Feb 24, 2026
Closed
Merged
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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
Four Pydantic AI-inspired features implemented as independent building blocks, following neuron's "serde, not serde_json" philosophy:
run()andrun_stream()pathsToolMiddlewareToolError::ModelRetryself-correction and atomic retry countingOtelHookimplementingObservabilityHookusinggen_ai.*GenAI semantic conventionsBug fix included
run_stream()— added 3 checkpoints matchingrun()pathQuality
New files
neuron-otel/— new crate (leaf node, depends only on neuron-types).claude/skills/test-audit/SKILL.md— automated test coverage verificationdocs/book/src/guides/observability.md— OTel guideTest plan
cargo clippy --workspace --tests --examples -- -Dwarnings— zero warningscargo test --workspace— 1042 tests passcargo build --workspace --examples— all examples compilecargo doc --workspace --no-deps— zero warningsmdbook build docs/book/— docs site builds🤖 Generated with Claude Code