harness-everything 1.5.3 → 1.5.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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +6 -0
- package/benchmarks/results/live-host/agy-2026-12-02-linux-loader/README.md +33 -0
- package/ci/mechanism-548-bigint-identity.test.js +252 -5
- package/ci/mechanism-error-ledger-promote.test.js +122 -1
- package/ci/mechanism-system-one-install.test.js +50 -0
- package/docs/platform-capabilities.md +8 -1
- package/docs/platform-compatibility.json +3 -3
- package/docs/system-one-cycle.md +2 -1
- package/harness-everything/SKILL.md +1 -1
- package/harness-everything/scripts/system-one/cua_adapter.py +4 -2
- package/harness-everything/scripts/system-one/install.js +1 -5
- package/harness-everything/scripts/system-one/manifest.js +7 -3
- package/harness-everything/scripts/system-one/provider.js +3 -4
- 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/cua_adapter.py +4 -2
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/install.js +1 -5
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/manifest.js +7 -3
- package/plugins/harness-everything/skills/harness-everything/scripts/system-one/provider.js +3 -4
- package/sbom.cdx.json +7 -7
- package/scripts/system-one-cycle/package.js +2 -2
|
@@ -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.5.
|
|
13
|
+
"version": "1.5.4",
|
|
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.5.
|
|
4
|
+
"version": "1.5.4",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Miya Daniel"
|
|
7
7
|
},
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.5.4](https://github.com/dyphn1/Harness-everything/compare/v1.5.3...v1.5.4) (2026-12-02)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* **system-one:** unify version ID validation ([678a84b](https://github.com/dyphn1/Harness-everything/commit/678a84b6315bdaecb738efa86d55a5c5773ea310))
|
|
10
|
+
|
|
5
11
|
## [1.5.3](https://github.com/dyphn1/Harness-everything/compare/v1.5.2...v1.5.3) (2026-12-01)
|
|
6
12
|
|
|
7
13
|
### Bug Fixes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Antigravity CLI Linux plugin loading for #514
|
|
2
|
+
|
|
3
|
+
| Field | Observed value |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| Host | Antigravity CLI 1.5.21 |
|
|
6
|
+
| OS | Debian GNU/Linux 13.7, x86_64, kernel 6.18.64 |
|
|
7
|
+
| Node | 24.22.3 |
|
|
8
|
+
| Harness | 1.5.3 at `970f168455e75a5a42b2181e9074b57c78fd7017` |
|
|
9
|
+
| Scope | Global package in a disposable home. Separate clean home for the project-only probe and its control. |
|
|
10
|
+
|
|
11
|
+
## Loader checks
|
|
12
|
+
|
|
13
|
+
Commands below use a disposable profile and a local checkout.
|
|
14
|
+
|
|
15
|
+
| Command or check | Observed result |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| `agy plugin validate --json ./plugins/harness-everything` | Validation succeeded. The host selected `.antigravity-plugin/plugin.json` and found 28 skills, one rule and one hook. It reported two warnings for the other hosts' `hooks/hooks.json` and `plugin.json` plus a no-logo note. |
|
|
18
|
+
| `agy plugin validate --strict --json ./plugins/harness-everything` | Exit 1 with those two warnings. |
|
|
19
|
+
| `agy plugin install <checkout>/plugins/harness-everything` | The CLI installed the package under `<profile>/.gemini/config/plugins/harness-everything`. The installed root `hooks.json` was byte-identical to the source. |
|
|
20
|
+
| `agy plugin list --json` | The installed plugin appeared enabled at version 1.5.3 with the `harness-everything` hook and `AGENTS.md` rule. The separate clean profile listed zero global plugins. |
|
|
21
|
+
|
|
22
|
+
## Lifecycle evidence
|
|
23
|
+
|
|
24
|
+
A temporary Git workspace carried the package at `.agents/plugins/harness-everything/`. A second Git workspace using the same clean profile had no project plugin. In each workspace, `agy --print-timeout 12s --print "Reply with HELLO, with no tool calls." --output-format json` stopped at Google authentication. Neither run produced a lifecycle trace. Project-only loading and global/project isolation therefore remain open.
|
|
25
|
+
|
|
26
|
+
| Acceptance item | Evidence and disposition |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| Global loader | Linux CLI 1.5.21 validation, install and list confirmed above. The macOS and Windows lifecycle samples remain scoped to their recorded versions. |
|
|
29
|
+
| Project-only loader and IDE write tools | Earlier macOS CLI evidence covers temporary project-scope hook discovery. Windows CLI 1.5.17 exercised `write_file` inside and outside its subdirectory workspace. Full isolation and IDE-specific `write_to_file`, `replace_file_content` and `multi_replace_file_content` remain unchecked. |
|
|
30
|
+
| `PostToolUse` outcome | Earlier macOS and Windows shell traces lack structured exit status. The Windows trace preserved unset verification timestamps. Verification credit requires a structured success outcome. |
|
|
31
|
+
| `Stop` | The Windows CLI test observed `NO_TOOL_CALL`, with one continuation for a pending edit and a later allow. Live `model_stop` remains unchecked. |
|
|
32
|
+
|
|
33
|
+
Sources: [PR #513 and macOS host evidence](../agy-2026-11-23/README.md), [Windows read-only handoff](../agy-2026-11-26-516-read-only/README.md), [Windows CLI #516 acceptance](https://github.com/dyphn1/Harness-everything/issues/516#issuecomment-7182359426). Upstream outcome and wait-marker tracking continues under [#538](https://github.com/dyphn1/Harness-everything/issues/538).
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const assert = require('node:assert/strict');
|
|
4
|
+
const crypto = require('node:crypto');
|
|
4
5
|
const fs = require('node:fs');
|
|
5
6
|
const os = require('node:os');
|
|
6
7
|
const path = require('node:path');
|
|
@@ -12,6 +13,8 @@ const walk = require('acorn-walk');
|
|
|
12
13
|
const ROOT = path.resolve(__dirname, '..');
|
|
13
14
|
const REPORT_WRITER = path.join(ROOT, 'scripts', 'report-writer.js');
|
|
14
15
|
const ERRORS_SYNC = path.join(ROOT, 'scripts', 'errors-sync.js');
|
|
16
|
+
const PROMOTE = path.join(ROOT, 'error-ledger-bootstrap', 'scripts', 'promote.js');
|
|
17
|
+
const SCAN = path.join(ROOT, 'error-ledger-bootstrap', 'scripts', 'scan.js');
|
|
15
18
|
const LARGE = 2n ** 60n;
|
|
16
19
|
|
|
17
20
|
function canonical(file) {
|
|
@@ -246,6 +249,197 @@ test('548 errors-sync detects a swapped index whose 64-bit ino collides as Numbe
|
|
|
246
249
|
assert.match(swapCheck.stderr, /target index changed while it was being read/);
|
|
247
250
|
});
|
|
248
251
|
|
|
252
|
+
test('548 errors-sync refuses Number-colliding index identity at publication and preserves bytes', t => {
|
|
253
|
+
assert.equal(Number(LARGE), Number(LARGE + 1n), 'fixture IDs must collide when converted to Number');
|
|
254
|
+
|
|
255
|
+
const root = tempDir(t, 'harness-548-publication-');
|
|
256
|
+
const errorsDir = path.join(root, '.agents', 'harness-everything', 'errors');
|
|
257
|
+
fs.mkdirSync(errorsDir, { recursive: true });
|
|
258
|
+
fs.writeFileSync(path.join(errorsDir, 'E-0001-sample.md'), [
|
|
259
|
+
'---', 'id: E-0001', 'signature: sample-error', 'class: test', 'title: "Sample"',
|
|
260
|
+
'scope: in', 'status: open', '---', '', 'Body.', ''
|
|
261
|
+
].join('\n'));
|
|
262
|
+
const initial = runNode([ERRORS_SYNC, '--root', root]);
|
|
263
|
+
assert.equal(initial.status, 0, initial.stderr || initial.stdout);
|
|
264
|
+
const indexFile = path.join(errorsDir, 'index.jsonl');
|
|
265
|
+
const originalBytes = fs.readFileSync(indexFile);
|
|
266
|
+
|
|
267
|
+
function publicationPreload(file, collide) {
|
|
268
|
+
return writeStatPreload(file, `
|
|
269
|
+
'use strict';
|
|
270
|
+
const fs = require('node:fs');
|
|
271
|
+
const path = require('node:path');
|
|
272
|
+
const indexKey = path.resolve(${JSON.stringify(indexFile)});
|
|
273
|
+
const large = ${LARGE}n;
|
|
274
|
+
const collide = ${JSON.stringify(collide)};
|
|
275
|
+
const originalLstat = fs.lstatSync;
|
|
276
|
+
const originalOpen = fs.openSync;
|
|
277
|
+
const originalFstat = fs.fstatSync;
|
|
278
|
+
const indexFds = new Set();
|
|
279
|
+
let indexReads = 0;
|
|
280
|
+
fs.lstatSync = function (file, options) {
|
|
281
|
+
const result = originalLstat.call(this, file, options);
|
|
282
|
+
if (path.resolve(String(file)) === indexKey) {
|
|
283
|
+
indexReads++;
|
|
284
|
+
const ino = collide && indexReads >= 4 ? large + 1n : large;
|
|
285
|
+
const convert = value => options && options.bigint ? value : Number(value);
|
|
286
|
+
result.dev = convert(large);
|
|
287
|
+
result.ino = convert(ino);
|
|
288
|
+
}
|
|
289
|
+
return result;
|
|
290
|
+
};
|
|
291
|
+
fs.openSync = function (file, ...args) {
|
|
292
|
+
const fd = originalOpen.call(this, file, ...args);
|
|
293
|
+
if (path.resolve(String(file)) === indexKey) indexFds.add(fd);
|
|
294
|
+
return fd;
|
|
295
|
+
};
|
|
296
|
+
fs.fstatSync = function (fd, options) {
|
|
297
|
+
const result = originalFstat.call(this, fd, options);
|
|
298
|
+
if (indexFds.has(fd)) {
|
|
299
|
+
const convert = value => options && options.bigint ? value : Number(value);
|
|
300
|
+
result.dev = convert(large);
|
|
301
|
+
result.ino = convert(large);
|
|
302
|
+
}
|
|
303
|
+
return result;
|
|
304
|
+
};
|
|
305
|
+
`);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const collision = runNode([ERRORS_SYNC, '--root', root], {
|
|
309
|
+
preload: publicationPreload(path.join(root, 'preload-collision.cjs'), true)
|
|
310
|
+
});
|
|
311
|
+
assert.notEqual(collision.status, 0, 'distinct bigint IDs that collide as Number must refuse publication');
|
|
312
|
+
assert.match(collision.stderr, /target index changed before publication/);
|
|
313
|
+
assert.deepEqual(fs.readFileSync(indexFile), originalBytes, 'refusal preserves the prior index bytes');
|
|
314
|
+
assert.equal(fs.readdirSync(errorsDir).some(name => name.endsWith('.tmp')), false,
|
|
315
|
+
'refusal removes the unpublished temporary index');
|
|
316
|
+
|
|
317
|
+
const same = runNode([ERRORS_SYNC, '--root', root], {
|
|
318
|
+
preload: publicationPreload(path.join(root, 'preload-same.cjs'), false)
|
|
319
|
+
});
|
|
320
|
+
assert.equal(same.status, 0, `same-ID positive control failed: ${same.stderr || same.stdout}`);
|
|
321
|
+
assert.deepEqual(fs.readFileSync(indexFile), originalBytes, 'positive control publishes the expected index bytes');
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
test('548 promote refuses Number-colliding opened-index identity before changing the ledger', t => {
|
|
325
|
+
assert.equal(Number(LARGE), Number(LARGE + 1n), 'fixture IDs must collide when converted to Number');
|
|
326
|
+
const scratch = tempDir(t, 'harness-548-promote-');
|
|
327
|
+
const target = path.join(scratch, 'target');
|
|
328
|
+
const errorsDir = path.join(target, '.agents', 'harness-everything', 'errors');
|
|
329
|
+
fs.mkdirSync(errorsDir, { recursive: true });
|
|
330
|
+
fs.writeFileSync(path.join(errorsDir, 'E-0001-fixture.md'), [
|
|
331
|
+
'---', 'id: E-0001', 'signature: fixture', 'class: test', 'title: "Fixture"',
|
|
332
|
+
'scope: in', 'status: lesson', '---', '', 'A synthetic ledger record.', ''
|
|
333
|
+
].join('\n'));
|
|
334
|
+
fs.mkdirSync(path.join(target, 'src'), { recursive: true });
|
|
335
|
+
const parser = path.join(target, 'src', 'parser.js');
|
|
336
|
+
fs.writeFileSync(parser, 'module.exports = value => value;\n');
|
|
337
|
+
function git(args, seconds = 0) {
|
|
338
|
+
const date = new Date(Date.parse('2024-01-02T03:04:05.000Z') + seconds * 1000).toISOString();
|
|
339
|
+
const result = spawnSync('git', ['-C', target, ...args], {
|
|
340
|
+
encoding: 'utf8',
|
|
341
|
+
env: { ...process.env, GIT_CONFIG_NOSYSTEM: '1', HUSKY: '0',
|
|
342
|
+
GIT_AUTHOR_NAME: '548 Fixture', GIT_AUTHOR_EMAIL: 'fixture@example.invalid',
|
|
343
|
+
GIT_COMMITTER_NAME: '548 Fixture', GIT_COMMITTER_EMAIL: 'fixture@example.invalid',
|
|
344
|
+
GIT_AUTHOR_DATE: date, GIT_COMMITTER_DATE: date }
|
|
345
|
+
});
|
|
346
|
+
assert.equal(result.status, 0, `git ${args.join(' ')} failed: ${result.stderr}`);
|
|
347
|
+
}
|
|
348
|
+
git(['init', '-q']);
|
|
349
|
+
git(['add', '-A']);
|
|
350
|
+
git(['commit', '-q', '-m', 'feat: seed parser fixture']);
|
|
351
|
+
fs.writeFileSync(parser, 'module.exports = value => value == null ? "" : value;\n');
|
|
352
|
+
git(['add', '-A']);
|
|
353
|
+
git(['commit', '-q', '-m', 'fix: preserve parser boundary'], 1);
|
|
354
|
+
fs.writeFileSync(parser, 'module.exports = value => String(value ?? "");\n');
|
|
355
|
+
git(['add', '-A']);
|
|
356
|
+
git(['commit', '-q', '-m', 'fix: handle parser edge case'], 2);
|
|
357
|
+
|
|
358
|
+
const sync = runNode([ERRORS_SYNC, '--root', target]);
|
|
359
|
+
assert.equal(sync.status, 0, sync.stderr || sync.stdout);
|
|
360
|
+
const indexFile = path.join(errorsDir, 'index.jsonl');
|
|
361
|
+
const scanDir = path.join(scratch, 'scan');
|
|
362
|
+
const scanned = runNode([SCAN, '--root', target, '--out', scanDir, '--no-memory', '--json']);
|
|
363
|
+
assert.equal(scanned.status, 0, `scanner failed: ${scanned.stderr || scanned.stdout}`);
|
|
364
|
+
const reportPayload = JSON.parse(scanned.stdout);
|
|
365
|
+
const reportFile = reportPayload.reportJson;
|
|
366
|
+
const reportBytes = fs.readFileSync(reportFile);
|
|
367
|
+
const report = JSON.parse(reportBytes.toString('utf8'));
|
|
368
|
+
const candidate = report.candidates.find(item => item.sites.includes('src/parser.js')
|
|
369
|
+
&& item.sources.some(source => source.type === 'git'));
|
|
370
|
+
assert.ok(candidate, 'the real scanner found a durable Git candidate for the target fixture');
|
|
371
|
+
const approvalFile = path.join(scratch, 'approval.json');
|
|
372
|
+
fs.writeFileSync(approvalFile, JSON.stringify({
|
|
373
|
+
schemaVersion: 1,
|
|
374
|
+
candidateId: candidate.id,
|
|
375
|
+
reportSha256: crypto.createHash('sha256').update(reportBytes).digest('hex'),
|
|
376
|
+
targetRoot: fs.realpathSync.native(target),
|
|
377
|
+
approvedBy: 'fixture-owner',
|
|
378
|
+
approvedAt: '2026-11-30T12:00:00.000Z',
|
|
379
|
+
record: {
|
|
380
|
+
signature: 'parser-edge-case', class: 'test-coupling', title: 'Parser edge case regressed',
|
|
381
|
+
violates: 'The parser preserves the approved token boundary.', scope: 'in', status: 'lesson',
|
|
382
|
+
sites: ['src/parser.js'], sourcesNote: 'Synthetic durable source evidence for the collision witness.'
|
|
383
|
+
}
|
|
384
|
+
}, null, 2));
|
|
385
|
+
const before = Object.fromEntries(fs.readdirSync(errorsDir).sort().map(name => [
|
|
386
|
+
name, fs.readFileSync(path.join(errorsDir, name)).toString('base64')
|
|
387
|
+
]));
|
|
388
|
+
|
|
389
|
+
function promotePreload(file, collide) {
|
|
390
|
+
return writeStatPreload(file, `
|
|
391
|
+
'use strict';
|
|
392
|
+
const fs = require('node:fs');
|
|
393
|
+
const path = require('node:path');
|
|
394
|
+
const indexKey = path.resolve(${JSON.stringify(indexFile)});
|
|
395
|
+
const large = ${LARGE}n;
|
|
396
|
+
const collide = ${JSON.stringify(collide)};
|
|
397
|
+
const originalLstat = fs.lstatSync;
|
|
398
|
+
const originalOpen = fs.openSync;
|
|
399
|
+
const originalFstat = fs.fstatSync;
|
|
400
|
+
const indexFds = new Set();
|
|
401
|
+
fs.lstatSync = function (file, options) {
|
|
402
|
+
const result = originalLstat.call(this, file, options);
|
|
403
|
+
if (path.resolve(String(file)) === indexKey) {
|
|
404
|
+
const convert = value => options && options.bigint ? value : Number(value);
|
|
405
|
+
result.dev = convert(large);
|
|
406
|
+
result.ino = convert(large);
|
|
407
|
+
}
|
|
408
|
+
return result;
|
|
409
|
+
};
|
|
410
|
+
fs.openSync = function (file, ...args) {
|
|
411
|
+
const fd = originalOpen.call(this, file, ...args);
|
|
412
|
+
if (path.resolve(String(file)) === indexKey) indexFds.add(fd);
|
|
413
|
+
return fd;
|
|
414
|
+
};
|
|
415
|
+
fs.fstatSync = function (fd, options) {
|
|
416
|
+
const result = originalFstat.call(this, fd, options);
|
|
417
|
+
if (indexFds.has(fd)) {
|
|
418
|
+
const convert = value => options && options.bigint ? value : Number(value);
|
|
419
|
+
result.dev = convert(large);
|
|
420
|
+
result.ino = convert(collide ? large + 1n : large);
|
|
421
|
+
}
|
|
422
|
+
return result;
|
|
423
|
+
};
|
|
424
|
+
`);
|
|
425
|
+
}
|
|
426
|
+
function invoke(preload) {
|
|
427
|
+
return runNode([PROMOTE, '--target', target, '--report', reportFile, '--approval', approvalFile,
|
|
428
|
+
'--harness', ROOT, '--json'], { preload });
|
|
429
|
+
}
|
|
430
|
+
const refused = invoke(promotePreload(path.join(scratch, 'preload-collision.cjs'), true));
|
|
431
|
+
assert.notEqual(refused.status, 0, 'a distinct opened index ID must be refused');
|
|
432
|
+
assert.match(refused.stdout, /index changed while it was being read/);
|
|
433
|
+
const afterRefusal = Object.fromEntries(fs.readdirSync(errorsDir).sort().map(name => [
|
|
434
|
+
name, fs.readFileSync(path.join(errorsDir, name)).toString('base64')
|
|
435
|
+
]));
|
|
436
|
+
assert.deepEqual(afterRefusal, before, 'refusal preserves all ledger names and bytes');
|
|
437
|
+
|
|
438
|
+
const accepted = invoke(promotePreload(path.join(scratch, 'preload-same.cjs'), false));
|
|
439
|
+
assert.equal(accepted.status, 0, `same-ID positive control failed: ${accepted.stderr || accepted.stdout}`);
|
|
440
|
+
assert.equal(JSON.parse(accepted.stdout).ok, true, 'same-ID control reaches successful promotion');
|
|
441
|
+
});
|
|
442
|
+
|
|
249
443
|
// --- Guard: every non-test JS `.ino` access must originate from a `{ bigint: true }` stat call ---
|
|
250
444
|
|
|
251
445
|
const STAT_METHODS = new Set(['statSync', 'lstatSync', 'fstatSync']);
|
|
@@ -271,6 +465,14 @@ function isStatCall(node) {
|
|
|
271
465
|
&& STAT_METHODS.has(node.callee.property.name);
|
|
272
466
|
}
|
|
273
467
|
|
|
468
|
+
function inoPropertyName(node) {
|
|
469
|
+
if (!node.computed && node.property.type === 'Identifier') return node.property.name;
|
|
470
|
+
if (node.computed && node.property.type === 'Literal' && typeof node.property.value === 'string') {
|
|
471
|
+
return node.property.value;
|
|
472
|
+
}
|
|
473
|
+
return null;
|
|
474
|
+
}
|
|
475
|
+
|
|
274
476
|
function hasBigIntTrueOption(callNode) {
|
|
275
477
|
const opts = callNode.arguments[1];
|
|
276
478
|
if (!opts || opts.type !== 'ObjectExpression') return false;
|
|
@@ -294,7 +496,7 @@ function parseProgram(source, file) {
|
|
|
294
496
|
}
|
|
295
497
|
|
|
296
498
|
function findNonBigIntInoViolations(source, label) {
|
|
297
|
-
if (!source.includes('.ino')) return [];
|
|
499
|
+
if (!source.includes('.ino') && !/\bino\b/.test(source)) return [];
|
|
298
500
|
const ast = parseProgram(source, label);
|
|
299
501
|
|
|
300
502
|
// Collect function declarations and expressions by name, plus per-scope variable bindings.
|
|
@@ -347,6 +549,9 @@ function findNonBigIntInoViolations(source, label) {
|
|
|
347
549
|
},
|
|
348
550
|
VariableDeclarator(node, ancestors) {
|
|
349
551
|
if (node.id.type !== 'Identifier') return;
|
|
552
|
+
if (node.init && (node.init.type === 'FunctionExpression' || node.init.type === 'ArrowFunctionExpression')) {
|
|
553
|
+
functions.set(node.id.name, node.init);
|
|
554
|
+
}
|
|
350
555
|
const decl = ancestors[ancestors.length - 2];
|
|
351
556
|
const scope = decl && decl.kind === 'var' ? enclosingFn(ancestors) : nearestScope(ancestors);
|
|
352
557
|
recordBinding(scope, node.id.name, node.init || null);
|
|
@@ -411,8 +616,9 @@ function findNonBigIntInoViolations(source, label) {
|
|
|
411
616
|
return verifyIdentifier(expr.name, scopeNode, fnNode, propPath, seen);
|
|
412
617
|
}
|
|
413
618
|
|
|
414
|
-
if (expr.type === 'MemberExpression'
|
|
415
|
-
|
|
619
|
+
if (expr.type === 'MemberExpression') {
|
|
620
|
+
const property = inoPropertyName(expr);
|
|
621
|
+
if (property) return verifyExpr(expr.object, scopeNode, fnNode, [property, ...propPath], seen);
|
|
416
622
|
}
|
|
417
623
|
|
|
418
624
|
if (expr.type === 'CallExpression' && expr.callee.type === 'Identifier') {
|
|
@@ -424,6 +630,9 @@ function findNonBigIntInoViolations(source, label) {
|
|
|
424
630
|
if (ret.argument) returns.push({ arg: ret.argument, scope: nearestScope(ancestors) });
|
|
425
631
|
},
|
|
426
632
|
});
|
|
633
|
+
if (targetFn.type === 'ArrowFunctionExpression' && targetFn.body.type !== 'BlockStatement') {
|
|
634
|
+
returns.push({ arg: targetFn.body, scope: parentOf.get(targetFn) || ast });
|
|
635
|
+
}
|
|
427
636
|
if (!returns.length) return { ok: false, reason: `${expr.callee.name}() has no return value` };
|
|
428
637
|
let verifiedStat = false;
|
|
429
638
|
for (const ret of returns) {
|
|
@@ -481,8 +690,19 @@ function findNonBigIntInoViolations(source, label) {
|
|
|
481
690
|
|
|
482
691
|
const violations = [];
|
|
483
692
|
walk.ancestor(ast, {
|
|
693
|
+
VariableDeclarator(node, ancestors) {
|
|
694
|
+
if (node.id.type !== 'ObjectPattern' || !node.init) return;
|
|
695
|
+
const hasIno = node.id.properties.some(property => property.type === 'Property'
|
|
696
|
+
&& ((property.key.type === 'Identifier' && property.key.name === 'ino')
|
|
697
|
+
|| (property.key.type === 'Literal' && property.key.value === 'ino')));
|
|
698
|
+
if (!hasIno) return;
|
|
699
|
+
const scopeNode = nearestScope(ancestors);
|
|
700
|
+
const fnNode = enclosingFn(ancestors);
|
|
701
|
+
const check = verifyExpr(node.init, scopeNode, fnNode, [], new Set());
|
|
702
|
+
if (!check.ok) violations.push(`${label}:${node.loc.start.line}: destructured ino from ${check.reason}`);
|
|
703
|
+
},
|
|
484
704
|
MemberExpression(node, ancestors) {
|
|
485
|
-
if (node
|
|
705
|
+
if (inoPropertyName(node) !== 'ino') return;
|
|
486
706
|
const scopeNode = nearestScope(ancestors);
|
|
487
707
|
const fnNode = enclosingFn(ancestors);
|
|
488
708
|
const check = verifyExpr(node.object, scopeNode, fnNode, [], new Set());
|
|
@@ -506,14 +726,41 @@ test('548 guard: every non-test JS .ino access comes from a { bigint: true } sta
|
|
|
506
726
|
`;
|
|
507
727
|
const goodSample = `
|
|
508
728
|
const fs = require('node:fs');
|
|
509
|
-
|
|
729
|
+
const same = (a, b) => {
|
|
510
730
|
const x = fs.statSync(a, { bigint: true });
|
|
511
731
|
const y = fs.statSync(b, { bigint: true });
|
|
512
732
|
return x.ino > 0n && x.dev === y.dev && x.ino === y.ino;
|
|
733
|
+
};
|
|
734
|
+
`;
|
|
735
|
+
const destructuredNumberSample = `
|
|
736
|
+
const fs = require('node:fs');
|
|
737
|
+
function same(a, b) {
|
|
738
|
+
const { ino: left } = fs.statSync(a);
|
|
739
|
+
const { ino: right } = fs.statSync(b);
|
|
740
|
+
return left === right;
|
|
741
|
+
}
|
|
742
|
+
`;
|
|
743
|
+
const computedNumberSample = `
|
|
744
|
+
const fs = require('node:fs');
|
|
745
|
+
function same(a, b) {
|
|
746
|
+
const left = fs.statSync(a);
|
|
747
|
+
const right = fs.statSync(b);
|
|
748
|
+
return left['ino'] === right['ino'];
|
|
513
749
|
}
|
|
514
750
|
`;
|
|
751
|
+
const arrowHelperSample = `
|
|
752
|
+
const fs = require('node:fs');
|
|
753
|
+
const stat = file => fs.statSync(file, { bigint: true });
|
|
754
|
+
const same = (a, b) => stat(a).ino === stat(b).ino;
|
|
755
|
+
`;
|
|
515
756
|
assert.ok(findNonBigIntInoViolations(badSample, 'bad.js').length > 0, 'guard must fail on Number-ino comparison');
|
|
757
|
+
assert.ok(findNonBigIntInoViolations(destructuredNumberSample, 'destructured.js').length > 0,
|
|
758
|
+
'guard must fail on Number-ino reads through destructuring');
|
|
759
|
+
assert.ok(findNonBigIntInoViolations(computedNumberSample, 'computed.js').length > 0,
|
|
760
|
+
'guard must fail on Number-ino reads through computed access');
|
|
516
761
|
assert.deepEqual(findNonBigIntInoViolations(goodSample, 'good.js'), [], 'guard must accept bigint-ino comparison');
|
|
762
|
+
assert.deepEqual(findNonBigIntInoViolations(arrowHelperSample, 'arrow-helper.js'), [],
|
|
763
|
+
'guard must trace a valid const arrow helper');
|
|
517
764
|
|
|
518
765
|
const files = listNonTestJsFiles(ROOT).sort();
|
|
519
766
|
const checkedWithIno = [];
|
|
@@ -129,10 +129,11 @@ function writeApproval(value, file = path.join(TMP, 'approval.json')) {
|
|
|
129
129
|
return file;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
function invoke(target, report, approval, harness = ROOT, extraEnv = {}) {
|
|
132
|
+
function invoke(target, report, approval, harness = ROOT, extraEnv = {}, preload = null) {
|
|
133
133
|
const env = { ...process.env, ...extraEnv };
|
|
134
134
|
delete env.HARNESS_SYSTEM_ONE_MODE;
|
|
135
135
|
return childProcess.spawnSync(process.execPath, [
|
|
136
|
+
...(preload ? ['-r', preload] : []),
|
|
136
137
|
SCRIPT, '--target', target, '--report', report,
|
|
137
138
|
'--approval', approval, '--harness', harness, '--json'
|
|
138
139
|
], { cwd: ROOT, encoding: 'utf8', env });
|
|
@@ -222,6 +223,83 @@ function makeSyncHarness(name, afterWrite, duringRollback = '') {
|
|
|
222
223
|
return harness;
|
|
223
224
|
}
|
|
224
225
|
|
|
226
|
+
function writeRollbackIdentityPreload(fixture, file, { site, mismatch, previousIndex }) {
|
|
227
|
+
const indexFile = path.join(fixture.errorsDir, 'index.jsonl');
|
|
228
|
+
const recordFile = path.join(fixture.errorsDir, 'E-0002-parser-edge-case.md');
|
|
229
|
+
const finalIndexStat = previousIndex ? 4 : 3;
|
|
230
|
+
write(file, `
|
|
231
|
+
'use strict';
|
|
232
|
+
const fs = require('node:fs');
|
|
233
|
+
const path = require('node:path');
|
|
234
|
+
const indexKey = path.resolve(${JSON.stringify(indexFile)});
|
|
235
|
+
const recordKey = path.resolve(${JSON.stringify(recordFile)});
|
|
236
|
+
const large = 2n ** 60n;
|
|
237
|
+
const mismatch = ${JSON.stringify(mismatch)};
|
|
238
|
+
const site = ${JSON.stringify(site)};
|
|
239
|
+
const finalIndexStat = ${finalIndexStat};
|
|
240
|
+
const originalLstat = fs.lstatSync;
|
|
241
|
+
const originalOpen = fs.openSync;
|
|
242
|
+
const originalFstat = fs.fstatSync;
|
|
243
|
+
const indexFds = new Set();
|
|
244
|
+
const recordFds = new Set();
|
|
245
|
+
let indexStatCount = 0;
|
|
246
|
+
let pendingIndexIno = large;
|
|
247
|
+
fs.lstatSync = function (file, options) {
|
|
248
|
+
const result = originalLstat.call(this, file, options);
|
|
249
|
+
const key = path.resolve(String(file));
|
|
250
|
+
if (options && options.bigint && key === indexKey) {
|
|
251
|
+
indexStatCount++;
|
|
252
|
+
pendingIndexIno = large + (site.startsWith('index-') && mismatch && indexStatCount === finalIndexStat ? 1n : 0n);
|
|
253
|
+
result.dev = large;
|
|
254
|
+
result.ino = pendingIndexIno;
|
|
255
|
+
} else if (options && options.bigint && key === recordKey) {
|
|
256
|
+
result.dev = large;
|
|
257
|
+
result.ino = large + (site === 'new-record' && mismatch ? 1n : 0n);
|
|
258
|
+
}
|
|
259
|
+
return result;
|
|
260
|
+
};
|
|
261
|
+
fs.openSync = function (file, ...args) {
|
|
262
|
+
const fd = originalOpen.call(this, file, ...args);
|
|
263
|
+
const key = path.resolve(String(file));
|
|
264
|
+
if (key === indexKey) indexFds.add(fd);
|
|
265
|
+
if (key === recordKey) recordFds.add(fd);
|
|
266
|
+
return fd;
|
|
267
|
+
};
|
|
268
|
+
fs.fstatSync = function (fd, options) {
|
|
269
|
+
const result = originalFstat.call(this, fd, options);
|
|
270
|
+
if (options && options.bigint && indexFds.has(fd)) {
|
|
271
|
+
result.dev = large;
|
|
272
|
+
result.ino = pendingIndexIno;
|
|
273
|
+
} else if (options && options.bigint && recordFds.has(fd)) {
|
|
274
|
+
result.dev = large;
|
|
275
|
+
result.ino = large;
|
|
276
|
+
}
|
|
277
|
+
return result;
|
|
278
|
+
};
|
|
279
|
+
`);
|
|
280
|
+
return { indexFile, recordFile };
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
function replaceAfterWrite(site, replacementCopy) {
|
|
284
|
+
const errorsDir = "path.join(args[args.indexOf('--root') + 1], '.agents', 'harness-everything', 'errors')";
|
|
285
|
+
if (site === 'new-record') {
|
|
286
|
+
return [
|
|
287
|
+
` const file = path.join(${errorsDir}, 'E-0002-parser-edge-case.md');`,
|
|
288
|
+
' const temporary = `${file}.replacement`;',
|
|
289
|
+
" fs.writeFileSync(temporary, Buffer.concat([fs.readFileSync(file), Buffer.from('\\n<!-- replacement record -->\\n')]));",
|
|
290
|
+
` fs.copyFileSync(temporary, ${JSON.stringify(replacementCopy)});`,
|
|
291
|
+
' fs.renameSync(temporary, file);'
|
|
292
|
+
].join('\n');
|
|
293
|
+
}
|
|
294
|
+
return [
|
|
295
|
+
` const file = path.join(${errorsDir}, 'index.jsonl');`,
|
|
296
|
+
' const temporary = `${file}.replacement`;',
|
|
297
|
+
` fs.copyFileSync(file, ${JSON.stringify(replacementCopy)});`,
|
|
298
|
+
' fs.copyFileSync(file, temporary);',
|
|
299
|
+
' fs.renameSync(temporary, file);'
|
|
300
|
+
].join('\n');
|
|
301
|
+
}
|
|
302
|
+
|
|
225
303
|
try {
|
|
226
304
|
// The whole happy path uses the real CLI and target-root sync implementation.
|
|
227
305
|
const success = seedFixture();
|
|
@@ -405,6 +483,49 @@ try {
|
|
|
405
483
|
`rollback recognizes its own replacement, removes the new record, and restores prior index bytes: ${syncFailureResult.error}`);
|
|
406
484
|
assert.equal(runSync(syncFailure.root).status, 0, 'the target index remains current after rollback');
|
|
407
485
|
|
|
486
|
+
assert.equal(Number(2n ** 60n), Number((2n ** 60n) + 1n),
|
|
487
|
+
'rollback fixture IDs must be distinct bigint values that collide as Number');
|
|
488
|
+
function checkRollbackIdentity(site, mismatch) {
|
|
489
|
+
const fixture = seedFixture();
|
|
490
|
+
const indexFile = path.join(fixture.errorsDir, 'index.jsonl');
|
|
491
|
+
const previousIndex = site !== 'index-missing';
|
|
492
|
+
if (!previousIndex) fs.unlinkSync(indexFile);
|
|
493
|
+
const before = snapshot(fixture.errorsDir);
|
|
494
|
+
const replacementCopy = path.join(TMP, `rollback-${site}-${mismatch ? 'mismatch' : 'match'}.replacement`);
|
|
495
|
+
const harness = makeSyncHarness(`rollback-${site}-${mismatch ? 'mismatch' : 'match'}-harness`,
|
|
496
|
+
replaceAfterWrite(site, replacementCopy));
|
|
497
|
+
const preload = path.join(TMP, `rollback-${site}-${mismatch ? 'mismatch' : 'match'}.cjs`);
|
|
498
|
+
const { recordFile } = writeRollbackIdentityPreload(fixture, preload, { site, mismatch, previousIndex });
|
|
499
|
+
const result = resultFor(invoke(fixture.root, fixture.report, fixture.approval, harness, {}, preload), 1);
|
|
500
|
+
assert.equal(result.ok, false, 'the injected final check fails after successful publication');
|
|
501
|
+
|
|
502
|
+
const after = snapshot(fixture.errorsDir);
|
|
503
|
+
if (mismatch && site.startsWith('index-')) {
|
|
504
|
+
assert.match(result.error, site === 'index-missing'
|
|
505
|
+
? /index changed before the owned replacement could be removed/
|
|
506
|
+
: /index changed before the owned replacement could be restored/);
|
|
507
|
+
assert.equal(fs.existsSync(recordFile), false, 'matched record identity lets rollback remove its own record');
|
|
508
|
+
assert.deepEqual(fs.readFileSync(indexFile), fs.readFileSync(replacementCopy),
|
|
509
|
+
'mismatched index identity preserves the replacement index bytes');
|
|
510
|
+
assert.notDeepEqual(after, before, 'the refusal remains visible as a recovery state');
|
|
511
|
+
} else if (mismatch) {
|
|
512
|
+
assert.match(result.error, /new record was replaced by another writer/);
|
|
513
|
+
assert.deepEqual(fs.readFileSync(recordFile), fs.readFileSync(replacementCopy),
|
|
514
|
+
'mismatched record identity preserves the replacement record bytes');
|
|
515
|
+
assert.deepEqual(fs.readFileSync(indexFile), Buffer.from(before['index.jsonl'], 'base64'),
|
|
516
|
+
'the independent matched index identity restores the prior index');
|
|
517
|
+
assert.notDeepEqual(after, before, 'the preserved replacement record remains visible');
|
|
518
|
+
} else {
|
|
519
|
+
assert.match(result.error, /injected final check failure; ledger restored to its pre-promotion state/);
|
|
520
|
+
assert.deepEqual(after, before, 'matched bigint identities allow the same rollback branch to complete');
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
for (const site of ['index-missing', 'index-existing', 'new-record']) {
|
|
525
|
+
checkRollbackIdentity(site, true);
|
|
526
|
+
checkRollbackIdentity(site, false);
|
|
527
|
+
}
|
|
528
|
+
|
|
408
529
|
const rollbackContention = seedFixture();
|
|
409
530
|
const secondCandidate = rollbackContention.reportJson.candidates.find(candidate =>
|
|
410
531
|
candidate.id !== rollbackContention.selected.id && candidate.sources.some(source => source.type === 'git'));
|
|
@@ -67,6 +67,56 @@ test('S1-I01 local install copies the manifest-shaped checkpoint without activat
|
|
|
67
67
|
} finally { remove(root, home); }
|
|
68
68
|
});
|
|
69
69
|
|
|
70
|
+
test('443 R4: cycle, publish, install, manifest and both runtimes agree on version IDs', t => {
|
|
71
|
+
const root = tempDir('harness-s1-version-repo-');
|
|
72
|
+
const home = tempDir('harness-s1-version-home-');
|
|
73
|
+
t.after(() => remove(root, home));
|
|
74
|
+
const { validateVersion, publishVersion } = require('../scripts/system-one-cycle/package');
|
|
75
|
+
const adapterDir = path.dirname(script);
|
|
76
|
+
const python = process.env.PYTHON || (process.platform === 'win32' ? 'python' : 'python3');
|
|
77
|
+
const activeFile = path.join(home, 'active.json');
|
|
78
|
+
const loadAdapter = () => spawnSync(python, ['-B', '-c',
|
|
79
|
+
"import sys; sys.path.insert(0,sys.argv[2]); import cua_adapter; b=cua_adapter.load_active_bundle(sys.argv[1], scorer_loader=lambda *_: (lambda _r: [], {})); print(b['version'])",
|
|
80
|
+
activeFile, adapterDir], { encoding: 'utf8' });
|
|
81
|
+
const env = { ...process.env, HARNESS_SYSTEM_ONE_HOME: home };
|
|
82
|
+
const version = 's1-2026-12';
|
|
83
|
+
const source = makeRepo(root, version, '.safetensors');
|
|
84
|
+
const manifestFile = path.join(source, 'manifest.json');
|
|
85
|
+
const manifest = JSON.parse(fs.readFileSync(manifestFile, 'utf8'));
|
|
86
|
+
const installed = install.installVersion(root, version, home);
|
|
87
|
+
const pointer = install.activate(version, home);
|
|
88
|
+
assert.equal(validateVersion(version), version);
|
|
89
|
+
assert.equal(validateVersionManifest(manifest).version, version);
|
|
90
|
+
assert.equal(readActive(env)?.version, version);
|
|
91
|
+
const live = loadAdapter();
|
|
92
|
+
assert.equal(live.status, 0, live.stderr);
|
|
93
|
+
assert.equal(live.stdout.trim(), version);
|
|
94
|
+
assert.equal(validateVersion('v' + '1'.repeat(79)).length, 80);
|
|
95
|
+
|
|
96
|
+
for (const invalid of ['S1-2026-12', 'v' + '1'.repeat(80), '', '../model', 'a/b', 'a\\b', '.hidden', 'v1\n']) {
|
|
97
|
+
const witness = JSON.stringify(invalid);
|
|
98
|
+
assert.throws(() => validateVersion(invalid), /invalid --version/, witness);
|
|
99
|
+
assert.throws(() => publishVersion({ dataDir: root, version: invalid }), /invalid --version/, witness);
|
|
100
|
+
assert.throws(() => install.installVersion(root, invalid, home), /invalid-version/, witness);
|
|
101
|
+
assert.throws(() => install.activate(invalid, home), /invalid-version/, witness);
|
|
102
|
+
assert.throws(() => validateVersionManifest({ ...manifest, version: invalid }), /invalid-manifest/, witness);
|
|
103
|
+
assert.deepEqual(JSON.parse(fs.readFileSync(activeFile)), pointer, witness);
|
|
104
|
+
|
|
105
|
+
// A previous version does not participate in manifest validation.
|
|
106
|
+
for (const field of ['previous', 'version']) {
|
|
107
|
+
fs.writeFileSync(activeFile, JSON.stringify({ ...pointer, [field]: invalid }));
|
|
108
|
+
assert.throws(() => install.readActive(home), /invalid-active-pointer/, witness);
|
|
109
|
+
assert.equal(readActive(env), null, witness);
|
|
110
|
+
const rejected = loadAdapter();
|
|
111
|
+
assert.equal(rejected.error, undefined);
|
|
112
|
+
assert.equal(rejected.status, 1, witness);
|
|
113
|
+
assert.match(rejected.stderr, /ValueError: active-pointer/, witness);
|
|
114
|
+
}
|
|
115
|
+
fs.writeFileSync(activeFile, JSON.stringify(pointer));
|
|
116
|
+
}
|
|
117
|
+
assert.equal(readActive(env)?.dir, installed.dir);
|
|
118
|
+
});
|
|
119
|
+
|
|
70
120
|
test('S1-I02 install rejects a tampered stage hash before copying any version', () => {
|
|
71
121
|
const root = tempDir('harness-s1-repo-'); const home = tempDir('harness-s1-home-');
|
|
72
122
|
try {
|
|
@@ -45,6 +45,13 @@ can therefore coexist with unresolved changes. The coordinator owns
|
|
|
45
45
|
even when the hook is silent. The source and package fixtures cover these
|
|
46
46
|
behaviors. Windows host delivery remains to be verified.
|
|
47
47
|
|
|
48
|
+
### Antigravity Linux plugin loading
|
|
49
|
+
|
|
50
|
+
[AGY CLI 1.5.21 evidence](../benchmarks/results/live-host/agy-2026-12-02-linux-loader/README.md)
|
|
51
|
+
records validation, global installation and enabled-plugin discovery on
|
|
52
|
+
Debian 13.7. The project-only and clean control sessions stopped at
|
|
53
|
+
authentication before lifecycle evidence was available.
|
|
54
|
+
|
|
48
55
|
### Antigravity Windows shell handoff
|
|
49
56
|
|
|
50
57
|
[AGY CLI 1.5.17 evidence](../benchmarks/results/live-host/agy-2026-11-26-516-read-only/README.md)
|
|
@@ -88,7 +95,7 @@ A shared matcher (`hooks/scripts/lib/ledger-match.js`) selects workspace ledger
|
|
|
88
95
|
| Platform surface | Standalone skills | Plugin support | Hooks/lifecycle | Project scope | Global scope | Current evidence boundary |
|
|
89
96
|
| --- | --- | --- | --- | --- | --- | --- |
|
|
90
97
|
| Codex | `Supported` | `Mechanism verified` | `Partial`: user-hook compatibility capture is live-verified for `UserPromptSubmit` and `Stop` on one Windows Codex CLI host; native plugin hooks remain mechanism-verified | `.agents/skills/`, `AGENTS.md` | `~/.agents/skills/` | [Live evidence](../benchmarks/results/live-host/codex-2026-10-13/README.md) verifies two consecutive turns on Codex CLI 0.162.1; native plugin mounting, other lifecycle events, and other versions remain unverified. |
|
|
91
|
-
| Antigravity (AGY) | `Supported` | `Partial` (`Mechanism verified`; global Desktop App `2.34.0` load and `agy` CLI `1.5.15` `validate`/`list --json` live-verified on macOS, plus `agy` CLI `1.5.16` `validate`/`list --json` on Windows; `validate --strict` fails on 2 multi-host warnings; temp `.agents/plugins/` hook discovery observed via `agy --print`) | `Partial`: `Mechanism verified` for all adapters; Desktop App `2.34.0` + CLI `1.5.15` (macOS) live-verified `SessionStart`, `PreInvocation` dedup, `PreToolUse` (`write_file`/`run_command`), `PostToolUse` edit tracking, and `Stop` (`NO_TOOL_CALL`); Windows Desktop + CLI `1.5.16` (`harness-everything` `1.0.1`) live-verified `SessionStart`, `PreInvocation`, and bounded 1-continuation `Stop`; `PostToolUse` omits `exitCode`/`error` on shell outcomes on macOS `2.34.0`/CLI `1.5.15` and Windows Desktop, so unknown shell outcomes grant no verification credit (`exitCode === 0` required); IDE write tools (`write_to_file`/`replace_file_content`/`multi_replace_file_content`) and live `model_stop` remain mechanism-only | `.agents/plugins/harness-everything/`, `.agents/rules/AGENTS.md` | `~/.gemini/config/plugins/harness-everything/` | [Mechanism evidence](../benchmarks/results/live-host/agy-2026-11-22/README.md) + [macOS partial live-host evidence](../benchmarks/results/live-host/agy-2026-11-23/README.md) + [Windows partial live-host evidence](../benchmarks/results/live-host/agy-2026-11-25/README.md); `/hooks` TUI view, full project-scope `harness-everything` isolation, IDE write tools, live shell `exitCode: 0` verification credit, and live `Stop` `model_stop` remain open in issue #514. |
|
|
98
|
+
| Antigravity (AGY) | `Supported` | `Partial` (`Mechanism verified`; global Desktop App `2.34.0` load and `agy` CLI `1.5.15` `validate`/`list --json` live-verified on macOS, plus `agy` CLI `1.5.16` `validate`/`list --json` on Windows and CLI `1.5.21` global validation, installation and discovery on Linux; `validate --strict` fails on 2 multi-host warnings; temp `.agents/plugins/` hook discovery observed via `agy --print`) | `Partial`: `Mechanism verified` for all adapters; Desktop App `2.34.0` + CLI `1.5.15` (macOS) live-verified `SessionStart`, `PreInvocation` dedup, `PreToolUse` (`write_file`/`run_command`), `PostToolUse` edit tracking, and `Stop` (`NO_TOOL_CALL`); Windows Desktop + CLI `1.5.16` (`harness-everything` `1.0.1`) live-verified `SessionStart`, `PreInvocation`, and bounded 1-continuation `Stop`; `PostToolUse` omits `exitCode`/`error` on shell outcomes on macOS `2.34.0`/CLI `1.5.15` and Windows Desktop, so unknown shell outcomes grant no verification credit (`exitCode === 0` required); IDE write tools (`write_to_file`/`replace_file_content`/`multi_replace_file_content`) and live `model_stop` remain mechanism-only | `.agents/plugins/harness-everything/`, `.agents/rules/AGENTS.md` | `~/.gemini/config/plugins/harness-everything/` | [Mechanism evidence](../benchmarks/results/live-host/agy-2026-11-22/README.md) + [macOS partial live-host evidence](../benchmarks/results/live-host/agy-2026-11-23/README.md) + [Windows partial live-host evidence](../benchmarks/results/live-host/agy-2026-11-25/README.md) + [Linux CLI loader evidence](../benchmarks/results/live-host/agy-2026-12-02-linux-loader/README.md); `/hooks` TUI view, full project-scope `harness-everything` isolation, IDE write tools, live shell `exitCode: 0` verification credit, and live `Stop` `model_stop` remain open in issue #514. |
|
|
92
99
|
| ChatGPT / OpenAI Plugin | `Unknown` for a repository-local standalone path | `Mechanism verified` | `Partial`: local Work/Codex hooks are separate from ordinary Chat | Managed workspace marketplace | Not established | The public Skills-only bundle is mechanically reproducible; import, approval, and live behavior remain `Unknown`. |
|
|
93
100
|
| Claude Code | `Supported` | `Supported` | `Mechanism verified` for Harness configuration | `.claude/skills/` | `~/.claude/skills/` | Native Claude surfaces and the state-specific plugin sync command are mechanically checked; fresh-host execution is not preserved here. |
|
|
94
101
|
| OpenCode | `Supported` | `Partial` (V2 plugin API only; OpenCode 1.x / V1 unsupported; V2 default-export load verified live on OpenCode 2.1.3 macOS via server-log only, in the 2.1.4 macOS 26.6.2 V2 lifecycle trace and 2.1.4 macOS workspace trace, and in the 2.4.1 macOS 26.7.3 long-lived server runs; full router injection trace remains mechanism-tested on V2) | `Partial` (V2 default-export load, V2 tool hooks, V2 event envelope + `session.execution.succeeded`, and completion → verification → reminder delivery on a long-lived server are live-observed on OpenCode 2.1.4 macOS 26.6.2; observation recording + training export — with router/context injection indirectly observed as the model emitted the injected label contract — and mid-turn live steering delivery shape are live-observed on OpenCode 2.4.1 macOS 26.7.3 on a long-lived server; E-0003 ledger-lesson context delivery after a matched `git commit` is live-observed on OpenCode 2.4.1 macOS (paired run, after the action); full router/context injection trace, lesson delivery before the action, session create/delete reset, and cancellation remain mechanism-verified only; retained 1.18.31 project-scope `.js` loading and edit/verification state artifact is historical/unsupported V1 evidence) | `.opencode/skills/`, `.agents/skills/`, `.opencode/plugins/` | `~/.config/opencode/skills/`, `~/.agents/skills/`, `~/.config/opencode/plugins/` | **V2-only support boundary (#453):** OpenCode V2 plugin API family only (OpenCode 1.x / V1 unsupported; no validated minimum patch version claimed). Tested V2 live observations: an isolated [OpenCode 2.1.4/macOS 26.6.2 V2 lifecycle trace](../benchmarks/results/live-host/opencode-2026-11-24-v2-lifecycle/README.md) (one host/version/run establishing V2 default-export load, V2 tool hooks, V2 event envelope + `session.execution.succeeded` completion, and completion → verification → reminder delivery on a long-lived server; `opencode run --standalone` exits before verification finishes), V2 default-export load on OpenCode 2.1.3 (macOS, 2026-10-23, server-log evidence only), a separate [OpenCode 2.1.4/macOS session workspace trace](../benchmarks/results/live-host/opencode-2026-11-15-workspace/README.md) observing `ctx.session.get({sessionID})` returning `location.directory` for two sessions matching setup (no mismatch test or V2 hook fire), and two isolated OpenCode 2.4.1/macOS 26.7.3 long-lived server runs (`OPENCODE_PASSWORD` required): [turn → export trace](../benchmarks/results/live-host/opencode-2026-11-28-397-turn-export/README.md) (observation recording for two turns + idempotent training export; router/context injection indirectly observed as the model emitted the injected label contract, not a full injection trace) and [steering trace](../benchmarks/results/live-host/opencode-2026-11-28-450-steering-trace/README.md) (mid-turn live steering delivery shape, witness-only for #450). Full router/context injection trace, ledger lessons, session create/delete reset, cancellation, and workspace mismatch handling remain mechanism evidence only. [Retained historical/unsupported V1 evidence](../benchmarks/results/live-host/opencode-2026-09-16/README.md) (OpenCode 1.18.31, macOS) documents project-scope `.js` loading and edit/verification state in one V1 host session, with a post-reset final snapshot, hard lock only an interactive observation with no retained blocked-tool trace, and operator-seeded then agent-rewritten reflection; it is preserved as historical/unsupported evidence only and does not establish current V2 support. `.mjs` auto-discovery is silently ignored (issue #127); global scope, npm-package installation, and other host versions remain unverified (as do other OSes). |
|
|
@@ -290,15 +290,15 @@
|
|
|
290
290
|
],
|
|
291
291
|
"capabilities": {
|
|
292
292
|
"standaloneSkills": {"status": "Supported", "notes": "Harness bundles all 28 canonical skills in plugins/harness-everything/skills/ and syncs rules/AGENTS.md; standalone AGY skill-only targets are not separately registered in installer.js."},
|
|
293
|
-
"pluginSupport": {"status": "Partial", "paths": {"manifest": [".antigravity-plugin/plugin.json"], "project": [".agents/plugins/harness-everything"], "global": ["~/.gemini/config/plugins/harness-everything"]}, "notes": "Package parity is mechanism-verified; global Desktop App 2.34.0 (macOS) GetAllPlugins load and agy CLI 1.5.15 validate/list --json are live-verified (validate exits 0 with 2 multi-host warnings; --strict exits 1). Project-scope .agents/plugins/ hook discovery was observed on agy CLI 1.5.15 via a temporary probe plugin; full project-scope harness-everything isolation and Desktop App project scope remain unverified."},
|
|
293
|
+
"pluginSupport": {"status": "Partial", "paths": {"manifest": [".antigravity-plugin/plugin.json"], "project": [".agents/plugins/harness-everything"], "global": ["~/.gemini/config/plugins/harness-everything"]}, "notes": "Package parity is mechanism-verified; global Desktop App 2.34.0 (macOS) GetAllPlugins load and agy CLI 1.5.15 validate/list --json are live-verified (validate exits 0 with 2 multi-host warnings; --strict exits 1). Linux agy CLI 1.5.21 also validated, installed and listed the global plugin. Project-scope .agents/plugins/ hook discovery was observed on agy CLI 1.5.15 via a temporary probe plugin; full project-scope harness-everything isolation and Desktop App project scope remain unverified."},
|
|
294
294
|
"bundledSkills": {"status": "Mechanism verified", "paths": {"skills": ["plugins/harness-everything/skills/<name>/SKILL.md"]}, "notes": "Package checks verify all 28 canonical skills, and agy plugin validate --json (1.5.15) counted skills: 28; live invocation across all 28 skills remains unverified."},
|
|
295
295
|
"hooksLifecycle": {"status": "Partial", "notes": "Deterministic mechanism tests cover SessionStart, PreInvocation, PreToolUse, PostToolUse, and Stop. Desktop App 2.34.0 and CLI 1.5.15 (macOS) live-verified SessionStart, PreInvocation, PreToolUse (write_file/run_command), PostToolUse edit timestamps, and Stop (NO_TOOL_CALL). Host limits: PostToolUse omits exitCode and error on shell non-zero exit (1) on both Desktop 2.34.0 and CLI 1.5.15, so unknown shell outcomes grant no verification credit and preserve failed state (explicit exitCode === 0 required); IDE write tools (write_to_file, replace_file_content, multi_replace_file_content) and live Stop model_stop remain unverified."},
|
|
296
296
|
"projectScope": {"status": "Partial", "paths": {"plugins": [".agents/plugins/harness-everything"], "rules": [".agents/rules/AGENTS.md"]}, "notes": "agy CLI 1.5.15 plugin list --json only lists global plugins, while agy --print discovered and executed project-scope .agents/plugins/ hooks from a temporary probe plugin. Full project-scope harness-everything isolation without global install and Desktop App project-scope loading remain unverified."},
|
|
297
|
-
"globalScope": {"status": "Partial", "paths": {"plugins": ["~/.gemini/config/plugins/harness-everything"]}, "notes": "Global load and hook execution are live-verified on Antigravity 2.0 Desktop App 2.34.0 (macOS), agy CLI 1.5.15 (macOS), and Windows Antigravity Desktop + agy CLI 1.5.16
|
|
297
|
+
"globalScope": {"status": "Partial", "paths": {"plugins": ["~/.gemini/config/plugins/harness-everything"]}, "notes": "Global load and hook execution are live-verified on Antigravity 2.0 Desktop App 2.34.0 (macOS), agy CLI 1.5.15 (macOS), and Windows Antigravity Desktop + agy CLI 1.5.16. Linux agy CLI 1.5.21 verified global installation and discovery. Linux lifecycle hooks and other AGY versions remain unverified."},
|
|
298
298
|
"installUninstallSymmetry": {"status": "Mechanism verified", "notes": "scripts/plugin-sync.js --host agy install/update/dry-run and staged rollback are covered by mechanism tests and synced live to global scope; plugin-sync.js does not provide uninstall symmetry."},
|
|
299
299
|
"assetsReferences": {"status": "Mechanism verified", "notes": "Packaged skills, rules/AGENTS.md byte-for-byte parity, and packaged agy-*.js hook scripts are verified by ci/mechanism-agy-plugin-package.test.js."},
|
|
300
300
|
"updateSync": {"status": "Partial", "notes": "scripts/plugin-sync.js --host agy --json is mechanism-tested and was observed live updating ~/.gemini/config/plugins/harness-everything on macOS; other OSes and project-scope sync live behavior remain unverified."},
|
|
301
|
-
"liveHostVerification": {"status": "Partial", "evidence": "benchmarks/results/live-host/agy-2026-11-23/README.md", "notes": "Partial live-host evidence covers global Antigravity 2.0 Desktop App 2.34.0 (macOS), agy CLI 1.5.15 (macOS), and Windows Desktop + agy CLI 1.5.16 (benchmarks/results/live-host/agy-2026-11-25/README.md): plugin validate/list, SessionStart, PreInvocation, PreToolUse (write_file/run_command), PostToolUse edit timestamps, bounded Stop continuation (NO_TOOL_CALL / direct revision + workspace fingerprint), and temporary project-scope hook discovery. IDE write tools, live shell exitCode: 0 verification credit, live Stop model_stop, full project-scope isolation
|
|
301
|
+
"liveHostVerification": {"status": "Partial", "evidence": "benchmarks/results/live-host/agy-2026-11-23/README.md", "notes": "Partial live-host evidence covers global Antigravity 2.0 Desktop App 2.34.0 (macOS), agy CLI 1.5.15 (macOS), and Windows Desktop + agy CLI 1.5.16 (benchmarks/results/live-host/agy-2026-11-25/README.md): plugin validate/list, SessionStart, PreInvocation, PreToolUse (write_file/run_command), PostToolUse edit timestamps, bounded Stop continuation (NO_TOOL_CALL / direct revision + workspace fingerprint), and temporary project-scope hook discovery. Linux AGY CLI 1.5.21 validated, installed and listed the enabled global plugin (benchmarks/results/live-host/agy-2026-12-02-linux-loader/README.md). Linux lifecycle hooks, IDE write tools, live shell exitCode: 0 verification credit, live Stop model_stop, and full project-scope isolation remain unverified."}
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
]
|
package/docs/system-one-cycle.md
CHANGED
|
@@ -18,7 +18,8 @@ flowchart LR
|
|
|
18
18
|
- Use a fresh, private directory for this cycle, outside the Harness checkout. On POSIX hosts the scripts set directory permissions to `0700` and data files to `0600`; on Windows, use a user-private directory with a restrictive ACL.
|
|
19
19
|
- For cross-month comparisons, choose one absolute private history file outside the checkout and every cycle directory, then pass the same `--history` path to each month's `evaluate` or `all` command. If omitted, history remains at `<private-cycle-dir>/training/history.jsonl` for compatibility and is cycle-local.
|
|
20
20
|
- Set `--since` to the last completed collection boundary. `collect` requires this date and accepts an optional `--sessions` path for a non-default Codex session directory.
|
|
21
|
-
-
|
|
21
|
+
- Use a version ID of 1–80 characters starting with a lowercase ASCII letter or digit. Subsequent characters may include lowercase ASCII letters, digits, dots, underscores, and hyphens. Version IDs are used as written. Reuse the same data directory and version id to resume; use a new directory for the next month.
|
|
22
|
+
- An existing active pointer with an invalid version ID requires manual recovery. Preserve that installation and its pointer, then install and activate a checkpoint published with a valid ID in a clean directory using `--dir`. Set `HARNESS_SYSTEM_ONE_HOME` to that directory for runtime use.
|
|
22
23
|
- Replace the placeholders in the commands below with real paths, dates, and a version id.
|
|
23
24
|
|
|
24
25
|
## Steps
|
|
@@ -195,9 +195,9 @@ def load_active_bundle(active_path, expected_fingerprint=None, scorer_loader=Non
|
|
|
195
195
|
pointer = json.loads(active_path.read_text(encoding='utf-8'))
|
|
196
196
|
if (not isinstance(pointer, dict) or set(pointer) != {'schemaVersion', 'version', 'dir', 'previous', 'activatedAt'}
|
|
197
197
|
or pointer.get('schemaVersion') != 1 or not isinstance(pointer.get('version'), str)
|
|
198
|
-
or not
|
|
198
|
+
or not VERSION_PATTERN.fullmatch(pointer['version']) or not isinstance(pointer.get('dir'), str)
|
|
199
199
|
or not Path(pointer['dir']).is_absolute()
|
|
200
|
-
or (pointer.get('previous') is not None and (not isinstance(pointer['previous'], str) or not
|
|
200
|
+
or (pointer.get('previous') is not None and (not isinstance(pointer['previous'], str) or not VERSION_PATTERN.fullmatch(pointer['previous'])))
|
|
201
201
|
or not isinstance(pointer.get('activatedAt'), str)):
|
|
202
202
|
raise ValueError('active-pointer')
|
|
203
203
|
directory = Path(pointer['dir'])
|
|
@@ -260,6 +260,8 @@ MAX_CLIENTS = 64
|
|
|
260
260
|
READ_DEADLINE_S = 1.0 # never longer than the Node client's 1000 ms call deadline
|
|
261
261
|
STARTUP_REASONS = ('artifact-hash', 'checkpoint-format')
|
|
262
262
|
ID_PATTERN = re.compile(r'[a-z0-9._-]{1,80}')
|
|
263
|
+
# Version IDs match manifest.js; request tasks and options use ID_PATTERN.
|
|
264
|
+
VERSION_PATTERN = re.compile(r'[a-z0-9][a-z0-9._-]{0,79}')
|
|
263
265
|
HASH_PATTERN = re.compile(r'[0-9a-f]{64}')
|
|
264
266
|
_USER_SID = []
|
|
265
267
|
|
|
@@ -7,7 +7,7 @@ const path = require('node:path');
|
|
|
7
7
|
const { createHash, randomBytes } = require('node:crypto');
|
|
8
8
|
const { spawnSync } = require('node:child_process');
|
|
9
9
|
const { PINNED_CUA_S1_REVISION } = require('./provider');
|
|
10
|
-
const { STAGES, validateVersionManifest } = require('./manifest');
|
|
10
|
+
const { STAGES, validVersion, validateVersionManifest } = require('./manifest');
|
|
11
11
|
|
|
12
12
|
const PINS = Object.freeze({
|
|
13
13
|
cuaS1Revision: PINNED_CUA_S1_REVISION,
|
|
@@ -23,10 +23,6 @@ const versionDir = (dir, version) => path.join(path.resolve(dir), 'versions', ve
|
|
|
23
23
|
const activePath = dir => path.join(path.resolve(dir), 'active.json');
|
|
24
24
|
const hash = bytes => createHash('sha256').update(bytes).digest('hex');
|
|
25
25
|
|
|
26
|
-
function validVersion(version) {
|
|
27
|
-
return typeof version === 'string' && /^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(version)
|
|
28
|
-
&& version !== '.' && version !== '..';
|
|
29
|
-
}
|
|
30
26
|
function assertVersion(version) {
|
|
31
27
|
if (!validVersion(version)) throw new Error('invalid-version: use a single safe version id');
|
|
32
28
|
}
|
|
@@ -6,11 +6,15 @@ const path = require('node:path');
|
|
|
6
6
|
const STAGES = ['validity', 'intent', 'tier'];
|
|
7
7
|
const SAFE_ID = /^[a-z0-9._-]{1,80}$/;
|
|
8
8
|
const HASH = /^[a-f0-9]{64}$/;
|
|
9
|
-
const VERSION = /^[
|
|
9
|
+
const VERSION = /^[a-z0-9][a-z0-9._-]{0,79}$/;
|
|
10
10
|
const SAFE_PATH_PART = /^[A-Za-z0-9._-]+$/;
|
|
11
11
|
const exact = (value, keys) => value && typeof value === 'object' && !Array.isArray(value)
|
|
12
12
|
&& Object.keys(value).length === keys.length && keys.every(key => Object.hasOwn(value, key));
|
|
13
13
|
|
|
14
|
+
function validVersion(version) {
|
|
15
|
+
return typeof version === 'string' && VERSION.test(version);
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
function safeRelative(value) {
|
|
15
19
|
return typeof value === 'string' && value.length > 0 && !value.includes('\\')
|
|
16
20
|
&& !path.posix.isAbsolute(value) && !path.win32.isAbsolute(value)
|
|
@@ -20,7 +24,7 @@ function safeRelative(value) {
|
|
|
20
24
|
function validateVersionManifest(manifest, expectedVersion) {
|
|
21
25
|
const fail = detail => { throw new TypeError(`invalid-manifest: ${detail}`); };
|
|
22
26
|
if (!exact(manifest, ['schemaVersion', 'version', 'createdAt', 'stages', 'evaluation'])
|
|
23
|
-
|| manifest.schemaVersion !== 1 ||
|
|
27
|
+
|| manifest.schemaVersion !== 1 || !validVersion(manifest.version)
|
|
24
28
|
|| (expectedVersion !== undefined && manifest.version !== expectedVersion)
|
|
25
29
|
|| typeof manifest.createdAt !== 'string' || !Number.isFinite(Date.parse(manifest.createdAt))
|
|
26
30
|
|| !exact(manifest.stages, STAGES)
|
|
@@ -63,4 +67,4 @@ if (require.main === module) {
|
|
|
63
67
|
} catch (_) { process.exitCode = 1; }
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
module.exports = { STAGES, validateVersionManifest };
|
|
70
|
+
module.exports = { STAGES, validVersion, validateVersionManifest };
|
|
@@ -5,7 +5,7 @@ const path = require('node:path');
|
|
|
5
5
|
const { createHash } = require('node:crypto');
|
|
6
6
|
const { spawnSync } = require('node:child_process');
|
|
7
7
|
const { createRequest, validateRequest, validateResponse } = require('./contract');
|
|
8
|
-
const { STAGES, validateVersionManifest } = require('./manifest');
|
|
8
|
+
const { STAGES, validVersion, validateVersionManifest } = require('./manifest');
|
|
9
9
|
// Upstream cua_s1 source revision documented in docs/system-one-routing.md.
|
|
10
10
|
const PINNED_CUA_S1_REVISION = 'b7f7e2d8714609853a29c7d049140bc46aec0954';
|
|
11
11
|
const ADAPTER = path.join(__dirname, 'cua_adapter.py');
|
|
@@ -18,7 +18,6 @@ const adapterName = value => typeof value === 'string' && /^[a-z][a-z0-9_-]{0,63
|
|
|
18
18
|
// Thresholds calibrated on validation for this checkpoint (docs/system-one-training.md).
|
|
19
19
|
const inRange = (v, lo, hi) => typeof v === 'number' && Number.isFinite(v) && v >= lo && v <= hi;
|
|
20
20
|
const LIVE_STAGES = STAGES;
|
|
21
|
-
const SAFE_ID = /^[a-z0-9._-]{1,80}$/;
|
|
22
21
|
const sha256 = value => createHash('sha256').update(value).digest('hex');
|
|
23
22
|
const MAX_LAYER_BYTES = 32 * 1024 * 1024;
|
|
24
23
|
// secondaryThreshold is optional and belongs to intent checkpoints (docs/system-one-intent.md#scoring).
|
|
@@ -141,9 +140,9 @@ function readActive(env = process.env) {
|
|
|
141
140
|
if (!pointerStat.isFile() || pointerStat.isSymbolicLink() || pointerStat.size > 65536) return null;
|
|
142
141
|
const pointer = JSON.parse(fs.readFileSync(pointerPath, 'utf8'));
|
|
143
142
|
if (!exact(pointer, ['schemaVersion', 'version', 'dir', 'previous', 'activatedAt']) || pointer.schemaVersion !== 1
|
|
144
|
-
||
|
|
143
|
+
|| !validVersion(pointer.version)
|
|
145
144
|
|| typeof pointer.dir !== 'string' || !path.isAbsolute(pointer.dir)
|
|
146
|
-
|| !(pointer.previous === null || (
|
|
145
|
+
|| !(pointer.previous === null || validVersion(pointer.previous))
|
|
147
146
|
|| typeof pointer.activatedAt !== 'string' || !Number.isFinite(Date.parse(pointer.activatedAt))) return null;
|
|
148
147
|
const dir = pointer.dir;
|
|
149
148
|
const dirStat = fs.lstatSync(dir);
|
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.5.
|
|
4
|
+
"version": "1.5.4",
|
|
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",
|
package/plugins/harness-everything/skills/harness-everything/scripts/system-one/cua_adapter.py
CHANGED
|
@@ -195,9 +195,9 @@ def load_active_bundle(active_path, expected_fingerprint=None, scorer_loader=Non
|
|
|
195
195
|
pointer = json.loads(active_path.read_text(encoding='utf-8'))
|
|
196
196
|
if (not isinstance(pointer, dict) or set(pointer) != {'schemaVersion', 'version', 'dir', 'previous', 'activatedAt'}
|
|
197
197
|
or pointer.get('schemaVersion') != 1 or not isinstance(pointer.get('version'), str)
|
|
198
|
-
or not
|
|
198
|
+
or not VERSION_PATTERN.fullmatch(pointer['version']) or not isinstance(pointer.get('dir'), str)
|
|
199
199
|
or not Path(pointer['dir']).is_absolute()
|
|
200
|
-
or (pointer.get('previous') is not None and (not isinstance(pointer['previous'], str) or not
|
|
200
|
+
or (pointer.get('previous') is not None and (not isinstance(pointer['previous'], str) or not VERSION_PATTERN.fullmatch(pointer['previous'])))
|
|
201
201
|
or not isinstance(pointer.get('activatedAt'), str)):
|
|
202
202
|
raise ValueError('active-pointer')
|
|
203
203
|
directory = Path(pointer['dir'])
|
|
@@ -260,6 +260,8 @@ MAX_CLIENTS = 64
|
|
|
260
260
|
READ_DEADLINE_S = 1.0 # never longer than the Node client's 1000 ms call deadline
|
|
261
261
|
STARTUP_REASONS = ('artifact-hash', 'checkpoint-format')
|
|
262
262
|
ID_PATTERN = re.compile(r'[a-z0-9._-]{1,80}')
|
|
263
|
+
# Version IDs match manifest.js; request tasks and options use ID_PATTERN.
|
|
264
|
+
VERSION_PATTERN = re.compile(r'[a-z0-9][a-z0-9._-]{0,79}')
|
|
263
265
|
HASH_PATTERN = re.compile(r'[0-9a-f]{64}')
|
|
264
266
|
_USER_SID = []
|
|
265
267
|
|
|
@@ -7,7 +7,7 @@ const path = require('node:path');
|
|
|
7
7
|
const { createHash, randomBytes } = require('node:crypto');
|
|
8
8
|
const { spawnSync } = require('node:child_process');
|
|
9
9
|
const { PINNED_CUA_S1_REVISION } = require('./provider');
|
|
10
|
-
const { STAGES, validateVersionManifest } = require('./manifest');
|
|
10
|
+
const { STAGES, validVersion, validateVersionManifest } = require('./manifest');
|
|
11
11
|
|
|
12
12
|
const PINS = Object.freeze({
|
|
13
13
|
cuaS1Revision: PINNED_CUA_S1_REVISION,
|
|
@@ -23,10 +23,6 @@ const versionDir = (dir, version) => path.join(path.resolve(dir), 'versions', ve
|
|
|
23
23
|
const activePath = dir => path.join(path.resolve(dir), 'active.json');
|
|
24
24
|
const hash = bytes => createHash('sha256').update(bytes).digest('hex');
|
|
25
25
|
|
|
26
|
-
function validVersion(version) {
|
|
27
|
-
return typeof version === 'string' && /^[A-Za-z0-9][A-Za-z0-9._-]*$/.test(version)
|
|
28
|
-
&& version !== '.' && version !== '..';
|
|
29
|
-
}
|
|
30
26
|
function assertVersion(version) {
|
|
31
27
|
if (!validVersion(version)) throw new Error('invalid-version: use a single safe version id');
|
|
32
28
|
}
|
|
@@ -6,11 +6,15 @@ const path = require('node:path');
|
|
|
6
6
|
const STAGES = ['validity', 'intent', 'tier'];
|
|
7
7
|
const SAFE_ID = /^[a-z0-9._-]{1,80}$/;
|
|
8
8
|
const HASH = /^[a-f0-9]{64}$/;
|
|
9
|
-
const VERSION = /^[
|
|
9
|
+
const VERSION = /^[a-z0-9][a-z0-9._-]{0,79}$/;
|
|
10
10
|
const SAFE_PATH_PART = /^[A-Za-z0-9._-]+$/;
|
|
11
11
|
const exact = (value, keys) => value && typeof value === 'object' && !Array.isArray(value)
|
|
12
12
|
&& Object.keys(value).length === keys.length && keys.every(key => Object.hasOwn(value, key));
|
|
13
13
|
|
|
14
|
+
function validVersion(version) {
|
|
15
|
+
return typeof version === 'string' && VERSION.test(version);
|
|
16
|
+
}
|
|
17
|
+
|
|
14
18
|
function safeRelative(value) {
|
|
15
19
|
return typeof value === 'string' && value.length > 0 && !value.includes('\\')
|
|
16
20
|
&& !path.posix.isAbsolute(value) && !path.win32.isAbsolute(value)
|
|
@@ -20,7 +24,7 @@ function safeRelative(value) {
|
|
|
20
24
|
function validateVersionManifest(manifest, expectedVersion) {
|
|
21
25
|
const fail = detail => { throw new TypeError(`invalid-manifest: ${detail}`); };
|
|
22
26
|
if (!exact(manifest, ['schemaVersion', 'version', 'createdAt', 'stages', 'evaluation'])
|
|
23
|
-
|| manifest.schemaVersion !== 1 ||
|
|
27
|
+
|| manifest.schemaVersion !== 1 || !validVersion(manifest.version)
|
|
24
28
|
|| (expectedVersion !== undefined && manifest.version !== expectedVersion)
|
|
25
29
|
|| typeof manifest.createdAt !== 'string' || !Number.isFinite(Date.parse(manifest.createdAt))
|
|
26
30
|
|| !exact(manifest.stages, STAGES)
|
|
@@ -63,4 +67,4 @@ if (require.main === module) {
|
|
|
63
67
|
} catch (_) { process.exitCode = 1; }
|
|
64
68
|
}
|
|
65
69
|
|
|
66
|
-
module.exports = { STAGES, validateVersionManifest };
|
|
70
|
+
module.exports = { STAGES, validVersion, validateVersionManifest };
|
|
@@ -5,7 +5,7 @@ const path = require('node:path');
|
|
|
5
5
|
const { createHash } = require('node:crypto');
|
|
6
6
|
const { spawnSync } = require('node:child_process');
|
|
7
7
|
const { createRequest, validateRequest, validateResponse } = require('./contract');
|
|
8
|
-
const { STAGES, validateVersionManifest } = require('./manifest');
|
|
8
|
+
const { STAGES, validVersion, validateVersionManifest } = require('./manifest');
|
|
9
9
|
// Upstream cua_s1 source revision documented in docs/system-one-routing.md.
|
|
10
10
|
const PINNED_CUA_S1_REVISION = 'b7f7e2d8714609853a29c7d049140bc46aec0954';
|
|
11
11
|
const ADAPTER = path.join(__dirname, 'cua_adapter.py');
|
|
@@ -18,7 +18,6 @@ const adapterName = value => typeof value === 'string' && /^[a-z][a-z0-9_-]{0,63
|
|
|
18
18
|
// Thresholds calibrated on validation for this checkpoint (docs/system-one-training.md).
|
|
19
19
|
const inRange = (v, lo, hi) => typeof v === 'number' && Number.isFinite(v) && v >= lo && v <= hi;
|
|
20
20
|
const LIVE_STAGES = STAGES;
|
|
21
|
-
const SAFE_ID = /^[a-z0-9._-]{1,80}$/;
|
|
22
21
|
const sha256 = value => createHash('sha256').update(value).digest('hex');
|
|
23
22
|
const MAX_LAYER_BYTES = 32 * 1024 * 1024;
|
|
24
23
|
// secondaryThreshold is optional and belongs to intent checkpoints (docs/system-one-intent.md#scoring).
|
|
@@ -141,9 +140,9 @@ function readActive(env = process.env) {
|
|
|
141
140
|
if (!pointerStat.isFile() || pointerStat.isSymbolicLink() || pointerStat.size > 65536) return null;
|
|
142
141
|
const pointer = JSON.parse(fs.readFileSync(pointerPath, 'utf8'));
|
|
143
142
|
if (!exact(pointer, ['schemaVersion', 'version', 'dir', 'previous', 'activatedAt']) || pointer.schemaVersion !== 1
|
|
144
|
-
||
|
|
143
|
+
|| !validVersion(pointer.version)
|
|
145
144
|
|| typeof pointer.dir !== 'string' || !path.isAbsolute(pointer.dir)
|
|
146
|
-
|| !(pointer.previous === null || (
|
|
145
|
+
|| !(pointer.previous === null || validVersion(pointer.previous))
|
|
147
146
|
|| typeof pointer.activatedAt !== 'string' || !Number.isFinite(Date.parse(pointer.activatedAt))) return null;
|
|
148
147
|
const dir = pointer.dir;
|
|
149
148
|
const dirStat = fs.lstatSync(dir);
|
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:5cebc116-0901-56e0-bb38-e6192158fc63",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-12-
|
|
8
|
+
"timestamp": "2026-12-02T01:41:44.070Z",
|
|
9
9
|
"tools": [
|
|
10
10
|
{
|
|
11
11
|
"vendor": "Harness Everything",
|
|
12
12
|
"name": "generate-sbom.js",
|
|
13
|
-
"version": "1.5.
|
|
13
|
+
"version": "1.5.4"
|
|
14
14
|
}
|
|
15
15
|
],
|
|
16
16
|
"component": {
|
|
17
17
|
"type": "application",
|
|
18
|
-
"bom-ref": "pkg:npm/harness-everything@1.5.
|
|
18
|
+
"bom-ref": "pkg:npm/harness-everything@1.5.4",
|
|
19
19
|
"name": "harness-everything",
|
|
20
|
-
"version": "1.5.
|
|
21
|
-
"purl": "pkg:npm/harness-everything@1.5.
|
|
20
|
+
"version": "1.5.4",
|
|
21
|
+
"purl": "pkg:npm/harness-everything@1.5.4"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
"components": [
|
|
@@ -2033,7 +2033,7 @@
|
|
|
2033
2033
|
]
|
|
2034
2034
|
},
|
|
2035
2035
|
{
|
|
2036
|
-
"ref": "pkg:npm/harness-everything@1.5.
|
|
2036
|
+
"ref": "pkg:npm/harness-everything@1.5.4",
|
|
2037
2037
|
"dependsOn": [
|
|
2038
2038
|
"pkg:npm/%40commitlint/cli@19.8.1",
|
|
2039
2039
|
"pkg:npm/%40commitlint/config-conventional@19.8.1",
|
|
@@ -6,7 +6,7 @@ const path = require('node:path');
|
|
|
6
6
|
const { spawnSync } = require('node:child_process');
|
|
7
7
|
const { REPO, dataPath, writeJson, assertPrivateDataDir } = require('./common');
|
|
8
8
|
const { TASKS, validateFitStage } = require('./train');
|
|
9
|
-
const { validateVersionManifest } = require('../../harness-everything/scripts/system-one/manifest');
|
|
9
|
+
const { validVersion, validateVersionManifest } = require('../../harness-everything/scripts/system-one/manifest');
|
|
10
10
|
|
|
11
11
|
function trainerCatalogs() {
|
|
12
12
|
const trainer = path.join(REPO, 'scripts', 'system-one-train.py');
|
|
@@ -27,7 +27,7 @@ function trainerCatalogs() {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function validateVersion(version) {
|
|
30
|
-
if (
|
|
30
|
+
if (!validVersion(version)) throw new Error('invalid --version');
|
|
31
31
|
return version;
|
|
32
32
|
}
|
|
33
33
|
|