The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(ci): hand the lanes Python 3.12 without exporting its environment
M3gA-Mind7548171ca68b
diff --git a/.github/workflows/ci-lanes.yml b/.github/workflows/ci-lanes.ymlindex 871121f6b3..1b9bcae79d 100644--- a/.github/workflows/ci-lanes.yml+++ b/.github/workflows/ci-lanes.yml@@ -95,10 +95,16 @@ jobs:# a red lane from hiding the lanes after it.# The embed-consumer bootstrap uses stdlib tomllib (Python >= 3.11).# Both runner profiles must use the same interpreter before spawning lanes.+ # It is handed to the lanes explicitly (OPENHUMAN_CI_PYTHON) rather than+ # exported: an exported toolcache PATH/LD_LIBRARY_PATH leaks into the+ # Rust tests, whose agent shell keeps PATH but not LD_LIBRARY_PATH, so a+ # PATH-resolved python3 then cannot load libpython.- name: Setup Python for lanes+ id: pythonuses: actions/setup-python@v6with:python-version: "3.12"+ update-environment: false- name: Start lanesid: lanes@@ -113,6 +119,7 @@ jobs:CI_AREA_TOOLCHAIN_IMAGE: ${{ steps.filter.outputs['toolchain-image'] }}CI_AREA_INSTALL_PS1: ${{ steps.filter.outputs.install_ps1 }}CI_AREA_STORAGE: ${{ steps.filter.outputs.storage }}+ OPENHUMAN_CI_PYTHON: ${{ steps.python.outputs.python-path }}run: node scripts/ci/self-hosted/lanes.mjs --profile ex63 --detach- name: "Lane: static checks"@@ -325,13 +332,21 @@ jobs:# a red lane from hiding the lanes after it.# The embed-consumer bootstrap uses stdlib tomllib (Python >= 3.11).# Both runner profiles must use the same interpreter before spawning lanes.+ # It is handed to the lanes explicitly (OPENHUMAN_CI_PYTHON) rather than+ # exported: an exported toolcache PATH/LD_LIBRARY_PATH leaks into the+ # Rust tests, whose agent shell keeps PATH but not LD_LIBRARY_PATH, so a+ # PATH-resolved python3 then cannot load libpython.- name: Setup Python for lanes+ id: pythonuses: actions/setup-python@v6with:python-version: "3.12"+ update-environment: false- name: Start lanesid: lanes+ env:+ OPENHUMAN_CI_PYTHON: ${{ steps.python.outputs.python-path }}run: >-node scripts/ci/self-hosted/lanes.mjs --profile hosted --detach--lanes '${{ matrix.lanes }}' --max-parallel ${{ matrix['max-parallel'] }}diff --git a/scripts/__tests__/embed-consumer-bootstrap.test.mjs b/scripts/__tests__/embed-consumer-bootstrap.test.mjsindex 1aeb4d70fa..de6a3ccd9e 100644--- a/scripts/__tests__/embed-consumer-bootstrap.test.mjs+++ b/scripts/__tests__/embed-consumer-bootstrap.test.mjs@@ -7,6 +7,8 @@ import { test } from 'node:test';const root = resolve(dirname(fileURLToPath(import.meta.url)), '../..');const script = join(root, 'scripts/bootstrap-embed-consumer.py');+// CI hands the lanes their pinned interpreter explicitly; locally use PATH.+const python = process.env.OPENHUMAN_CI_PYTHON || 'python3';function fixture() {mkdirSync(join(root, 'target'), { recursive: true });const directory = mkdtempSync(join(root, 'target/embed-bootstrap-fixture-'));@@ -32,7 +34,7 @@ test('a pinned consumer generates patches, excludes local secrets and builds botconst { directory, source, rev } = fixture();try {const destination = join(directory, 'consumer');- execFileSync('python3', [script, '--offline', '--source', source, '--rev', rev, '--destination', destination]);+ execFileSync(python, [script, '--offline', '--source', source, '--rev', rev, '--destination', destination]);const manifest = readFileSync(join(destination, 'Cargo.toml'), 'utf8');assert.match(manifest, /default = \[\]/);assert.match(manifest, /optional = true, default-features = false/);@@ -49,7 +51,7 @@ test('a pinned consumer generates patches, excludes local secrets and builds botassert.doesNotMatch(readFileSync(join(destination, 'Cargo.lock'), 'utf8'), /patch\.unused/);const tree = execFileSync('cargo', ['tree', '--offline', '--manifest-path', join(destination, 'Cargo.toml'), '-e', 'normal'], { encoding: 'utf8' });assert.doesNotMatch(tree, /openhuman-embed|reqwest/);- const again = spawnSync('python3', [script, '--offline', '--source', source, '--rev', rev, '--destination', destination], { encoding: 'utf8' });+ const again = spawnSync(python, [script, '--offline', '--source', source, '--rev', rev, '--destination', destination], { encoding: 'utf8' });assert.equal(again.status, 1);assert.equal(readFileSync(join(destination, 'OPENHUMAN_REV'), 'utf8').trim(), rev);} finally { rmSync(directory, { recursive: true, force: true }); }@@ -60,7 +62,7 @@ test('symbolic and missing pins fail without leaving a partial consumer', () =>try {for (const rev of ['main', '0'.repeat(40)]) {const destination = join(directory, 'consumer');- const result = spawnSync('python3', [script, '--offline', '--source', source, '--rev', rev, '--destination', destination], { encoding: 'utf8' });+ const result = spawnSync(python, [script, '--offline', '--source', source, '--rev', rev, '--destination', destination], { encoding: 'utf8' });assert.equal(result.status, 1);assert.equal(existsSync(destination), false);assert.doesNotMatch(result.stderr, /PRIVATE_FIXTURE_TOKEN/);@@ -72,7 +74,7 @@ test('credential-bearing source URLs are refused before Git sees them', () => {const { directory, source, rev } = fixture();try {const destination = join(directory, 'consumer');- const result = spawnSync('python3', [script, '--offline', '--source', `file://${source}?token=PRIVATE_FIXTURE_TOKEN`, '--rev', rev, '--destination', destination], { encoding: 'utf8' });+ const result = spawnSync(python, [script, '--offline', '--source', `file://${source}?token=PRIVATE_FIXTURE_TOKEN`, '--rev', rev, '--destination', destination], { encoding: 'utf8' });assert.equal(result.status, 1);assert.match(result.stderr, /credential-bearing/);assert.doesNotMatch(result.stderr, /PRIVATE_FIXTURE_TOKEN/);@@ -89,7 +91,7 @@ test('unsupported and escaping patch specifications fail closed', () => {execFileSync('git', ['-C', source, '-c', 'user.name=Fixture', '-c', '[email protected]', 'commit', '--quiet', '-m', 'invalid patch']);const rev = execFileSync('git', ['-C', source, 'rev-parse', 'HEAD'], { encoding: 'utf8' }).trim();const destination = join(directory, 'consumer');- const result = spawnSync('python3', [script, '--offline', '--source', source, '--rev', rev, '--destination', destination], { encoding: 'utf8' });+ const result = spawnSync(python, [script, '--offline', '--source', source, '--rev', rev, '--destination', destination], { encoding: 'utf8' });assert.equal(result.status, 1);assert.match(result.stderr, /Unsupported workspace patch form|leaves the source checkout/);assert.equal(existsSync(destination), false);