Skip to content

feat(agent-runtime): Phase 5A — trait compliance macros and differential tests#515

Merged
yacosta738 merged 1 commit into
feature/capability-architecturefrom
feature/dallay-264-phase-5a-add-compliance-and-differential-testing-for
Apr 11, 2026
Merged

feat(agent-runtime): Phase 5A — trait compliance macros and differential tests#515
yacosta738 merged 1 commit into
feature/capability-architecturefrom
feature/dallay-264-phase-5a-add-compliance-and-differential-testing-for

Conversation

@yacosta738
Copy link
Copy Markdown
Contributor

Related Issues

Closes DALLAY-264


Summary

Phase 5A introduces the trait compliance test harness for the capability-based architecture. This PR delivers:

  1. Five #[macro_export] compliance macros in crates/corvus-traits/src/testing.rs, replacing the 6-line TraitHarness placeholder:

    • provider_compliance_tests! — validates capabilities(), chat_with_system(), supports_streaming(), convert_tools()
    • tool_compliance_tests! — validates name(), description(), execute()
    • memory_compliance_tests! — validates name(), health_check(), count()
    • channel_compliance_tests! — validates name(), health_check()
    • sandbox_compliance_tests! — validates name(), is_available()

    Each macro takes a factory expression and generates standard test functions. Self-validation tests using stub implementations are included in #[cfg(test)].

  2. pub mod testing — the testing module is now public so capability crates (corvus-providers, corvus-channels, etc.) can import and use the macros.

  3. Six differential tests in crates/corvus-composer/src/lib.rs that validate AgentComposer::required_capabilities() is consistent with each manifest section (providers, channels, tools, memory presence/absence).


Tested Information

cargo fmt --manifest-path clients/agent-runtime/Cargo.toml --all
cargo clippy --manifest-path clients/agent-runtime/Cargo.toml --all-targets -- -D warnings
cargo test --manifest-path clients/agent-runtime/Cargo.toml --lib

Results:

  • corvus-traits: 22 → 37 tests (15 new: 5 macros × 3 self-tests each)
  • corvus-composer: 8 → 14 tests (6 new differential tests)
  • Main runtime: 3493 tests — all passing, no regressions

Documentation Impact

  • No docs update required because this is a test harness — the macros are developer tooling for future capability crate authors. The docs/composing-agents.md added in Phase 5B covers the user-facing documentation.
  • I verified the documentation matches the current behavior.

Breaking Changes

None. The testing module visibility change (modpub mod) is additive — no existing code referenced the private module.


Checklist

  • I have checked that there isn't already a PR solving the same problem.
  • I have read the Contributing Guidelines.
  • I ensured my code follows the project's style guidelines.
  • I have added or updated tests that prove my fix is effective or that my feature works.
  • I have updated the documentation, or I explained above why no documentation update is needed.
  • I verified the documentation matches the current behavior.
  • I have documented any breaking changes in the Breaking Changes section.
  • I have linked the related issue (if any).

@linear
Copy link
Copy Markdown

linear Bot commented Apr 11, 2026

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 11, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • main
  • develop

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3ad5949f-2f2c-46b6-aa11-b074a212a7fb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/dallay-264-phase-5a-add-compliance-and-differential-testing-for

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 11, 2026

✅ Contributor Report

User: @yacosta738
Status: Passed (12/13 metrics passed)

Metric Description Value Threshold Status
PR Merge Rate PRs merged vs closed 89% >= 30%
Repo Quality Repos with ≥100 stars 0 >= 0
Positive Reactions Positive reactions received 10 >= 1
Negative Reactions Negative reactions received 0 <= 5
Account Age GitHub account age 3088 days >= 30 days
Activity Consistency Regular activity over time 108% >= 0%
Issue Engagement Issues with community engagement 0 >= 0
Code Reviews Code reviews given to others 547 >= 0
Merger Diversity Unique maintainers who merged PRs 2 >= 0
Repo History Merge Rate Merge rate in this repo 92% >= 0%
Repo History Min PRs Previous PRs in this repo 233 >= 0
Profile Completeness Profile richness (bio, followers) 90 >= 0
Suspicious Patterns Spam-like activity detection 1 N/A

Contributor Report evaluates based on public GitHub activity. Analysis period: 2025-04-11 to 2026-04-11

@yacosta738 yacosta738 force-pushed the feature/dallay-264-phase-5a-add-compliance-and-differential-testing-for branch from 1d275b3 to 0d513b3 Compare April 11, 2026 16:51
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 11, 2026

Deploying corvus with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1d275b3
Status: ✅  Deploy successful!
Preview URL: https://c584da15.corvus-42x.pages.dev
Branch Preview URL: https://feature-dallay-264-phase-5a.corvus-42x.pages.dev

View logs

@yacosta738 yacosta738 merged commit 20c0527 into feature/capability-architecture Apr 11, 2026
6 of 7 checks passed
@yacosta738 yacosta738 deleted the feature/dallay-264-phase-5a-add-compliance-and-differential-testing-for branch April 11, 2026 17:24
This was referenced Apr 11, 2026
@dallay-bot dallay-bot Bot mentioned this pull request May 3, 2026
@dallay-bot dallay-bot Bot mentioned this pull request May 6, 2026
This was referenced May 10, 2026
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