deadbyte-mcp 0.15.0 → 0.15.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/MANIFEST.SHA256 +76 -41
- package/PROVENANCE.json +10 -0
- package/R45-PARENT.json +18 -0
- package/README.txt +14 -14
- package/RELEASE.json +37 -0
- package/SBOM.cdx.json +46 -0
- package/TEST-MATRIX.json +31 -0
- package/bin/deadbyte-hardware-observer-r45.exe +0 -0
- package/bin/deadbyte-hardware-observer-r45.obj +0 -0
- package/controller/README.TXT +2 -2
- package/controller/deadbyte-controller.ps1 +2 -2
- package/docs/ARCHITECTURE.md +1 -1
- package/native/deadbyte-hardware-observer.cpp +308 -0
- package/package.json +12 -7
- package/scripts/autonomous-tests.ps1 +2 -2
- package/scripts/build-hardware-r45.ps1 +71 -0
- package/scripts/deferred-slot-operation-r45.mjs +126 -0
- package/scripts/derive-r45-parent.mjs +24 -0
- package/scripts/derive-r45-release.mjs +72 -0
- package/scripts/derive-r45-tests.mjs +20 -0
- package/scripts/final-closure-r45.mjs +121 -0
- package/scripts/final-closure-verify-r45.mjs +220 -0
- package/scripts/finalize-r45.mjs +219 -0
- package/scripts/full-regression-r45.mjs +20 -0
- package/scripts/full-regression-summary-r45.mjs +14 -0
- package/scripts/gate-windows-r45.ps1 +44 -0
- package/scripts/init-host-policy.ps1 +39 -1
- package/scripts/inspect-active-release-r45.mjs +20 -0
- package/scripts/release-manifest.mjs +3 -1
- package/scripts/release-parity-r45.mjs +253 -0
- package/scripts/release-parity-tests-r45.ps1 +8 -0
- package/scripts/verify-r45-parent.mjs +142 -0
- package/scripts/windows-gate-evidence-r45.mjs +60 -0
- package/src/autonomous-runtime.mjs +12 -7
- package/src/capability-ledger.mjs +1 -0
- package/src/compact-gateway-mcp-tools.mjs +4 -2
- package/src/deadbyte-cli.mjs +17 -9
- package/src/doctor-r45.mjs +65 -0
- package/src/host-plane.mjs +133 -85
- package/src/mcp-server.mjs +64 -23
- package/src/native-diff-v2.mjs +9 -4
- package/src/native-diff.mjs +29 -7
- package/src/observation-mcp-tools.mjs +5 -1
- package/src/observation-output-contracts.mjs +8 -0
- package/src/observation-runtime.mjs +33 -2
- package/src/observation-smoke-client.mjs +6 -2
- package/src/output-contracts.mjs +27 -11
- package/src/r45-compact-disarmed-probe.mjs +74 -0
- package/src/r45-full-surface-probe.mjs +34 -0
- package/src/release-generation.mjs +1 -0
- package/src/remote-mcp-r45-parity-client.mjs +206 -0
- package/src/runtime-update.mjs +36 -8
- package/src/version.mjs +1 -1
- package/test/agent-runtime.test.mjs +1 -0
- package/test/autonomous-loop.test.mjs +24 -0
- package/test/autonomous-runtime.test.mjs +1 -0
- package/test/cli-entrypoint.test.mjs +4 -4
- package/test/coding-plane.test.mjs +1 -0
- package/test/compact-max-catalog-r45.test.mjs +99 -0
- package/test/contained.test.mjs +23 -11
- package/test/controller.test.mjs +5 -1
- package/test/core.test.mjs +1 -1
- package/test/full-max-catalog-r45.test.mjs +91 -0
- package/test/hardware-observation-r45.test.mjs +44 -0
- package/test/host-inline-r45.test.mjs +67 -0
- package/test/machine-mcp-integration.test.mjs +1 -0
- package/test/observation-mcp-tools.test.mjs +4 -3
- package/test/output-schema.test.mjs +1 -0
- package/test/package-boundary.test.mjs +1 -1
- package/test/production-docs.test.mjs +3 -3
- package/test/r33-closeout-regression.test.mjs +20 -19
- package/test/r33-finalization.test.mjs +3 -3
- package/test/r45-autonomous-quick-test.test.mjs +10 -0
- package/test/r45-finalization.test.mjs +84 -0
- package/test/release-generation.test.mjs +1 -0
- package/test/release-version.test.mjs +52 -41
- package/test/runtime-host-bootstrap-r45.test.mjs +46 -0
|
@@ -19,9 +19,9 @@ test('R34 public parity catalog is exact, unique, and includes production coding
|
|
|
19
19
|
|
|
20
20
|
test('release parity and final verifier are package entry points', async () => {
|
|
21
21
|
const pkg = JSON.parse(await text('package.json'));
|
|
22
|
-
assert.equal(pkg.scripts['release:parity'], 'node scripts/release-parity-
|
|
23
|
-
assert.equal(pkg.scripts['release:final:write'], 'node scripts/final-closure-
|
|
24
|
-
assert.equal(pkg.scripts['release:final:verify'], 'node scripts/final-closure-verify-
|
|
22
|
+
assert.equal(pkg.scripts['release:parity'], 'node scripts/release-parity-r45.mjs');
|
|
23
|
+
assert.equal(pkg.scripts['release:final:write'], 'node scripts/final-closure-r45.mjs');
|
|
24
|
+
assert.equal(pkg.scripts['release:final:verify'], 'node scripts/final-closure-verify-r45.mjs');
|
|
25
25
|
assert.equal(typeof validateParityEvidence, 'function');
|
|
26
26
|
assert.equal(typeof verifyFinalClosureObject, 'function');
|
|
27
27
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { readFile } from 'node:fs/promises';
|
|
4
|
+
|
|
5
|
+
test('R45 autonomous quick-test is fixture-scoped and does not invoke legacy npm test matrix', async () => {
|
|
6
|
+
const text=await readFile(new URL('../scripts/autonomous-tests.ps1',import.meta.url),'utf8');
|
|
7
|
+
assert.match(text,/node\.exe --test test\/autonomous-live-fixture\.test\.mjs/);
|
|
8
|
+
assert.doesNotMatch(text,/npm\.cmd test/);
|
|
9
|
+
assert.match(text,/R24 QUICK TEST PASS/);
|
|
10
|
+
});
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { readFile } from 'node:fs/promises';
|
|
4
|
+
import { validateFinalizerAuthorityStatus, validateWindowsGateEvidence } from '../scripts/finalize-r45.mjs';
|
|
5
|
+
import { R45_PREDECESSOR_RELEASE_ID, R45_PREDECESSOR_MANIFEST } from '../scripts/release-parity-r45.mjs';
|
|
6
|
+
|
|
7
|
+
const manifest='a'.repeat(64);
|
|
8
|
+
const parent={
|
|
9
|
+
release_id:'v0.15.0-c15fa41719be61b3',
|
|
10
|
+
manifest_sha256:'c15fa41719be61b3186e49b2367a5f4c057365cfb465102dbefb7d7355f45483',
|
|
11
|
+
generation_manifest_sha256:'6d7429c050b7fe893492e102f00282019116e0c9e54e4f25a5791defa1661d30',
|
|
12
|
+
closure_sha256:'533b7e0ff9ded04086dd90ed34e3b87bc427acc3c55c25bb9f4ec66cb448e667'
|
|
13
|
+
};
|
|
14
|
+
const features=()=>({
|
|
15
|
+
skill_integrity:true,agent_backend_persistence:true,codex_protocol_contract:true,
|
|
16
|
+
remote_device_identity:true,durable_job_supervisor:true,real_external_supervisor_smoke:true,
|
|
17
|
+
full_regression_required:true,codex_live_binary_required:false,
|
|
18
|
+
host_inline_native:true,native_hardware_observation:true,doctor_release_truth:true
|
|
19
|
+
});
|
|
20
|
+
const valid=()=>({
|
|
21
|
+
schema:'deadbyte.r45-windows-gate.v1',status:'passed',exit_code:0,version:'0.15.1',
|
|
22
|
+
marker:'DEADBYTE V0.15.1 / R45 MACHINE FREEDOM WINDOWS BATCH GATE: PASS',
|
|
23
|
+
manifest_sha256:manifest,
|
|
24
|
+
parent:{release_id:parent.release_id,manifest_sha256:parent.manifest_sha256,
|
|
25
|
+
generation_manifest_sha256:parent.generation_manifest_sha256,final_closure_sha256:parent.closure_sha256},
|
|
26
|
+
features:features()
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test('R45 detached finalizer requires Process+Coding+Autonomous and Desktop+Host DISARMED',()=>{
|
|
30
|
+
assert.equal(validateFinalizerAuthorityStatus({process_armed:true,coding_armed:true,autonomous_armed:true,desktop_armed:false,host_armed:false}),true);
|
|
31
|
+
assert.throws(()=>validateFinalizerAuthorityStatus({process_armed:false,coding_armed:true,autonomous_armed:true,desktop_armed:false,host_armed:false}),/Process standing grant/);
|
|
32
|
+
assert.throws(()=>validateFinalizerAuthorityStatus({process_armed:true,coding_armed:true,autonomous_armed:true,desktop_armed:true,host_armed:false}),/Desktop DISARMED/);
|
|
33
|
+
assert.throws(()=>validateFinalizerAuthorityStatus({process_armed:true,coding_armed:true,autonomous_armed:true,desktop_armed:false,host_armed:true}),/Host DISARMED/);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test('R45 finalizer binds exact R44 parent and all Machine Freedom gate proofs',()=>{
|
|
37
|
+
assert.equal(validateWindowsGateEvidence(valid(),manifest,parent),true);
|
|
38
|
+
for(const key of ['host_inline_native','native_hardware_observation','doctor_release_truth']){
|
|
39
|
+
assert.throws(()=>validateWindowsGateEvidence({...valid(),features:{...features(),[key]:false}},manifest,parent),new RegExp(key));
|
|
40
|
+
}
|
|
41
|
+
assert.throws(()=>validateWindowsGateEvidence({...valid(),manifest_sha256:'b'.repeat(64)},manifest,parent),/candidate mismatch/);
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
test('R45 release machinery binds 0.15.1, 82/43 surfaces, Host v2 bootstrap and FINAL closure',async()=>{
|
|
45
|
+
const root=new URL('../',import.meta.url);
|
|
46
|
+
const text=rel=>readFile(new URL(rel,root),'utf8');
|
|
47
|
+
const [gate,parity,compactClient,writer,verifier,finalizer,evidence,manifestSource]=await Promise.all([
|
|
48
|
+
text('scripts/gate-windows-r45.ps1'),text('scripts/release-parity-r45.mjs'),text('src/remote-mcp-r45-parity-client.mjs'),text('scripts/final-closure-r45.mjs'),
|
|
49
|
+
text('scripts/final-closure-verify-r45.mjs'),text('scripts/finalize-r45.mjs'),text('scripts/windows-gate-evidence-r45.mjs'),text('scripts/release-manifest.mjs')
|
|
50
|
+
]);
|
|
51
|
+
assert.equal(R45_PREDECESSOR_RELEASE_ID,parent.release_id);
|
|
52
|
+
assert.equal(R45_PREDECESSOR_MANIFEST,parent.manifest_sha256);
|
|
53
|
+
assert.match(gate,/host-policy-refresh/);assert.match(gate,/doctor/);assert.match(gate,/hardware-build/);
|
|
54
|
+
const hermetic=gate.indexOf('host-policy-hermetic-clean');
|
|
55
|
+
const focused=gate.indexOf('r45-feature-focused');
|
|
56
|
+
const regression=gate.indexOf("Invoke-GateStep -Name 'full-regression'");
|
|
57
|
+
const agentSmoke=gate.indexOf("Invoke-GateStep -Name 'mcp-agent-smoke'");
|
|
58
|
+
const containedSmoke=gate.indexOf("Invoke-GateStep -Name 'mcp-contained-smoke'");
|
|
59
|
+
const hostRefresh=gate.indexOf("Invoke-GateStep -Name 'host-policy-refresh'");
|
|
60
|
+
const manifestWrite=gate.indexOf("Invoke-GateStep -Name 'release-manifest-write'");
|
|
61
|
+
const hostSmoke=gate.indexOf("Invoke-GateStep -Name 'mcp-host-smoke'");
|
|
62
|
+
assert.ok(hermetic>=0&&focused>hermetic&®ression>focused&&agentSmoke>regression&&containedSmoke>agentSmoke&&hostRefresh>containedSmoke&&manifestWrite>hostRefresh&&hostSmoke>manifestWrite,'R45 gate must keep generated Host policy out of hermetic regression and non-Host smoke surfaces');
|
|
63
|
+
assert.match(gate,/DEADBYTE V0\.15\.1 \/ R45 MACHINE FREEDOM WINDOWS BATCH GATE: PASS/);
|
|
64
|
+
assert.match(parity,/tool_count===82/);assert.match(parity,/tool_count===43/);assert.match(compactClient,/hardware_query/);
|
|
65
|
+
assert.match(parity,/waitForExactPointer/);
|
|
66
|
+
assert.match(parity,/rollbackPair\.completed\.active_release===R45_PREDECESSOR_RELEASE_ID/);
|
|
67
|
+
assert.match(parity,/version:'0\.15\.0',manifestSha256:R45_PREDECESSOR_MANIFEST/);
|
|
68
|
+
assert.match(parity,/restorePair\.completed\.active_release===active\.release_id/);
|
|
69
|
+
assert.match(parity,/version:'0\.15\.1',manifestSha256:candidateManifest/);
|
|
70
|
+
assert.match(parity,/predecessor_disarmed\?\.tool_count===43/);
|
|
71
|
+
assert.doesNotMatch(parity,/predecessor_disarmed\?\.tool_count===42/);
|
|
72
|
+
assert.doesNotMatch(parity,/R45 exact R44 predecessor identity mismatch[^\n]*0\.14\.1/);
|
|
73
|
+
for(const source of [writer,verifier]){
|
|
74
|
+
assert.match(source,/DEADBYTE-R45-FINAL-CLOSURE-V1/);
|
|
75
|
+
assert.match(source,/deadbyte\.r45-final-closure\.v1/);
|
|
76
|
+
assert.match(source,/R45 MACHINE FREEDOM FINAL BASELINE/);
|
|
77
|
+
}
|
|
78
|
+
assert.match(finalizer,/--host-policy/);assert.match(finalizer,/--host-policy-sha256/);
|
|
79
|
+
assert.match(finalizer,/host_inline_native/);assert.match(finalizer,/native_hardware_observation/);assert.match(finalizer,/doctor_release_truth/);
|
|
80
|
+
assert.match(evidence,/host_inline_native:true/);assert.match(evidence,/native_hardware_observation:true/);assert.match(evidence,/doctor_release_truth:true/);
|
|
81
|
+
assert.match(manifestSource,/excludedPackagePrefixes = \[[^\]]*'tmp\/'[^\]]*'\.deadbyte-machine-fs-recovery\/'[^\]]*\]/);
|
|
82
|
+
assert.match(manifestSource,/excludedPackagePaths = new Set\(\['controller\/deadbyte-host-policy\.json'\]\)/);
|
|
83
|
+
assert.match(manifestSource,/excludedPackagePrefixes\.some\(prefix => rel\.startsWith\(prefix\)\)/);
|
|
84
|
+
});
|
|
@@ -92,6 +92,7 @@ test('R27 generation bundle rebinds authority and mutable state outside the rele
|
|
|
92
92
|
assert.equal(generatedAuto.profiles.gate.script_sha256,sha(Buffer.from('Write-Output gate\n')));
|
|
93
93
|
assert.equal(generatedAuto.profiles['windows-release'].script_path,'scripts/gate-windows-current.ps1');
|
|
94
94
|
assert.equal(generatedAuto.profiles['windows-release'].script_sha256,sha(Buffer.from('Write-Output current-gate\n')));
|
|
95
|
+
assert.equal(generatedAuto.profiles['windows-release'].timeout_ms,600000);
|
|
95
96
|
assert.equal(generatedAuto.profiles['windows-release'].description,'Full Windows target release gate; runs only when finish is requested.');
|
|
96
97
|
const generatedHost=JSON.parse(await readFile(result.host_policy_path,'utf8'));
|
|
97
98
|
assert.equal(generatedHost.roots.core.path,path.resolve(development));
|
|
@@ -2,58 +2,69 @@ import test from 'node:test';
|
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
3
|
import { readFile } from 'node:fs/promises';
|
|
4
4
|
import { createHash } from 'node:crypto';
|
|
5
|
-
const root=new URL('../',import.meta.url);const text=rel=>readFile(new URL(rel,root),'utf8');
|
|
6
|
-
const PARENT_RELEASE='v0.14.1-0a5a833892593283';
|
|
7
|
-
const PARENT_MANIFEST='0a5a8338925932830986421dda60ec5643f62f600404de4992fda2a5e79d09a9';
|
|
8
|
-
const PARENT_CLOSURE='2f29e94dd726638c23b2e520a608dcf2a6919e43348855be3940599d557f920b';
|
|
9
5
|
|
|
10
|
-
|
|
6
|
+
const root=new URL('../',import.meta.url);
|
|
7
|
+
const text=rel=>readFile(new URL(rel,root),'utf8');
|
|
8
|
+
const PARENT_RELEASE='v0.15.0-c15fa41719be61b3';
|
|
9
|
+
const PARENT_MANIFEST='c15fa41719be61b3186e49b2367a5f4c057365cfb465102dbefb7d7355f45483';
|
|
10
|
+
const PARENT_GENERATION='6d7429c050b7fe893492e102f00282019116e0c9e54e4f25a5791defa1661d30';
|
|
11
|
+
const PARENT_CLOSURE='533b7e0ff9ded04086dd90ed34e3b87bc427acc3c55c25bb9f4ec66cb448e667';
|
|
12
|
+
|
|
13
|
+
test('R45 current authority agrees on V0.15.1 and preserves exact sealed R44 parent',async()=>{
|
|
11
14
|
const pkg=JSON.parse(await text('package.json'));
|
|
12
|
-
const [version,controller,gate,readme,architecture,controllerReadme,deferred,parity,closure,closureVerify,windowsGate,parent,
|
|
13
|
-
text('src/version.mjs'),text('controller/deadbyte-controller.ps1'),text('scripts/gate-windows-
|
|
14
|
-
text('docs/ARCHITECTURE.md'),text('controller/README.TXT'),text('scripts/deferred-slot-operation-
|
|
15
|
-
text('scripts/release-parity-
|
|
16
|
-
text('scripts/windows-gate-evidence-
|
|
17
|
-
text('scripts/gate-windows-
|
|
15
|
+
const [version,controller,gate,readme,architecture,controllerReadme,deferred,parity,closure,closureVerify,windowsGate,parent,r44Gate,r44Parity,r44Closure]=await Promise.all([
|
|
16
|
+
text('src/version.mjs'),text('controller/deadbyte-controller.ps1'),text('scripts/gate-windows-r45.ps1'),text('README.txt'),
|
|
17
|
+
text('docs/ARCHITECTURE.md'),text('controller/README.TXT'),text('scripts/deferred-slot-operation-r45.mjs'),
|
|
18
|
+
text('scripts/release-parity-r45.mjs'),text('scripts/final-closure-r45.mjs'),text('scripts/final-closure-verify-r45.mjs'),
|
|
19
|
+
text('scripts/windows-gate-evidence-r45.mjs'),text('R45-PARENT.json'),
|
|
20
|
+
text('scripts/gate-windows-r44.ps1'),text('scripts/release-parity-r44.mjs'),text('scripts/final-closure-r44.mjs')
|
|
18
21
|
]);
|
|
19
|
-
assert.equal(pkg.version,'0.15.
|
|
20
|
-
assert.equal(pkg.scripts['gate:windows'],'powershell -NoProfile -ExecutionPolicy Bypass -File scripts/gate-windows-
|
|
21
|
-
assert.equal(pkg.scripts['
|
|
22
|
-
assert.equal(pkg.scripts['
|
|
23
|
-
assert.equal(pkg.scripts['self-update:deferred'],'node scripts/deferred-slot-operation-
|
|
24
|
-
assert.equal(pkg.scripts['release:parity'],'node scripts/release-parity-
|
|
25
|
-
assert.equal(pkg.scripts['release:final:write'],'node scripts/final-closure-
|
|
26
|
-
assert.equal(pkg.scripts['release:final:verify'],'node scripts/final-closure-verify-
|
|
27
|
-
assert.equal(pkg.scripts['finalize:
|
|
28
|
-
assert.match(version,/DEADBYTE_VERSION = '0\.15\.
|
|
29
|
-
assert.match(controller,/CONTROLLER V0\.15\.
|
|
30
|
-
assert.match(gate,/DEADBYTE V0\.15\.
|
|
31
|
-
assert.match(readme,/^DEADBYTE MCP V0\.15\.
|
|
32
|
-
assert.match(architecture,/^# DEADBYTE MCP V0\.15\.
|
|
33
|
-
assert.match(controllerReadme,/^DEADBYTE MCP V0\.15\.
|
|
34
|
-
assert.match(deferred,/--expected-version','0\.15\.
|
|
35
|
-
assert.match(parity,/
|
|
36
|
-
assert.match(parity
|
|
37
|
-
assert.match(
|
|
38
|
-
assert.match(
|
|
39
|
-
assert.match(
|
|
22
|
+
assert.equal(pkg.version,'0.15.1');
|
|
23
|
+
assert.equal(pkg.scripts['gate:windows'],'powershell -NoProfile -ExecutionPolicy Bypass -File scripts/gate-windows-r45.ps1');
|
|
24
|
+
assert.equal(pkg.scripts['r45:parent:verify'],'node scripts/verify-r45-parent.mjs');
|
|
25
|
+
assert.equal(pkg.scripts['r45:full:test'],'node scripts/full-regression-r45.mjs');
|
|
26
|
+
assert.equal(pkg.scripts['self-update:deferred'],'node scripts/deferred-slot-operation-r45.mjs');
|
|
27
|
+
assert.equal(pkg.scripts['release:parity'],'node scripts/release-parity-r45.mjs');
|
|
28
|
+
assert.equal(pkg.scripts['release:final:write'],'node scripts/final-closure-r45.mjs');
|
|
29
|
+
assert.equal(pkg.scripts['release:final:verify'],'node scripts/final-closure-verify-r45.mjs');
|
|
30
|
+
assert.equal(pkg.scripts['finalize:r45'],'node scripts/finalize-r45.mjs');
|
|
31
|
+
assert.match(version,/DEADBYTE_VERSION = '0\.15\.1'/);
|
|
32
|
+
assert.match(controller,/CONTROLLER V0\.15\.1 \/ R45/);
|
|
33
|
+
assert.match(gate,/DEADBYTE V0\.15\.1 \/ R45 MACHINE FREEDOM WINDOWS BATCH GATE: PASS/);
|
|
34
|
+
assert.match(readme,/^DEADBYTE MCP V0\.15\.1 \/ R45 MACHINE FREEDOM FINAL BASELINE$/m);
|
|
35
|
+
assert.match(architecture,/^# DEADBYTE MCP V0\.15\.1 \/ R45 ARCHITECTURE$/m);
|
|
36
|
+
assert.match(controllerReadme,/^DEADBYTE MCP V0\.15\.1 \/ R45 CONTROLLER$/m);
|
|
37
|
+
assert.match(deferred,/--expected-version','0\.15\.1'/);
|
|
38
|
+
assert.match(parity,/R45_PREDECESSOR_RELEASE_ID='v0\.15\.0-c15fa41719be61b3'/);
|
|
39
|
+
assert.match(parity,new RegExp(PARENT_MANIFEST));
|
|
40
|
+
assert.match(parity,/tool_count===82/);assert.match(parity,/tool_count===43/);
|
|
41
|
+
assert.match(closure,/version:'0\.15\.1'/);assert.match(closure,/DEADBYTE-R45-FINAL-CLOSURE-V1/);
|
|
42
|
+
assert.match(closureVerify,/R45_FULL_TOOL_COUNT=82/);assert.match(closureVerify,/R45_COMPACT_TOOL_COUNT=43/);
|
|
43
|
+
assert.match(windowsGate,/deadbyte\.r45-windows-gate\.v1/);
|
|
40
44
|
const parentRecord=JSON.parse(parent);
|
|
41
|
-
assert.equal(parentRecord.parent_release_id,PARENT_RELEASE);
|
|
45
|
+
assert.equal(parentRecord.parent_release_id,PARENT_RELEASE);
|
|
46
|
+
assert.equal(parentRecord.parent_manifest_sha256,PARENT_MANIFEST);
|
|
47
|
+
assert.equal(parentRecord.parent_generation_manifest_sha256,PARENT_GENERATION);
|
|
42
48
|
assert.equal(parentRecord.parent_final_closure_sha256,PARENT_CLOSURE);
|
|
43
|
-
assert.match(
|
|
44
|
-
assert.match(
|
|
49
|
+
assert.match(r44Gate,/DEADBYTE V0\.15\.0 \/ R44 REMOTE AGENT SKILL WINDOWS BATCH GATE: PASS/);
|
|
50
|
+
assert.match(r44Parity,/deadbyte\.r44-parity\.v1/);
|
|
51
|
+
assert.match(r44Closure,/version:'0\.15\.0'/);
|
|
45
52
|
});
|
|
46
53
|
|
|
47
|
-
test('
|
|
54
|
+
test('R45 keeps ONLINE reuse and explicit Desktop authority',async()=>{
|
|
48
55
|
const [cli,controller]=await Promise.all([text('src/deadbyte-cli.mjs'),text('controller/deadbyte-controller.ps1')]);
|
|
49
|
-
assert.match(cli,/controllerRuntimeReady/);
|
|
56
|
+
assert.match(cli,/controllerRuntimeReady/);
|
|
57
|
+
assert.match(cli,/Runtime already ONLINE; reusing verified bridge\/cloud\/supervisor/);
|
|
50
58
|
const start=controller.indexOf('function Recover-AutonomousSupervisor'),end=controller.indexOf('function Show-State',start);
|
|
51
|
-
assert.ok(start>=0&&end>start);
|
|
52
|
-
|
|
53
|
-
assert.
|
|
59
|
+
assert.ok(start>=0&&end>start);
|
|
60
|
+
const block=controller.slice(start,end);
|
|
61
|
+
assert.doesNotMatch(block,/\$host\s*=/i);
|
|
62
|
+
assert.match(block,/\$hostStatus\s*=\s*Get-HostArmStatus/);
|
|
63
|
+
assert.match(controller,/armdesktop/);
|
|
64
|
+
assert.match(controller,/disarmdesktop/);
|
|
54
65
|
});
|
|
55
66
|
|
|
56
|
-
test('semantic config remains byte-pinned across
|
|
67
|
+
test('semantic config remains byte-pinned across R45 machine-freedom work',async()=>{
|
|
57
68
|
const semantic=await text('controller/deadbyte-semantic-lsp-config.json');
|
|
58
69
|
assert.equal(createHash('sha256').update(Buffer.from(semantic,'utf8')).digest('hex'),'d274b099a298c1033fea8f1e8849751693bbc0448778d619400acb82d4f53a3b');
|
|
59
70
|
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import { createHash } from 'node:crypto';
|
|
4
|
+
import { mkdtemp, readFile, writeFile } from 'node:fs/promises';
|
|
5
|
+
import os from 'node:os';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import { parseUpdateArgs, prepareHostPolicyBootstrap } from '../scripts/runtime-self-update.mjs';
|
|
8
|
+
|
|
9
|
+
const hex=ch=>ch.repeat(64);
|
|
10
|
+
const sha=bytes=>createHash('sha256').update(bytes).digest('hex');
|
|
11
|
+
|
|
12
|
+
test('R45 slot-update CLI binds Host policy bootstrap as one exact path plus SHA-256 pair',()=>{
|
|
13
|
+
const base=['--stage','stage','--development-root','dev','--expected-version','0.15.1','--expected-manifest',hex('a')];
|
|
14
|
+
assert.throws(()=>parseUpdateArgs([...base,'--host-policy','C:/candidate/host.json']),/host policy.*pair/i);
|
|
15
|
+
assert.throws(()=>parseUpdateArgs([...base,'--host-policy-sha256',hex('b')]),/host policy.*pair/i);
|
|
16
|
+
const parsed=parseUpdateArgs([...base,'--host-policy','C:/candidate/host.json','--host-policy-sha256',hex('b')]);
|
|
17
|
+
assert.equal(parsed.hostPolicyBootstrap.path,path.resolve('C:/candidate/host.json'));
|
|
18
|
+
assert.equal(parsed.hostPolicyBootstrap.sha256,hex('b'));
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('R45 Host policy bootstrap accepts exact v2 bytes and rejects hash or native contract drift',async()=>{
|
|
22
|
+
const root=await mkdtemp(path.join(os.tmpdir(),'deadbyte-r45-host-bootstrap-'));
|
|
23
|
+
const file=path.join(root,'host.json');
|
|
24
|
+
const policy={
|
|
25
|
+
schema:'deadbyte.host-policy.v2',enabled:true,arm_file:'C:/state/host-grant.json',
|
|
26
|
+
roots:{core:{path:'C:/core',read:true,write:true,exec:true}},
|
|
27
|
+
commands:{node_inline:{kind:'inline',executable:'C:/node.exe',executable_sha256:hex('1'),root_ids:['core'],prefix_args:['-e'],timeout_ms:1000,max_output_bytes:4096,max_command_chars:1024}},
|
|
28
|
+
native_exec:{enabled:true,root_ids:['core'],timeout_ms:1000,max_output_bytes:4096,max_args:8,max_arg_chars:1024}
|
|
29
|
+
};
|
|
30
|
+
const bytes=Buffer.from(JSON.stringify(policy)+'\n','utf8'); await writeFile(file,bytes);
|
|
31
|
+
const accepted=await prepareHostPolicyBootstrap({path:file,sha256:sha(bytes)});
|
|
32
|
+
assert.equal(accepted.sha256,sha(bytes)); assert.deepEqual(accepted.policy,policy);
|
|
33
|
+
await assert.rejects(prepareHostPolicyBootstrap({path:file,sha256:hex('f')}),/host policy.*SHA-256 mismatch/i);
|
|
34
|
+
const bad=path.join(root,'bad.json');
|
|
35
|
+
const badBytes=Buffer.from(JSON.stringify({...policy,native_exec:{...policy.native_exec,enabled:false}})+'\n','utf8');
|
|
36
|
+
await writeFile(bad,badBytes);
|
|
37
|
+
await assert.rejects(prepareHostPolicyBootstrap({path:bad,sha256:sha(await readFile(bad))}),/native_exec contract/i);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test('R45 updater threads the bootstrapped Host v2 policy into successor generation',async()=>{
|
|
41
|
+
const source=await readFile(new URL('../src/runtime-update.mjs',import.meta.url),'utf8');
|
|
42
|
+
assert.match(source,/prepareHostPolicyBootstrap\(hostPolicyBootstrap\)/);
|
|
43
|
+
assert.match(source,/control\.hostPolicy=hostBootstrap\.policy/);
|
|
44
|
+
assert.match(source,/hostPolicy:control\.hostPolicy/);
|
|
45
|
+
assert.match(source,/hostPolicyBootstrap:args\.hostPolicyBootstrap/);
|
|
46
|
+
});
|