summaryrefslogtreecommitdiff
path: root/9agents/src/active.zig
diff options
context:
space:
mode:
Diffstat (limited to '9agents/src/active.zig')
-rw-r--r--9agents/src/active.zig7
1 files changed, 2 insertions, 5 deletions
diff --git a/9agents/src/active.zig b/9agents/src/active.zig
index ebf7ed6..301e905 100644
--- a/9agents/src/active.zig
+++ b/9agents/src/active.zig
@@ -311,7 +311,6 @@ pub fn legalZmxName(name: []const u8) bool {
return true;
}
-
// ---- reading /proc and the harness stores ------------------------------------
/// Where the view reads from. Every path below is composed from these
@@ -393,7 +392,7 @@ fn join(buf: []u8, parts: []const []const u8) ?[]const u8 {
/// `<root>` of a harness, or null when it is not pinned.
fn rootOf(s: Sources, k: Kind) ?[]const u8 {
- const base = s.roots[@intFromEnum(k)];
+ const base = s.roots[@backingInt(k)];
return if (base.len == 0) null else base;
}
@@ -872,7 +871,6 @@ fn sessionFile(kind: Kind, rel: []const u8) bool {
};
}
-
// ---- fields derived when they are read ---------------------------------------
/// The value of `key` in a NUL-separated environment block, as
@@ -979,7 +977,6 @@ pub fn bootTime(io: Io, proc: []const u8) i64 {
return 0;
}
-
// ---- subagents ----------------------------------------------------------------
/// Longest subagent name answered.
@@ -1168,7 +1165,7 @@ test "active: a zmx session name is checked before it is ever used" {
try testing.expect(!legalZmxName("../escape"));
try testing.expect(!legalZmxName("semi;colon"));
try testing.expect(!legalZmxName("nul\x00byte"));
- try testing.expect(!legalZmxName("x" ** 65));
+ try testing.expect(!legalZmxName(&@as([65]u8, @splat('x'))));
}
test "active: a codex thread's rollout is found by the day its id was minted" {