@inventarch/compliance 3.0.0 → 3.1.0
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/README.md +4 -2
- package/SPEC.md +17 -0
- package/dist/conformance/bind.d.ts +42 -0
- package/dist/conformance/bind.d.ts.map +1 -0
- package/dist/conformance/bind.js +129 -0
- package/dist/conformance/bind.js.map +1 -0
- package/dist/conformance/corpus.d.ts +13 -0
- package/dist/conformance/corpus.d.ts.map +1 -0
- package/dist/conformance/corpus.js +43 -0
- package/dist/conformance/corpus.js.map +1 -0
- package/dist/conformance/evidence-fixtures.d.ts +5 -0
- package/dist/conformance/evidence-fixtures.d.ts.map +1 -0
- package/dist/conformance/evidence-fixtures.js +257 -0
- package/dist/conformance/evidence-fixtures.js.map +1 -0
- package/dist/conformance/evidence.d.ts +52 -0
- package/dist/conformance/evidence.d.ts.map +1 -0
- package/dist/conformance/evidence.js +96 -0
- package/dist/conformance/evidence.js.map +1 -0
- package/dist/conformance/inventory.d.ts +36 -0
- package/dist/conformance/inventory.d.ts.map +1 -0
- package/dist/conformance/inventory.generated.d.ts +4 -0
- package/dist/conformance/inventory.generated.d.ts.map +1 -0
- package/dist/conformance/inventory.generated.js +2230 -0
- package/dist/conformance/inventory.generated.js.map +1 -0
- package/dist/conformance/inventory.js +15 -0
- package/dist/conformance/inventory.js.map +1 -0
- package/dist/conformance/refusals.d.ts +5 -0
- package/dist/conformance/refusals.d.ts.map +1 -0
- package/dist/conformance/refusals.js +372 -0
- package/dist/conformance/refusals.js.map +1 -0
- package/dist/conformance/verify-kernel.d.ts +9 -0
- package/dist/conformance/verify-kernel.d.ts.map +1 -0
- package/dist/conformance/verify-kernel.js +49 -0
- package/dist/conformance/verify-kernel.js.map +1 -0
- package/dist/conformance/verify.d.ts +15 -0
- package/dist/conformance/verify.d.ts.map +1 -0
- package/dist/conformance/verify.js +170 -0
- package/dist/conformance/verify.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/kernel.d.ts +25 -0
- package/dist/kernel.d.ts.map +1 -0
- package/dist/kernel.js +290 -0
- package/dist/kernel.js.map +1 -0
- package/dist/report.d.ts +6 -0
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +28 -7
- package/dist/report.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/fixtures/loop/.ia/src/systems/workspace-system/schemas/distribution.schema.ia +11 -0
- package/fixtures/refusals.ts +2 -470
- package/package.json +3 -3
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { KernelSource } from '../kernel.js';
|
|
2
|
+
import type { Assessment } from '../types.js';
|
|
3
|
+
import type { OutOfProfileSuite } from './inventory.js';
|
|
4
|
+
/** The conformance profile a sandboxed consumer can run itself (C31). */
|
|
5
|
+
export declare const CONFORMANCE_PROFILE = "package-v1";
|
|
6
|
+
export type ConformanceProfile = typeof CONFORMANCE_PROFILE;
|
|
7
|
+
/** The running toolchain an evidence object was produced by. */
|
|
8
|
+
export interface ConformanceToolchain {
|
|
9
|
+
readonly languageVersion: string;
|
|
10
|
+
readonly kernelDigest: string;
|
|
11
|
+
readonly compliance: string;
|
|
12
|
+
readonly node: string;
|
|
13
|
+
}
|
|
14
|
+
export interface KernelEvidence {
|
|
15
|
+
readonly subject: 'COMP-KERNEL';
|
|
16
|
+
readonly profile: ConformanceProfile;
|
|
17
|
+
readonly toolchain: ConformanceToolchain;
|
|
18
|
+
/** `kernelDigest` of the floor this evidence verified. */
|
|
19
|
+
readonly floorDigest: string;
|
|
20
|
+
readonly assessment: Assessment;
|
|
21
|
+
}
|
|
22
|
+
export interface FixtureEvidence {
|
|
23
|
+
readonly subject: 'COMP-FIXTURES';
|
|
24
|
+
readonly profile: ConformanceProfile;
|
|
25
|
+
readonly toolchain: ConformanceToolchain;
|
|
26
|
+
/** `INVENTORY_DIGEST` of the inventory this evidence ran. */
|
|
27
|
+
readonly inventoryDigest: string;
|
|
28
|
+
/** The codes passing failing cases observed. */
|
|
29
|
+
readonly observedCodes: readonly string[];
|
|
30
|
+
/** The suites the profile does not run, so a pass says nothing about them. */
|
|
31
|
+
readonly outOfProfile: readonly OutOfProfileSuite[];
|
|
32
|
+
readonly assessment: Assessment;
|
|
33
|
+
}
|
|
34
|
+
export type ConformanceEvidence = KernelEvidence | FixtureEvidence;
|
|
35
|
+
/** True only for evidence verifyKernel or verifyFixtures returned in this module instance, of `subject`'s kind if given. */
|
|
36
|
+
export declare function isConformanceEvidence(value: unknown, subject: 'COMP-KERNEL'): value is KernelEvidence;
|
|
37
|
+
export declare function isConformanceEvidence(value: unknown, subject: 'COMP-FIXTURES'): value is FixtureEvidence;
|
|
38
|
+
export declare function isConformanceEvidence(value: unknown): value is ConformanceEvidence;
|
|
39
|
+
/** The toolchain this process runs. */
|
|
40
|
+
export declare function runningToolchain(): ConformanceToolchain;
|
|
41
|
+
/**
|
|
42
|
+
* Verifies COMP-KERNEL in this process: regenerates the kernel from `floor` (the embedded floor by default) and
|
|
43
|
+
* compares it with the running language. The evidence records the digest of the floor it verified.
|
|
44
|
+
*/
|
|
45
|
+
export declare function verifyKernel(floor?: readonly KernelSource[]): KernelEvidence;
|
|
46
|
+
/**
|
|
47
|
+
* Verifies COMP-FIXTURES in this process for the package-v1 profile: runs the language fixtures this package ships
|
|
48
|
+
* against its generated inventory, and the refusal and evidence suites over the conformance corpus it embeds. It reads
|
|
49
|
+
* the package's own fixture files and writes nothing.
|
|
50
|
+
*/
|
|
51
|
+
export declare function verifyFixtures(): FixtureEvidence;
|
|
52
|
+
//# sourceMappingURL=evidence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence.d.ts","sourceRoot":"","sources":["../../src/conformance/evidence.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACj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E,OAAO,EAAE,OAAO,EAAE,aAAa,GAAG,KAAK,IAAI,cAAc,CAAC;AACvG,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,KAAK,IAAI,eAAe,CAAC;AAC1G,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAAC;AA2BpF,uCAAuC;AACvC,wBAAgB,gBAAgB,IAAI,oBAAoB,CAOvD;AAuBD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,GAAE,SAAS,YAAY,EAAmB,GAAG,cAAc,CAW5F;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,eAAe,CAahD"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { KERNEL_DIGEST, KERNEL_SOURCES, LANGUAGE_VERSION } from '@inventarch/language';
|
|
3
|
+
import { kernelDigest } from '../kernel.js';
|
|
4
|
+
import { INVENTORY, INVENTORY_DIGEST } from './inventory.generated.js';
|
|
5
|
+
import { kernelAssessment } from './verify-kernel.js';
|
|
6
|
+
import { runProfile } from './verify.js';
|
|
7
|
+
/** The conformance profile a sandboxed consumer can run itself (C31). */
|
|
8
|
+
export const CONFORMANCE_PROFILE = 'package-v1';
|
|
9
|
+
/** Evidence this module instance produced, by kind. Copies, clones and hand-built objects are never members. */
|
|
10
|
+
const kernels = new WeakSet(), fixtureRuns = new WeakSet();
|
|
11
|
+
export function isConformanceEvidence(value, subject) {
|
|
12
|
+
if (typeof value !== 'object' || value === null)
|
|
13
|
+
return false;
|
|
14
|
+
return subject === 'COMP-KERNEL'
|
|
15
|
+
? kernels.has(value)
|
|
16
|
+
: subject === 'COMP-FIXTURES'
|
|
17
|
+
? fixtureRuns.has(value)
|
|
18
|
+
: kernels.has(value) || fixtureRuns.has(value);
|
|
19
|
+
}
|
|
20
|
+
let compliance;
|
|
21
|
+
function complianceVersion() {
|
|
22
|
+
if (compliance === undefined)
|
|
23
|
+
try {
|
|
24
|
+
const manifest = JSON.parse(readFileSync(new URL('../../package.json', import.meta.url), 'utf8'));
|
|
25
|
+
compliance =
|
|
26
|
+
manifest.name === '@inventarch/compliance' && typeof manifest.version === 'string'
|
|
27
|
+
? manifest.version
|
|
28
|
+
: 'unknown';
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
compliance = 'unknown';
|
|
32
|
+
}
|
|
33
|
+
return compliance;
|
|
34
|
+
}
|
|
35
|
+
/** The toolchain this process runs. */
|
|
36
|
+
export function runningToolchain() {
|
|
37
|
+
return Object.freeze({
|
|
38
|
+
languageVersion: LANGUAGE_VERSION,
|
|
39
|
+
kernelDigest: KERNEL_DIGEST,
|
|
40
|
+
compliance: complianceVersion(),
|
|
41
|
+
node: process.version,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function freeze(value) {
|
|
45
|
+
if (typeof value === 'object' && value !== null && !Object.isFrozen(value)) {
|
|
46
|
+
Object.freeze(value);
|
|
47
|
+
for (const item of Object.values(value))
|
|
48
|
+
freeze(item);
|
|
49
|
+
}
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
function floorOf(floor) {
|
|
53
|
+
if (!Array.isArray(floor) ||
|
|
54
|
+
floor.some((source) => typeof source !== 'object' ||
|
|
55
|
+
source === null ||
|
|
56
|
+
typeof source.path !== 'string' ||
|
|
57
|
+
typeof source.text !== 'string'))
|
|
58
|
+
throw new TypeError('A floor is an array of {path, text} sources');
|
|
59
|
+
return floor.map(({ path, text }) => ({ path, text }));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Verifies COMP-KERNEL in this process: regenerates the kernel from `floor` (the embedded floor by default) and
|
|
63
|
+
* compares it with the running language. The evidence records the digest of the floor it verified.
|
|
64
|
+
*/
|
|
65
|
+
export function verifyKernel(floor = KERNEL_SOURCES) {
|
|
66
|
+
const sources = floorOf(floor);
|
|
67
|
+
const evidence = freeze({
|
|
68
|
+
subject: 'COMP-KERNEL',
|
|
69
|
+
profile: CONFORMANCE_PROFILE,
|
|
70
|
+
toolchain: runningToolchain(),
|
|
71
|
+
floorDigest: kernelDigest(sources),
|
|
72
|
+
assessment: kernelAssessment(sources),
|
|
73
|
+
});
|
|
74
|
+
kernels.add(evidence);
|
|
75
|
+
return evidence;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Verifies COMP-FIXTURES in this process for the package-v1 profile: runs the language fixtures this package ships
|
|
79
|
+
* against its generated inventory, and the refusal and evidence suites over the conformance corpus it embeds. It reads
|
|
80
|
+
* the package's own fixture files and writes nothing.
|
|
81
|
+
*/
|
|
82
|
+
export function verifyFixtures() {
|
|
83
|
+
const result = runProfile(INVENTORY, INVENTORY_DIGEST, new URL('../../fixtures/language/', import.meta.url));
|
|
84
|
+
const evidence = freeze({
|
|
85
|
+
subject: 'COMP-FIXTURES',
|
|
86
|
+
profile: CONFORMANCE_PROFILE,
|
|
87
|
+
toolchain: runningToolchain(),
|
|
88
|
+
inventoryDigest: INVENTORY_DIGEST,
|
|
89
|
+
observedCodes: [...result.observedCodes],
|
|
90
|
+
outOfProfile: INVENTORY.outOfProfile.map((suite) => ({ ...suite, codes: [...suite.codes] })),
|
|
91
|
+
assessment: result.assessment,
|
|
92
|
+
});
|
|
93
|
+
fixtureRuns.add(evidence);
|
|
94
|
+
return evidence;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=evidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence.js","sourceRoot":"","sources":["../../src/conformance/evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,EAAE,SAAS,EAAE,gBAAgB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MAAM,CAAiB;QACtC,OAAO,EAAE,aAAa;QACtB,OAAO,EAAE,mBAAmB;QAC5B,SAAS,EAAE,gBAAgB,EAAE;QAC7B,WAAW,EAAE,YAAY,CAAC,OAAO,CAAC;QAClC,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC;KACtC,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IACtB,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,EAAE,gBAAgB,EAAE,IAAI,GAAG,CAAC,0BAA0B,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7G,MAAM,QAAQ,GAAG,MAAM,CAAkB;QACvC,OAAO,EAAE,eAAe;QACxB,OAAO,EAAE,mBAAmB;QAC5B,SAAS,EAAE,gBAAgB,EAAE;QAC7B,eAAe,EAAE,gBAAgB;QACjC,aAAa,EAAE,CAAC,GAAG,MAAM,CAAC,aAAa,CAAC;QACxC,YAAY,EAAE,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC5F,UAAU,EAAE,MAAM,CAAC,UAAU;KAC9B,CAAC,CAAC;IACH,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC1B,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** The companions a fixture of this clause and mode may have, besides its `.ia` source. */
|
|
2
|
+
export declare function companionSuffixes(clause: string, mode: 'pass' | 'fail'): readonly string[];
|
|
3
|
+
export interface InventoryFixture {
|
|
4
|
+
/** `<clause>/<mode>/<stem>.ia` under the package's `fixtures/language`. */
|
|
5
|
+
readonly path: string;
|
|
6
|
+
readonly clause: string;
|
|
7
|
+
readonly mode: 'pass' | 'fail';
|
|
8
|
+
/** The sha256 of each of the fixture's files by suffix, `.ia` included. */
|
|
9
|
+
readonly files: Readonly<Record<string, string>>;
|
|
10
|
+
}
|
|
11
|
+
/** A suite the profile does not run, the reason, and the codes only it observes. */
|
|
12
|
+
export interface OutOfProfileSuite {
|
|
13
|
+
readonly suite: 'HOOK' | 'RUNTIME' | 'escalation' | 'EXEC' | 'PUBLICATION';
|
|
14
|
+
readonly reason: string;
|
|
15
|
+
readonly codes: readonly string[];
|
|
16
|
+
}
|
|
17
|
+
export interface ConformanceInventory {
|
|
18
|
+
readonly profile: 'package-v1';
|
|
19
|
+
readonly fixtures: readonly InventoryFixture[];
|
|
20
|
+
/** The conformance corpus the boundary suites run over, as `KERNEL_SOURCES` carries the floor. */
|
|
21
|
+
readonly corpus: readonly {
|
|
22
|
+
readonly path: string;
|
|
23
|
+
readonly text: string;
|
|
24
|
+
}[];
|
|
25
|
+
/** The system folders of the corpus. */
|
|
26
|
+
readonly folders: readonly string[];
|
|
27
|
+
/** The scope of every boundary case of the refusal and evidence suites. */
|
|
28
|
+
readonly boundaries: readonly string[];
|
|
29
|
+
/** The codes a passing failing case must observe: every LANG, GRAPH, COMP and EVIDENCE code. */
|
|
30
|
+
readonly requiredCodes: readonly string[];
|
|
31
|
+
readonly outOfProfile: readonly OutOfProfileSuite[];
|
|
32
|
+
}
|
|
33
|
+
export declare const fileDigest: (bytes: Uint8Array) => string;
|
|
34
|
+
/** The digest an inventory is pinned by: sha256 over its stable serialization. */
|
|
35
|
+
export declare function inventoryDigest(inventory: ConformanceInventory): string;
|
|
36
|
+
//# sourceMappingURL=inventory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.d.ts","sourceRoot":"","sources":["../../src/conformance/inventory.ts"],"names":[],"mappings":"AAGA,2FAA2F;AAC3F,wBAAgB,iBAAiB,CAAC,MAAM,EAA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AC;AAC1G,kFAAkF;AAClF,wBAAgB,eAAe,CAAC,SAAS,EAAE,oBAAoB,GAAG,MAAM,CAEvE"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ConformanceInventory } from './inventory.js';
|
|
2
|
+
export declare const INVENTORY: ConformanceInventory;
|
|
3
|
+
export declare const INVENTORY_DIGEST = "030084fc86ce6024a2626780e774691157561a3a44a9c7ac2cf2cb72dd77a73a";
|
|
4
|
+
//# sourceMappingURL=inventory.generated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inventory.generated.d.ts","sourceRoot":"","sources":["../../src/conformance/inventory.generated.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,eAAO,MAAM,SAAS,EAAE,oBAmrEvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,qEAAqE,CAAC"}
|