ci: stabilize release validation tests (#108420)

* test(codex): remove turn-watch timing race

* ci: pin workflow sanity shellcheck

* ci: run workflow sanity on blacksmith

* ci: serialize workflow sanity lint

* ci: bound workflow lint stalls

* ci: cap actionlint process fanout

* ci: report stalled workflow shellcheck

* ci: stabilize release validation checks

* ci: restore release workflow shellcheck

* test: preserve codex turn watch reset proof
This commit is contained in:
Peter Steinberger
2026-07-15 13:22:31 -07:00
committed by GitHub
parent ff8a015981
commit 28d30e9dae
9 changed files with 459 additions and 145 deletions

View File

@@ -1021,7 +1021,10 @@ describe("runCodexAppServerAttempt turn watches", () => {
expect(harness.request.mock.calls.some(([method]) => method === "turn/interrupt")).toBe(true);
});
it("counts handled nullable-turn elicitations as turn attempt progress", async () => {
it("refreshes the turn attempt watch for handled nullable-turn elicitations", async () => {
let nowMs = 1_000_000;
vi.spyOn(Date, "now").mockImplementation(() => nowMs);
const setTimeoutSpy = vi.spyOn(globalThis, "setTimeout");
const harness = createStartedThreadHarness();
vi.spyOn(elicitationBridge, "handleCodexAppServerElicitationRequest").mockResolvedValue({
action: "accept",
@@ -1032,7 +1035,7 @@ describe("runCodexAppServerAttempt turn watches", () => {
path.join(tempDir, "session.jsonl"),
path.join(tempDir, "workspace"),
);
params.timeoutMs = 100;
params.timeoutMs = 10_000;
const onRunProgress = vi.fn();
params.onRunProgress = onRunProgress;
@@ -1049,10 +1052,14 @@ describe("runCodexAppServerAttempt turn watches", () => {
),
fastWait,
);
const initialAttemptWatch = setTimeoutSpy.mock.calls.find(
([callback]) => typeof callback === "function" && callback.name === "fireAttemptIdleTimeout",
)?.[0];
if (typeof initialAttemptWatch !== "function") {
throw new Error("Expected the initial turn attempt watch timer");
}
nowMs += 6_000;
await new Promise((resolve) => {
setTimeout(resolve, 60);
});
await harness.handleServerRequest({
id: "request-null-turn-elicitation",
method: "mcpServer/elicitation/request",
@@ -1066,9 +1073,15 @@ describe("runCodexAppServerAttempt turn watches", () => {
_meta: null,
},
});
await new Promise((resolve) => {
setTimeout(resolve, 60);
});
await vi.waitFor(
() =>
expect(onRunProgress).toHaveBeenCalledWith(
expect.objectContaining({ reason: "request:mcpServer/elicitation/request:start" }),
),
fastWait,
);
nowMs += 6_000;
initialAttemptWatch();
expect(harness.request.mock.calls.some(([method]) => method === "turn/interrupt")).toBe(false);
await harness.completeTurn({ threadId: "thread-1", turnId: "turn-1" });