Skip to content

Commit b1a9224

Browse files
Shooksieclaude
andcommitted
fix: suppress dead code warnings in fly_api.rs and ops_mcp.rs
CI treats warnings as errors. These files contain stub implementations for future cloud CLI and memory MCP features. Add #[allow(dead_code)] to unused FlyMachinesClient methods (new, create_machine, get_deployment_status, get_logs, destroy_machines) and response structs (CreateMachineResponse, DeploymentStatusResponse, Machine, LogsResponse, DestroyResponse) in crates/orchestrator-cli/src/services/fly_api.rs. Also add #[allow(dead_code)] to MemoryMcpServer struct and memory_root method in crates/orchestrator-cli/src/services/operations/ops_mcp.rs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f2d2c16 commit b1a9224

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

crates/orchestrator-cli/src/services/fly_api.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ pub struct FlyMachinesClient {
1212
}
1313

1414
impl FlyMachinesClient {
15+
#[allow(dead_code)]
1516
pub fn new(api_token: String) -> Self {
1617
FlyMachinesClient { api_token }
1718
}
1819

1920
/// Create a new machine on Fly.io
21+
#[allow(dead_code)]
2022
pub async fn create_machine(&self, app_name: &str, region: &str, _image: &str) -> Result<CreateMachineResponse> {
2123
// This would use the Fly.io GraphQL API to create a machine
2224
// For now, we return a placeholder response
@@ -29,6 +31,7 @@ impl FlyMachinesClient {
2931
}
3032

3133
/// Get deployment status from Fly.io
34+
#[allow(dead_code)]
3235
pub async fn get_deployment_status(&self, app_name: &str) -> Result<DeploymentStatusResponse> {
3336
// This would query the Fly.io API for the current deployment status
3437
// For now, we return a placeholder response
@@ -41,6 +44,7 @@ impl FlyMachinesClient {
4144
}
4245

4346
/// Stream logs from a Fly.io machine
47+
#[allow(dead_code)]
4448
pub async fn get_logs(&self, app_name: &str, _lines: Option<usize>, _follow: bool) -> Result<LogsResponse> {
4549
// This would query the Fly.io logs API
4650
Ok(LogsResponse {
@@ -50,6 +54,7 @@ impl FlyMachinesClient {
5054
}
5155

5256
/// Destroy a deployment on Fly.io
57+
#[allow(dead_code)]
5358
pub async fn destroy_machines(&self, app_name: &str) -> Result<DestroyResponse> {
5459
// This would call the Fly.io API to destroy all machines for the app
5560
Ok(DestroyResponse { app_name: app_name.to_string(), status: "destroyed".to_string(), machines_destroyed: 0 })
@@ -80,6 +85,7 @@ impl FlyMachinesClient {
8085
}
8186
}
8287

88+
#[allow(dead_code)]
8389
#[derive(Debug, Serialize, Deserialize)]
8490
pub struct CreateMachineResponse {
8591
pub id: String,
@@ -88,6 +94,7 @@ pub struct CreateMachineResponse {
8894
pub app: String,
8995
}
9096

97+
#[allow(dead_code)]
9198
#[derive(Debug, Serialize, Deserialize)]
9299
pub struct DeploymentStatusResponse {
93100
pub app_name: String,
@@ -96,19 +103,22 @@ pub struct DeploymentStatusResponse {
96103
pub updated_at: String,
97104
}
98105

106+
#[allow(dead_code)]
99107
#[derive(Debug, Serialize, Deserialize)]
100108
pub struct Machine {
101109
pub id: String,
102110
pub status: String,
103111
pub region: String,
104112
}
105113

114+
#[allow(dead_code)]
106115
#[derive(Debug, Serialize, Deserialize)]
107116
pub struct LogsResponse {
108117
pub app_name: String,
109118
pub logs: Vec<String>,
110119
}
111120

121+
#[allow(dead_code)]
112122
#[derive(Debug, Serialize, Deserialize)]
113123
pub struct DestroyResponse {
114124
pub app_name: String,

crates/orchestrator-cli/src/services/operations/ops_mcp.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,14 @@ fn normalize_non_empty(value: Option<String>) -> Option<String> {
212212
}
213213

214214
#[derive(Debug, Clone)]
215+
#[allow(dead_code)]
215216
struct MemoryMcpServer {
216217
default_project_root: String,
217218
tool_router: ToolRouter<Self>,
218219
}
219220

220221
impl MemoryMcpServer {
222+
#[allow(dead_code)]
221223
fn memory_root(&self) -> std::path::PathBuf {
222224
protocol::scoped_state_root(std::path::Path::new(&self.default_project_root))
223225
.unwrap_or_else(|| std::path::PathBuf::from(&self.default_project_root).join(".ao"))

0 commit comments

Comments
 (0)