fix: restore #[tokio::main] on main(), #[cfg(unix)] on platform tests, #[allow] on run_pty_session/AuthListenerResult
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -111,6 +111,7 @@ mod tests {
|
||||
use super::*;
|
||||
use super::super::server::crdt_sync_handler;
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[derive(Debug)]
|
||||
enum AuthListenerResult {
|
||||
Authenticated(String),
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user