test: strengthen and prune audited test coverage (#8573)

* test: strengthen and prune audited test coverage

* test: require delivered DeepSeek skill instructions

* test: keep schema fixture types private

* test: verify Gemini receives skill instructions

* test: bind Qwen skill evidence to its tool result

* test: report NativeAOT verifier checks precisely

* fix: verify Ghidra cleanup paths reliably

* fix: verify Command Code skill activation

* test: tighten cleanup and fixture checks

* test: verify packet capture evidence is recorded

* fix: report HTTP3 capture provenance accurately

* test: preserve resource coverage through MCP

* test: prune repeated assertions and retain cancellation identity

* fix: validate client verifier fixture paths

* test: skip Copilot verifier cases on Windows

* test: keep verifier setup target relative
This commit is contained in:
morluto authored and GitHub committed 2026-11-02 02:13:32 +08:00
1 parent ce9095d727
commit 7bcefead69
167 files changed
+2396 -1012

No files matched your search

@@ -1,5 +1,6 @@
import { setImmediate } from "node:timers/promises";
import { describe, expect, it } from "vitest";
import { ArtifactReaderFailure } from "../../artifacts/ArtifactReader.js";
import { completeJavaScriptAnalysisSteps } from "./JavaScriptAnalysisControl.js";
describe("JavaScript cooperative computation lifecycle", () => {
@@ -15,9 +16,19 @@ describe("JavaScript cooperative computation lifecycle", () => {
}
}
const cancellation = setImmediate().then(() => controller.abort(reason));
await expect(
completeJavaScriptAnalysisSteps(work(), controller.signal),
).rejects.toMatchObject({ reason: "cancelled", cause: reason });
const failure = await completeJavaScriptAnalysisSteps(
work(),
controller.signal,
).then(
() => {
throw new Error("Expected cancellation");
},
(cause: unknown) => cause,
);
expect(failure).toBeInstanceOf(ArtifactReaderFailure);
if (!(failure instanceof ArtifactReaderFailure)) throw failure;
expect(failure.reason).toBe("cancelled");
expect(failure.cause).toBe(reason);
await cancellation;
expect(released).toBe(true);
});
@@ -32,9 +43,19 @@ describe("JavaScript cooperative computation lifecycle", () => {
yield;
return 42;
}
await expect(
completeJavaScriptAnalysisSteps(work(), controller.signal),
).rejects.toMatchObject({ reason: "cancelled", cause: reason });
const failure = await completeJavaScriptAnalysisSteps(
work(),
controller.signal,
).then(
() => {
throw new Error("Expected cancellation");
},
(cause: unknown) => cause,
);
expect(failure).toBeInstanceOf(ArtifactReaderFailure);
if (!(failure instanceof ArtifactReaderFailure)) throw failure;
expect(failure.reason).toBe("cancelled");
expect(failure.cause).toBe(reason);
expect(started).toBe(false);
expect(await completeJavaScriptAnalysisSteps(work())).toBe(42);
});