From 8dfac6ed930b87334ae23cdb5c0599b2cb7d71dc Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Fri, 24 Jul 2026 12:39:53 -0600 Subject: [PATCH 1/2] fix(optimization): verify the published GEPA wheel --- .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6eb8039..a3500f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -66,7 +66,7 @@ jobs: RPC_VERSION=$(node -e "const v=require('./package.json').dependencies['@tangle-network/agent-eval']; if (!/^\\d+\\.\\d+\\.\\d+$/.test(v)) throw new Error('agent-eval dependency must be exact'); console.log(v)") .venv-official/bin/python -m pip install \ "agent-eval-rpc==$RPC_VERSION" \ - "gepa[full] @ git+https://github.com/gepa-ai/gepa.git@f919db0a622e2e9f9204779b81fe00cc1b2d808f" \ + "gepa[full]==0.1.4" \ "skillopt @ git+https://github.com/microsoft/SkillOpt.git@61735e3922efc2b90c6d6cab561e62e98452ca90" - name: Run packed package through official GEPA and SkillOpt diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2a8b304..b572d1b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -49,7 +49,7 @@ jobs: RPC_VERSION=$(node -e "const v=require('./package.json').dependencies['@tangle-network/agent-eval']; if (!/^\\d+\\.\\d+\\.\\d+$/.test(v)) throw new Error('agent-eval dependency must be exact'); console.log(v)") .venv-official/bin/python -m pip install \ "agent-eval-rpc==$RPC_VERSION" \ - "gepa[full] @ git+https://github.com/gepa-ai/gepa.git@f919db0a622e2e9f9204779b81fe00cc1b2d808f" \ + "gepa[full]==0.1.4" \ "skillopt @ git+https://github.com/microsoft/SkillOpt.git@61735e3922efc2b90c6d6cab561e62e98452ca90" - name: Run packed package through official GEPA and SkillOpt From bfe26f33fadaa8c59245eda42b3e42490cd42642 Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Fri, 24 Jul 2026 13:40:22 -0600 Subject: [PATCH 2/2] fix(optimization): use released eval bridge --- .github/workflows/ci.yml | 12 ------ .github/workflows/publish.yml | 12 ------ CHANGELOG.md | 2 +- README.md | 2 +- package.json | 2 +- pnpm-lock.yaml | 10 ++--- scripts/verify-official-optimizers.mjs | 55 +++++++++++++++++++------- 7 files changed, 48 insertions(+), 47 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a3500f5..1a27ccc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,17 +59,5 @@ jobs: - name: Install JavaScript dependencies run: pnpm install --frozen-lockfile - - name: Install official Python optimizers - run: | - python -m venv .venv-official - .venv-official/bin/python -m pip install --upgrade pip - RPC_VERSION=$(node -e "const v=require('./package.json').dependencies['@tangle-network/agent-eval']; if (!/^\\d+\\.\\d+\\.\\d+$/.test(v)) throw new Error('agent-eval dependency must be exact'); console.log(v)") - .venv-official/bin/python -m pip install \ - "agent-eval-rpc==$RPC_VERSION" \ - "gepa[full]==0.1.4" \ - "skillopt @ git+https://github.com/microsoft/SkillOpt.git@61735e3922efc2b90c6d6cab561e62e98452ca90" - - name: Run packed package through official GEPA and SkillOpt run: pnpm verify:official-optimizers - env: - AGENT_EVAL_TEST_PYTHON: ${{ github.workspace }}/.venv-official/bin/python diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b572d1b..b1d1ea2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -42,20 +42,8 @@ jobs: - name: Verify packed package lifecycle run: pnpm run verify:package - - name: Install official Python optimizers - run: | - python -m venv .venv-official - .venv-official/bin/python -m pip install --upgrade pip - RPC_VERSION=$(node -e "const v=require('./package.json').dependencies['@tangle-network/agent-eval']; if (!/^\\d+\\.\\d+\\.\\d+$/.test(v)) throw new Error('agent-eval dependency must be exact'); console.log(v)") - .venv-official/bin/python -m pip install \ - "agent-eval-rpc==$RPC_VERSION" \ - "gepa[full]==0.1.4" \ - "skillopt @ git+https://github.com/microsoft/SkillOpt.git@61735e3922efc2b90c6d6cab561e62e98452ca90" - - name: Run packed package through official GEPA and SkillOpt run: pnpm run verify:official-optimizers - env: - AGENT_EVAL_TEST_PYTHON: ${{ github.workspace }}/.venv-official/bin/python - name: Verify tag/version lock run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a42a0f..6fc4776 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,7 +24,7 @@ ### Changed -- Updated `@tangle-network/agent-eval` to `0.126.3` and `@tangle-network/agent-interface` to `0.32.0`. +- Updated `@tangle-network/agent-eval` to `0.126.5` and `@tangle-network/agent-interface` to `0.32.0`. - Kept memory provider evaluations resumable and branch-isolated while moving search ownership to the supplied method. - Restricted immutable references to lowercase SHA-256 and full Git commit identities. diff --git a/README.md b/README.md index 5799c37..1b0eeee 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Supply application callbacks for those decisions, or use `@tangle-network/agent- ## Install ```bash -pnpm add @tangle-network/agent-knowledge @tangle-network/agent-eval@0.126.3 +pnpm add @tangle-network/agent-knowledge @tangle-network/agent-eval@0.126.5 ``` Requires Node.js 20.19 or later. diff --git a/package.json b/package.json index c64e635..19d46b8 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "verify:official-optimizers": "node scripts/verify-official-optimizers.mjs" }, "dependencies": { - "@tangle-network/agent-eval": "0.126.3", + "@tangle-network/agent-eval": "0.126.5", "@tangle-network/agent-interface": "^0.32.0", "proper-lockfile": "4.1.2", "zod": "^4.4.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7173db6..7a92cc6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,8 +13,8 @@ importers: .: dependencies: '@tangle-network/agent-eval': - specifier: 0.126.3 - version: 0.126.3(typescript@5.9.3) + specifier: 0.126.5 + version: 0.126.5(typescript@5.9.3) '@tangle-network/agent-interface': specifier: ^0.32.0 version: 0.32.0 @@ -968,8 +968,8 @@ packages: '@tangle-network/agent-core@0.4.20': resolution: {integrity: sha512-gJzZh5PqPJtWW6kMEfm3IP7CGibvHdVXM4uqCAuCy+Kvg9TlVVkzXqZPRt9gU44mjdw5hDGoVzZotFsPoHAlFw==} - '@tangle-network/agent-eval@0.126.3': - resolution: {integrity: sha512-VCd2drX0nvYK7OCwRHell+08eKdtH5MTyOGB/fLc4vy3Ev8X/SgzJ41o8GvRDyuF1kaiS7JATjl8exBh5aLHSg==} + '@tangle-network/agent-eval@0.126.5': + resolution: {integrity: sha512-nXgG+ULn2LwRs86d6TaWLsjL4Y0SrznD9GuVhSTMr3vkeludzzqBZsBEnHd2Zo454M71TT1vqdEtbX+pzJaaKA==} engines: {node: '>=20'} hasBin: true @@ -3229,7 +3229,7 @@ snapshots: '@tangle-network/agent-interface': 0.32.0 zod: 4.4.3 - '@tangle-network/agent-eval@0.126.3(typescript@5.9.3)': + '@tangle-network/agent-eval@0.126.5(typescript@5.9.3)': dependencies: '@asteasolutions/zod-to-openapi': 8.5.0(zod@4.4.3) '@ax-llm/ax': 23.0.5(zod@4.4.3) diff --git a/scripts/verify-official-optimizers.mjs b/scripts/verify-official-optimizers.mjs index 84e79ae..b890cfa 100644 --- a/scripts/verify-official-optimizers.mjs +++ b/scripts/verify-official-optimizers.mjs @@ -11,30 +11,28 @@ import { tmpdir } from 'node:os' import { dirname, join, resolve } from 'node:path' import { fileURLToPath, pathToFileURL } from 'node:url' -const python = process.env.AGENT_EVAL_TEST_PYTHON -if (!python) { - throw new Error('AGENT_EVAL_TEST_PYTHON must point to Python with GEPA and SkillOpt installed') -} - const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..') const sourcePackage = JSON.parse(readFileSync(join(repoRoot, 'package.json'), 'utf8')) const agentEvalVersion = sourcePackage.dependencies?.['@tangle-network/agent-eval'] if (!/^\d+\.\d+\.\d+$/.test(agentEvalVersion)) { throw new Error('@tangle-network/agent-eval must be pinned to one exact version') } -const pythonRpcVersion = run( - python, - ['-c', "from importlib.metadata import version; print(version('agent-eval-rpc'))"], - repoRoot, -).trim() -if (pythonRpcVersion !== agentEvalVersion) { - throw new Error( - `official optimizer Python bridge ${pythonRpcVersion} does not match agent-eval ${agentEvalVersion}`, - ) -} const tempRoot = mkdtempSync(join(tmpdir(), 'agent-knowledge-official-')) try { + const python = + process.env.AGENT_EVAL_TEST_PYTHON ?? installOfficialOptimizers(tempRoot, agentEvalVersion) + const pythonRpcVersion = run( + python, + ['-c', "from importlib.metadata import version; print(version('agent-eval-rpc'))"], + repoRoot, + ).trim() + if (pythonRpcVersion !== agentEvalVersion) { + throw new Error( + `official optimizer Python bridge ${pythonRpcVersion} does not match agent-eval ${agentEvalVersion}`, + ) + } + const packDir = join(tempRoot, 'pack') const appDir = join(tempRoot, 'app') mkdirSync(packDir, { recursive: true }) @@ -100,6 +98,33 @@ try { rmSync(tempRoot, { recursive: true, force: true }) } +function installOfficialOptimizers(root, rpcVersion) { + const venvDir = join(root, 'python') + const basePython = process.env.PYTHON ?? 'python' + run(basePython, ['-m', 'venv', venvDir], repoRoot, { PYTHONNOUSERSITE: '1' }) + const python = + process.platform === 'win32' + ? join(venvDir, 'Scripts', 'python.exe') + : join(venvDir, 'bin', 'python') + run( + python, + [ + '-m', + 'pip', + 'install', + '--disable-pip-version-check', + '--index-url=https://pypi.org/simple', + '--no-cache-dir', + '--only-binary=agent-eval-rpc,gepa', + `agent-eval-rpc==${rpcVersion}`, + 'gepa[full]==0.1.4', + 'skillopt @ git+https://github.com/microsoft/SkillOpt.git@61735e3922efc2b90c6d6cab561e62e98452ca90', + ], + repoRoot, + ) + return python +} + function run(command, args, cwd, env = {}) { const result = spawnSync(command, args, { cwd,