From 3379c1206eb788dd8ee8a48d20f81da6f3709ffb Mon Sep 17 00:00:00 2001 From: Chris Hagglund Date: Thu, 12 Nov 2026 09:46:13 -0600 Subject: [PATCH 1/8] ci(agent-e2e): run on gpt-6-luna; skip live dall-e-3/tts-1 tests The OpenAI key is moving to the Orkes-Developers project, which only allows the gpt-5.6 / gpt-6 families. gpt-4o-mini also shuts down on 2027-01-14. - Set CONDUCTOR_AGENT_LLM_MODEL=openai/gpt-6-luna for every suite. - Suite 11 (LangGraph): build ChatOpenAI from that model, without temperature. Reasoning models reject temperature unless reasoning effort is "none". - Suite 7: skip the live DALL-E 3 and TTS-1 tests. dall-e-3 no longer exists at OpenAI, gpt-image-* is not enabled, and the project gets a 403 for tts-1. - Add an "LLM provider check" first step that calls the model directly, so a dead key or quota fails in seconds, not at the 45-minute timeout. - Add a "Show server errors" step that prints server.log errors to the job log on failure or cancel. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/agent-e2e.yml | 43 +++++++++++++++++++++++++++++ e2e/test_suite11_langgraph.test.ts | 19 +++++++------ e2e/test_suite7_media_tools.test.ts | 9 ++++-- 3 files changed, 61 insertions(+), 10 deletions(-) diff --git a/.github/workflows/agent-e2e.yml b/.github/workflows/agent-e2e.yml index 539eb2bb..bf73d091 100644 --- a/.github/workflows/agent-e2e.yml +++ b/.github/workflows/agent-e2e.yml @@ -39,7 +39,40 @@ jobs: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} CONDUCTOR_SERVER_URL: http://localhost:8080/api + # Default model for every suite. The Orkes-Developers OpenAI project only + # allows the gpt-5.6 / gpt-6 families; gpt-6-luna is OpenAI's replacement + # for gpt-4o-mini, which shuts down on 2027-01-14. + CONDUCTOR_AGENT_LLM_MODEL: openai/gpt-6-luna steps: + # A dead key, exhausted quota, retired model or provider outage makes + # every agent test wait out its timeout — the job then hits timeout-minutes + # before the runner reports a single failure. Call the model the suites use + # directly, before any setup: the HTTP status and body name the cause in + # seconds. No suite calls Anthropic through the server, so only OpenAI is + # checked. + - name: LLM provider check + timeout-minutes: 1 + run: | + fail=0 + probe() { # label, url, curl args... + local label=$1 url=$2; shift 2 + local code + code=$(curl -sS -m 15 -o "$RUNNER_TEMP/probe.json" -w '%{http_code}' "$url" "$@" \ + -H 'content-type: application/json') || true + echo "$label: HTTP $code" + if [ "$code" != 200 ]; then + echo "::error::$label check failed (HTTP $code; 000 = no response in 15s)" + cat "$RUNNER_TEMP/probe.json" 2>/dev/null || true; echo + fail=1 + fi + } + # Responses API, as the server uses; 16 is its minimum max_output_tokens. + openai_model=${CONDUCTOR_AGENT_LLM_MODEL#openai/} + probe "OpenAI $openai_model" https://api.openai.com/v1/responses \ + -H "authorization: Bearer $OPENAI_API_KEY" \ + -d "{\"model\":\"$openai_model\",\"input\":\"ping\",\"max_output_tokens\":16,\"reasoning\":{\"effort\":\"none\"}}" + exit $fail + - name: Checkout code uses: actions/checkout@v4 @@ -119,6 +152,16 @@ jobs: # 45-minute time budget. Matrix-suite concurrency is intentional. npm run test:agent-e2e -- --maxWorkers=2 + # The uploaded server.log is lost when the run is re-run, and a run + # killed at timeout-minutes never reports its test failures — keep the + # server's own errors in the job log, which survives both. + - name: Show server errors + if: failure() || cancelled() + run: | + [ -f server.log ] || exit 0 + grep -nE ' (ERROR|WARN) |Exception|[Qq]uota|rate.?limit|\b(401|403|404|429)\b' server.log \ + | grep -vE 'cannot init (Cohere|Mistral)' | tail -150 + # The TS suites fail hard when the server is down (no session-skip), # so this guard is defense-in-depth against a future gate regression # or a secrets-less fork run skipping everything. diff --git a/e2e/test_suite11_langgraph.test.ts b/e2e/test_suite11_langgraph.test.ts index c906c554..0ec637a1 100644 --- a/e2e/test_suite11_langgraph.test.ts +++ b/e2e/test_suite11_langgraph.test.ts @@ -21,7 +21,7 @@ import { describe, expect, beforeAll, afterAll, jest } from '@jest/globals'; import { AgentRuntime } from '@io-orkes/conductor-javascript/agents'; -import { checkServerHealth, itSkipIf, expectMsg } from './helpers'; +import { checkServerHealth, itSkipIf, expectMsg, MODEL } from './helpers'; jest.setTimeout(300_000); // ported from vitest describe({ timeout }) options @@ -42,6 +42,9 @@ let detectFramework: any; const SERVER_URL = process.env.CONDUCTOR_SERVER_URL ?? 'http://localhost:8080/api'; const BASE_URL = SERVER_URL.replace(/\/api$/, ''); +// LangChain takes the bare OpenAI model name. No temperature: reasoning +// models (gpt-6-luna) reject it unless reasoning effort is "none". +const OPENAI_MODEL = MODEL.replace(/^openai\//, ''); try { // Synchronous require instead of upstream top-level await import — this file @@ -97,7 +100,7 @@ describe('Suite 11: LangGraph Integration', () => { // ── 1. Framework detection ────────────────────────────────────────── itSkipIf(!langGraphAvailable)('framework detection identifies langgraph', () => { - const llm = new ChatOpenAI({ model: 'gpt-4o-mini', temperature: 0 }); + const llm = new ChatOpenAI({ model: OPENAI_MODEL }); const graph = createReactAgent({ llm, tools: [], name: 'detect_test' }); const framework = detectFramework(graph); @@ -128,7 +131,7 @@ describe('Suite 11: LangGraph Integration', () => { func: async ({ text }: { text: string }) => text.split('').reverse().join(''), }); - const llm = new ChatOpenAI({ model: 'gpt-4o-mini', temperature: 0 }); + const llm = new ChatOpenAI({ model: OPENAI_MODEL }); const graph = createReactAgent({ llm, tools: [calculateTool, countWordsTool, reverseTool], @@ -148,7 +151,7 @@ describe('Suite 11: LangGraph Integration', () => { expectMsg( String(rawConfig.model), '[FullExtract] wrong model', - ).toContain('gpt-4o-mini'); + ).toContain(OPENAI_MODEL); // Tools must be present with correct names const toolsList = rawConfig.tools as Record[]; @@ -182,7 +185,7 @@ describe('Suite 11: LangGraph Integration', () => { func: async ({ a, b }: { a: number; b: number }) => String(a * b), }); - const llm = new ChatOpenAI({ model: 'gpt-4o-mini', temperature: 0 }); + const llm = new ChatOpenAI({ model: OPENAI_MODEL }); const graph = createReactAgent({ llm, tools: [multiplyTool], name: 'e2e_lg_schema' }); (graph as any)._agentspan = { @@ -454,7 +457,7 @@ describe('Suite 11: LangGraph Integration', () => { return; } - const llm = new ChatOpenAI({ model: 'gpt-4o-mini', temperature: 0 }); + const llm = new ChatOpenAI({ model: OPENAI_MODEL }); const graph = createReactAgent({ llm, tools: [], name: 'compile_hello_world' }); (graph as any)._agentspan = { @@ -499,7 +502,7 @@ describe('Suite 11: LangGraph Integration', () => { func: async ({ text }: { text: string }) => `${text.split(/\s+/).length} words`, }); - const llm = new ChatOpenAI({ model: 'gpt-4o-mini', temperature: 0 }); + const llm = new ChatOpenAI({ model: OPENAI_MODEL }); const graph = createReactAgent({ llm, tools: [calculateTool, countWordsTool], @@ -593,7 +596,7 @@ describe('Suite 11: LangGraph Integration', () => { func: async ({ a, b }: { a: number; b: number }) => String(a * b), }); - const llm = new ChatOpenAI({ model: 'gpt-4o-mini', temperature: 0 }); + const llm = new ChatOpenAI({ model: OPENAI_MODEL }); const graph = createReactAgent({ llm, tools: [multiplyTool], diff --git a/e2e/test_suite7_media_tools.test.ts b/e2e/test_suite7_media_tools.test.ts index 0ef8b0f7..fa94c809 100644 --- a/e2e/test_suite7_media_tools.test.ts +++ b/e2e/test_suite7_media_tools.test.ts @@ -85,7 +85,10 @@ function assertToolCompiled( // ── Tests ─────────────────────────────────────────────────────────────── describe('Suite 7: Media Tools', () => { - (!process.env.OPENAI_API_KEY ? it.skip : it.failing)('image — OpenAI DALL-E 3', async () => { + // Skipped: dall-e-3 has been removed from OpenAI's API ('model does not exist'), + // and its gpt-image-* replacements are not enabled in the Orkes-Developers + // OpenAI project. + it.skip('image — OpenAI DALL-E 3', async () => { const img = imageTool({ name: 'gen_image', description: 'Generate an image from text.', @@ -143,7 +146,9 @@ describe('Suite 7: Media Tools', () => { await assertMediaGenerated(result, 'Image/Gemini', 'GENERATE_IMAGE'); }); - itSkipIf(!process.env.OPENAI_API_KEY)('audio — OpenAI TTS-1', async () => { + // Skipped: the Orkes-Developers OpenAI project does not have access to tts-1 + // (HTTP 403). + it.skip('audio — OpenAI TTS-1', async () => { const aud = audioTool({ name: 'gen_audio', description: 'Convert text to speech.', From c6a5c3e73806cc679b438a44304e482d64a65be6 Mon Sep 17 00:00:00 2001 From: Chris Hagglund Date: Thu, 12 Nov 2026 10:28:07 -0600 Subject: [PATCH 2/8] TEMP ci(agent-e2e): run the two rc2 failures on rc2 vs 3.33.0 Revert before merge. A server bisect: on 3.34.0-rc2, test_hitl_approve_path stalled twice in the same place, and guardrail matrix #09 timed out once. Run only those two tests, in a matrix against the org-var server version and 3.33.0, the last server the full JS suite passed on (2026-10-26). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/agent-e2e.yml | 15 +++++++++++++-- e2e/test_suite17_guardrail_matrix.test.ts | 3 ++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/agent-e2e.yml b/.github/workflows/agent-e2e.yml index bf73d091..a852fc15 100644 --- a/.github/workflows/agent-e2e.yml +++ b/.github/workflows/agent-e2e.yml @@ -33,9 +33,18 @@ env: jobs: agent-e2e: + # TEMP (server bisect, revert before merge): run the two tests that fail on + # 3.34.0-rc2 against the org-var server and 3.33.0, the last server the + # full suite passed on (2026-10-26). + name: agent-e2e (server ${{ matrix.server }}) + strategy: + fail-fast: false + matrix: + server: ['${{ vars.E2E_TEST_OSS_CONDUCTOR_VERSION }}', '3.33.0'] runs-on: ubuntu-latest timeout-minutes: 45 env: + CONDUCTOR_OSS_VERSION: ${{ matrix.server }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} CONDUCTOR_SERVER_URL: http://localhost:8080/api @@ -150,7 +159,9 @@ jobs: # system-worker pool. Two Jest workers avoid starving long-running # workflows, while retaining enough parallelism for this job's # 45-minute time budget. Matrix-suite concurrency is intentional. - npm run test:agent-e2e -- --maxWorkers=2 + npm run test:agent-e2e -- --maxWorkers=2 \ + e2e/test_suite16_streaming.test.ts e2e/test_suite17_guardrail_matrix.test.ts \ + -t 'test_hitl_approve_path|#09 aout_custom_fix' # The uploaded server.log is lost when the run is re-run, and a run # killed at timeout-minutes never reports its test failures — keep the @@ -194,7 +205,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: agent-e2e-results + name: agent-e2e-results-${{ matrix.server }} path: | results/ server.log diff --git a/e2e/test_suite17_guardrail_matrix.test.ts b/e2e/test_suite17_guardrail_matrix.test.ts index f4aca975..dde74254 100644 --- a/e2e/test_suite17_guardrail_matrix.test.ts +++ b/e2e/test_suite17_guardrail_matrix.test.ts @@ -1046,7 +1046,8 @@ describe("Suite 17: Guardrail Matrix (3x3x3)", () => { // Phase 1: fire all 27 workflows concurrently const handles: { spec: Spec; handle: AgentHandle }[] = []; - for (const spec of SPECS) { + // TEMP (server bisect, revert before merge): start only #09 aout_custom_fix. + for (const spec of SPECS.filter((s) => s.num === 9)) { const handle = await runtime.start(spec.agent, spec.prompt); handles.push({ spec, handle }); console.log( From 5fe43028cf0cf3ad86dc8505ce112585af6275f8 Mon Sep 17 00:00:00 2001 From: Chris Hagglund Date: Thu, 12 Nov 2026 10:42:49 -0600 Subject: [PATCH 3/8] TEMP test(agent-e2e): dump the HITL approve workflow's tasks and prompts Revert before merge. test_hitl_approve_path stays RUNNING after one approval on both 3.34.0-rc2 and 3.33.0 with gpt-6-luna, but passed on 3.33.0 with gpt-4o-mini. After the wait, print every task in its workflow, with full inputs and outputs for the LLM and HUMAN tasks, to see what the model does after the approved publish_article call. Run only that test, still on both servers. Guardrail matrix #09 passed alone on both and goes back to normal. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/agent-e2e.yml | 8 ++++---- e2e/test_suite16_streaming.test.ts | 15 ++++++++++++++- e2e/test_suite17_guardrail_matrix.test.ts | 3 +-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/agent-e2e.yml b/.github/workflows/agent-e2e.yml index a852fc15..76cf05db 100644 --- a/.github/workflows/agent-e2e.yml +++ b/.github/workflows/agent-e2e.yml @@ -33,8 +33,9 @@ env: jobs: agent-e2e: - # TEMP (server bisect, revert before merge): run the two tests that fail on - # 3.34.0-rc2 against the org-var server and 3.33.0, the last server the + # TEMP (HITL stall diagnostic, revert before merge): run only + # test_hitl_approve_path, which dumps its workflow's tasks and LLM + # prompts, against the org-var server and 3.33.0, the last server the # full suite passed on (2026-10-26). name: agent-e2e (server ${{ matrix.server }}) strategy: @@ -160,8 +161,7 @@ jobs: # workflows, while retaining enough parallelism for this job's # 45-minute time budget. Matrix-suite concurrency is intentional. npm run test:agent-e2e -- --maxWorkers=2 \ - e2e/test_suite16_streaming.test.ts e2e/test_suite17_guardrail_matrix.test.ts \ - -t 'test_hitl_approve_path|#09 aout_custom_fix' + e2e/test_suite16_streaming.test.ts -t 'test_hitl_approve_path' # The uploaded server.log is lost when the run is re-run, and a run # killed at timeout-minutes never reports its test failures — keep the diff --git a/e2e/test_suite16_streaming.test.ts b/e2e/test_suite16_streaming.test.ts index 7152a137..63b214d7 100644 --- a/e2e/test_suite16_streaming.test.ts +++ b/e2e/test_suite16_streaming.test.ts @@ -17,7 +17,7 @@ import { RegexGuardrail, } from '@io-orkes/conductor-javascript/agents'; import type { AgentEvent, GuardrailResult } from '@io-orkes/conductor-javascript/agents'; -import { checkServerHealth, MODEL, TIMEOUT, expectMsg } from './helpers'; +import { checkServerHealth, MODEL, TIMEOUT, expectMsg, getWorkflow } from './helpers'; jest.setTimeout(TIMEOUT); // ported from vitest describe({ timeout }) options @@ -272,6 +272,19 @@ describe('Suite 16: Streaming — HITL', () => { await new Promise((r) => setTimeout(r, 1000)); status = await runtime.getStatus(stream.executionId); } + // TEMP (HITL stall diagnostic, revert before merge): dump every task, + // with full LLM inputs/outputs, so we can see what the model did after + // the approved publish_article call. + const wf = await getWorkflow(stream.executionId); + const lines = [`[HITL-DIAG] workflow ${stream.executionId} status=${wf.status} agentStatus=${status.status}`]; + for (const t of (wf.tasks ?? []) as Record[]) { + lines.push(`[HITL-DIAG] #${t.seq} ${t.taskType} ref=${t.referenceTaskName} status=${t.status}`); + if (t.taskType === 'LLM_CHAT_COMPLETE' || t.taskType === 'HUMAN') { + lines.push(`[HITL-DIAG] input=${JSON.stringify(t.inputData).slice(0, 6000)}`); + lines.push(`[HITL-DIAG] output=${JSON.stringify(t.outputData).slice(0, 3000)}`); + } + } + console.log(lines.join('\n')); expectMsg(['COMPLETED', 'FAILED', 'TERMINATED']).toContain(status.status); } else { // No waiting event — the stream may close before the server records its diff --git a/e2e/test_suite17_guardrail_matrix.test.ts b/e2e/test_suite17_guardrail_matrix.test.ts index dde74254..f4aca975 100644 --- a/e2e/test_suite17_guardrail_matrix.test.ts +++ b/e2e/test_suite17_guardrail_matrix.test.ts @@ -1046,8 +1046,7 @@ describe("Suite 17: Guardrail Matrix (3x3x3)", () => { // Phase 1: fire all 27 workflows concurrently const handles: { spec: Spec; handle: AgentHandle }[] = []; - // TEMP (server bisect, revert before merge): start only #09 aout_custom_fix. - for (const spec of SPECS.filter((s) => s.num === 9)) { + for (const spec of SPECS) { const handle = await runtime.start(spec.agent, spec.prompt); handles.push({ spec, handle }); console.log( From 1e134e9c8e4046ddeb0b6a84153d87178f82e87b Mon Sep 17 00:00:00 2001 From: Chris Hagglund Date: Thu, 12 Nov 2026 10:56:49 -0600 Subject: [PATCH 4/8] test(agent-e2e): tell the HITL approve agent when it is done On gpt-6-luna, test_hitl_approve_path stalled on every run (3.33.0 and 3.34.0-rc2). After the approved publish_article call, the server sends the instructions and the original user request again, after the tool result. Read literally, that is a new request: luna wrote and published a second article, which waits for a second approval the test never gives. gpt-4o-mini treated the request as already done. Keep the task in the user message only. Make the instructions say how to do the work and that one successful publish_article ends the request. Co-Authored-By: Claude Opus 5.5 --- e2e/test_suite16_streaming.test.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/e2e/test_suite16_streaming.test.ts b/e2e/test_suite16_streaming.test.ts index 63b214d7..4992e1ea 100644 --- a/e2e/test_suite16_streaming.test.ts +++ b/e2e/test_suite16_streaming.test.ts @@ -251,9 +251,15 @@ describe('Suite 16: Streaming — HITL', () => { const agent = new Agent({ name: uniqueName('s16_hitl_approve'), model: MODEL, + // The server re-sends these instructions and the user request after the + // tool result, so state when the work is done. Without that, + // gpt-6-luna writes and publishes a second article, which waits for a + // second approval this test never gives. instructions: - 'You are a blog writer. Write a very short article (one paragraph) ' + - 'about Python and publish it using the publish_article tool.', + 'You are a blog writer. Write each requested post as one short paragraph ' + + 'and publish it with the publish_article tool. Publish each request exactly ' + + "once: when publish_article returns status 'published', the request is done. " + + 'Reply with a one-sentence confirmation and do not call any tool again.', tools: [publishArticle], }); const stream = await runtime.stream(agent, 'Write a short blog post about Python programming'); From 3d1921696b9e61a4ca466c30c3637a927e4eeb58 Mon Sep 17 00:00:00 2001 From: Chris Hagglund Date: Thu, 12 Nov 2026 11:16:16 -0600 Subject: [PATCH 5/8] TEMP test(agent-e2e): run the HITL approve test once per prompt variant Revert before merge. Make the test's system prompt, tool description and user message overridable (HITL_SYSTEM, HITL_TOOL_DESC, HITL_USER). Run one matrix job per variant on the org-var server (3.34.0-rc2), in place of the 3.33.0 vs rc2 legs. Both servers behaved the same. - control: current text - user-stop: stop rule in the user message, which the server re-sends after the tool results each turn - tool-once: tool description says it can be called at most once per chat session - system-count: system prompt says to count publish_article calls and end the session when the count is above zero Co-Authored-By: Claude Opus 5.5 --- .github/workflows/agent-e2e.yml | 23 ++++++++++++++++------- e2e/test_suite16_streaming.test.ts | 12 ++++++++++-- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/agent-e2e.yml b/.github/workflows/agent-e2e.yml index 76cf05db..e074d3a5 100644 --- a/.github/workflows/agent-e2e.yml +++ b/.github/workflows/agent-e2e.yml @@ -33,19 +33,28 @@ env: jobs: agent-e2e: - # TEMP (HITL stall diagnostic, revert before merge): run only + # TEMP (HITL prompt variants, revert before merge): run only # test_hitl_approve_path, which dumps its workflow's tasks and LLM - # prompts, against the org-var server and 3.33.0, the last server the - # full suite passed on (2026-10-26). - name: agent-e2e (server ${{ matrix.server }}) + # prompts, once per prompt variant on the org-var server. Each variant + # sets only the fields it changes; an empty field keeps the test's text. + name: agent-e2e (${{ matrix.variant }}) strategy: fail-fast: false matrix: - server: ['${{ vars.E2E_TEST_OSS_CONDUCTOR_VERSION }}', '3.33.0'] + include: + - variant: control + - variant: user-stop + user: "Write a short blog post about Python programming and publish it. If the tool results already show it was published, do not publish again; just reply with a one-sentence confirmation." + - variant: tool-once + tool_desc: "Publish an article to the blog. Requires editorial approval. This tool can be called at most once per chat session." + - variant: system-count + system: "You are a blog writer. Write the requested post as one short paragraph and publish it with the publish_article tool. The publish_article tool can only ever be called once in this chat session. Keep track of how many times it has been called, counting any earlier publish_article calls and [TOOL RESULTS]. If that count is more than zero, do not call it again: end the session by replying with a one-sentence confirmation." runs-on: ubuntu-latest timeout-minutes: 45 env: - CONDUCTOR_OSS_VERSION: ${{ matrix.server }} + HITL_SYSTEM: ${{ matrix.system }} + HITL_TOOL_DESC: ${{ matrix.tool_desc }} + HITL_USER: ${{ matrix.user }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} CONDUCTOR_SERVER_URL: http://localhost:8080/api @@ -205,7 +214,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: agent-e2e-results-${{ matrix.server }} + name: agent-e2e-results-${{ matrix.variant }} path: | results/ server.log diff --git a/e2e/test_suite16_streaming.test.ts b/e2e/test_suite16_streaming.test.ts index 4992e1ea..6215709b 100644 --- a/e2e/test_suite16_streaming.test.ts +++ b/e2e/test_suite16_streaming.test.ts @@ -115,7 +115,9 @@ const publishArticle = tool( }), { name: 'publish_article', - description: 'Publish an article to the blog. Requires editorial approval.', + // TEMP (HITL prompt variants, revert before merge): HITL_TOOL_DESC overrides. + description: + process.env.HITL_TOOL_DESC || 'Publish an article to the blog. Requires editorial approval.', approvalRequired: true, inputSchema: { type: 'object', @@ -255,14 +257,20 @@ describe('Suite 16: Streaming — HITL', () => { // tool result, so state when the work is done. Without that, // gpt-6-luna writes and publishes a second article, which waits for a // second approval this test never gives. + // TEMP (HITL prompt variants, revert before merge): HITL_SYSTEM and + // HITL_USER override the instructions and the user message. instructions: + process.env.HITL_SYSTEM || 'You are a blog writer. Write each requested post as one short paragraph ' + 'and publish it with the publish_article tool. Publish each request exactly ' + "once: when publish_article returns status 'published', the request is done. " + 'Reply with a one-sentence confirmation and do not call any tool again.', tools: [publishArticle], }); - const stream = await runtime.stream(agent, 'Write a short blog post about Python programming'); + const stream = await runtime.stream( + agent, + process.env.HITL_USER || 'Write a short blog post about Python programming', + ); // Collect until waiting const preEvents = await collectEventsUntil(stream, 'waiting', 120_000); From df5087d58144691bb36ffbee698c8f5740def89e Mon Sep 17 00:00:00 2001 From: Chris Hagglund Date: Thu, 12 Nov 2026 11:49:19 -0600 Subject: [PATCH 6/8] TEMP test(agent-e2e): drop the control variant from the HITL matrix Revert before merge. The control prompt failed in 4 of 4 runs. Keep the three passing variants (user-stop, tool-once, system-count) for repeat runs. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/agent-e2e.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/agent-e2e.yml b/.github/workflows/agent-e2e.yml index e074d3a5..3a605a37 100644 --- a/.github/workflows/agent-e2e.yml +++ b/.github/workflows/agent-e2e.yml @@ -42,7 +42,6 @@ jobs: fail-fast: false matrix: include: - - variant: control - variant: user-stop user: "Write a short blog post about Python programming and publish it. If the tool results already show it was published, do not publish again; just reply with a one-sentence confirmation." - variant: tool-once From 83d483b67445e148c3a8e00a92cf115effcd25de Mon Sep 17 00:00:00 2001 From: Chris Hagglund Date: Thu, 12 Nov 2026 12:06:09 -0600 Subject: [PATCH 7/8] test(agent-e2e): make the HITL approve agent count its publish calls Remove the temporary bisect, diagnostic and prompt-variant changes: the workflow and suites go back to their state at 3379c12, and the full suite runs again. On gpt-6-luna, test_hitl_approve_path stalled on both 3.33.0 and 3.34.0-rc2. After the approved publish_article call, the server sends the original user request again, after the tool results. Luna often reads that as a new request and publishes a second article, which waits for a second approval the test never gives. Prompt variants tested in CI (passed / runs): - "publish once; when it returns 'published' you are done": 0/4 - tool description "at most once per chat session": 2/4 - user message "if already published, do not publish again": 3/4 - system prompt: count earlier calls, stop if above zero: 4/4 Use the last one as the agent's instructions. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/agent-e2e.yml | 23 ++------------- e2e/test_suite16_streaming.test.ts | 46 +++++++++--------------------- 2 files changed, 16 insertions(+), 53 deletions(-) diff --git a/.github/workflows/agent-e2e.yml b/.github/workflows/agent-e2e.yml index 3a605a37..bf73d091 100644 --- a/.github/workflows/agent-e2e.yml +++ b/.github/workflows/agent-e2e.yml @@ -33,27 +33,9 @@ env: jobs: agent-e2e: - # TEMP (HITL prompt variants, revert before merge): run only - # test_hitl_approve_path, which dumps its workflow's tasks and LLM - # prompts, once per prompt variant on the org-var server. Each variant - # sets only the fields it changes; an empty field keeps the test's text. - name: agent-e2e (${{ matrix.variant }}) - strategy: - fail-fast: false - matrix: - include: - - variant: user-stop - user: "Write a short blog post about Python programming and publish it. If the tool results already show it was published, do not publish again; just reply with a one-sentence confirmation." - - variant: tool-once - tool_desc: "Publish an article to the blog. Requires editorial approval. This tool can be called at most once per chat session." - - variant: system-count - system: "You are a blog writer. Write the requested post as one short paragraph and publish it with the publish_article tool. The publish_article tool can only ever be called once in this chat session. Keep track of how many times it has been called, counting any earlier publish_article calls and [TOOL RESULTS]. If that count is more than zero, do not call it again: end the session by replying with a one-sentence confirmation." runs-on: ubuntu-latest timeout-minutes: 45 env: - HITL_SYSTEM: ${{ matrix.system }} - HITL_TOOL_DESC: ${{ matrix.tool_desc }} - HITL_USER: ${{ matrix.user }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} CONDUCTOR_SERVER_URL: http://localhost:8080/api @@ -168,8 +150,7 @@ jobs: # system-worker pool. Two Jest workers avoid starving long-running # workflows, while retaining enough parallelism for this job's # 45-minute time budget. Matrix-suite concurrency is intentional. - npm run test:agent-e2e -- --maxWorkers=2 \ - e2e/test_suite16_streaming.test.ts -t 'test_hitl_approve_path' + npm run test:agent-e2e -- --maxWorkers=2 # The uploaded server.log is lost when the run is re-run, and a run # killed at timeout-minutes never reports its test failures — keep the @@ -213,7 +194,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: agent-e2e-results-${{ matrix.variant }} + name: agent-e2e-results path: | results/ server.log diff --git a/e2e/test_suite16_streaming.test.ts b/e2e/test_suite16_streaming.test.ts index 6215709b..b2b1bd91 100644 --- a/e2e/test_suite16_streaming.test.ts +++ b/e2e/test_suite16_streaming.test.ts @@ -17,7 +17,7 @@ import { RegexGuardrail, } from '@io-orkes/conductor-javascript/agents'; import type { AgentEvent, GuardrailResult } from '@io-orkes/conductor-javascript/agents'; -import { checkServerHealth, MODEL, TIMEOUT, expectMsg, getWorkflow } from './helpers'; +import { checkServerHealth, MODEL, TIMEOUT, expectMsg } from './helpers'; jest.setTimeout(TIMEOUT); // ported from vitest describe({ timeout }) options @@ -115,9 +115,7 @@ const publishArticle = tool( }), { name: 'publish_article', - // TEMP (HITL prompt variants, revert before merge): HITL_TOOL_DESC overrides. - description: - process.env.HITL_TOOL_DESC || 'Publish an article to the blog. Requires editorial approval.', + description: 'Publish an article to the blog. Requires editorial approval.', approvalRequired: true, inputSchema: { type: 'object', @@ -253,24 +251,21 @@ describe('Suite 16: Streaming — HITL', () => { const agent = new Agent({ name: uniqueName('s16_hitl_approve'), model: MODEL, - // The server re-sends these instructions and the user request after the - // tool result, so state when the work is done. Without that, - // gpt-6-luna writes and publishes a second article, which waits for a - // second approval this test never gives. - // TEMP (HITL prompt variants, revert before merge): HITL_SYSTEM and - // HITL_USER override the instructions and the user message. + // After a tool result the server re-sends the original user request, so + // gpt-6-luna often reads it as a new request and publishes a second + // article, which waits for an approval this test never gives. Asking it + // to count earlier calls stopped that in 4 of 4 CI runs; softer wording + // ("publish once", "if already published, stop") still failed. instructions: - process.env.HITL_SYSTEM || - 'You are a blog writer. Write each requested post as one short paragraph ' + - 'and publish it with the publish_article tool. Publish each request exactly ' + - "once: when publish_article returns status 'published', the request is done. " + - 'Reply with a one-sentence confirmation and do not call any tool again.', + 'You are a blog writer. Write the requested post as one short paragraph ' + + 'and publish it with the publish_article tool. The publish_article tool ' + + 'can only ever be called once in this chat session. Keep track of how ' + + 'many times it has been called, counting any earlier publish_article ' + + 'calls and [TOOL RESULTS]. If that count is more than zero, do not call ' + + 'it again: end the session by replying with a one-sentence confirmation.', tools: [publishArticle], }); - const stream = await runtime.stream( - agent, - process.env.HITL_USER || 'Write a short blog post about Python programming', - ); + const stream = await runtime.stream(agent, 'Write a short blog post about Python programming'); // Collect until waiting const preEvents = await collectEventsUntil(stream, 'waiting', 120_000); @@ -286,19 +281,6 @@ describe('Suite 16: Streaming — HITL', () => { await new Promise((r) => setTimeout(r, 1000)); status = await runtime.getStatus(stream.executionId); } - // TEMP (HITL stall diagnostic, revert before merge): dump every task, - // with full LLM inputs/outputs, so we can see what the model did after - // the approved publish_article call. - const wf = await getWorkflow(stream.executionId); - const lines = [`[HITL-DIAG] workflow ${stream.executionId} status=${wf.status} agentStatus=${status.status}`]; - for (const t of (wf.tasks ?? []) as Record[]) { - lines.push(`[HITL-DIAG] #${t.seq} ${t.taskType} ref=${t.referenceTaskName} status=${t.status}`); - if (t.taskType === 'LLM_CHAT_COMPLETE' || t.taskType === 'HUMAN') { - lines.push(`[HITL-DIAG] input=${JSON.stringify(t.inputData).slice(0, 6000)}`); - lines.push(`[HITL-DIAG] output=${JSON.stringify(t.outputData).slice(0, 3000)}`); - } - } - console.log(lines.join('\n')); expectMsg(['COMPLETED', 'FAILED', 'TERMINATED']).toContain(status.status); } else { // No waiting event — the stream may close before the server records its From 0974b01e21d056bad2f07969d49dd697edcaea57 Mon Sep 17 00:00:00 2001 From: Chris Hagglund Date: Mon, 16 Nov 2026 12:44:52 -0600 Subject: [PATCH 8/8] ci(agent-e2e): gate image/TTS tests on SKIP_IMAGE_GEN/SKIP_TTS env vars The live image and TTS tests now run by default and are skipped only when SKIP_IMAGE_GEN / SKIP_TTS is "true". agent-e2e.yml sets them, because the Orkes-Developers OpenAI project has no image or TTS models. Also keep "Show server errors" green when grep finds no match. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/agent-e2e.yml | 4 +++- e2e/test_suite7_media_tools.test.ts | 16 +++++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/agent-e2e.yml b/.github/workflows/agent-e2e.yml index bf73d091..13ada730 100644 --- a/.github/workflows/agent-e2e.yml +++ b/.github/workflows/agent-e2e.yml @@ -43,6 +43,8 @@ jobs: # allows the gpt-5.6 / gpt-6 families; gpt-6-luna is OpenAI's replacement # for gpt-4o-mini, which shuts down on 2027-01-14. CONDUCTOR_AGENT_LLM_MODEL: openai/gpt-6-luna + SKIP_IMAGE_GEN: 'true' # no image models in the Orkes-Developers OpenAI project; dall-e-3 is retired, so re-enabling also needs gpt-image-1 + SKIP_TTS: 'true' # tts-1 is not enabled in the Orkes-Developers OpenAI project (HTTP 403) steps: # A dead key, exhausted quota, retired model or provider outage makes # every agent test wait out its timeout — the job then hits timeout-minutes @@ -160,7 +162,7 @@ jobs: run: | [ -f server.log ] || exit 0 grep -nE ' (ERROR|WARN) |Exception|[Qq]uota|rate.?limit|\b(401|403|404|429)\b' server.log \ - | grep -vE 'cannot init (Cohere|Mistral)' | tail -150 + | grep -vE 'cannot init (Cohere|Mistral)' | tail -150 || true # The TS suites fail hard when the server is down (no session-skip), # so this guard is defense-in-depth against a future gate regression diff --git a/e2e/test_suite7_media_tools.test.ts b/e2e/test_suite7_media_tools.test.ts index fa94c809..6615fef2 100644 --- a/e2e/test_suite7_media_tools.test.ts +++ b/e2e/test_suite7_media_tools.test.ts @@ -82,13 +82,15 @@ function assertToolCompiled( expectMsg(model, `[${stepName}] wrong model`).toBe(expectedModel); } +const envFlag = (name: string) => process.env[name]?.toLowerCase() === 'true'; + // ── Tests ─────────────────────────────────────────────────────────────── describe('Suite 7: Media Tools', () => { - // Skipped: dall-e-3 has been removed from OpenAI's API ('model does not exist'), - // and its gpt-image-* replacements are not enabled in the Orkes-Developers - // OpenAI project. - it.skip('image — OpenAI DALL-E 3', async () => { + // SKIP_IMAGE_GEN=true skips this: dall-e-3 has been removed from OpenAI's API + // ('model does not exist'), and its gpt-image-* replacements are not enabled + // in the Orkes-Developers OpenAI project. + (!process.env.OPENAI_API_KEY || envFlag('SKIP_IMAGE_GEN') ? it.skip : it.failing)('image — OpenAI DALL-E 3', async () => { const img = imageTool({ name: 'gen_image', description: 'Generate an image from text.', @@ -146,9 +148,9 @@ describe('Suite 7: Media Tools', () => { await assertMediaGenerated(result, 'Image/Gemini', 'GENERATE_IMAGE'); }); - // Skipped: the Orkes-Developers OpenAI project does not have access to tts-1 - // (HTTP 403). - it.skip('audio — OpenAI TTS-1', async () => { + // SKIP_TTS=true skips this: the Orkes-Developers OpenAI project does not have + // access to tts-1 (HTTP 403). + itSkipIf(!process.env.OPENAI_API_KEY || envFlag('SKIP_TTS'))('audio — OpenAI TTS-1', async () => { const aud = audioTool({ name: 'gen_audio', description: 'Convert text to speech.',