test(qa-lab): seed broken-turn recovery scenarios (#66416)

This commit is contained in:
Vincent Koc
2026-04-14 09:03:49 +01:00
committed by GitHub
parent 37f449d7e1
commit 900681751d
7 changed files with 365 additions and 2 deletions

View File

@@ -21,6 +21,16 @@ describe("resolveEffectiveExecutionContract", () => {
).toBe("strict-agentic");
});
it("auto-activates on the mock-openai qa lane", () => {
expect(
resolveEffectiveExecutionContract({
config: emptyConfig,
provider: "mock-openai",
modelId: "mock-openai/gpt-5.4",
}),
).toBe("strict-agentic");
});
it("auto-activates on gpt-5o and variants without a separator", () => {
for (const modelId of ["gpt-5", "gpt-5o", "gpt-5o-mini"]) {
expect(

View File

@@ -39,14 +39,16 @@ const STRICT_AGENTIC_MODEL_ID_PATTERN = /^gpt-5(?:[.o-]|$)/i;
* Supported provider + model combinations where strict-agentic is the intended
* runtime contract. Kept as a narrow helper so both the execution-contract
* resolver and the `update_plan` auto-enable gate converge on the same
* definition of "GPT-5-family openai/openai-codex run".
* definition of "GPT-5-family openai/openai-codex run". The embedded
* `mock-openai` QA lane intentionally piggybacks on that contract so repo QA
* can exercise the same incomplete-turn recovery rules end to end.
*/
export function isStrictAgenticSupportedProviderModel(params: {
provider?: string | null;
modelId?: string | null;
}): boolean {
const provider = normalizeLowercaseStringOrEmpty(params.provider ?? "");
if (provider !== "openai" && provider !== "openai-codex") {
if (provider !== "openai" && provider !== "openai-codex" && provider !== "mock-openai") {
return false;
}
const modelId = typeof params.modelId === "string" ? params.modelId : "";