deadbyte-mcp 0.15.37 โ 0.15.39
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 +41 -22
- package/PROVENANCE.json +55 -20
- package/README.txt +19 -19
- package/RELEASE.json +50 -21
- package/SBOM.cdx.json +2 -2
- package/TEST-MATRIX.json +67 -15
- package/bridge/package.json +1 -1
- package/bridge/src/bridge.mjs +4 -4
- package/bridge/src/r40-governor.mjs +109 -19
- package/controller/deadbyte-process-policy.json +4 -4
- package/docs/R61-TASK-CONTRACT.md +11 -0
- package/docs/r61-reference-evidence.md +18 -0
- package/package.json +5 -3
- package/scripts/gate-windows-r61-prepublish.ps1 +45 -0
- package/scripts/gate-windows-r62-prepublish.ps1 +45 -0
- package/scripts/npm-artifact-identity-r61.mjs +22 -0
- package/scripts/npm-release-r48.mjs +21 -5
- package/scripts/r61-mixed-lane-benchmark.mjs +98 -0
- package/scripts/r62-focused.ps1 +9 -0
- package/scripts/r62-full.ps1 +9 -0
- package/scripts/r62-live-transaction-audit.mjs +17 -0
- package/scripts/r62-unresolved-transaction-inspect.mjs +54 -0
- package/src/deadbyte-cli.mjs +9 -6
- package/src/doctor-transactions-r58.mjs +79 -8
- package/src/remote-live-log.mjs +28 -5
- package/src/runtime-update.mjs +28 -4
- package/src/version.mjs +1 -1
- package/test/bridge-runtime-r59.test.mjs +5 -5
- package/test/commander-schema-differential-r48.test.mjs +1 -1
- package/test/r58-doctor-transactions.test.mjs +2 -2
- package/test/r60-release-contract.test.mjs +4 -3
- package/test/r61-control-lane.test.mjs +154 -0
- package/test/r61-live-timeline-bounds.test.mjs +31 -0
- package/test/r61-npm-artifact-identity.test.mjs +17 -0
- package/test/r61-release-bridge-binding.test.mjs +32 -0
- package/test/r61-release-contract.test.mjs +45 -0
- package/test/r62-doctor-receipt-semantics.test.mjs +50 -0
- package/test/r62-doctor-transactions-reconcile.test.mjs +208 -0
- package/test/r62-release-contract.test.mjs +59 -0
- package/test/r62-rollback-failure-receipt.test.mjs +19 -0
- package/test/remote-live-log-r37.test.mjs +23 -6
- package/test/remote-session-cli.test.mjs +1 -1
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import {readFile} from 'node:fs/promises';
|
|
4
|
+
|
|
5
|
+
const read=rel=>readFile(new URL('../'+rel,import.meta.url),'utf8');
|
|
6
|
+
const json=rel=>read(rel).then(raw=>JSON.parse(raw.replace(/^\uFEFF/,'')));
|
|
7
|
+
const PARENT={
|
|
8
|
+
version:'0.15.38',
|
|
9
|
+
release_id:'v0.15.38-917901b3fcb2a77f',
|
|
10
|
+
manifest_sha256:'917901b3fcb2a77f696fedc539bd97c567d9dc59345779906fc633d11ea4bcfb',
|
|
11
|
+
generation_manifest_sha256:'9d320a8af1ba8e9e6a23552f35263da2670c00af1355464820552d849d9033c6'
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
test('R62 identity binds exact sealed 0.15.38 parent and transaction reconciliation scope',async()=>{
|
|
15
|
+
const [pkg,lock,bridge,release,provenance,matrix,sbom,version,gate]=await Promise.all([
|
|
16
|
+
json('package.json'),json('package-lock.json'),json('bridge/package.json'),json('RELEASE.json'),
|
|
17
|
+
json('PROVENANCE.json'),json('TEST-MATRIX.json'),json('SBOM.cdx.json'),read('src/version.mjs'),
|
|
18
|
+
read('scripts/gate-windows-r62-prepublish.ps1')
|
|
19
|
+
]);
|
|
20
|
+
assert.equal(pkg.version,'0.15.39');
|
|
21
|
+
assert.equal(lock.version,pkg.version);
|
|
22
|
+
assert.equal(lock.packages[''].version,pkg.version);
|
|
23
|
+
assert.equal(bridge.version,pkg.version);
|
|
24
|
+
assert.match(version,/DEADBYTE_VERSION = '0\.15\.39'/);
|
|
25
|
+
assert.equal(release.version,pkg.version);
|
|
26
|
+
assert.equal(release.train,'R62');
|
|
27
|
+
assert.equal(release.parent.version,PARENT.version);
|
|
28
|
+
assert.equal(release.parent.release_id,PARENT.release_id);
|
|
29
|
+
assert.equal(release.parent.manifest_sha256,PARENT.manifest_sha256);
|
|
30
|
+
assert.equal(release.parent.generation_manifest_sha256,PARENT.generation_manifest_sha256);
|
|
31
|
+
assert.deepEqual(release.runtime_predecessor,{
|
|
32
|
+
release_id:PARENT.release_id,
|
|
33
|
+
manifest_sha256:PARENT.manifest_sha256,
|
|
34
|
+
generation_manifest_sha256:PARENT.generation_manifest_sha256
|
|
35
|
+
});
|
|
36
|
+
assert.equal(provenance.version,pkg.version);
|
|
37
|
+
assert.equal(provenance.parent_release_id,PARENT.release_id);
|
|
38
|
+
assert.equal(provenance.parent_manifest_sha256,PARENT.manifest_sha256);
|
|
39
|
+
assert.equal(provenance.parent_generation_manifest_sha256,PARENT.generation_manifest_sha256);
|
|
40
|
+
assert.equal(matrix.version,pkg.version);
|
|
41
|
+
assert.equal(matrix.train,'R62');
|
|
42
|
+
assert.equal(sbom.metadata.component.version,pkg.version);
|
|
43
|
+
assert.equal(sbom.serialNumber,'urn:cdx:deadbyte-mcp:r62:0.15.39');
|
|
44
|
+
assert.equal(release.r62_transaction_reconciliation.public_surface_tool_count,43);
|
|
45
|
+
assert.equal(release.r62_transaction_reconciliation.new_authority_scopes,0);
|
|
46
|
+
assert.equal(release.r62_transaction_reconciliation.signed_terminal_receipt_reconciliation,true);
|
|
47
|
+
assert.equal(release.r62_transaction_reconciliation.r31_signed_failure_receipts,true);
|
|
48
|
+
assert.equal(release.r62_transaction_reconciliation.transaction_inventory_default_max_entries,1024);
|
|
49
|
+
assert.equal(release.r62_transaction_reconciliation.historical_unsigned_residue_preserved,true);
|
|
50
|
+
assert.equal(release.r62_transaction_reconciliation.stable_final_claim,false);
|
|
51
|
+
assert.match(pkg.scripts['r62:focused:test'],/r62-doctor-transactions-reconcile\.test\.mjs/);
|
|
52
|
+
assert.match(pkg.scripts['r62:focused:test'],/r62-rollback-failure-receipt\.test\.mjs/);
|
|
53
|
+
assert.equal(pkg.scripts['gate:windows'],'powershell -NoProfile -ExecutionPolicy Bypass -File scripts/gate-windows-r62-prepublish.ps1');
|
|
54
|
+
assert.match(gate,/v0\.15\.38-917901b3fcb2a77f/);
|
|
55
|
+
assert.match(gate,/917901b3fcb2a77f696fedc539bd97c567d9dc59345779906fc633d11ea4bcfb/);
|
|
56
|
+
assert.match(gate,/9d320a8af1ba8e9e6a23552f35263da2670c00af1355464820552d849d9033c6/);
|
|
57
|
+
assert.match(gate,/r62:focused:test/);
|
|
58
|
+
assert.doesNotMatch(gate,/v0\.15\.37-1cfecd7889419da7/);
|
|
59
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import test from 'node:test';
|
|
2
|
+
import assert from 'node:assert/strict';
|
|
3
|
+
import {readFile} from 'node:fs/promises';
|
|
4
|
+
|
|
5
|
+
test('R62 R31 rollback failures emit a signed subject-bound failure receipt before returning failure',async()=>{
|
|
6
|
+
const source=await readFile(new URL('../src/runtime-update.mjs',import.meta.url),'utf8');
|
|
7
|
+
assert.match(source,/const ROLLBACK_FAILURE_SCHEMA='deadbyte\.r31-slot-rollback-failure\.v1'/);
|
|
8
|
+
const start=source.indexOf('export async function performSlotRollback');
|
|
9
|
+
const end=source.indexOf('export async function runSlotUpdateCli',start);
|
|
10
|
+
assert.ok(start>=0&&end>start);
|
|
11
|
+
const perform=source.slice(start,end);
|
|
12
|
+
assert.match(perform,/failurePath=path\.join\(evidenceDir,'failure-receipt\.json'\)/);
|
|
13
|
+
assert.match(perform,/schema:ROLLBACK_FAILURE_SCHEMA/);
|
|
14
|
+
assert.match(perform,/rollback_id:rollbackId/);
|
|
15
|
+
assert.match(perform,/activation_receipt_sha256:activationEnvelope\.receipt_sha256/);
|
|
16
|
+
assert.match(perform,/await writeEnvelope\(failurePath,failure,key\)/);
|
|
17
|
+
assert.match(perform,/writeState\(statePath,journal,'failed_receipted'/);
|
|
18
|
+
assert.match(perform,/wrapped\.failureReceiptPath=failureReceipt\?failurePath:null/);
|
|
19
|
+
});
|
|
@@ -22,7 +22,7 @@ test('R40 long or mutating call gets start line and terminal error carries sanit
|
|
|
22
22
|
const tracker=createLiveTimelineTracker({clock:()=>now});
|
|
23
23
|
const start=tracker.observe({event_type:'tool.request',tool:'coding_command_run',request_id:'request-23456789',
|
|
24
24
|
ts:'1970-01-01T00:00:01.000Z',args:{root_id:'core',command_id:'node_script',script_path:'scripts/check.mjs'}},{sequence:20});
|
|
25
|
-
assert.match(start,/^๐ 07:00:01\.000 #20 \[request-\] coding_command_run core node_script scripts\/check\.mjs
|
|
25
|
+
assert.match(start,/^๐ 07:00:01\.000 #20 \[request-\] coding_command_run โถ START core node_script scripts\/check\.mjs$/);
|
|
26
26
|
now=1900;
|
|
27
27
|
const done=tracker.observe({event_type:'tool.result',tool:'coding_command_run',request_id:'request-23456789',
|
|
28
28
|
ts:'1970-01-01T00:00:01.900Z',outcome:{is_error:true,duration_ms:900,reason:'script exited 1: ENOENT scripts/missing.mjs'}},{sequence:21});
|
|
@@ -72,9 +72,9 @@ test('R40 CLI exposes explicit verbose mode while keeping default live mode comp
|
|
|
72
72
|
const {readFile}=await import('node:fs/promises');
|
|
73
73
|
const src=await readFile(new URL('../src/deadbyte-cli.mjs',import.meta.url),'utf8');
|
|
74
74
|
assert.match(src,/readLiveRootPaths\(ctx\.root\)/);
|
|
75
|
-
assert.match(src,/createLiveTimelineTracker\(\{verbose,displayMode,rootPaths,trace\}\)/);
|
|
75
|
+
assert.match(src,/createLiveTimelineTracker\(\{verbose,displayMode,rootPaths,trace,foldHeartbeats:!verbose\}\)/);
|
|
76
76
|
assert.match(src,/createLiveTimelineFilter\(filterExpression\)/);
|
|
77
|
-
assert.match(src,/createLiveTimelineWriter\(\{stream:process\.stdout,displayMode,rewrite
|
|
77
|
+
assert.match(src,/createLiveTimelineWriter\(\{stream:process\.stdout,displayMode,rewrite:false\}\)/);
|
|
78
78
|
assert.match(src,/arg==='--verbose'\|\|arg==='-v'/);
|
|
79
79
|
assert.match(src,/arg==='--trace'/);
|
|
80
80
|
assert.match(src,/arg==='--filter'/);
|
|
@@ -100,7 +100,7 @@ test('R40 interrupted side effect is explicit failed-after-unknown-effect instea
|
|
|
100
100
|
args:{root_id:'core',path:'x.txt',content:'x'}},{sequence:70});
|
|
101
101
|
const line=tracker.observe({event_type:'tool.result',tool:'coding_file_write',request_id:'unknown-12345678',
|
|
102
102
|
outcome:{status:'interrupted',is_error:true,duration_ms:0,side_effect_state:'unknown',recovery:{reason:'runtime_restart'}}},{sequence:71});
|
|
103
|
-
assert.match(line,/FAILED_AFTER_UNKNOWN_EFFECT โ runtime_restart$/);
|
|
103
|
+
assert.match(line,/FAILED_AFTER_UNKNOWN_EFFECT status=interrupted โ runtime_restart$/);
|
|
104
104
|
assert.doesNotMatch(line,/\s[โโ]\s/);
|
|
105
105
|
});
|
|
106
106
|
|
|
@@ -124,7 +124,7 @@ test('visual opcode projection resolves multiplexed machine_fs operation and exp
|
|
|
124
124
|
now=1007;
|
|
125
125
|
const done=tracker.observe({event_type:'tool.result',tool:'machine_fs',request_id:'machinefs-12345678',
|
|
126
126
|
ts:'1970-01-01T00:00:01.007Z',outcome:{status:'committed',is_error:false,duration_ms:7,receipt_sha256s:[receipt]}},{sequence:81});
|
|
127
|
-
assert.match(done,/^๐ .*machine_fs\.write .*7ms โ
SUCCEEDED ๐งพ receipt=11111111โฆ$/);
|
|
127
|
+
assert.match(done,/^๐ .*machine_fs\.write .*7ms โ
SUCCEEDED status=committed ๐งพ receipt=11111111โฆ$/);
|
|
128
128
|
});
|
|
129
129
|
|
|
130
130
|
test('visual opcode projection reserves warning semantics for explicitly unknown side effects',()=>{
|
|
@@ -133,7 +133,7 @@ test('visual opcode projection reserves warning semantics for explicitly unknown
|
|
|
133
133
|
args:{root_id:'core',command_id:'powershell_inline',mode:'inline'}},{sequence:90});
|
|
134
134
|
const done=tracker.observe({event_type:'tool.result',tool:'host_exec',request_id:'unknown-host-1234',
|
|
135
135
|
outcome:{status:'interrupted',is_error:true,duration_ms:4,side_effect_state:'unknown',recovery:{reason:'runtime_restart'}}},{sequence:91});
|
|
136
|
-
assert.match(done,/^โ ๏ธ .*host_exec .*4ms FAILED_AFTER_UNKNOWN_EFFECT โ runtime_restart$/);
|
|
136
|
+
assert.match(done,/^โ ๏ธ .*host_exec .*4ms FAILED_AFTER_UNKNOWN_EFFECT status=interrupted โ runtime_restart$/);
|
|
137
137
|
assert.doesNotMatch(done,/โ|๐ซ/);
|
|
138
138
|
});
|
|
139
139
|
|
|
@@ -218,3 +218,20 @@ test('R51 live timeline marks slow calls and reports peak in-flight concurrency'
|
|
|
218
218
|
tracker.observe({event_type:'tool.result',tool:'coding_file_read',request_id:'slow-b-12345678',outcome:{is_error:false,duration_ms:5}});
|
|
219
219
|
assert.match(tracker.summary(),/peak in-flight 2/);
|
|
220
220
|
});
|
|
221
|
+
|
|
222
|
+
test('human mutation span labels START and preserves terminal audit status',()=>{
|
|
223
|
+
const tracker=createLiveTimelineTracker({clock:()=>1000});
|
|
224
|
+
const start=tracker.observe({event_type:'tool.request',tool:'coding_file_write',request_id:'detail-1234567890',
|
|
225
|
+
args:{root_id:'core',path:'x.txt',content:'x'}},{sequence:120});
|
|
226
|
+
assert.match(start,/coding_file_write โถ START core:x\.txt \(1B\)$/);
|
|
227
|
+
const done=tracker.observe({event_type:'tool.result',tool:'coding_file_write',request_id:'detail-1234567890',
|
|
228
|
+
outcome:{status:'committed',is_error:false,duration_ms:3,receipt_sha256s:['a'.repeat(64)]}},{sequence:121});
|
|
229
|
+
assert.match(done,/coding_file_write .*3ms โ
SUCCEEDED status=committed ๐งพ receipt=aaaaaaaaโฆ$/);
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
test('foreground human log keeps START and DONE separate and folds heartbeat noise',async()=>{
|
|
233
|
+
const {readFile}=await import('node:fs/promises');
|
|
234
|
+
const src=await readFile(new URL('../src/deadbyte-cli.mjs',import.meta.url),'utf8');
|
|
235
|
+
assert.match(src,/createLiveTimelineTracker\(\{verbose,displayMode,rootPaths,trace,foldHeartbeats:!verbose\}\)/);
|
|
236
|
+
assert.match(src,/createLiveTimelineWriter\(\{stream:process\.stdout,displayMode,rewrite:false\}\)/);
|
|
237
|
+
});
|
|
@@ -148,7 +148,7 @@ for(const [flag,armedPlane,disarmedPlane] of [['--desktop','desktop','host'],['-
|
|
|
148
148
|
child=spawn(process.execPath,[cliPath,'remote',flag],{env:fx.env,stdio:['pipe','pipe','pipe'],windowsHide:true});
|
|
149
149
|
const output=await collect(child);
|
|
150
150
|
const deadline=Date.now()+8000;
|
|
151
|
-
while(Date.now()<deadline
|
|
151
|
+
while(Date.now()<deadline&&!/\[READY\]/.test(output.stdout)) await sleep(50);
|
|
152
152
|
assert.match(output.stdout,/\[READY\]/,output.stderr);
|
|
153
153
|
assert.match(output.stdout,new RegExp(`${armedPlane} ARMED`));
|
|
154
154
|
assert.match(output.stdout,new RegExp(`${disarmedPlane} DISARMED`));
|