Skip to content

graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs

Python

test: repair Linux cancellation fixture and offline SDK package smoke

yxlyx91bd9d175477
diff --git a/sdk/ts/scripts/test-packed-install.mjs b/sdk/ts/scripts/test-packed-install.mjs
index 0492458a..06a97f2c 100644
--- a/sdk/ts/scripts/test-packed-install.mjs
+++ b/sdk/ts/scripts/test-packed-install.mjs
@@ -66,12 +66,14 @@ try {
await chmod(sourceBinary, 0o755);
}
+ const sdkManifest = JSON.parse(await readFile(join(SDK_ROOT, "package.json"), "utf8"));
const nativeTarballs = {};
for (const [target, packageName] of ALL_TARGETS) {
const output = run(process.execPath, [
join(HERE, "package-platform.mjs"),
"--target", target,
"--binary", sourceBinary,
+ "--version", sdkManifest.optionalDependencies[packageName],
"--out", packages,
], SDK_ROOT);
const { packageDir } = JSON.parse(output);
@@ -88,7 +90,7 @@ try {
),
};
await writeFile(join(consumer, "package.json"), `${JSON.stringify(manifest, null, 2)}\n`);
- npmRun(["install", "--ignore-scripts", "--no-audit", "--no-fund"], consumer);
+ npmRun(["install", "--offline", "--ignore-scripts", "--no-audit", "--no-fund"], consumer);
const smoke = `
import { Harness } from "@codegraff/sdk";
diff --git a/src/subagent_activity.zig b/src/subagent_activity.zig
index 756bfb7a..3bd3522d 100644
--- a/src/subagent_activity.zig
+++ b/src/subagent_activity.zig
@@ -208,7 +208,7 @@ test "cancel file marks a working child interrupted even if it later finishes" {
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
const io = std.testing.io;
- var r: Recorder = .{ .a = std.testing.allocator, .io = io, .dir = try tmp.dir.openDir(io, ".", .{}), .meta = .{ .id = "child", .label = "test", .task = "test" } };
+ var r: Recorder = .{ .a = std.testing.allocator, .io = io, .dir = try tmp.dir.openDir(io, ".", .{ .iterate = true }), .meta = .{ .id = "child", .label = "test", .task = "test" } };
defer r.deinit();
try requestInterrupt(io, r.dir, "child");
try std.testing.expect(interruptRequested(io, r.dir, "child"));