@tangle-network/agent-bench 0.9.3 → 0.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/HARNESS.md +8 -0
- package/package.json +2 -2
- package/scripts/run-package-tests.mjs +16 -1
- package/scripts/run-package-tests.test.mjs +15 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.4
|
|
4
|
+
|
|
5
|
+
Requires Runtime 0.202.0 so Bench consumers receive explicit failed-execution settlement and retained failure recovery.
|
|
6
|
+
Supports an optional Node test concurrency limit for hosts with constrained memory.
|
|
7
|
+
|
|
3
8
|
## 0.9.3
|
|
4
9
|
|
|
5
10
|
Requires Runtime 0.201.0, Interface 2.5.0, Eval 0.176, and Knowledge 15 for scoped candidate knowledge.
|
package/HARNESS.md
CHANGED
|
@@ -37,6 +37,14 @@ pnpm verify:bench
|
|
|
37
37
|
pnpm verify:official-optimizers
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
Set `AGENT_BENCH_PACKAGE_TEST_CONCURRENCY=1` to run Node source test files sequentially on memory-constrained hosts.
|
|
41
|
+
The value must be a positive safe integer; leaving it unset preserves Node's default concurrency.
|
|
42
|
+
Vitest uses the worker limit in `bench/vitest.config.ts`.
|
|
43
|
+
|
|
44
|
+
Packing resolves the Runtime dependency from `workspace:^` to a version range.
|
|
45
|
+
A new Runtime compatibility line does not update previously published Bench packages.
|
|
46
|
+
Check the packed dependency range and release Bench when consumers must receive that Runtime version.
|
|
47
|
+
|
|
40
48
|
`verify:official-optimizers` exercises the official Optimize Anything bridge, engine identities, equal input budgets, resume compatibility, candidate callbacks, accounting, and package provenance. Its deterministic candidate improvement is deliberately a fixture. It does **not** reproduce the published GEPA or Omni benchmark numbers.
|
|
41
49
|
|
|
42
50
|
### Bounded benchmark matrix
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-bench",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Benchmark adapters and execution for agent-runtime across coding, tool-use, RAG, memory, browser, and terminal tasks.",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@tangle-network/agent-interface": "^2.5.0",
|
|
30
30
|
"@tangle-network/agent-knowledge": "^15.0.0",
|
|
31
31
|
"@tangle-network/sandbox": ">=0.36.4 <0.38.0",
|
|
32
|
-
"@tangle-network/agent-runtime": "^0.
|
|
32
|
+
"@tangle-network/agent-runtime": "^0.202.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@arethetypeswrong/cli": "0.18.5",
|
|
@@ -8,6 +8,21 @@ const execFileAsync = promisify(execFile)
|
|
|
8
8
|
const benchDir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..')
|
|
9
9
|
const sourceDir = path.join(benchDir, 'src')
|
|
10
10
|
|
|
11
|
+
export function packageNodeTestArgs(files, env = process.env) {
|
|
12
|
+
const raw = env.AGENT_BENCH_PACKAGE_TEST_CONCURRENCY
|
|
13
|
+
const concurrency = raw === undefined ? undefined : Number(raw)
|
|
14
|
+
if (raw !== undefined && (!/^[1-9]\d*$/.test(raw) || !Number.isSafeInteger(concurrency))) {
|
|
15
|
+
throw new Error('AGENT_BENCH_PACKAGE_TEST_CONCURRENCY must be a positive safe integer')
|
|
16
|
+
}
|
|
17
|
+
return [
|
|
18
|
+
'--test',
|
|
19
|
+
...(concurrency === undefined ? [] : [`--test-concurrency=${concurrency}`]),
|
|
20
|
+
'--import',
|
|
21
|
+
'tsx',
|
|
22
|
+
...files,
|
|
23
|
+
]
|
|
24
|
+
}
|
|
25
|
+
|
|
11
26
|
export function resolvePackageTestTimeoutMs(env = process.env) {
|
|
12
27
|
const raw = env.AGENT_BENCH_PACKAGE_TEST_TIMEOUT_MS
|
|
13
28
|
if (raw === undefined) return undefined
|
|
@@ -74,7 +89,7 @@ async function main() {
|
|
|
74
89
|
if (nodeTests.length > 0) {
|
|
75
90
|
await run(
|
|
76
91
|
process.execPath,
|
|
77
|
-
|
|
92
|
+
packageNodeTestArgs(nodeTests.map((file) => path.relative(benchDir, file))),
|
|
78
93
|
{
|
|
79
94
|
...process.env,
|
|
80
95
|
TSX_TSCONFIG_PATH: 'tsconfig.public.json',
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import assert from 'node:assert/strict'
|
|
2
2
|
import { test } from 'node:test'
|
|
3
|
-
import { resolvePackageTestTimeoutMs, run } from './run-package-tests.mjs'
|
|
3
|
+
import { packageNodeTestArgs, resolvePackageTestTimeoutMs, run } from './run-package-tests.mjs'
|
|
4
|
+
|
|
5
|
+
test('package test concurrency reaches Node without changing selected files', () => {
|
|
6
|
+
const files = ['src/first.test.mts', 'src/second.test.ts']
|
|
7
|
+
assert.deepEqual(packageNodeTestArgs(files, {}), ['--test', '--import', 'tsx', ...files])
|
|
8
|
+
assert.deepEqual(packageNodeTestArgs(files, { AGENT_BENCH_PACKAGE_TEST_CONCURRENCY: '1' }), [
|
|
9
|
+
'--test', '--test-concurrency=1', '--import', 'tsx', ...files,
|
|
10
|
+
])
|
|
11
|
+
for (const value of ['', '0', '-1', '1.5', 'Infinity', '9007199254740992']) {
|
|
12
|
+
assert.throws(
|
|
13
|
+
() => packageNodeTestArgs(files, { AGENT_BENCH_PACKAGE_TEST_CONCURRENCY: value }),
|
|
14
|
+
/must be a positive safe integer/,
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
})
|
|
4
18
|
|
|
5
19
|
test('package test timeout is optional and caller-controlled', () => {
|
|
6
20
|
assert.equal(resolvePackageTestTimeoutMs({}), undefined)
|