Skip to content

Kernel coordination types#1684

Open
ashum9 wants to merge 2 commits into
mofa-org:mainfrom
ashum9:kernel_coordination_types
Open

Kernel coordination types#1684
ashum9 wants to merge 2 commits into
mofa-org:mainfrom
ashum9:kernel_coordination_types

Conversation

@ashum9
Copy link
Copy Markdown
Collaborator

@ashum9 ashum9 commented May 25, 2026

Description

so basically this is the Part 2 of the Multi Agent Coordination Infrastructure contribution.

it builds directly on top of the scaffold introduced in Part 1 #1683 by implementing the 12 core data contracts (structs and enums), serialization layers, helper methods, and corresponding unit tests.

these types serve as the pure data layer. they try to define the format of information flowing through the runtime before introducing traits/behavior in the next phase.

what is included

  1. Memory and State Contracts
  2. Handoff & Tracing
  3. Governance, Retries & Conflict Management
  4. Error System

Verification & Unit Tests

All implemented types compile cleanly and are fully covered by unit tests:

  • memory_scope_serializes_correctly`: Confirms JSON serialization structure.
  • trace_context_child_preserves_trace_id`: Verifies parent-to-child trace propagation.
  • handoff_packet_forward_increments_depth`: Validates recursion depth tracing.
  • memory_object_prompt_text_prefers_summary`: Confirms token-saving summary prioritization.
  • governance_config_defaults_are_safe`: Checks safe fallback defaults.
  • coordination_error_displays_correctly: Validates thiserror` string formatting.

Copilot AI review requested due to automatic review settings May 25, 2026 18:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the kernel-level “coordination” data contracts for the multi-agent coordination layer, exposing them via agent::components so runtime/governor/coordinator implementations can exchange standardized cognition-transfer payloads.

Changes:

  • Introduces agent::components::coordination with core structs/enums for memory refs/objects, handoff packets, tracing context, governance + retry policy, conflict handling, and a typed error.
  • Re-exports the new coordination contracts from crates/mofa-kernel/src/agent/components/mod.rs for ergonomic consumption.
  • Adds unit tests covering basic serialization and helper-method behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
crates/mofa-kernel/src/agent/components/mod.rs Wires in the new coordination module and re-exports its public contracts.
crates/mofa-kernel/src/agent/components/coordination.rs Implements the coordination data layer types, helpers, serde support, and unit tests.

Comment thread crates/mofa-kernel/src/agent/components/coordination.rs
Comment thread crates/mofa-kernel/src/agent/components/coordination.rs
Comment thread crates/mofa-kernel/src/agent/components/coordination.rs
Comment thread crates/mofa-kernel/src/agent/components/coordination.rs
Comment thread crates/mofa-kernel/src/agent/components/coordination.rs
Comment thread crates/mofa-kernel/src/agent/components/coordination.rs
Comment thread crates/mofa-kernel/src/agent/components/coordination.rs
Comment thread crates/mofa-kernel/src/agent/components/coordination.rs
@ashum9 ashum9 force-pushed the kernel_coordination_types branch from 70b3c40 to 2e01bd1 Compare May 25, 2026 19:21
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.

2 participants