From 45b21f5e5740780b5209d0b6ba36ef4c938ae0be Mon Sep 17 00:00:00 2001 From: Tajudeen Date: Thu, 23 Jul 2026 15:33:39 +0100 Subject: [PATCH] Add Phase 2 agent-loop tests to CortexIDE QA CI. Introduce test-phase2-qa and test-cortexide-qa so agentLoopDecisions, toolPermissions, and parse-classifier unit tests run on every PR alongside Phase 0/1 regression. Co-authored-by: Cursor --- .github/workflows/phase0-qa.yml | 4 ++-- package.json | 2 ++ test/cortexide-smoke/README.md | 4 +++- test/cortexide-smoke/run-phase0-qa.sh | 4 ++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/phase0-qa.yml b/.github/workflows/phase0-qa.yml index d28393b4b5f..97ee27efcd2 100644 --- a/.github/workflows/phase0-qa.yml +++ b/.github/workflows/phase0-qa.yml @@ -45,8 +45,8 @@ jobs: - name: Transpile source run: npm run transpile-client - - name: Run Phase 0 QA unit tests - run: npm run test-phase0-qa + - name: Run CortexIDE unit regression (Phase 0 + Phase 2) + run: npm run test-cortexide-qa phase0-cdp-macos: name: Phase 0 CDP smoke (macOS) diff --git a/package.json b/package.json index 2325d6c4e43..658c79a0d8a 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,8 @@ "test-node": "mocha test/unit/node/index.js --delay --ui=tdd --timeout=5000 --exit", "test-phase0-qa": "npm run test-node -- --runGlob \"**/cortexide/test/common/{providerSettingsValidation,onboardingHelpers,attachFileToChat,chatThreadStorageReviver,providerToolFormat,phase0ClaimVerification,modelCapabilities,menubarStackingFix,designSystem,atReferenceTokens,resolveAtReferences,prepareChatAttachments}.test.js\"", "test-phase1-safety-cdp": "node test/cortexide-smoke/phase1-safety-verify.mjs", + "test-phase2-qa": "npm run test-node -- --runGlob \"**/cortexide/test/common/{agentLoopDecisions,toolPermissions,toolSynthesisDecision,toolCallRecognition}.test.js\"", + "test-cortexide-qa": "npm run test-phase0-qa && npm run test-phase2-qa", "test-extension": "vscode-test", "test-build-scripts": "cd build && npm run test", "check-cyclic-dependencies": "node build/lib/checkCyclicDependencies.ts out", diff --git a/test/cortexide-smoke/README.md b/test/cortexide-smoke/README.md index 665e1364faa..cb748bfbf2c 100644 --- a/test/cortexide-smoke/README.md +++ b/test/cortexide-smoke/README.md @@ -35,7 +35,9 @@ Exit code 0 = all checks passed. A screenshot is written to the OS temp dir. ```bash # Fast — unit tests only (CI runs this on every PR): -npm run test-phase0-qa +npm run test-cortexide-qa +# Phase 0 only: npm run test-phase0-qa +# Phase 2 only: npm run test-phase2-qa # Full — unit tests + live CDP verify (needs a built dev app): node build/lib/preLaunch.ts diff --git a/test/cortexide-smoke/run-phase0-qa.sh b/test/cortexide-smoke/run-phase0-qa.sh index 590f4a3ea40..7b73df51b1a 100755 --- a/test/cortexide-smoke/run-phase0-qa.sh +++ b/test/cortexide-smoke/run-phase0-qa.sh @@ -27,8 +27,8 @@ PORT="${CX_CDP_PORT:-9222}" WS="${CX_WS:-/tmp/cx-phase0-qa-ws}" PROFILE="${CX_PROFILE:-/tmp/cx-phase0-qa-profile}" -echo "== Phase 0 QA: unit tests ==" -npm run test-phase0-qa +echo "== CortexIDE QA: Phase 0 + Phase 2 unit tests ==" +npm run test-cortexide-qa if [[ "$RUN_CDP" -ne 1 ]]; then echo ""