deadbyte-mcp 0.15.38 → 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.
@@ -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
+ });