Skip to content

Commit dff3449

Browse files
committed
Integrate master into the v0.9.6 candidate
Brings in the two test-only repairs landed 2026-08-06: - PR #87 (6664f8e) order run-binding cleanup after fixture readiness - PR #88 (9fbf6e4) derive the expected renderer policy from the platform Delta is +24/-2 across test/eval/agent-workflow-run-binding.test.js and test/render-pdf-page.test.js. No product, manifest, or dependency change. Merged so the shipped head carries both fixes and the release aggregate binds the tree that actually ships, rather than an ancestor.
2 parents 34ca7e0 + 661cd0a commit dff3449

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

‎test/eval/agent-workflow-run-binding.test.js‎

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1087,6 +1087,7 @@ setInterval(() => {}, 1000);
10871087
let caught = null;
10881088
let parentPid = null;
10891089
let grandchildPid = null;
1090+
let settledAt = null;
10901091
const startedAt = Date.now();
10911092
try {
10921093
await Promise.race([
@@ -1110,6 +1111,7 @@ setInterval(() => {}, 1000);
11101111
} catch (error) {
11111112
caught = error;
11121113
} finally {
1114+
settledAt = Date.now();
11131115
if (watchdog !== null) clearTimeout(watchdog);
11141116
const readFixturePid = async filename => {
11151117
try {
@@ -1124,7 +1126,19 @@ setInterval(() => {}, 1000);
11241126
parentPid = Number.isSafeInteger(reportedPid) && reportedPid > 0
11251127
? reportedPid
11261128
: await readFixturePid(parentPidPath);
1129+
// The injected killProcess denies every real signal, so the fixture is
1130+
// still running once the runner gives up, and it records its grandchild
1131+
// pid on its own schedule rather than inside the runner's rejection
1132+
// budget. Wait for that observable readiness before the process group is
1133+
// killed below, otherwise a slow host lets the kill beat the write and
1134+
// the pid these assertions need is never recorded. The wait is bounded so
1135+
// a genuinely missing pid still fails instead of hanging.
11271136
grandchildPid = await readFixturePid(grandchildPidPath);
1137+
const readinessDeadlineAt = Date.now() + 2_000;
1138+
while (grandchildPid === null && Date.now() < readinessDeadlineAt) {
1139+
await new Promise(resolve => setTimeout(resolve, 5));
1140+
grandchildPid = await readFixturePid(grandchildPidPath);
1141+
}
11281142
if (parentPid !== null) {
11291143
try {
11301144
process.kill(-parentPid, "SIGKILL");
@@ -1152,7 +1166,10 @@ setInterval(() => {}, 1000);
11521166
await new Promise(resolve => setTimeout(resolve, 10));
11531167
}
11541168
}
1155-
expect(Date.now() - startedAt).toBeLessThan(5_000);
1169+
// Bound the runner's own rejection, measured when the race settled, not the
1170+
// fixture teardown that follows it.
1171+
expect(settledAt).not.toBeNull();
1172+
expect(settledAt - startedAt).toBeLessThan(5_000);
11561173
expect(caught).toMatchObject({
11571174
code: "CODEX_PROCESS_TERMINATION_UNVERIFIABLE",
11581175
process_result: {
@@ -1180,6 +1197,7 @@ setInterval(() => {}, 1000);
11801197
});
11811198
expect(parentPid).not.toBeNull();
11821199
expect(grandchildPid).not.toBeNull();
1200+
expect(await fs.readFile(grandchildReadyPath, "utf8")).toBe("ready");
11831201
for (const pid of [-parentPid, parentPid, grandchildPid]) {
11841202
expect(() => process.kill(pid, 0)).toThrow(
11851203
expect.objectContaining({ code: "ESRCH" }),

‎test/render-pdf-page.test.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,11 @@ describe("render_pdf_page MCP tool", () => {
163163
size_bytes: sourceBytes.length,
164164
},
165165
raw_pixel_status: "available",
166-
renderer_policy: "native_with_system_fallback",
166+
// The system-renderer fallback is a macOS capability, so pdfjsRendererPolicy
167+
// reports plain "native" everywhere else. The hardcoded darwin value failed
168+
// on every non-darwin host; it stayed hidden because the aggregate gate runs
169+
// on macOS.
170+
renderer_policy: process.platform === "darwin" ? "native_with_system_fallback" : "native",
167171
});
168172
expect(result.structuredContent.png_sha256)
169173
.toBe(createHash("sha256").update(Buffer.from(image.data, "base64")).digest("hex"));

0 commit comments

Comments
 (0)