Skip to content

A self-improving RLM agent for coding workflows and long-running autonomous tasks.

Rust

pa-tui tests: drop unneeded lint allows, give the rest reasons (#3844)

Sebastian Müller405d16cac1ab
diff --git a/crates/pa-tui/tests/agents_view_catalog_settle_carry.rs b/crates/pa-tui/tests/agents_view_catalog_settle_carry.rs
index 5646601c22..af999f181c 100644
--- a/crates/pa-tui/tests/agents_view_catalog_settle_carry.rs
+++ b/crates/pa-tui/tests/agents_view_catalog_settle_carry.rs
@@ -3,21 +3,7 @@
//! `resolveMissingSelectionAnchor`), and the carried catalog paints the
//! next view run's first frame with no re-fetch.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/agents_view_click_headless.rs b/crates/pa-tui/tests/agents_view_click_headless.rs
index d1986391d0..046c066186 100644
--- a/crates/pa-tui/tests/agents_view_click_headless.rs
+++ b/crates/pa-tui/tests/agents_view_click_headless.rs
@@ -2,21 +2,7 @@
//! a session row selects and opens it (the Enter action); a dragged
//! release never opens.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/agents_view_hover_headless.rs b/crates/pa-tui/tests/agents_view_hover_headless.rs
index 0c7fcddb4f..b381772a1b 100644
--- a/crates/pa-tui/tests/agents_view_hover_headless.rs
+++ b/crates/pa-tui/tests/agents_view_hover_headless.rs
@@ -4,21 +4,7 @@
//! expanded child rows open the subagent); hover motions ride along. The same mock also pins the
//! shells poll's one-cycle-in-flight contract.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -544,6 +530,10 @@ async fn a_slow_shells_read_never_stacks_the_poll() {
/// A cycle held across a session handoff belongs to the returning view, not the old UI channel.
#[tokio::test]
+#[expect(
+ clippy::too_many_lines,
+ reason = "the inline mock daemon sits next to the two view runs it scripts"
+)]
async fn a_held_shells_read_survives_the_agents_view_handoff() {
use tokio::io::{AsyncBufReadExt, AsyncWriteExt};
diff --git a/crates/pa-tui/tests/agents_view_incident_notice_e2e.rs b/crates/pa-tui/tests/agents_view_incident_notice_e2e.rs
index b6eb99de73..5bbd348dcc 100644
--- a/crates/pa-tui/tests/agents_view_incident_notice_e2e.rs
+++ b/crates/pa-tui/tests/agents_view_incident_notice_e2e.rs
@@ -3,21 +3,7 @@
//! collapsed warning line renders from the agent.jsonl tail, Esc
//! dismisses it, and a dismissal is sticky across polls/re-entries.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -169,6 +155,10 @@ fn read_line(reader: &mut impl BufRead) -> Option<String> {
/// Milliseconds since the Unix epoch (the notice window rides the real clock; the fixture entries
/// must be relative to it).
+#[expect(
+ clippy::cast_possible_truncation,
+ reason = "epoch milliseconds stay far below the target type's max"
+)]
fn now_ms() -> i64 {
std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
diff --git a/crates/pa-tui/tests/agents_view_saved_catalog_failure.rs b/crates/pa-tui/tests/agents_view_saved_catalog_failure.rs
index 8de35ba4db..592764be2c 100644
--- a/crates/pa-tui/tests/agents_view_saved_catalog_failure.rs
+++ b/crates/pa-tui/tests/agents_view_saved_catalog_failure.rs
@@ -3,21 +3,7 @@
//! an Enter after the failure opens the default row, and the fetch
//! re-arms on the next query change (TS `rearmSavedSearchFetch`).
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/agents_view_wait_render_barrier.rs b/crates/pa-tui/tests/agents_view_wait_render_barrier.rs
index 51c4f2c74f..9426841204 100644
--- a/crates/pa-tui/tests/agents_view_wait_render_barrier.rs
+++ b/crates/pa-tui/tests/agents_view_wait_render_barrier.rs
@@ -3,21 +3,7 @@
//! daemon-driven row, so the plan cannot reach `Done` before the data
//! rendered; the deadline still pops on a needle that never lands.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/bash_bang_headless.rs b/crates/pa-tui/tests/bash_bang_headless.rs
index 355ab5bdfa..1b719cbd05 100644
--- a/crates/pa-tui/tests/bash_bang_headless.rs
+++ b/crates/pa-tui/tests/bash_bang_headless.rs
@@ -3,21 +3,7 @@
//! session and answers the `execute_bash` request with the streamed
//! `bash_start`/`bash_output`/`bash_end` events.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -84,6 +70,10 @@ impl MockSupervisor {
/// Serve connections until the client stops coming back (bounded, so the plan's join always
/// finishes); the second connection carries the §10.3 `updateResume` hello.
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
self.listener
.set_nonblocking(true)
diff --git a/crates/pa-tui/tests/chat_detail_persist_headless.rs b/crates/pa-tui/tests/chat_detail_persist_headless.rs
index 6c00114cb2..e2e7749f8b 100644
--- a/crates/pa-tui/tests/chat_detail_persist_headless.rs
+++ b/crates/pa-tui/tests/chat_detail_persist_headless.rs
@@ -3,21 +3,7 @@
//! chat — the same session re-entered or a fresh one — opens at the saved
//! level instead of the `overview` startup default.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/chat_open_first_frame_headless.rs b/crates/pa-tui/tests/chat_open_first_frame_headless.rs
index ef7f4f8242..dcd50a947f 100644
--- a/crates/pa-tui/tests/chat_open_first_frame_headless.rs
+++ b/crates/pa-tui/tests/chat_open_first_frame_headless.rs
@@ -3,21 +3,7 @@
//! the FIRST frame — the dock folds synchronously with the attach even
//! when the catalog responses lag; no captured frame repaints the dock.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -47,6 +33,10 @@ impl MockSupervisor {
/// Serve one connection: attach, subscribe the roster, and answer the dock data requests after
/// the delay.
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self, with_content: bool) {
let (stream, _) = self.listener.accept().expect("accept");
let write_stream = stream.try_clone().expect("clone mock socket");
diff --git a/crates/pa-tui/tests/daemon_rejection_headless.rs b/crates/pa-tui/tests/daemon_rejection_headless.rs
index c5bfc4cf11..edc7fc949c 100644
--- a/crates/pa-tui/tests/daemon_rejection_headless.rs
+++ b/crates/pa-tui/tests/daemon_rejection_headless.rs
@@ -3,21 +3,7 @@
//! `showError` row and keep running — a daemon refusal never exits the
//! client; only transport failures stay fatal (TS `handleFollowUp`).
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -137,6 +123,10 @@ impl MockSupervisor {
/// One client connection's read loop, over the shared answers.
impl SharedAnswers {
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve_connection(self: std::sync::Arc<Self>, stream: UnixStream) {
let mut writer = stream.try_clone().expect("clone mock socket");
let mut reader = BufReader::new(stream);
@@ -569,14 +559,14 @@ fn run_plan(
let options = options_with_session(socket, selection);
let outcome = runtime.block_on(async {
if agents_view_open {
- pa_tui::interactive::run_interactive_agents_view_open(
+ Box::pin(pa_tui::interactive::run_interactive_agents_view_open(
options,
UiMode::Headless(plan),
None,
- )
+ ))
.await
} else {
- run_interactive(options, UiMode::Headless(plan)).await
+ Box::pin(run_interactive(options, UiMode::Headless(plan))).await
}
})?;
let _ = handle.join();
diff --git a/crates/pa-tui/tests/daemon_shutdown_reconnect_headless.rs b/crates/pa-tui/tests/daemon_shutdown_reconnect_headless.rs
index 967d93b290..317261c9fa 100644
--- a/crates/pa-tui/tests/daemon_shutdown_reconnect_headless.rs
+++ b/crates/pa-tui/tests/daemon_shutdown_reconnect_headless.rs
@@ -3,21 +3,7 @@
//! reconnect when the daemon returns on the same socket path (TS
//! `reconnectAfterShutdown`: same path, same durable session id).
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/daemon_shutdown_turn_end_headless.rs b/crates/pa-tui/tests/daemon_shutdown_turn_end_headless.rs
index 3ddb6daf8f..fffd7c4a38 100644
--- a/crates/pa-tui/tests/daemon_shutdown_turn_end_headless.rs
+++ b/crates/pa-tui/tests/daemon_shutdown_turn_end_headless.rs
@@ -3,21 +3,7 @@
//! must not stall the loop — the client refuses the send on a dead
//! supervisor reader (TS `requestWire`), so recovery arms at once.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -57,6 +43,10 @@ impl FirstGeneration {
}
/// Serve until the closing batch, then free the socket path for the successor.
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self, socket: &Path) {
let stream = accept(&self.listener, "the first daemon never saw the client");
let mut writer = stream.try_clone().expect("clone first daemon socket");
diff --git a/crates/pa-tui/tests/dock_arrows_headless.rs b/crates/pa-tui/tests/dock_arrows_headless.rs
index 281ca85c65..372e5d8b4b 100644
--- a/crates/pa-tui/tests/dock_arrows_headless.rs
+++ b/crates/pa-tui/tests/dock_arrows_headless.rs
@@ -5,21 +5,7 @@
//! The event-driven pins below hold the dock's update contract: every dock
//! input repaints on its own daemon event, never on a per-wake recompute.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -72,6 +58,10 @@ impl MockSupervisor {
/// Serve one client connection until it goes quiet (bounded, so the plan teardown join always
/// finishes).
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
self.listener
.set_nonblocking(true)
diff --git a/crates/pa-tui/tests/dock_click_headless.rs b/crates/pa-tui/tests/dock_click_headless.rs
index 7b36667e00..0be2349a36 100644
--- a/crates/pa-tui/tests/dock_click_headless.rs
+++ b/crates/pa-tui/tests/dock_click_headless.rs
@@ -3,21 +3,7 @@
//! that group's view, and a click on the tray's `← manage` hint hands
//! the pane to the agents view; hover motions ride the same path.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/dock_panel_exit_focus_headless.rs b/crates/pa-tui/tests/dock_panel_exit_focus_headless.rs
index 33be57d6b5..29f4754be3 100644
--- a/crates/pa-tui/tests/dock_panel_exit_focus_headless.rs
+++ b/crates/pa-tui/tests/dock_panel_exit_focus_headless.rs
@@ -4,21 +4,7 @@
//! prompt bar; the next Enter re-opens the SAME panel. A panel the agents view requested on open
//! closes back to the agents view instead.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -47,6 +33,10 @@ impl MockSupervisor {
/// Serve one connection: attach the session with the goal state, then answer the loop's
/// requests.
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
let (stream, _) = self.listener.accept().expect("accept");
let write_stream = stream.try_clone().expect("clone mock socket");
@@ -320,14 +310,14 @@ fn run_plan_with(
.block_on(async {
match open_panel {
Some(panel) => {
- run_interactive_agents_view_open(
+ Box::pin(run_interactive_agents_view_open(
options(socket),
UiMode::Headless(plan),
Some(panel),
- )
+ ))
.await
}
- None => run_interactive(options(socket), UiMode::Headless(plan)).await,
+ None => Box::pin(run_interactive(options(socket), UiMode::Headless(plan))).await,
}
})
.expect("interactive run");
diff --git a/crates/pa-tui/tests/editor_keybinds_parity_headless.rs b/crates/pa-tui/tests/editor_keybinds_parity_headless.rs
index 64e069210a..bc2576c993 100644
--- a/crates/pa-tui/tests/editor_keybinds_parity_headless.rs
+++ b/crates/pa-tui/tests/editor_keybinds_parity_headless.rs
@@ -2,21 +2,7 @@
//! paste, shift+arrow selection, select-all replace, doc/paragraph jumps. SANCTIONED DIVERGENCE
//! from TS (per the #289 precedent): the TS editor has none of these; pins the forward feature.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/effort_tray_label_headless.rs b/crates/pa-tui/tests/effort_tray_label_headless.rs
index 69def3ff01..021f29e364 100644
--- a/crates/pa-tui/tests/effort_tray_label_headless.rs
+++ b/crates/pa-tui/tests/effort_tray_label_headless.rs
@@ -3,21 +3,7 @@
//! session's model supports reasoning, keeps the bare model id when not,
//! and the label follows a `/effort` switch live.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -86,6 +72,10 @@ struct MockSupervisor {
}
impl MockSupervisor {
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(mut self) {
// Armed by `set_thinking_level` when the session pins the failed-read fallback: every later
// state read refuses.
diff --git a/crates/pa-tui/tests/info_panel_headless.rs b/crates/pa-tui/tests/info_panel_headless.rs
index c2d5022825..1e2219e7a5 100644
--- a/crates/pa-tui/tests/info_panel_headless.rs
+++ b/crates/pa-tui/tests/info_panel_headless.rs
@@ -3,21 +3,7 @@
//! `/system-prompt`, `/logs`, `/changelog`, `/hotkeys`, `/list`) open the
//! docked panel; ESC closes it; `?` types into the editor (guide removed).
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -43,6 +29,10 @@ impl MockSupervisor {
/// Serve one connection: the info commands' daemon fetches all land in the default arm's
/// empty-data success.
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
let (stream, _) = self.listener.accept().expect("accept");
let write_stream = stream.try_clone().expect("clone mock socket");
diff --git a/crates/pa-tui/tests/loader_anchor_headless.rs b/crates/pa-tui/tests/loader_anchor_headless.rs
index c48188e840..829f218d9b 100644
--- a/crates/pa-tui/tests/loader_anchor_headless.rs
+++ b/crates/pa-tui/tests/loader_anchor_headless.rs
@@ -3,21 +3,7 @@
//! PROMPT's time, never the re-attach instant (TS anchors at the mount — deliberate divergence).
//! Each `run_plan` below is one leg of the round trip: the returning client is a fresh process.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -156,6 +142,10 @@ fn write_json(writer: &mut UnixStream, value: &Value) {
/// The attach result: a mid-turn snapshot whose LAST HUMAN PROMPT is `prompt_age_ms` old and whose
/// state is streaming (the frame the agents-view round trip returns into).
fn attach_data(id: &str, prompt_age_ms: u64) -> Value {
+ #[expect(
+ clippy::cast_possible_truncation,
+ reason = "epoch milliseconds stay far below the target type's max"
+ )]
let now_ms = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.map(|since| since.as_millis() as u64)
diff --git a/crates/pa-tui/tests/model_picker_provider_headless.rs b/crates/pa-tui/tests/model_picker_provider_headless.rs
index 97bbf0bdd3..6bc6d230b2 100644
--- a/crates/pa-tui/tests/model_picker_provider_headless.rs
+++ b/crates/pa-tui/tests/model_picker_provider_headless.rs
@@ -3,21 +3,7 @@
//! catalog listing the SAME id under openrouter too, the picker must
//! resolve the session's OWN provider's entry, not the openrouter row.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -67,6 +53,10 @@ impl MockSupervisor {
}
}
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
let (stream, _) = self.listener.accept().expect("accept");
let write_stream = stream.try_clone().expect("clone mock socket");
diff --git a/crates/pa-tui/tests/mouse_click_open_headless.rs b/crates/pa-tui/tests/mouse_click_open_headless.rs
index ea0a6c68c0..5964aa5132 100644
--- a/crates/pa-tui/tests/mouse_click_open_headless.rs
+++ b/crates/pa-tui/tests/mouse_click_open_headless.rs
@@ -3,21 +3,7 @@
//! target (recorded `opened_urls` stand in for the browser spawn); a
//! release after a drag selects instead; plain text opens nothing.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/mouse_scroll_headless.rs b/crates/pa-tui/tests/mouse_scroll_headless.rs
index 079d0c1475..0cc920874e 100644
--- a/crates/pa-tui/tests/mouse_scroll_headless.rs
+++ b/crates/pa-tui/tests/mouse_scroll_headless.rs
@@ -3,21 +3,7 @@
//! lines per turn, the wheel is consumed without scrolling while a
//! picker owns the frame, and tracking-off reports are consumed either way.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/mouse_selection_headless.rs b/crates/pa-tui/tests/mouse_selection_headless.rs
index 6c03f301ef..59ff5dac73 100644
--- a/crates/pa-tui/tests/mouse_selection_headless.rs
+++ b/crates/pa-tui/tests/mouse_selection_headless.rs
@@ -3,21 +3,7 @@
//! copies the spanned text (recorded `copies` stand in for the OSC 52
//! write); a dock press starts a frame selection; a plain click copies nothing.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/nightly_command_headless.rs b/crates/pa-tui/tests/nightly_command_headless.rs
index 78cbbf873a..91d0c4b9a6 100644
--- a/crates/pa-tui/tests/nightly_command_headless.rs
+++ b/crates/pa-tui/tests/nightly_command_headless.rs
@@ -3,21 +3,7 @@
//! usage error keeps the TS wording, and the off arm pins the channel
//! through a stub settings seam (persisted form covered by the pa-cli test).
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/plugins_command_headless.rs b/crates/pa-tui/tests/plugins_command_headless.rs
index 0fbf3373ee..a8a24df51c 100644
--- a/crates/pa-tui/tests/plugins_command_headless.rs
+++ b/crates/pa-tui/tests/plugins_command_headless.rs
@@ -2,21 +2,7 @@
//! `showServiceCatalogPicker`): opens the external-services catalog view
//! (the merged `/mcp` view) and an argument prefills the search field.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
diff --git a/crates/pa-tui/tests/prompt_history_nav_headless.rs b/crates/pa-tui/tests/prompt_history_nav_headless.rs
index c79954f41d..d91ebfaad1 100644
--- a/crates/pa-tui/tests/prompt_history_nav_headless.rs
+++ b/crates/pa-tui/tests/prompt_history_nav_headless.rs
@@ -6,21 +6,7 @@
//! own Down enters the dock in every session shape, and the Up that
//! follows returns to the prompt before the next Up recalls.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -46,6 +32,10 @@ impl MockSupervisor {
/// Serve one connection: attach an empty session, list one heartbeat (selectable while no
/// subagents exist — the session shape that must not steal the prompt's Down).
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
let (stream, _) = self.listener.accept().expect("accept");
let writer = stream.try_clone().expect("clone mock socket");
diff --git a/crates/pa-tui/tests/replay_images.rs b/crates/pa-tui/tests/replay_images.rs
index d96d7634c0..a7ab6f0125 100644
--- a/crates/pa-tui/tests/replay_images.rs
+++ b/crates/pa-tui/tests/replay_images.rs
@@ -2,21 +2,7 @@
//! the same rows the live path shows (an image-only user prompt shows the
//! `[image]` placeholder); drives the same fold the `pa-tui-replay`
//! `--frame` path uses.
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use pa_tui::session::{parse_jsonl, JsonlSessionStream, SessionStream};
use pa_tui::theme::{ColorMode, Theme};
diff --git a/crates/pa-tui/tests/replay_tables.rs b/crates/pa-tui/tests/replay_tables.rs
index 5e2fd7a102..fda8e543df 100644
--- a/crates/pa-tui/tests/replay_tables.rs
+++ b/crates/pa-tui/tests/replay_tables.rs
@@ -2,21 +2,7 @@
//! the same box/table rows and the legacy `label [url]` link form the live
//! path shows (the TS product under a plain tmux pane renders links the
//! same way: the terminal-capability gate forces the legacy form there).
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use pa_tui::session::{parse_jsonl, JsonlSessionStream, SessionStream};
use pa_tui::theme::{ColorMode, Theme};
diff --git a/crates/pa-tui/tests/service_tier_headless.rs b/crates/pa-tui/tests/service_tier_headless.rs
index c902f6054f..acd094b5ea 100644
--- a/crates/pa-tui/tests/service_tier_headless.rs
+++ b/crates/pa-tui/tests/service_tier_headless.rs
@@ -3,21 +3,7 @@
//! with the list; a supported tier applies through `set_service_tier` and
//! the tray badge shows the non-default tier.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -61,6 +47,10 @@ impl MockSupervisor {
/// Serve one connection: attach an OpenRouter-model session; `set_service_tier` applies,
/// `get_state` reports the tier.
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
let (stream, _) = self.listener.accept().expect("accept");
let write_stream = stream.try_clone().expect("clone mock socket");
diff --git a/crates/pa-tui/tests/settings_menu_headless.rs b/crates/pa-tui/tests/settings_menu_headless.rs
index 0408be01ab..19fc597a88 100644
--- a/crates/pa-tui/tests/settings_menu_headless.rs
+++ b/crates/pa-tui/tests/settings_menu_headless.rs
@@ -9,21 +9,7 @@
//! fullscreen setting's retirement (the always-fullscreen surface has no
//! toggle left to advertise).
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -55,6 +41,10 @@ impl MockSupervisor {
/// Serve one connection: the connection state carries the session's thinking levels for the
/// Models tab's submenu rows.
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
let (stream, _) = self.listener.accept().expect("accept");
let write_stream = stream.try_clone().expect("clone mock socket");
@@ -233,6 +223,10 @@ impl Default for RecordingSettings {
}
impl RecordingSettings {
+ #[expect(
+ clippy::unnecessary_wraps,
+ reason = "returns the ClientSettings setters' Result so each setter can tail-call it"
+ )]
fn record(&self, entry: &str) -> Result<()> {
self.writes
.lock()
diff --git a/crates/pa-tui/tests/skills_menu_headless.rs b/crates/pa-tui/tests/skills_menu_headless.rs
index 5e2757d5bd..e7a3ada8df 100644
--- a/crates/pa-tui/tests/skills_menu_headless.rs
+++ b/crates/pa-tui/tests/skills_menu_headless.rs
@@ -2,21 +2,7 @@
//! `createBaseAutocompleteProvider`): the session's `get_commands`
//! response enumerates the installed skills into the slash menu.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -44,6 +30,10 @@ impl MockSupervisor {
}
}
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
let (stream, _) = self.listener.accept().expect("accept");
let write_stream = stream.try_clone().expect("clone mock socket");
diff --git a/crates/pa-tui/tests/slash_menu_panel_headless.rs b/crates/pa-tui/tests/slash_menu_panel_headless.rs
index c2df3707f4..a2bb8e122a 100644
--- a/crates/pa-tui/tests/slash_menu_panel_headless.rs
+++ b/crates/pa-tui/tests/slash_menu_panel_headless.rs
@@ -3,21 +3,7 @@
//! inline menu panel opens with (TS `MenuPanel.render`), drawn directly
//! above the menu rows.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -40,6 +26,10 @@ impl MockSupervisor {
}
}
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
let (stream, _) = self.listener.accept().expect("accept");
let write_stream = stream.try_clone().expect("clone mock socket");
@@ -228,7 +218,7 @@ fn options(socket: PathBuf) -> InteractiveOptions {
}
}
-const WIDTH: usize = 100;
+const WIDTH: u16 = 100;
fn run_plan(steps: Vec<HeadlessStep>) -> Vec<String> {
std::env::remove_var("TMUX");
@@ -243,7 +233,7 @@ fn run_plan(steps: Vec<HeadlessStep>) -> Vec<String> {
.expect("tokio runtime");
let plan = HeadlessPlan {
steps,
- width: WIDTH as u16,
+ width: WIDTH,
height: 30,
};
let outcome = runtime
@@ -284,7 +274,7 @@ fn slash_menu_opens_with_the_top_border_rule() {
);
assert_eq!(
lines[marker - 1],
- "\u{2500}".repeat(WIDTH),
+ "\u{2500}".repeat(usize::from(WIDTH)),
"the panel's top border sits directly above the menu rows:\n{frame}"
);
}
diff --git a/crates/pa-tui/tests/speed_footer_headless.rs b/crates/pa-tui/tests/speed_footer_headless.rs
index f496b3f31b..a7b6aaeb6d 100644
--- a/crates/pa-tui/tests/speed_footer_headless.rs
+++ b/crates/pa-tui/tests/speed_footer_headless.rs
@@ -3,21 +3,7 @@
//! responses — the readout appears after the first completed response
//! with positive usage and span; off clears both the stats and the row.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -41,6 +27,10 @@ impl MockSupervisor {
}
/// Serve one connection: stream one scripted assistant turn per prompt.
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
let (stream, _) = self.listener.accept().expect("accept");
let write_stream = stream.try_clone().expect("clone mock socket");
@@ -193,6 +183,10 @@ fn attach_data(id: &str) -> Value {
/// usage and a stream-start timestamp (`message_end` is set at provider stream start).
fn stream_turn(writer: &mut UnixStream) {
let event = |payload: Value| json!({ "type": "session_event", "activeSessionId": "s1", "event": payload });
+ #[expect(
+ clippy::cast_possible_truncation,
+ reason = "epoch milliseconds stay far below the target type's max"
+ )]
let stream_start_ms = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.map_or(0, |d| d.as_millis() as i64)
diff --git a/crates/pa-tui/tests/touch_click_headless.rs b/crates/pa-tui/tests/touch_click_headless.rs
index 0010de5744..47c54fc128 100644
--- a/crates/pa-tui/tests/touch_click_headless.rs
+++ b/crates/pa-tui/tests/touch_click_headless.rs
@@ -3,21 +3,7 @@
//! a terminal's clicks take. A plain click toggles the card it lands on (operator directive
//! 2026-09-26), places the caret, or moves a `/model` picker row.
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -67,6 +53,10 @@ impl MockSupervisor {
}
}
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
let (stream, _) = self.listener.accept().expect("accept");
let write_stream = stream.try_clone().expect("clone mock socket");
@@ -197,6 +187,10 @@ fn write_json(writer: &mut UnixStream, value: &Value) {
/// The slim attach result: eight ipython calls around a received agent message and hidden thinking
/// — every call renders as its own card (the 2026-09-28 undo of the condensed-run summary block).
+#[expect(
+ clippy::too_many_lines,
+ reason = "inline JSON fixture of the whole attach transcript"
+)]
fn attach_data(id: &str) -> Value {
let tool_call = |index: usize| {
json!({
@@ -271,7 +265,7 @@ fn attach_data(id: &str) -> Value {
"timestamp": 18_000u64,
}),
];
- for index in 3..8 {
+ for index in 3u64..8 {
let mut details = json!({ "status": "ok" });
if index == 5 {
details["sentAgentMessages"] = json!([
@@ -290,7 +284,7 @@ fn attach_data(id: &str) -> Value {
"content": [{ "type": "text", "text": format!("out {index}") }],
"details": details,
"isError": false,
- "timestamp": 18_000u64 + (index as u64 - 2) * 9_000,
+ "timestamp": 18_000u64 + (index - 2) * 9_000,
}));
}
messages.push(json!({
diff --git a/crates/pa-tui/tests/tui_rss_stability.rs b/crates/pa-tui/tests/tui_rss_stability.rs
index cde8382f2d..518e12b7f6 100644
--- a/crates/pa-tui/tests/tui_rss_stability.rs
+++ b/crates/pa-tui/tests/tui_rss_stability.rs
@@ -3,21 +3,7 @@
//! `/proc/self/statm` and asserts a plateau in the last quarter. Linux-only
//! by construction (compiles to nothing elsewhere).
#![cfg(unix)]
-// Casts: structurally bounded terminal-layout arithmetic; guarded conversions add panic paths.
-#![allow(
- clippy::cast_possible_truncation,
- clippy::cast_possible_wrap,
- clippy::cast_sign_loss,
- clippy::cast_precision_loss
-)]
-// Render routes are flat tables (one arm per route); splitting adds indirection.
-#![allow(clippy::too_many_lines)]
-// Widget state structs carry independent flag bits.
-#![allow(clippy::struct_excessive_bools, clippy::fn_params_excessive_bools)]
-// Futures are bounded by the surface's lifetime; boxing adds a steady-state allocation.
-#![allow(clippy::large_futures)]
-// The wrappers preserve a uniform Result-returning API surface.
-#![allow(clippy::unnecessary_wraps)]
+#![warn(clippy::allow_attributes_without_reason)]
use std::io::{BufRead, BufReader, Write};
use std::os::unix::net::{UnixListener, UnixStream};
@@ -57,6 +43,10 @@ impl MockSupervisor {
}
}
+ #[expect(
+ clippy::too_many_lines,
+ reason = "mock daemon request loop: one match arm per scripted request method"
+ )]
fn serve(self) {
let (stream, _) = self.listener.accept().expect("accept");
let write_stream = stream.try_clone().expect("clone mock socket");