Compare commits

..

7 Commits

Author SHA1 Message Date
DuProcess 3d5bb126c5 Trace ticket reattach recovery
ci / test (push) Waiting to run
ci / fuzz-smoke (push) Waiting to run
ci / windows-client (push) Waiting to run
ci / package-release (linux-x86_64, ubuntu-latest) (push) Waiting to run
ci / package-release (macos-aarch64, macos-14) (push) Waiting to run
ci / package-release (macos-x86_64, macos-13) (push) Waiting to run
ci / package-release (windows-x86_64, windows-latest) (push) Waiting to run
ci / remote-bench (push) Waiting to run
2026-07-12 12:15:25 -04:00
DuProcess 37632a96b7 Filter trace reports to latest run
ci / test (push) Waiting to run
ci / fuzz-smoke (push) Waiting to run
ci / windows-client (push) Waiting to run
ci / package-release (linux-x86_64, ubuntu-latest) (push) Waiting to run
ci / package-release (macos-aarch64, macos-14) (push) Waiting to run
ci / package-release (macos-x86_64, macos-13) (push) Waiting to run
ci / package-release (windows-x86_64, windows-latest) (push) Waiting to run
ci / remote-bench (push) Waiting to run
2026-07-12 12:09:37 -04:00
DuProcess e69be4fdf0 Reconnect before input after local sleep
ci / test (push) Waiting to run
ci / fuzz-smoke (push) Waiting to run
ci / windows-client (push) Waiting to run
ci / package-release (linux-x86_64, ubuntu-latest) (push) Waiting to run
ci / package-release (macos-aarch64, macos-14) (push) Waiting to run
ci / package-release (macos-x86_64, macos-13) (push) Waiting to run
ci / package-release (windows-x86_64, windows-latest) (push) Waiting to run
ci / remote-bench (push) Waiting to run
2026-07-12 12:01:46 -04:00
DuProcess fdbd58b628 Fetch remote server trace reports
ci / test (push) Waiting to run
ci / fuzz-smoke (push) Waiting to run
ci / windows-client (push) Waiting to run
ci / package-release (linux-x86_64, ubuntu-latest) (push) Waiting to run
ci / package-release (macos-aarch64, macos-14) (push) Waiting to run
ci / package-release (macos-x86_64, macos-13) (push) Waiting to run
ci / package-release (windows-x86_64, windows-latest) (push) Waiting to run
ci / remote-bench (push) Waiting to run
2026-07-12 11:55:23 -04:00
DuProcess c65aba9d7a Repaint terminal after local sleep
ci / test (push) Waiting to run
ci / fuzz-smoke (push) Waiting to run
ci / windows-client (push) Waiting to run
ci / package-release (linux-x86_64, ubuntu-latest) (push) Waiting to run
ci / package-release (macos-aarch64, macos-14) (push) Waiting to run
ci / package-release (macos-x86_64, macos-13) (push) Waiting to run
ci / package-release (windows-x86_64, windows-latest) (push) Waiting to run
ci / remote-bench (push) Waiting to run
2026-07-12 11:48:18 -04:00
DuProcess 818b481154 Cover terminal mouse input filtering
ci / test (push) Has been cancelled
ci / fuzz-smoke (push) Has been cancelled
ci / windows-client (push) Has been cancelled
ci / package-release (linux-x86_64, ubuntu-latest) (push) Has been cancelled
ci / package-release (macos-aarch64, macos-14) (push) Has been cancelled
ci / package-release (macos-x86_64, macos-13) (push) Has been cancelled
ci / package-release (windows-x86_64, windows-latest) (push) Has been cancelled
ci / remote-bench (push) Has been cancelled
2026-07-12 01:08:38 -04:00
DuProcess 70650e221b Flag trace terminal input anomalies
ci / test (push) Has been cancelled
ci / fuzz-smoke (push) Has been cancelled
ci / windows-client (push) Has been cancelled
ci / package-release (linux-x86_64, ubuntu-latest) (push) Has been cancelled
ci / package-release (macos-aarch64, macos-14) (push) Has been cancelled
ci / package-release (macos-x86_64, macos-13) (push) Has been cancelled
ci / package-release (windows-x86_64, windows-latest) (push) Has been cancelled
ci / remote-bench (push) Has been cancelled
2026-07-12 01:04:37 -04:00
5 changed files with 721 additions and 82 deletions
Generated
+1 -1
View File
@@ -436,7 +436,7 @@ dependencies = [
[[package]]
name = "dosh"
version = "1.0.0-rc31"
version = "1.0.0-rc37"
dependencies = [
"anyhow",
"base64",
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "dosh"
version = "1.0.0-rc31"
version = "1.0.0-rc37"
edition = "2024"
license = "MIT"
+6 -4
View File
@@ -85,12 +85,14 @@ dosh trace --client-log /tmp/dosh-client.log HOST
Summarize collected traces with:
```sh
dosh trace report --client-log /tmp/dosh-client.log
dosh trace report HOST --client-log /tmp/dosh-client.log
```
Set `DOSH_TRACE=/tmp/dosh-server.log` on `dosh-server` for matching server
events. Trace byte prefixes are enabled for `dosh trace`, so use it only for
short reproductions.
When `HOST` is given, Dosh fetches `/tmp/dosh-server.log` over SSH before
building the report. Set `DOSH_TRACE=/tmp/dosh-server.log` on `dosh-server` for
matching server events. Reports default to the latest traced client/server
process run; add `--all-runs` to include older appended log entries. Trace byte
prefixes are enabled for `dosh trace`, so use it only for short reproductions.
## VS Code
+670 -74
View File
File diff suppressed because it is too large Load Diff
+43 -2
View File
@@ -200,6 +200,13 @@ async fn serve(config_path: Option<std::path::PathBuf>) -> Result<()> {
.with_context(|| format!("bind {bind}"))?,
);
eprintln!("dosh-server listening on {bind}");
dosh::trace::event(
"server.start",
&[
("version", dosh::build_info::VERSION.to_string()),
("bind", bind.clone()),
],
);
let (pty_tx, mut pty_rx) = mpsc::unbounded_channel();
let state = Arc::new(Mutex::new(ServerState::new(
@@ -1456,6 +1463,7 @@ async fn handle_ticket_attach(
peer: SocketAddr,
body: Vec<u8>,
) -> Result<()> {
dosh::trace::event("server.ticket_attach_start", &[("peer", peer.to_string())]);
let env: TicketAttachEnvelope = protocol::from_body(&body)?;
let opened = {
let locked = state.lock().expect("server state poisoned");
@@ -1479,10 +1487,22 @@ async fn handle_ticket_attach(
};
let (ticket, request_plain) = match opened {
Ok(opened) => opened,
Err(err) => return send_reject(socket, peer, &err.to_string()).await,
Err(err) => {
let reason = err.to_string();
dosh::trace::event("server.ticket_attach_reject", &[("reason", reason.clone())]);
return send_reject(socket, peer, &reason).await;
}
};
let req: TicketAttachBody = protocol::from_body(&request_plain)?;
if req.session != ticket.session || req.mode != ticket.mode {
dosh::trace::event(
"server.ticket_attach_reject",
&[
("session", req.session.clone()),
("mode", req.mode.clone()),
("reason", "ticket scope mismatch".to_string()),
],
);
return send_reject(socket, peer, "ticket scope mismatch").await;
}
@@ -1553,7 +1573,18 @@ async fn handle_ticket_attach(
};
let (client_id, output_seq, snapshot) = match attached {
Ok(attached) => attached,
Err(err) => return send_reject(socket, peer, &err.to_string()).await,
Err(err) => {
let reason = err.to_string();
dosh::trace::event(
"server.ticket_attach_reject",
&[
("session", req.session.clone()),
("mode", req.mode.clone()),
("reason", reason.clone()),
],
);
return send_reject(socket, peer, &reason).await;
}
};
let ok = AttachOk {
@@ -1584,6 +1615,16 @@ async fn handle_ticket_attach(
let body = protocol::to_body(&envelope)?;
let out = protocol::encode_plain(PacketKind::AttachOk, client_id, 1, 0, &body)?;
let _ = send_udp(socket, &out, peer).await?;
dosh::trace::event(
"server.ticket_attach_ok",
&[
("session", ok.session.clone()),
("mode", ok.mode.clone()),
("client", hex_id(client_id)),
("output_seq", output_seq.to_string()),
("bytes", ok.snapshot.len().to_string()),
],
);
Ok(())
}