From 06035f20adc5c2ed0a34bffc47c11802edd7c234 Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 26 Apr 2026 23:38:17 +0000 Subject: [PATCH] fix: restore #[tokio::main] on main(), #[cfg(unix)] on platform tests, #[allow] on run_pty_session/AuthListenerResult MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The biggest miss is #[tokio::main] — without it, async fn main() doesn't compile, and the binary in every worktree fails 'cargo check'. Agents in those worktrees burn their turn budgets trying to fix the build before they can do real work, then get killed by the watchdog. That's why all three in-flight stories failed. Other restored attributes: - #[cfg(unix)] on 4 tests in merge/squash and scaffold (skip on non-Unix) - #[allow(dead_code)] on AuthListenerResult test enum - #[allow(clippy::too_many_arguments)] on run_pty_session Same root cause as the earlier #[test] attribute losses: my line ranges started at the fn line, missing the leading attribute on the previous line. --- server/src/agents/merge/squash.rs | 2 ++ server/src/crdt_sync/handshake.rs | 1 + server/src/io/fs/scaffold/mod.rs | 2 ++ server/src/llm/providers/claude_code/mod.rs | 1 + server/src/main.rs | 1 + 5 files changed, 7 insertions(+) diff --git a/server/src/agents/merge/squash.rs b/server/src/agents/merge/squash.rs index e2c25b50..b28591a8 100644 --- a/server/src/agents/merge/squash.rs +++ b/server/src/agents/merge/squash.rs @@ -1172,6 +1172,7 @@ mod tests { ); } + #[cfg(unix)] #[test] fn squash_merge_runs_component_setup_from_project_toml() { use std::fs; @@ -1243,6 +1244,7 @@ mod tests { ); } + #[cfg(unix)] #[test] fn squash_merge_succeeds_without_components_in_project_toml() { use std::fs; diff --git a/server/src/crdt_sync/handshake.rs b/server/src/crdt_sync/handshake.rs index 841b8a77..a561fa4e 100644 --- a/server/src/crdt_sync/handshake.rs +++ b/server/src/crdt_sync/handshake.rs @@ -111,6 +111,7 @@ mod tests { use super::*; use super::super::server::crdt_sync_handler; + #[allow(dead_code)] #[derive(Debug)] enum AuthListenerResult { Authenticated(String), diff --git a/server/src/io/fs/scaffold/mod.rs b/server/src/io/fs/scaffold/mod.rs index 2fc28d64..28d1abde 100644 --- a/server/src/io/fs/scaffold/mod.rs +++ b/server/src/io/fs/scaffold/mod.rs @@ -335,6 +335,7 @@ mod tests { assert!(!content.contains("TypeScript + React")); } + #[cfg(unix)] #[test] fn scaffold_story_kit_creates_executable_script_test() { use std::os::unix::fs::PermissionsExt; @@ -632,6 +633,7 @@ mod tests { ); } + #[cfg(unix)] #[test] fn scaffold_story_kit_creates_executable_script_build_and_lint() { use std::os::unix::fs::PermissionsExt; diff --git a/server/src/llm/providers/claude_code/mod.rs b/server/src/llm/providers/claude_code/mod.rs index c55233d6..95f2b95d 100644 --- a/server/src/llm/providers/claude_code/mod.rs +++ b/server/src/llm/providers/claude_code/mod.rs @@ -180,6 +180,7 @@ impl ClaudeCodeProvider { /// via `--permission-prompt-tool`. Claude Code calls the MCP tool when it /// needs user approval, and the server bridges the request to the frontend. +#[allow(clippy::too_many_arguments)] fn run_pty_session( user_message: &str, cwd: &str, diff --git a/server/src/main.rs b/server/src/main.rs index 3993bf6d..3306c90c 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -50,6 +50,7 @@ mod cli; use cli::{CliArgs, parse_cli_args, print_help, resolve_path_arg}; +#[tokio::main] async fn main() -> Result<(), std::io::Error> { // Reap zombie grandchildren on Unix (for native deployments without tini/init). // Docker containers with `init: true` in docker-compose.yml already have tini