Skip to content

[Communication] PR2: Adds CommsManager and CommsNodes - #213

Merged
tryuan99 merged 50 commits into
masterfrom
joseph/communication_delay_PR2
Jul 20, 2026
Merged

[Communication] PR2: Adds CommsManager and CommsNodes#213
tryuan99 merged 50 commits into
masterfrom
joseph/communication_delay_PR2

Conversation

@Joseph0120

Copy link
Copy Markdown
Collaborator

Files Modified:

IadsCommsAgent.cs -> IADS Proxy for supporting mailbox message sending and recieving. Created a proxy that extends IAgent so that Mailbox can support IADS. Mailbox only supports Agents and adding a proxy makes IADS a part of an agent.

@stacklane-pr-stack-visualizer

stacklane-pr-stack-visualizer Bot commented Apr 1, 2026

Copy link
Copy Markdown

🧱 Stack PR · Base of stack

Stack Structure:

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds the IadsCommsAgent class to handle mailbox communication as a proxy. The review feedback suggests correcting a typo in the class description and replacing Time.time with a deterministic fallback value for elapsed time.

Comment thread Assets/Scripts/IADS/IadsCommsAgent.cs Outdated
Comment thread Assets/Scripts/IADS/IadsCommsAgent.cs Outdated
@Joseph0120 Joseph0120 changed the title [Communication] Set up IADS proxy for Mailbox use. [Communication] PR2: Set up IADS proxy for Mailbox use Apr 1, 2026
@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new Unity MonoBehaviour IadsCommsAgent (Assets/Scripts/IADS/IadsCommsAgent.cs) implementing IAgent as a comms-only mailbox proxy. It exposes serialized references and kinematic fields, property mappings (Position/Transform, Speed, orientation vectors, InverseRotation), ElapsedTime access via SimManager, an idempotent Terminate() with OnTerminated, and many IAgent methods that throw NotSupportedException. Also adds messaging primitives (IMessagePayload, Message types, payloads, PendingMessage), EditMode tests validating wiring, termination and PendingMessage validation, and updates to package manifest/lockfile and a regenerated protobuf runtime header.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • tryuan99
  • daniellovell
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ⚠️ Warning The title mentions CommsManager and CommsNodes, but the PR actually adds an IADS comms proxy and messaging/pending-message types. Rename the PR to reflect the main change, e.g. "[Communication] PR2: Add IADS comms proxy and messaging support".
✅ Passed checks (3 passed)
Check name Status Explanation
Description check ✅ Passed The description directly relates to the changeset, explaining that IadsCommsAgent was created as a proxy extending IAgent to enable mailbox support for IADS.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch joseph/communication_delay_PR2

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Assets/Scripts/IADS/IadsCommsAgent.cs`:
- Line 4: Update the class-level comment at the top of IadsCommsAgent.cs (the
comment referring to the IADS Proxy for supporting mailbox message sending and
recieving) to correct the typo by changing "recieving" to "receiving" so the
comment reads "IADS Proxy for supporting mailbox message sending and receiving."
- Around line 21-24: The HierarchicalAgent property may be null when
OnTerminated handlers access it; ensure it cannot be null by initializing
_hierarchicalAgent and guarding accesses: set a safe default in IadsCommsAgent
(e.g., instantiate a new HierarchicalAgent or a lightweight placeholder into the
backing field _hierarchicalAgent), and also add null-checks where OnTerminated
handlers dereference agent.HierarchicalAgent (or bail out early) to avoid race
conditions; update the HierarchicalAgent getter/setter to validate assigned
values (throw or log) so callers cannot set it to null.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2c791cae-aa45-48c9-bc64-d51cb1c61988

📥 Commits

Reviewing files that changed from the base of the PR and between 589802e and b203cf9.

📒 Files selected for processing (1)
  • Assets/Scripts/IADS/IadsCommsAgent.cs

Comment thread Assets/Scripts/IADS/IadsCommsAgent.cs Outdated
Comment thread Assets/Scripts/IADS/IadsCommsAgent.cs Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Assets/Scripts/IADS/IadsCommsAgent.cs`:
- Line 57: Fix the typo in the comment inside IadsCommsAgent (file/class
IadsCommsAgent.cs) — change "Setting ElpasedTime has to be dependent on
SimManager to have uniform clock time." to "Setting ElapsedTime has to be
dependent on SimManager to have uniform clock time." so the comment reads
correctly.

In `@Assets/Tests/EditMode/IadsCommsAgentTests.cs`:
- Around line 71-75: The test currently uses a hard-coded compiler backing field
name in SetSimManagerInstance; instead use the SimManager.Instance property via
reflection: locate the PropertyInfo for "Instance" on typeof(SimManager)
(BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic), call
PropertyInfo.SetValue(null, simManager) if a setter exists, and if not present
throw a clear exception indicating the Instance property is read-only so the
test fails with an actionable message; update references to FieldInfo/GetField
to use PropertyInfo/GetProperty and keep method name SetSimManagerInstance and
symbol SimManager.Instance for locating the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7c09a180-3b32-46b3-af37-c58ffb263e43

📥 Commits

Reviewing files that changed from the base of the PR and between b203cf9 and 0f2c041.

⛔ Files ignored due to path filters (1)
  • Assets/Scripts/Generated/Proto/CommunicationConfig.cs is excluded by !**/generated/**
📒 Files selected for processing (3)
  • Assets/Scripts/IADS/IadsCommsAgent.cs
  • Assets/Tests/EditMode/IadsCommsAgentTests.cs
  • Assets/Tests/EditMode/IadsCommsAgentTests.cs.meta

Comment thread Assets/Scripts/IADS/IadsCommsAgent.cs Outdated
Comment thread Assets/Tests/EditMode/IadsCommsAgentTests.cs Outdated
Base automatically changed from joseph/communication_delay_PR1 to master May 11, 2026 03:46
Comment thread Assets/Scripts/Agents/AgentBase.cs Outdated
Comment thread Assets/Scripts/Communication/CommsNode.cs Outdated
Comment thread Assets/Scripts/Communication/CommsNode.cs Outdated
Comment thread Assets/Scripts/Communication/CommsNode.cs Outdated
Comment thread Assets/Scripts/IADS/IADS.cs Outdated
Comment thread Assets/Scripts/Managers/CommsManager.cs Outdated
Comment thread Assets/Scripts/Managers/CommsManager.cs Outdated
Comment thread Assets/Scripts/Managers/CommsManager.cs Outdated
Comment thread Assets/Scripts/Managers/CommsManager.cs Outdated
Comment thread Assets/Scripts/Managers/CommsManager.cs Outdated
@tryuan99 tryuan99 changed the title [Communication] PR2: Set up IADS proxy for Mailbox use [Communication] PR2: Adds CommsManager and CommsNodes Jul 6, 2026
@Joseph0120
Joseph0120 force-pushed the joseph/communication_delay_PR2 branch 2 times, most recently from 76316f0 to ba96985 Compare July 17, 2026 06:01
Comment thread Pisterlab_Micromissile.slnx Outdated
@@ -0,0 +1,7 @@
<Solution>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

what is this file?

Comment thread .github/workflows/build.yaml Outdated
@Joseph0120
Joseph0120 requested a review from tryuan99 July 19, 2026 07:05

@tryuan99 tryuan99 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just two comments on generated files. Everything lgtm

Comment thread Assets/UniversalRenderPipelineGlobalSettings.asset Outdated
Comment thread Pisterlab_Micromissile.slnx Outdated
@tryuan99
tryuan99 merged commit 499402c into master Jul 20, 2026
18 checks passed
@tryuan99
tryuan99 deleted the joseph/communication_delay_PR2 branch July 20, 2026 05:27
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