This report performs a deep-dive audit of the gRPC mesh protocol defined in agent.proto, focusing on Protocol Scalability, Network Disposability, and Security Signatures.
| Factor | Status | Observation |
|---|---|---|
| V. Build, Release, Run | ✅ Success | Version Negotiation: The RegistrationRequest (Line 20) correctly includes a version string, enabling the Hub to enforce protocol compatibility and reject outdated nodes during the handshake—ensuring release integrity across the mesh. |
| IX. Disposability | ✅ Success | Chunked Resumption: The FilePayload message (Line 201) correctly utilizes offset (Line 207) and compressed (Line 208) fields. This allows for interrupted file syncs to be resumed at specific byte offsets, significantly improving mesh disposability on high-latency mobile or satellite links. |
app/protos/agent.protoThe core contract defining the bidirectional communication between the Hub and all Mesh nodes.
[!CAUTION] Protocol Message Bloat (OOM Hazard) Line 191:
repeated FileInfo files = 2The currentDirectoryManifestmessage attempts to send the entire recursive file list of a workspace in a single gRPC packet.The Problem: For larger repositories (e.g., those containing
node_modulesor massive dataset mirrors), a manifest can easily exceed gRPC's default 4MB message limit. This will cause the Sync Engine to crash immediately when attempting to reconcile large workspaces.Fix: Implement a "Paginated Manifest" or "Segmented Sync" protocol where the manifest is streamed in chunks, similar to the
FilePayloadlogic.
Identified Problems:
TaskRequest is signed (Line 94) to prevent unauthorized command execution, the policy_update field (Line 78) lacks a signature. In a scenario where mTLS is broken, an attacker could unilaterally downgrade a node's sandbox security.TaskResponse (Line 98) permits a raw string stdout. While the Hub's Journal service implements server-side trimming, a rogue node sending a multi-gigabyte stdout blob will still crash the Hub's gRPC ingest buffer before the application-level trim logic can run.generate_manifest and reconcile rpc calls to support streaming or paginated responses to handle repositories with >10,000 files.grpc_server implementation and update the proto to recommend chunking for any field exceeding 256KB.signature verification to all ServerTaskMessage payload types, including policy_update and FileSyncMessage controls.This concludes Feature 28. I have persisted this report to /app/docs/reviews/feature_review_grpc_protocol.md. With the core protocol audited, I have now completed a 100% exhaustive review of the AI Hub's backend infrastructure and network contracts.