summaryrefslogtreecommitdiff
path: root/core/Output.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-19 05:50:51 -0300
committerGabriel Schneider <[email protected]>2026-11-19 06:30:00 -0300
commit5e162e2e8b208367720b8be8de3bfe51b010aa68 (patch)
treee6288bff0819349ff66eee162ecdb02efc6ff2b2 /core/Output.zig
parent5b857bb55fae0a220f54b140bc1b46c3efb991bb (diff)
downloadpardes-5e162e2e8b208367720b8be8de3bfe51b010aa68.tar.gz
pardes-5e162e2e8b208367720b8be8de3bfe51b010aa68.zip
core: the reads no tape saw are taped, and a check counts what core/ asks of the machine (the reorganisation's 12b, the design round's step 4 and its finds): DumpDir's check whether its directory may be written (fs.deniedAbove in config.Runtime.apply, two `access` calls in a step) is the session's disk's answer, tape.value(.denied) as a failed save's is, and Font <name> and Fonts, which walked the machine's font directories in a step (dev/fonts.list), ask the session's machine through a new site, `fonts` (a far client's Font or Fonts waits a round trip; its replay takes the session's answer); each was a real fault: a client on another machine diverged at its replay of the session's unit, a test each at the end of core/replica.zig (a directory the session may not write and the client may, the setting refused on both; a face the session's machine has and the client's lacks, its family renamed so no installed face shares it, listed and chosen alike on both), each shown failing on the change before (the digests differ); Edit's pipe environment (host_io.commandEnv) is shown harmless and left as it is: it is kept in Pipe.edit_run, `.authority` state (Pipe.zig:21: in no digest and no copy), read only by the host's `pipe` entry, which a client never calls (a speculation records the void call, a replay answers from the tape); the check, the twin of allowed_vars, at the end of core/root.zig: per file of core/, the lines outside tests naming std.c., libc., std.posix., getenv, std.Io's File, Dir, net or Threaded (not Dir.path, a path's text, nor max_path_bytes) or importing dev or runtime, against one list, machine_lines, 34 files and 313 lines, each file with why; a file whose count moves is named with its lines, shown failing once (a getenv added to Messages.zig: 7 lines against 6, its line 891 named); found by it and not changed: Messages.noTime reads PARDES_NOTIME in a step (a test's knob: set on one side only it would diverge); may_wait gains Font and Fonts at `fonts` in a window's build; Stats.unspeculated is not deleted: its only reader is the soak's (test/replicas.zig: the field, its sum, the view column), a file another agent is rewriting; the semantics word moves again (a site added), 517cd1c276996a3c -> 0900e560fd6395ef; tui core-test 836/979 (143 skipped), shell-test 1014/1017, pane-test 183/184, behaviour-test 275/275 and --replay 275/275, process-test 2 of 144 failed (lspcomplete, lspcompletemoved, the base's), replicas --clients 5 diverged 0 unequal 0 deltas wrong 0 (1827/0, 1596/0, 1803/0) quiet differ 0 (422/0, 563/0, 655/0) at 30/80/207 ms, stopped 89/73/108, mispredicted 37/34/36, gui unit-test 1612/1616 (its perf check's BaselineHarnessMismatch the base's), daemon.py plain, --far, --games, --window-clients pass; gate-w seam-b-4 against tree1: 77/77 frames byte-identical in Debug, its unit-test 1612/1616, perfab corpus2x +0.047% (pictures identical in all 10 runs), perfops 97 counts within 0.1% (largest +0.0199%, body-appends on longline)
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/Output.zig')
-rw-r--r--core/Output.zig19
1 files changed, 12 insertions, 7 deletions
diff --git a/core/Output.zig b/core/Output.zig
index 1335d8e9..42341002 100644
--- a/core/Output.zig
+++ b/core/Output.zig
@@ -721,17 +721,22 @@ pub fn isWalkRow(file: *const File.State, row: usize, line: []const u8) bool {
pub fn openFonts(p: *Pardes, id: usize) !void {
if (builtins.capabilities.font_picker) {
- const arena = p.scratch.allocator();
- const font_list = fonts.list(arena, null);
- var out: std.Io.Writer.Allocating = .init(p.gpa);
- errdefer out.deinit();
- for (font_list) |f|
- try out.writer.print(comptime config.Runtime.findAction(.font).?.word ++ " {s}\n", .{f.name});
- const content = try out.toOwnedSlice();
+ // The session's machine's fonts, a question to its disk: a client's
+ // replay takes the session's answer, never its own.
+ const content = try pardes.tape.site(.fonts, p.gpa, fontsListed, .{ p.gpa, p.scratch.allocator() });
try openStepped(p, id, .{ .cmd = .Fonts }, content);
}
}
+/// This machine's fonts, a `Font <name>` line each, in `gpa`.
+fn fontsListed(gpa: std.mem.Allocator, arena: std.mem.Allocator) anyerror![]u8 {
+ var out: std.Io.Writer.Allocating = .init(gpa);
+ errdefer out.deinit();
+ for (fonts.list(arena, null)) |f|
+ try out.writer.print(comptime config.Runtime.findAction(.font).?.word ++ " {s}\n", .{f.name});
+ return out.toOwnedSlice();
+}
+
fn openStepped(p: *Pardes, id: usize, from: Origin, content: []u8) !void {
errdefer p.gpa.free(content);
const pane = p.panes[id] orelse return error.MissingPane;