summaryrefslogtreecommitdiff
path: root/test/tty.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-17 22:06:33 -0300
committerGabriel Schneider <[email protected]>2026-11-17 22:23:50 -0300
commit920110be4c597b4b93fc2d38179c09b335186253 (patch)
treefb5a3eaebb48b8c52ec0e23540e5065d940995d0 /test/tty.zig
parent7d10ad68b07a7bbab23fa8565d39183e4387c478 (diff)
downloadpardes-920110be4c597b4b93fc2d38179c09b335186253.tar.gz
pardes-920110be4c597b4b93fc2d38179c09b335186253.zip
words: a session with no frontend of its own is `detached` in the code, one word for what was `headless`, `parked`, `alone_unattended`, `Term.none` and `!attached()` (PARDES.md ruling 1): main.zig's and gui.zig's `headless` (run, runNative, localSession) are `detached`, tui.zig's `Term.none` is `Term.detached`, the window's `Shell.parked` (its Gui kept while detached) is `Shell.detached`, `replica.Peers.alone_unattended` is `Peers.detached`, and the terminal's `Shell.attached()` is `Shell.detached()`, its five callers and `watched` negated to match (a test's Shell with no screen is not detached, as it was attached); the tape's `headless`, a replica core that skips `render` and the host calls inside it (set on every client), is `skips_render`, its replay run named `skips-render` ("replay X: skips-render replica: N digests agree"), and the two that read that line follow (test/tty.zig's other-build replay, test/cross_replay.py); NOT renamed, a different fact: `Core.unattended` (detached AND no client: nobody looks), a watched field on the tape by index; names only, no logic moved; tui core-test 811/950 (139 skipped), shell-test 993/996, behaviour-test 269/273 (the four addon ABI tests the base fails) and the same with --replay, process-test 2 of 144 failed (lspcomplete and lspcompletemoved, the base's), replicas pass (checked/wrong 0), daemon.py main passes; gui frame corpus 77/77 byte-identical against mbase, unit-test 1582/1590 (the base's 8 failures)
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'test/tty.zig')
-rw-r--r--test/tty.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/tty.zig b/test/tty.zig
index 2fdf5952..d41159a0 100644
--- a/test/tty.zig
+++ b/test/tty.zig
@@ -162,7 +162,7 @@ pub const Tty = struct {
}
/// Each tape the case's sessions wrote, replayed by `exe`.
- fn replayTapes(t: *Tty, exe: []const u8, headless: bool) !void {
+ fn replayTapes(t: *Tty, exe: []const u8, other_build: bool) !void {
const tapes_dir = try std.fmt.allocPrint(t.arena, "{s}/tapes", .{t.base});
const io = std.Io.Threaded.global_single_threaded.io();
var d = try std.Io.Dir.cwd().openDir(io, tapes_dir, .{ .iterate = true });
@@ -172,12 +172,12 @@ pub const Tty = struct {
while (try it.next(io)) |entry| {
if (!std.mem.endsWith(u8, entry.name, ".tape")) continue;
tapes += 1;
- const cmd = try std.fmt.allocPrintSentinel(t.arena, "PARDES_RECORD= PARDES_REPLAY='{s}/{s}' {s}timeout 300 '{s}' > '{s}/{s}.replay' 2>&1", .{ tapes_dir, entry.name, if (headless) "" else "PARDES_REPLAY_DUMP=1 ", exe, tapes_dir, entry.name }, 0);
+ const cmd = try std.fmt.allocPrintSentinel(t.arena, "PARDES_RECORD= PARDES_REPLAY='{s}/{s}' {s}timeout 300 '{s}' > '{s}/{s}.replay' 2>&1", .{ tapes_dir, entry.name, if (other_build) "" else "PARDES_REPLAY_DUMP=1 ", exe, tapes_dir, entry.name }, 0);
if (system(cmd) == 0) continue;
const said = readFileAlloc(t.arena, try std.fmt.allocPrint(t.arena, "{s}/{s}.replay", .{ tapes_dir, entry.name })) catch "";
// Another build's replay need agree only in the replica that draws nothing.
- if (headless) if (std.mem.indexOf(u8, said, ": headless replica: ")) |at| {
- if (std.mem.startsWith(u8, std.mem.trimStart(u8, said[at + ": headless replica: ".len ..], "0123456789"), " digests agree")) continue;
+ if (other_build) if (std.mem.indexOf(u8, said, ": skips-render replica: ")) |at| {
+ if (std.mem.startsWith(u8, std.mem.trimStart(u8, said[at + ": skips-render replica: ".len ..], "0123456789"), " digests agree")) continue;
};
std.debug.print(" {s}: its tape {s} did not replay:\n{s}", .{ t.name, entry.name, said });
return error.Diverged;