harness-everything 1.6.0 → 1.6.1
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +9 -0
- package/behavioral-evals/paired-benchmark.js +2 -2
- package/behavioral-evals/run-with-plugin.js +8 -3
- package/behavioral-evals/run.js +5 -3
- package/ci/ab-test-harness.js +2 -2
- package/ci/mechanism-2j-behavioral-runner.test.js +45 -1
- package/ci/mechanism-2j-fixture-entrypoints.test.js +39 -0
- package/ci/mechanism-32-paired-benchmark.test.js +38 -0
- package/ci/mechanism-468-dispatch-cli.test.js +23 -0
- package/ci/mechanism-system-one-curves.test.js +26 -3
- package/ci/mechanism-system-one-cycle.test.js +5 -4
- package/ci/mechanism-system-one-live.test.js +6 -1
- package/docs/system-one-cycle.md +5 -5
- package/docs/system-one-routing.md +10 -7
- package/docs/system-one-training.md +4 -5
- package/harness-everything/SKILL.md +1 -1
- package/harness-everything/scripts/system-one/router.js +0 -1
- package/opencode-plugin/plugin.json +1 -1
- package/package.json +1 -1
- package/plugins/harness-everything/.antigravity-plugin/plugin.json +1 -1
- package/plugins/harness-everything/.codex-plugin/plugin.json +1 -1
- package/plugins/harness-everything/plugin.json +1 -1
- package/plugins/harness-everything/skills/harness-everything/SKILL.md +1 -1
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/router.js +0 -1
- package/sbom.cdx.json +7 -7
- package/scripts/dispatch.js +3 -2
- package/scripts/system-one-curves.js +4 -32
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"name": "harness-everything",
|
|
11
11
|
"source": "./",
|
|
12
12
|
"description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
|
|
13
|
-
"version": "1.6.
|
|
13
|
+
"version": "1.6.1",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "Miya Daniel"
|
|
16
16
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harness-everything",
|
|
3
3
|
"description": "Harness OS: an orchestrated agent operating system — tier routing, circuit breaker guardrails, verification gates, WAL session memory, and self-evolving workspace rules.",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Miya Daniel"
|
|
7
7
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.6.1](https://github.com/dyphn1/Harness-everything/compare/v1.6.0...v1.6.1) (2026-12-04)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **behavioral-evals:** run opencode v2 arms standalone without --dir ([8a2e081](https://github.com/dyphn1/Harness-everything/commit/8a2e081b802041011b8920c8851aa65e79c8fdd0)), closes [#597](https://github.com/dyphn1/Harness-everything/issues/597)
|
|
10
|
+
* **dispatch:** restore the human diagnostic length cap ([70d1f58](https://github.com/dyphn1/Harness-everything/commit/70d1f58b384891e399cf282d9fd0aa9da6882a79)), closes [#466](https://github.com/dyphn1/Harness-everything/issues/466)
|
|
11
|
+
* **system-one:** expose reference-only options only through diagnostics ([eca770f](https://github.com/dyphn1/Harness-everything/commit/eca770f0579a2e73d12ec4ea7cc29122e00b6657)), closes [#443](https://github.com/dyphn1/Harness-everything/issues/443) [#443](https://github.com/dyphn1/Harness-everything/issues/443)
|
|
12
|
+
* **system-one:** report the active trend as unknown without active identity ([62fce2c](https://github.com/dyphn1/Harness-everything/commit/62fce2cc4df85d7478603d47eac04db4b0bca08d)), closes [#443](https://github.com/dyphn1/Harness-everything/issues/443) [#443](https://github.com/dyphn1/Harness-everything/issues/443)
|
|
13
|
+
|
|
5
14
|
## [1.6.0](https://github.com/dyphn1/Harness-everything/compare/v1.5.4...v1.6.0) (2026-12-04)
|
|
6
15
|
|
|
7
16
|
### Features
|
|
@@ -312,7 +312,7 @@ function buildInvocation(engine, model, prompt, ws, maxTurns) {
|
|
|
312
312
|
if (engine === 'opencode') {
|
|
313
313
|
return resolveCliInvocation({
|
|
314
314
|
command: 'opencode',
|
|
315
|
-
args: ['run', '--format', 'json', '--auto', '--
|
|
315
|
+
args: ['run', '--format', 'json', '--auto', '--standalone', '-m', model, prompt],
|
|
316
316
|
});
|
|
317
317
|
}
|
|
318
318
|
if (engine === 'claude') {
|
|
@@ -433,7 +433,7 @@ function runArm(c, context, arm, pairDir, execute = spawnSync) {
|
|
|
433
433
|
const started = Date.now();
|
|
434
434
|
const result = execute(invocation.command, invocation.args, {
|
|
435
435
|
cwd: prepared.ws,
|
|
436
|
-
env: { ...process.env, HARNESS_STATE_HOME: stateHome },
|
|
436
|
+
env: { ...process.env, HARNESS_STATE_HOME: stateHome, PWD: prepared.ws },
|
|
437
437
|
encoding: 'utf8',
|
|
438
438
|
timeout: context.engine === 'opencode' ? 20 * 60 * 1000 : 15 * 60 * 1000,
|
|
439
439
|
maxBuffer: 64 * 1024 * 1024,
|
|
@@ -172,15 +172,20 @@ function installHarnessWithPlugin(ws) {
|
|
|
172
172
|
function runHeadless(prompt, ws, maxTurns) {
|
|
173
173
|
const outPath = path.join(path.dirname(ws), path.basename(ws) + '.transcript.json');
|
|
174
174
|
const model = process.env.BEHAVIORAL_MODEL;
|
|
175
|
-
const args = ['run', '--format', 'json', '--auto', '--
|
|
175
|
+
const args = ['run', '--format', 'json', '--auto', '--standalone'];
|
|
176
176
|
if (model) args.push('-m', model);
|
|
177
177
|
// Pass the prompt as one argv element; shell quoting corrupts prompts on
|
|
178
178
|
// Windows and previously reduced full requests to fragments such as `Add.`.
|
|
179
179
|
args.push(prompt);
|
|
180
180
|
const outputFd = fs.openSync(outPath, 'w');
|
|
181
181
|
try {
|
|
182
|
-
execFileSync('opencode', args,
|
|
183
|
-
|
|
182
|
+
execFileSync('opencode', args, {
|
|
183
|
+
cwd: ws,
|
|
184
|
+
env: { ...process.env, PWD: ws },
|
|
185
|
+
stdio: ['ignore', outputFd, 'inherit'],
|
|
186
|
+
timeout: 20 * 60 * 1000,
|
|
187
|
+
windowsHide: true,
|
|
188
|
+
});
|
|
184
189
|
} finally {
|
|
185
190
|
fs.closeSync(outputFd);
|
|
186
191
|
}
|
package/behavioral-evals/run.js
CHANGED
|
@@ -338,7 +338,7 @@ function installHarness(ws, loadedSkills) {
|
|
|
338
338
|
|
|
339
339
|
function buildEngineInvocation(engine, prompt, ws, maxTurns, arm = 'treatment') {
|
|
340
340
|
if (engine === 'opencode') {
|
|
341
|
-
const args = ['run', '--format', 'json', '--auto', '--
|
|
341
|
+
const args = ['run', '--format', 'json', '--auto', '--standalone'];
|
|
342
342
|
const model = process.env.BEHAVIORAL_MODEL;
|
|
343
343
|
if (model) args.push('-m', model);
|
|
344
344
|
args.push(prompt);
|
|
@@ -401,7 +401,7 @@ function resolveCliInvocation(invocation) {
|
|
|
401
401
|
return direct ? { command: direct, args: invocation.args.slice() } : invocation;
|
|
402
402
|
}
|
|
403
403
|
|
|
404
|
-
function runHeadless(prompt, ws, maxTurns, engine, arm) {
|
|
404
|
+
function runHeadless(prompt, ws, maxTurns, engine, arm, execute = execFileSync) {
|
|
405
405
|
// Keep the transcript OUTSIDE the workspace: grader artifacts must never
|
|
406
406
|
// show up in git-status-based scope checks.
|
|
407
407
|
const outPath = path.join(path.dirname(ws), path.basename(ws) + '.transcript.jsonl');
|
|
@@ -411,8 +411,9 @@ function runHeadless(prompt, ws, maxTurns, engine, arm) {
|
|
|
411
411
|
try {
|
|
412
412
|
// Pass the prompt as one argv element. A shell wrapper on Windows can
|
|
413
413
|
// reinterpret spaces and punctuation, truncating prompts to `Add.`.
|
|
414
|
-
|
|
414
|
+
execute(executable.command, executable.args, {
|
|
415
415
|
cwd: ws,
|
|
416
|
+
env: { ...process.env, PWD: ws },
|
|
416
417
|
stdio: ['ignore', outputFd, 'inherit'],
|
|
417
418
|
timeout: engine === 'opencode' ? 20 * 60 * 1000 : 15 * 60 * 1000,
|
|
418
419
|
windowsHide: true,
|
|
@@ -1238,6 +1239,7 @@ module.exports = {
|
|
|
1238
1239
|
buildEngineInvocation,
|
|
1239
1240
|
buildWorkspace,
|
|
1240
1241
|
runFixtureSetup,
|
|
1242
|
+
runHeadless,
|
|
1241
1243
|
prepareWorkspace,
|
|
1242
1244
|
countToolCalls,
|
|
1243
1245
|
extractAgentEvents,
|
package/ci/ab-test-harness.js
CHANGED
|
@@ -181,8 +181,8 @@ function runHeadless(prompt, cwd, engine) {
|
|
|
181
181
|
const outPath = path.join(os.tmpdir(), `ab-test-${Date.now()}-${Math.random().toString(36).slice(2)}.json`);
|
|
182
182
|
const outputFd = fs.openSync(outPath, 'w');
|
|
183
183
|
try {
|
|
184
|
-
execFileSync('opencode', ['run', '-m', model, prompt, '--format', 'json', '--auto', '--
|
|
185
|
-
{ cwd, stdio: ['ignore', outputFd, 'inherit'], timeout: 10 * 60 * 1000, windowsHide: true });
|
|
184
|
+
execFileSync('opencode', ['run', '-m', model, prompt, '--format', 'json', '--auto', '--standalone'],
|
|
185
|
+
{ cwd, env: { ...process.env, PWD: cwd }, stdio: ['ignore', outputFd, 'inherit'], timeout: 10 * 60 * 1000, windowsHide: true });
|
|
186
186
|
} catch (err) {
|
|
187
187
|
// Timeout or crash — return empty trace
|
|
188
188
|
fs.rmSync(outPath, { force: true });
|
|
@@ -3,7 +3,7 @@ const fs = require('fs');
|
|
|
3
3
|
const os = require('os');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const { spawnSync } = require('child_process');
|
|
6
|
-
const { buildEngineInvocation, buildWorkspace, runFixtureSetup, prepareWorkspace, summarizePairResults } = require('../behavioral-evals/run');
|
|
6
|
+
const { buildEngineInvocation, buildWorkspace, runFixtureSetup, prepareWorkspace, summarizePairResults, runHeadless } = require('../behavioral-evals/run');
|
|
7
7
|
|
|
8
8
|
console.log('\n[2j] Behavioral runner argv integrity...');
|
|
9
9
|
const prompt = "Add punctuation stripping to slug.js, then run npm test. Do not truncate this request.";
|
|
@@ -179,4 +179,48 @@ helper.check(
|
|
|
179
179
|
JSON.stringify(fixtureFailureSummary)
|
|
180
180
|
);
|
|
181
181
|
|
|
182
|
+
const opencodeInvocation = buildEngineInvocation('opencode', prompt, 'C:/fixture with spaces', 16);
|
|
183
|
+
helper.check(
|
|
184
|
+
'2j. opencode invocation omits --dir and passes --standalone',
|
|
185
|
+
!opencodeInvocation.args.includes('--dir') &&
|
|
186
|
+
opencodeInvocation.args.includes('--standalone') &&
|
|
187
|
+
!opencodeInvocation.args.includes('C:/fixture with spaces'),
|
|
188
|
+
JSON.stringify(opencodeInvocation.args)
|
|
189
|
+
);
|
|
190
|
+
|
|
191
|
+
const runParentDir = fs.mkdtempSync(path.join(os.tmpdir(), 'harness-2j-opencode-'));
|
|
192
|
+
const runWs = path.join(runParentDir, 'ws');
|
|
193
|
+
fs.mkdirSync(runWs, { recursive: true });
|
|
194
|
+
const prevPwd2j = process.env.PWD;
|
|
195
|
+
const prevModel2j = process.env.BEHAVIORAL_MODEL;
|
|
196
|
+
try {
|
|
197
|
+
process.env.PWD = '/stale/parent/dir';
|
|
198
|
+
delete process.env.BEHAVIORAL_MODEL;
|
|
199
|
+
let capturedRun = null;
|
|
200
|
+
if (typeof runHeadless === 'function') {
|
|
201
|
+
runHeadless(prompt, runWs, 16, 'opencode', 'baseline', (command, args, options) => {
|
|
202
|
+
capturedRun = { command, args, options };
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
helper.check(
|
|
206
|
+
'2j. runHeadless spawns opencode with --standalone, no --dir, cwd=ws, and env.PWD=cwd',
|
|
207
|
+
Boolean(
|
|
208
|
+
capturedRun &&
|
|
209
|
+
!capturedRun.args.includes('--dir') &&
|
|
210
|
+
capturedRun.args.includes('--standalone') &&
|
|
211
|
+
capturedRun.options &&
|
|
212
|
+
capturedRun.options.cwd === runWs &&
|
|
213
|
+
capturedRun.options.env &&
|
|
214
|
+
capturedRun.options.env.PWD === capturedRun.options.cwd
|
|
215
|
+
),
|
|
216
|
+
capturedRun ? JSON.stringify({ args: capturedRun.args, cwd: capturedRun.options && capturedRun.options.cwd, pwd: capturedRun.options && capturedRun.options.env && capturedRun.options.env.PWD }) : 'runHeadless is not exported'
|
|
217
|
+
);
|
|
218
|
+
} finally {
|
|
219
|
+
if (prevPwd2j === undefined) delete process.env.PWD;
|
|
220
|
+
else process.env.PWD = prevPwd2j;
|
|
221
|
+
if (prevModel2j === undefined) delete process.env.BEHAVIORAL_MODEL;
|
|
222
|
+
else process.env.BEHAVIORAL_MODEL = prevModel2j;
|
|
223
|
+
fs.rmSync(runParentDir, { recursive: true, force: true });
|
|
224
|
+
}
|
|
225
|
+
|
|
182
226
|
helper.finish();
|
|
@@ -93,6 +93,45 @@ try {
|
|
|
93
93
|
assert.strictEqual(result.fixture_setup.status, 'pass');
|
|
94
94
|
assert.strictEqual(result.outcome, 'fail', 'an untouched topology must fail the actual final-state graders');
|
|
95
95
|
|
|
96
|
+
// Exercise run-with-plugin.js real runHeadless spawn argv and env.PWD.
|
|
97
|
+
const childProcess = require('child_process');
|
|
98
|
+
const originalExecFileSync = childProcess.execFileSync;
|
|
99
|
+
const pluginPath = require.resolve('../behavioral-evals/run-with-plugin');
|
|
100
|
+
const prevPwdPlugin = process.env.PWD;
|
|
101
|
+
let capturedPluginSpawn = null;
|
|
102
|
+
try {
|
|
103
|
+
process.env.PWD = '/stale/parent/dir';
|
|
104
|
+
childProcess.execFileSync = (command, args, options) => {
|
|
105
|
+
capturedPluginSpawn = { command, args, options };
|
|
106
|
+
return Buffer.alloc(0);
|
|
107
|
+
};
|
|
108
|
+
delete require.cache[pluginPath];
|
|
109
|
+
const freshPlugin = require('../behavioral-evals/run-with-plugin');
|
|
110
|
+
const spawnCase = {
|
|
111
|
+
id: 'opencode-spawn-contract',
|
|
112
|
+
loaded_skills: ['tdd'],
|
|
113
|
+
fixture: { files: [{ path: 'seed.txt', content: 'seed' }] },
|
|
114
|
+
prompt: 'Verify OpenCode standalone spawn contract.',
|
|
115
|
+
max_turns: 2,
|
|
116
|
+
expectations: [{ type: 'file_contains', path: 'seed.txt', value: 'seed' }],
|
|
117
|
+
};
|
|
118
|
+
const spawnRecord = freshPlugin.runCase(spawnCase);
|
|
119
|
+
track(spawnRecord.workspace);
|
|
120
|
+
track(spawnRecord.transcript);
|
|
121
|
+
assert.ok(capturedPluginSpawn, 'run-with-plugin runCase must invoke execFileSync via runHeadless');
|
|
122
|
+
assert.strictEqual(capturedPluginSpawn.command, 'opencode');
|
|
123
|
+
assert.ok(!capturedPluginSpawn.args.includes('--dir'), `unexpected --dir in args: ${JSON.stringify(capturedPluginSpawn.args)}`);
|
|
124
|
+
assert.ok(capturedPluginSpawn.args.includes('--standalone'), `missing --standalone in args: ${JSON.stringify(capturedPluginSpawn.args)}`);
|
|
125
|
+
assert.strictEqual(capturedPluginSpawn.options.cwd, spawnRecord.workspace);
|
|
126
|
+
assert.ok(capturedPluginSpawn.options.env && capturedPluginSpawn.options.env.PWD === capturedPluginSpawn.options.cwd,
|
|
127
|
+
`expected env.PWD === cwd (${capturedPluginSpawn.options.cwd}), got ${capturedPluginSpawn.options.env && capturedPluginSpawn.options.env.PWD}`);
|
|
128
|
+
} finally {
|
|
129
|
+
childProcess.execFileSync = originalExecFileSync;
|
|
130
|
+
delete require.cache[pluginPath];
|
|
131
|
+
if (prevPwdPlugin === undefined) delete process.env.PWD;
|
|
132
|
+
else process.env.PWD = prevPwdPlugin;
|
|
133
|
+
}
|
|
134
|
+
|
|
96
135
|
for (const fixture of [
|
|
97
136
|
{ files: [{ path: '../escape', content: 'bad' }] },
|
|
98
137
|
{ files: [{ path: 'seed', content: 'ok' }], setup: '../escape.js' },
|
|
@@ -9,6 +9,7 @@ const {
|
|
|
9
9
|
pairContract,
|
|
10
10
|
prepareArmWorkspace,
|
|
11
11
|
retrieveLesson,
|
|
12
|
+
runArm,
|
|
12
13
|
summarizePairs,
|
|
13
14
|
validateLessonCase,
|
|
14
15
|
validatePairRecord,
|
|
@@ -385,6 +386,43 @@ try {
|
|
|
385
386
|
JSON.stringify(summary.decision),
|
|
386
387
|
);
|
|
387
388
|
|
|
389
|
+
const opencodePairDir = helper.tempDir('.paired-opencode-spawn');
|
|
390
|
+
fs.mkdirSync(opencodePairDir, { recursive: true });
|
|
391
|
+
const prevPwd32 = process.env.PWD;
|
|
392
|
+
let capturedPairedSpawn = null;
|
|
393
|
+
try {
|
|
394
|
+
process.env.PWD = '/stale/parent/dir';
|
|
395
|
+
const spawnCase = {
|
|
396
|
+
id: 'paired-opencode-spawn',
|
|
397
|
+
discipline: 'tdd',
|
|
398
|
+
prompt: 'Verify paired-benchmark OpenCode standalone spawn.',
|
|
399
|
+
max_turns: 4,
|
|
400
|
+
fixture: { files: [{ path: 'probe.txt', content: 'baseline\n' }] },
|
|
401
|
+
expectations: [{ type: 'file_contains', path: 'probe.txt', value: 'baseline' }],
|
|
402
|
+
};
|
|
403
|
+
runArm(spawnCase, { effect_type: 'skill-text', engine: 'opencode', model: 'test/model' }, 'baseline', opencodePairDir, (command, args, options) => {
|
|
404
|
+
capturedPairedSpawn = { command, args, options };
|
|
405
|
+
return { status: 1, stdout: '', stderr: '' };
|
|
406
|
+
});
|
|
407
|
+
} finally {
|
|
408
|
+
if (prevPwd32 === undefined) delete process.env.PWD;
|
|
409
|
+
else process.env.PWD = prevPwd32;
|
|
410
|
+
}
|
|
411
|
+
helper.check(
|
|
412
|
+
'32. paired-benchmark spawns opencode with --standalone, no --dir, cwd=ws, and env.PWD=cwd',
|
|
413
|
+
Boolean(
|
|
414
|
+
capturedPairedSpawn &&
|
|
415
|
+
!capturedPairedSpawn.args.includes('--dir') &&
|
|
416
|
+
capturedPairedSpawn.args.includes('--standalone') &&
|
|
417
|
+
capturedPairedSpawn.options &&
|
|
418
|
+
capturedPairedSpawn.options.cwd &&
|
|
419
|
+
capturedPairedSpawn.options.env &&
|
|
420
|
+
capturedPairedSpawn.options.env.PWD === capturedPairedSpawn.options.cwd &&
|
|
421
|
+
capturedPairedSpawn.options.env.HARNESS_STATE_HOME
|
|
422
|
+
),
|
|
423
|
+
capturedPairedSpawn ? JSON.stringify({ args: capturedPairedSpawn.args, cwd: capturedPairedSpawn.options && capturedPairedSpawn.options.cwd, pwd: capturedPairedSpawn.options && capturedPairedSpawn.options.env && capturedPairedSpawn.options.env.PWD }) : 'execute was not called',
|
|
424
|
+
);
|
|
425
|
+
|
|
388
426
|
helper.finish();
|
|
389
427
|
} catch (error) {
|
|
390
428
|
helper.check('32. paired behavioral benchmark contract', false, error.stack);
|
|
@@ -578,6 +578,29 @@ try {
|
|
|
578
578
|
assert.match(result.stdout, /total tokens incl\. cache: 14/);
|
|
579
579
|
assert.ok(fs.readFileSync(testCase.report, 'utf8').endsWith('STATUS: DONE\n'));
|
|
580
580
|
});
|
|
581
|
+
check('466 human long diagnostic is capped while JSON and measured budget remain unchanged', () => {
|
|
582
|
+
const reason = 'x'.repeat(1200);
|
|
583
|
+
const telemetry = { input_tokens: 30_000_000, cached_input_tokens: 12_000_000, output_tokens: 1 };
|
|
584
|
+
const usage = { totalTokens: 30_000_001, mark: 'OVER-BUDGET' };
|
|
585
|
+
|
|
586
|
+
const humanCase = makeCase('human long diagnostic');
|
|
587
|
+
const human = cli([...argsFor(humanCase, 'codex')], humanCase, {
|
|
588
|
+
rawOverride: `Fixture blocked the packet.\nSTATUS: BLOCKED: ${reason}\n`,
|
|
589
|
+
extraEnv: { DISPATCH_FIXTURE_USAGE: JSON.stringify(telemetry) },
|
|
590
|
+
});
|
|
591
|
+
const diagnostic = `dispatch: worker delivered a valid BLOCKED report: ${reason}`;
|
|
592
|
+
assert.equal(human.status, 17, human.stdout);
|
|
593
|
+
assert.equal(human.stdout, '');
|
|
594
|
+
assert.equal(human.stderr.trimEnd(), `dispatch: ${diagnostic.slice('dispatch: '.length).slice(0, 1000)}`);
|
|
595
|
+
|
|
596
|
+
const jsonCase = makeCase('JSON long diagnostic');
|
|
597
|
+
const json = jsonResponse(cli([...argsFor(jsonCase, 'codex'), '--json'], jsonCase, {
|
|
598
|
+
rawOverride: `Fixture blocked the packet.\nSTATUS: BLOCKED: ${reason}\n`,
|
|
599
|
+
extraEnv: { DISPATCH_FIXTURE_USAGE: JSON.stringify(telemetry) },
|
|
600
|
+
}), 17, 'WORKER_BLOCKED');
|
|
601
|
+
assert.equal(json.message, diagnostic.slice('dispatch: '.length).slice(0, 1000));
|
|
602
|
+
assert.deepEqual(json.usage, usage);
|
|
603
|
+
});
|
|
581
604
|
check('468 completed telemetry is retained when a valid BLOCKED report is delivered', () => {
|
|
582
605
|
const telemetry = { input_tokens: 30_000_000, cached_input_tokens: 12_000_000, output_tokens: 1 };
|
|
583
606
|
const doneCase = makeCase('done report with same usage');
|
|
@@ -99,6 +99,13 @@ test('better ranking with worse calibration does not auto-promote', t => {
|
|
|
99
99
|
['a', 0.95, 0.1], ['b', 0.1, 0.95], ['a', 0.95, 0.1], ['b', 0.95, 0.9],
|
|
100
100
|
]) });
|
|
101
101
|
assert.equal(trend.verdict, 'hold');
|
|
102
|
+
assert.deepEqual(trend.compared, ['v0', 'v1']);
|
|
103
|
+
assert.deepEqual(trend.reasons.slice(0, 4), [
|
|
104
|
+
'tier coverage-accuracy AUC delta +0.250000 vs v0',
|
|
105
|
+
'tier log-loss delta -0.246765 vs v0',
|
|
106
|
+
'tier ECE delta +0.125000 vs v0',
|
|
107
|
+
'old-holdout floor unknown; promotion requires a checked floor',
|
|
108
|
+
]);
|
|
102
109
|
assert.ok(curves.stages.tier.ece > 0);
|
|
103
110
|
assert.ok(trend.reasons.some(reason => reason.includes('coverage-accuracy AUC delta +')));
|
|
104
111
|
assert.ok(trend.reasons.some(reason => reason.includes('ECE delta +')));
|
|
@@ -341,7 +348,7 @@ test('validity reference-only invalid keeps its established semantics (unchanged
|
|
|
341
348
|
assert.deepEqual(curve[25], [0.25, 1, 0.5]);
|
|
342
349
|
});
|
|
343
350
|
|
|
344
|
-
test('active trend
|
|
351
|
+
test('active trend remains unknown after two worsening candidate comparisons', t => {
|
|
345
352
|
const f = fixture(t);
|
|
346
353
|
const cycles = [
|
|
347
354
|
validityRows([['invalid', 0.8], ['invalid', 0.8], ['actionable', 0.2], ['actionable', 0.2]]),
|
|
@@ -350,6 +357,22 @@ test('active trend rolls back after two consecutive worsening cycles', t => {
|
|
|
350
357
|
];
|
|
351
358
|
cycles.forEach((val, i) => f.run({ version: `v${i}`, val }));
|
|
352
359
|
const { trend } = f.run({ version: 'v3', val: cycles[2] });
|
|
353
|
-
assert.equal(trend.verdict, '
|
|
354
|
-
assert.ok(trend.reasons.some(reason => reason.includes('
|
|
360
|
+
assert.equal(trend.verdict, 'hold');
|
|
361
|
+
assert.ok(trend.reasons.some(reason => reason.includes('active trend is unknown')));
|
|
362
|
+
assert.ok(!trend.reasons.some(reason => reason.includes('two consecutive')));
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
test('active trend stays unknown when held candidate rows are unbound to active identity', t => {
|
|
366
|
+
const f = fixture(t);
|
|
367
|
+
const activeA = validityRows([['invalid', 0.8], ['invalid', 0.8], ['actionable', 0.2], ['actionable', 0.2]]);
|
|
368
|
+
const heldB = validityRows([['invalid', 0.9], ['invalid', 0.9], ['actionable', 0.9], ['actionable', 0.9]]);
|
|
369
|
+
const rejectedC = validityRows([['invalid', 0.6], ['invalid', 0.6], ['actionable', 0.9], ['actionable', 0.9]]);
|
|
370
|
+
f.run({ version: 'active-a', val: activeA });
|
|
371
|
+
assert.equal(f.run({ version: 'held-b', val: heldB }).trend.verdict, 'hold');
|
|
372
|
+
assert.equal(f.run({ version: 'rejected-c', val: rejectedC }).trend.verdict, 'hold');
|
|
373
|
+
|
|
374
|
+
const { trend } = f.run({ version: 'next', val: rejectedC });
|
|
375
|
+
assert.equal(trend.verdict, 'hold');
|
|
376
|
+
assert.ok(trend.reasons.some(reason => reason.includes('active trend is unknown')));
|
|
377
|
+
assert.ok(!trend.reasons.some(reason => reason.includes('active curve worsened')));
|
|
355
378
|
});
|
|
@@ -1228,8 +1228,9 @@ test('446 cross-cycle: four evaluations detect two worsening transitions across
|
|
|
1228
1228
|
}
|
|
1229
1229
|
|
|
1230
1230
|
const { trend } = evaluation446(monthB.dataDir, 'v3');
|
|
1231
|
-
assert.equal(trend.verdict, '
|
|
1232
|
-
assert.ok(trend.reasons.some(reason => reason.includes('
|
|
1231
|
+
assert.equal(trend.verdict, 'hold');
|
|
1232
|
+
assert.ok(trend.reasons.some(reason => reason.includes('active trend is unknown')));
|
|
1233
|
+
assert.ok(!trend.reasons.some(reason => reason.includes('two consecutive cycles')));
|
|
1233
1234
|
assert.deepEqual(rows446(history).map(row => row.version), ['v0', 'v1', 'v2', 'v3']);
|
|
1234
1235
|
});
|
|
1235
1236
|
|
|
@@ -1510,7 +1511,7 @@ test('446 H2: rejects stale predecessor metrics and reordered trend rows before
|
|
|
1510
1511
|
for (const [fixture, version, quality] of [
|
|
1511
1512
|
[monthA, 'v0', 0.9], [monthB, 'v1', 0.8], [monthB, 'v2', 0.7], [monthB, 'v3', 0.6],
|
|
1512
1513
|
]) assert.equal(run446Cycle(fixture, version, { history: originalHistory, quality, all: true }).status, 0);
|
|
1513
|
-
assert.equal(evaluation446(monthB.dataDir, 'v3').trend.verdict, '
|
|
1514
|
+
assert.equal(evaluation446(monthB.dataDir, 'v3').trend.verdict, 'hold');
|
|
1514
1515
|
|
|
1515
1516
|
const changedHistory = path.join(tmp, 'changed-prior-history.jsonl');
|
|
1516
1517
|
const changedB = setup446Cycle(t, path.join(tmp, 'changed-b'), [
|
|
@@ -1528,7 +1529,7 @@ test('446 H2: rejects stale predecessor metrics and reordered trend rows before
|
|
|
1528
1529
|
path.join(monthB.dataDir, 'cycle-state.json'), monthB.callLog];
|
|
1529
1530
|
const changedBefore = snapshot446(changedPaths);
|
|
1530
1531
|
const changed = run446Cycle(monthB, 'v3', { history: changedHistory, quality: 0.6 });
|
|
1531
|
-
assert.notEqual(changed.status, 0, 'same baseline with changed prior comparison rows must reject
|
|
1532
|
+
assert.notEqual(changed.status, 0, 'same baseline with changed prior comparison rows must reject stale saved trend output');
|
|
1532
1533
|
assertSnapshot446(changedBefore);
|
|
1533
1534
|
assert.equal(fs.readFileSync(changedHistory, 'utf8'), changedBytes);
|
|
1534
1535
|
|
|
@@ -272,9 +272,14 @@ test('S1-L04 workflow plan carries the fixed object and user output labels score
|
|
|
272
272
|
version: 'v1', sha256: '0123456789abcdef',
|
|
273
273
|
stageScores: { validity: { invalid: 0.1 }, intent: intentScores(), tier: { tier1: 0.2, tier2: 0.76, tier3: 0.9 } },
|
|
274
274
|
thresholds: { validity: { invalid: 0.55 }, intent: stages.intent.thresholds, tier: stages.tier.thresholds },
|
|
275
|
+
referenceOnly: { validity: [], intent: ['unclassified'], tier: [] },
|
|
275
276
|
};
|
|
276
277
|
const contract = run('fixture request with clear scope', null, { systemOneResult: result });
|
|
277
|
-
assert.deepEqual(Object.keys(contract.workflowPlan.systemOne), ['version', 'sha256', 'mode', 'inputEnrichment', '
|
|
278
|
+
assert.deepEqual(Object.keys(contract.workflowPlan.systemOne), ['version', 'sha256', 'mode', 'inputEnrichment', 'validity', 'intents', 'tier', 'decision']);
|
|
279
|
+
const referencePrefix = '=> SYSTEM ONE REFERENCE CONFIDENCE (not a verdict): ';
|
|
280
|
+
const referenceLine = lines.find(line => line.includes(referencePrefix));
|
|
281
|
+
assert.deepEqual(JSON.parse(referenceLine.slice(referenceLine.indexOf(referencePrefix) + referencePrefix.length)).referenceOnlyOptions,
|
|
282
|
+
[{ stage: 'intent', id: 'unclassified', probability: 0.99 }]);
|
|
278
283
|
assert.deepEqual(contract.workflowPlan.systemOne.inputEnrichment, { handoffFiles: 0 });
|
|
279
284
|
assert.deepEqual(contract.workflowPlan.systemOne.decision, { validity: 'actionable', intents: ['feature', 'fix', 'docs'], tier: 'tier3' });
|
|
280
285
|
assert.deepEqual(JSON.parse(fs.readFileSync(env.HARNESS_ROUTER_CONTRACT_PATH, 'utf8')).workflowPlan.systemOne, contract.workflowPlan.systemOne);
|
package/docs/system-one-cycle.md
CHANGED
|
@@ -47,10 +47,10 @@ node scripts/system-one-colab.js --data-dir "<private-cycle-dir>" --version <ver
|
|
|
47
47
|
|
|
48
48
|
CPU is the default. `--gpu` selects the Colab GPU and passes `--device cuda`; CUDA runs need not be bit-identical to CPU runs. The launcher creates the remote bundle directories, then uploads only the built `training/v1/` and `training/v1-validity/` trainer inputs, the public trainer, and the two public holdout catalogs. It sends a SHA-256 manifest and checks every uploaded file on the VM before each stage. After training, the VM writes a status record with hashes for that stage's outputs; the launcher downloads the record first and verifies each downloaded file against it. Raw observations, relabels, adjudication, history, and private holdouts stay local. Each finished stage is downloaded and calibrated locally before the next task starts. Completed stages are reused on the next invocation, including after a later task fails. The launcher always attempts to stop the VM; if stopping fails, its diagnostic, the session ID, and a manual stop command are included in the CLI error. Set `COLAB_BIN` or pass `--colab` to use a different CLI binary, and optionally pass `--session` to choose its session name.
|
|
49
49
|
|
|
50
|
-
F6 extends per-stage manifest metadata with `referenceOnly`;
|
|
51
|
-
|
|
52
|
-
guide records the separate H1b output enrichment and the
|
|
53
|
-
shape
|
|
50
|
+
F6 extends per-stage manifest metadata with `referenceOnly`; reference-only
|
|
51
|
+
scores are surfaced through the router's reference diagnostics. The routing
|
|
52
|
+
guide records the separate H1b output enrichment and the
|
|
53
|
+
`workflowPlan.systemOne` contract shape.
|
|
54
54
|
|
|
55
55
|
## Run or resume the ordered path
|
|
56
56
|
|
|
@@ -68,7 +68,7 @@ node scripts/system-one-cycle.js all --until publish --data-dir "<private-cycle-
|
|
|
68
68
|
- Cached resume is accepted only when the selected history reproduces its saved baseline, ordered predecessor comparisons, and verdict; incompatible history is rejected without changing history or saved artifacts.
|
|
69
69
|
- Each stage keeps the first compatible historical holdout row as its floor baseline. Later rows record the baseline version and compare against that same row, including after partial recovery.
|
|
70
70
|
- A supplied history path must resolve outside the repository and name a file. Malformed history fails visibly. On POSIX, newly created history directories and files use `0700` and `0600`; existing shared parent permissions are left alone. Windows ACLs remain the operator's responsibility.
|
|
71
|
-
-
|
|
71
|
+
- History has no bound active-version identity, so the active trend is reported as unknown and rollback advisories are withheld. Candidate-to-candidate curve comparisons and their existing verdicts remain available; active-version rollback semantics need an approved identity schema.
|
|
72
72
|
|
|
73
73
|
For a synthetic integration check that does not read local session data or invoke model engines, prepare the earlier stage artifacts and completion entries under `.s1-work/`, then run:
|
|
74
74
|
|
|
@@ -289,22 +289,22 @@ fixed version, weight hash, mode, raw stage probabilities, and thresholded
|
|
|
289
289
|
decision. Unscored stages are `null`. When System One has no active version, the
|
|
290
290
|
field is omitted. User-visible routing text labels the highest stage options
|
|
291
291
|
with their probabilities as reference confidence, never as a verdict; it does
|
|
292
|
-
not print prompt text or artifact paths.
|
|
293
|
-
|
|
292
|
+
not print prompt text or artifact paths. Reference-only scores are available in
|
|
293
|
+
the existing `reference.referenceOnlyOptions` diagnostics, not as a public key
|
|
294
|
+
in `workflowPlan.systemOne`. Checkpoint activation is opt-in and the default
|
|
295
|
+
mode remains `off`.
|
|
294
296
|
|
|
295
297
|
H1b separately authorized the handoff count enrichment at
|
|
296
298
|
`inputEnrichment.handoffFiles`. F6 authorized `referenceOnly` as optional
|
|
297
|
-
per-stage manifest metadata
|
|
298
|
-
|
|
299
|
-
`workflowPlan.systemOne`, so the top-level `referenceOnly` field remains an
|
|
300
|
-
unresolved discrepancy against shared contract B. The seven-field contract
|
|
301
|
-
shape is:
|
|
299
|
+
per-stage manifest metadata. The `workflowPlan.systemOne` contract keeps the
|
|
300
|
+
H1b enrichment and has no top-level `referenceOnly` field:
|
|
302
301
|
|
|
303
302
|
```json
|
|
304
303
|
{
|
|
305
304
|
"version": "<active version id>",
|
|
306
305
|
"sha256": "<first 16 hex digits of tier weights hash>",
|
|
307
306
|
"mode": "live",
|
|
307
|
+
"inputEnrichment": { "handoffFiles": 0 },
|
|
308
308
|
"validity": { "invalid": 0.12 },
|
|
309
309
|
"intents": {
|
|
310
310
|
"explain": 0.1, "discuss": 0.12, "git": 0.1, "fix": 0.81,
|
|
@@ -316,6 +316,9 @@ shape is:
|
|
|
316
316
|
}
|
|
317
317
|
```
|
|
318
318
|
|
|
319
|
+
The separate reference diagnostic can include
|
|
320
|
+
`referenceOnlyOptions: [{ "stage": "intent", "id": "unclassified", "probability": 0.99 }]`.
|
|
321
|
+
|
|
319
322
|
`decision.validity` is `actionable`, `invalid`, or `abstain`. `decision.intents`
|
|
320
323
|
contains up to three above-threshold IDs in probability order. `decision.tier` is
|
|
321
324
|
the unique highest above-threshold tier or `null` when the tier stage abstains.
|
|
@@ -220,13 +220,12 @@ flowchart LR
|
|
|
220
220
|
C --> P{Candidate no worse on all curves?}
|
|
221
221
|
F --> P
|
|
222
222
|
P -->|yes| Promote[Promote]
|
|
223
|
-
P -->|no, two consecutive declines| Rollback[Rollback]
|
|
224
223
|
P -->|otherwise| Hold[Hold]
|
|
225
224
|
```
|
|
226
225
|
|
|
227
226
|
Promotion requires the candidate to tie or improve the previous version on coverage-accuracy
|
|
228
227
|
area, log loss and ECE, and a checked old-holdout floor with no regression. Missing holdout
|
|
229
|
-
scores leave the floor unknown and block promotion.
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
228
|
+
scores leave the floor unknown and block promotion. History has no active-version identity,
|
|
229
|
+
so the active trend is unknown and rollback advisories are withheld. Candidate comparison
|
|
230
|
+
still uses the whole curve; System One scores remain reference confidence, not absolute
|
|
231
|
+
answers.
|
|
@@ -59,7 +59,6 @@ function routeLive(input, result) {
|
|
|
59
59
|
mode: 'live',
|
|
60
60
|
inputEnrichment: { handoffFiles: Number.isSafeInteger(result.inputEnrichment?.handoffFiles)
|
|
61
61
|
? result.inputEnrichment.handoffFiles : 0 },
|
|
62
|
-
referenceOnly,
|
|
63
62
|
validity: validityScores,
|
|
64
63
|
intents,
|
|
65
64
|
tier: tierScores,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
|
|
3
3
|
"name": "harness-everything",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.1",
|
|
5
5
|
"description": "Invariant-first engineering harness for routing, verification, and failure recovery while preserving agent autonomy.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Miya Daniel",
|
|
@@ -59,7 +59,6 @@ function routeLive(input, result) {
|
|
|
59
59
|
mode: 'live',
|
|
60
60
|
inputEnrichment: { handoffFiles: Number.isSafeInteger(result.inputEnrichment?.handoffFiles)
|
|
61
61
|
? result.inputEnrichment.handoffFiles : 0 },
|
|
62
|
-
referenceOnly,
|
|
63
62
|
validity: validityScores,
|
|
64
63
|
intents,
|
|
65
64
|
tier: tierScores,
|
package/sbom.cdx.json
CHANGED
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
"$schema": "https://cyclonedx.org/schema/bom-1.7.schema.json",
|
|
3
3
|
"bomFormat": "CycloneDX",
|
|
4
4
|
"specVersion": "1.7",
|
|
5
|
-
"serialNumber": "urn:uuid:
|
|
5
|
+
"serialNumber": "urn:uuid:7fe0c7fc-6553-526e-b785-2416ed7dd222",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-12-
|
|
8
|
+
"timestamp": "2026-12-04T12:24:23.694Z",
|
|
9
9
|
"tools": [
|
|
10
10
|
{
|
|
11
11
|
"vendor": "Harness Everything",
|
|
12
12
|
"name": "generate-sbom.js",
|
|
13
|
-
"version": "1.6.
|
|
13
|
+
"version": "1.6.1"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
16
|
"component": {
|
|
17
17
|
"type": "application",
|
|
18
|
-
"bom-ref": "pkg:npm/harness-everything@1.6.
|
|
18
|
+
"bom-ref": "pkg:npm/harness-everything@1.6.1",
|
|
19
19
|
"name": "harness-everything",
|
|
20
|
-
"version": "1.6.
|
|
21
|
-
"purl": "pkg:npm/harness-everything@1.6.
|
|
20
|
+
"version": "1.6.1",
|
|
21
|
+
"purl": "pkg:npm/harness-everything@1.6.1"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"components": [
|
|
@@ -2033,7 +2033,7 @@
|
|
|
2033
2033
|
]
|
|
2034
2034
|
},
|
|
2035
2035
|
{
|
|
2036
|
-
"ref": "pkg:npm/harness-everything@1.6.
|
|
2036
|
+
"ref": "pkg:npm/harness-everything@1.6.1",
|
|
2037
2037
|
"dependsOn": [
|
|
2038
2038
|
"pkg:npm/%40commitlint/cli@19.8.1",
|
|
2039
2039
|
"pkg:npm/%40commitlint/config-conventional@19.8.1",
|
package/scripts/dispatch.js
CHANGED
|
@@ -431,13 +431,14 @@ function response(options, outcome, evidence = evidencePaths, input) {
|
|
|
431
431
|
} else if (input && Object.hasOwn(input, 'measuredUsage')) result.usage = input.measuredUsage;
|
|
432
432
|
else if (outcome.phase === 'execution') result.usage = null;
|
|
433
433
|
result.message = message.slice(0, 1000);
|
|
434
|
+
const humanMessage = message.slice(0, 1000);
|
|
434
435
|
if (outcome.argv) result.argv = outcome.argv;
|
|
435
436
|
if (outcome.cwd) result.cwd = outcome.cwd;
|
|
436
437
|
const paths = Object.fromEntries(Object.entries(evidence).filter(([, value]) => value && fs.existsSync(value)));
|
|
437
438
|
if (Object.keys(paths).length) result.evidence = paths;
|
|
438
439
|
if (options['--json']) process.stdout.write(`${JSON.stringify(result)}\n`);
|
|
439
|
-
else if (outcome.exitCode === 0) process.stdout.write(`${
|
|
440
|
-
else process.stderr.write(`dispatch: ${
|
|
440
|
+
else if (outcome.exitCode === 0) process.stdout.write(`${humanMessage}\n`);
|
|
441
|
+
else process.stderr.write(`dispatch: ${humanMessage}\n`);
|
|
441
442
|
process.exitCode = outcome.exitCode;
|
|
442
443
|
}
|
|
443
444
|
|
|
@@ -185,14 +185,6 @@ function noWorse(deltas) {
|
|
|
185
185
|
return deltas.auc >= -EPSILON && deltas.logLoss <= EPSILON && deltas.ece <= EPSILON;
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
function noBetter(deltas) {
|
|
189
|
-
return deltas.auc <= EPSILON && deltas.logLoss >= -EPSILON && deltas.ece >= -EPSILON;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
function strictlyWorse(deltas) {
|
|
193
|
-
return deltas.auc < -EPSILON || deltas.logLoss > EPSILON || deltas.ece > EPSILON;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
188
|
function fmt(value) {
|
|
197
189
|
return `${value >= 0 ? '+' : ''}${value.toFixed(6)}`;
|
|
198
190
|
}
|
|
@@ -394,21 +386,6 @@ function appendHistoryRow(file, history, curves) {
|
|
|
394
386
|
appendPrivateHistory(file, `${JSON.stringify(curves)}\n`);
|
|
395
387
|
}
|
|
396
388
|
|
|
397
|
-
function worseningCycles(history, stages) {
|
|
398
|
-
if (history.length < 3) return null;
|
|
399
|
-
// shortcut: history has no active-version field, so its latest three records stand in for the active trend; upgrade when the shared schema records active identity.
|
|
400
|
-
const [older, previous, active] = history.slice(-3);
|
|
401
|
-
for (const stage of Object.keys(stages)) {
|
|
402
|
-
const a = older.stages?.[stage]; const b = previous.stages?.[stage]; const c = active.stages?.[stage];
|
|
403
|
-
if (!a?.coverageCurve || !b?.coverageCurve || !c?.coverageCurve) continue;
|
|
404
|
-
const first = metricDeltas(comparisonMetrics(b), comparisonMetrics(a));
|
|
405
|
-
const second = metricDeltas(comparisonMetrics(c), comparisonMetrics(b));
|
|
406
|
-
if (!noBetter(first) || !strictlyWorse(first) || !noBetter(second) || !strictlyWorse(second)) continue;
|
|
407
|
-
return { stage, first, second, versions: [older.version, previous.version, active.version] };
|
|
408
|
-
}
|
|
409
|
-
return null;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
389
|
function decideTrend(candidate, history, floor) {
|
|
413
390
|
const reasons = [];
|
|
414
391
|
const previous = history.at(-1);
|
|
@@ -436,16 +413,11 @@ function decideTrend(candidate, history, floor) {
|
|
|
436
413
|
reasons.push(`${stage} old-holdout ${noWorse(metrics.deltas) ? 'curve deltas' : 'regression'}: ${detail}`);
|
|
437
414
|
}
|
|
438
415
|
if (!floorAllowsPromotion && !floor.oldHoldoutRegression) reasons.push(`old-holdout floor ${floor.detail.status}; promotion requires a checked floor`);
|
|
439
|
-
if (candidateNoWorse && floorAllowsPromotion)
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
if (worsening) {
|
|
443
|
-
reasons.push(`${worsening.stage} active curve worsened across two consecutive cycles (${worsening.versions.join(' → ')}): `
|
|
444
|
-
+ `coverage-accuracy AUC ${fmt(worsening.first.auc)}, ${fmt(worsening.second.auc)}; `
|
|
445
|
-
+ `log-loss ${fmt(worsening.first.logLoss)}, ${fmt(worsening.second.logLoss)}; `
|
|
446
|
-
+ `ECE ${fmt(worsening.first.ece)}, ${fmt(worsening.second.ece)}`);
|
|
447
|
-
return { compared: [...history.slice(-3).map(item => item.version), candidate.version], verdict: 'rollback', reasons };
|
|
416
|
+
if (candidateNoWorse && floorAllowsPromotion) {
|
|
417
|
+
reasons.push('active trend is unknown because history has no bound active identity; rollback advisory withheld');
|
|
418
|
+
return { compared: [...history.slice(-3).map(item => item.version), candidate.version], verdict: 'promote', reasons };
|
|
448
419
|
}
|
|
420
|
+
reasons.push('active trend is unknown because history has no bound active identity; rollback advisory withheld');
|
|
449
421
|
return { compared: [...history.slice(-3).map(item => item.version), candidate.version], verdict: 'hold', reasons };
|
|
450
422
|
}
|
|
451
423
|
|