@inventarch/compliance 3.7.0 → 3.8.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 +3 -3
- package/SPEC.md +8 -7
- package/dist/catalog.d.ts +36 -7
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +100 -30
- package/dist/catalog.js.map +1 -1
- package/dist/conformance/evidence-fixtures.d.ts.map +1 -1
- package/dist/conformance/evidence-fixtures.js +10 -7
- package/dist/conformance/evidence-fixtures.js.map +1 -1
- package/dist/conformance/evidence.d.ts +4 -4
- package/dist/conformance/evidence.d.ts.map +1 -1
- package/dist/conformance/evidence.js +3 -2
- package/dist/conformance/evidence.js.map +1 -1
- package/dist/conformance/inventory.d.ts +5 -1
- package/dist/conformance/inventory.d.ts.map +1 -1
- package/dist/conformance/inventory.generated.d.ts +1 -1
- package/dist/conformance/inventory.generated.js +2 -2
- package/dist/conformance/inventory.generated.js.map +1 -1
- package/dist/conformance/inventory.js +5 -0
- package/dist/conformance/inventory.js.map +1 -1
- package/dist/conformance/verify.d.ts +1 -1
- package/dist/conformance/verify.d.ts.map +1 -1
- package/dist/conformance/verify.js +6 -4
- package/dist/conformance/verify.js.map +1 -1
- package/dist/evidence.d.ts.map +1 -1
- package/dist/evidence.js +2 -2
- package/dist/evidence.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/obligations.d.ts.map +1 -1
- package/dist/obligations.js +10 -7
- package/dist/obligations.js.map +1 -1
- package/dist/profiles.d.ts +4 -3
- package/dist/profiles.d.ts.map +1 -1
- package/dist/profiles.js +9 -2
- package/dist/profiles.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -56,10 +56,10 @@ for (const verdict of verified.verdicts.filter((v) => ['COMP-KERNEL', 'COMP-FIXT
|
|
|
56
56
|
console.log(verdict.check, verdict.outcome, verdict.basis);
|
|
57
57
|
// COMP-FIXTURES pass verified
|
|
58
58
|
// COMP-KERNEL pass verified
|
|
59
|
-
console.log(verified.conformance.profile); // package
|
|
59
|
+
console.log(verified.conformance.profile); // package
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
`verifyKernel()` regenerates the kernel from the floor and compares it with the running `@inventarch/language`; `verifyFixtures()` runs the `package
|
|
62
|
+
`verifyKernel()` regenerates the kernel from the floor and compares it with the running `@inventarch/language`; `verifyFixtures()` runs the `package` profile of the fixtures this package ships. `verified.conformance.fixtures.outOfProfile` names the suites that profile does not run: hooks, the runtime, escalation, execution and publication.
|
|
63
63
|
|
|
64
64
|
## 🧭 What it does
|
|
65
65
|
|
|
@@ -101,5 +101,5 @@ Finding codes are `COMP_CODES` and `EVIDENCE_CODES` (`IA-COMP-*`); language and
|
|
|
101
101
|
- [LANGUAGE.md](LANGUAGE.md): the packaged summary of the words this release ships
|
|
102
102
|
- [Architecture reference](../../docs/reference/architecture/README.md#which-package-to-use) and the [host plugin specification](../../docs/specs/host-plugin-distribution/README.md)
|
|
103
103
|
- Neighbours in the dependency direction: [`@inventarch/language`](../language/README.md) and [`@inventarch/graph`](../graph/README.md) before it; [`@inventarch/db`](../db/README.md) after it
|
|
104
|
-
- In this repository, `pnpm compliance:check` runs these checks over the native corpus, the conformance fixtures and the `package
|
|
104
|
+
- In this repository, `pnpm compliance:check` runs these checks over the native corpus, the conformance fixtures and the `package` inventory
|
|
105
105
|
- [Root README](../../README.md)
|
package/SPEC.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Compliance specification
|
|
2
2
|
|
|
3
|
-
Evaluator catalog extension: the producer side of trusted evaluator catalog and obligations is implemented by C25–C29 below (the catalog, check binding, obligation resolution including the strict-typing
|
|
3
|
+
Evaluator catalog extension: the producer side of trusted evaluator catalog and obligations is implemented by C25–C29 below (the catalog, check binding, obligation resolution including the strict-typing profile mapping, receipts and admission, with their qualification cases in tests/evaluator-catalog.test.ts). It is explicit and optional: calls without a catalog keep the built-in-only behavior, and unknown check.runs ids still refuse. Hosts outside this package own the consumer side: transactional admission and the managed transition, choosing between fixed and catalog evaluators, re-evaluation after a late edit, concurrent workers with durable intent, silent agents, and a real strict-typing compiler evaluator with excluded-source detection. No scheduler, execution, persistence or native word is added here.
|
|
4
4
|
|
|
5
5
|
Status: C01–C21 and C25–C32 are implemented; the projection clauses C22–C24 are retired (below). Delivery evidence below is chronological; statements of later work within early checkpoints describe that checkpoint only.
|
|
6
6
|
|
|
@@ -92,7 +92,7 @@ C22–C24 (the host projection renderers renderHostArtifacts and renderWorkspace
|
|
|
92
92
|
|
|
93
93
|
## Trusted evaluator catalog, obligations and evidence (producer side)
|
|
94
94
|
|
|
95
|
-
C25 (catalog
|
|
95
|
+
C25 (catalog). Pure `createEvaluatorCatalog({format, formatVersion, entries}, {codecs, builtins?})`. The current shape is exactly `{format: 'evaluator-catalog', formatVersion: 2, entries}`: the version is an integer field, never part of the name, and an unsupported `formatVersion` (EVALUATOR_CATALOG_FORMAT_VERSIONS) is CATALOG-VERSION. The legacy shape `{format: 'ia-evaluator-catalog/1.<minor>', entries}` is still read: any minor of major 1 is accepted, its entries name codecs by the legacy `inputSchemaId` / `outputSchemaId` strings `name@major`, and an explicit legacy reader (`legacyCodecRef`, the only parser of that string) converts them to `{id, version}`, so the accepted catalog always carries the current entry shape (`catalog.formatVersion` is 1 for a legacy catalog, 2 otherwise) and a legacy catalog's digest is still computed over its entries as declared. An unknown key (e.g. `revocations`), another major or another shape is CATALOG-VERSION; each shape is exact, so the legacy fields in the current shape and the current fields in the legacy shape are CATALOG-ENTRY-INVALID; the declared format, and the format version in the current shape, are part of the digest. An entry has exactly id, contractVersion, implementationVersion, implementationDigest, inputCodec, outputCodec, supportedScopes, effects, environmentProfile, limits, evidencePolicy and availability; an unknown or missing field is CATALOG-ENTRY-INVALID. The id is a lowercase namespaced `id` (at least one hyphen, e.g. `acme-strict-typing`) so it stays a valid native `check.runs` value. Only CHECK_IDS are built in (D4). `options.builtins` lists host-reserved ids (validated as `A-Z`/`a-z` ids, otherwise TypeError); an entry id equal case-insensitively to a CHECK_IDS or reserved id, or in the reserved `comp` namespace, is CATALOG-BUILTIN-OVERRIDE. Reserved ids are recorded as `catalog.reserved`; they never pass COMP-CHECK and never resolve as evaluators. Versions are MAJOR.MINOR.PATCH; a contractVersion major outside EVALUATOR_CONTRACT_MAJORS (1) is CATALOG-VERSION. implementationDigest is `sha256:<64 hex>`. inputCodec/outputCodec are `{id, version}` references (a plain token id with no `@`, and a positive safe-integer version; `contractVersion` keeps its meaning, the version of the evaluator's invocation contract) that must name a codec in the host registry, otherwise CATALOG-CODEC-UNKNOWN; a malformed reference is CATALOG-ENTRY-INVALID. A codec is registered as `{id, version, validate, normalize?}` (a list; a malformed or repeated `{id, version}` registration is a TypeError), is trusted host code, and is looked up by the pair, so two versions of one codec id coexist (`codecOf(catalog, {id, version})`). supportedScopes (nonempty) and effects are unique ids. environmentProfile is `{id, credentials: none | scoped}`; ambient credentials are not expressible. limits require positive safe-integer timeoutMs, memoryBytes, outputBytes and concurrency (CATALOG-LIMITS). evidencePolicy is `{kind: fresh-run}` or `{kind: reusable, maxAgeMs, environmentSensitive}`. availability is `{status: supported}` or `{status: unavailable | revoked, reason}` with a printable single-line reason of at most 200 characters and no credential assignment. A repeated id@implementationVersion is CATALOG-DUPLICATE when the digests agree and CATALOG-DIGEST-CONFLICT when they differ; more than one supported version of one id is CATALOG-DUPLICATE. Findings carry the 1-based input index of the offending entry. Any finding refuses the whole catalog with no partial result. The accepted catalog is deeply frozen, entries sorted by id and version, with digest `sha256` of the canonical serialization of the format, entries, built-in and reserved ids; equal inputs in any entry order give equal digests. Only objects returned by this constructor are accepted by the functions below (`isEvaluatorCatalog`); a copied or hand-built object is a TypeError.
|
|
96
96
|
|
|
97
97
|
C26 (check.runs with a catalog). `validateCheck(node, catalog?)` and `evaluate(graph, {catalog})`. Without a catalog the result is byte-identical to C16. With one, a CHECK_IDS id passes as before; otherwise `selectEvaluator` picks the id's supported entry, else its highest listed version. Supported passes. Revoked is EVALUATOR-REVOKED, a blocking error. Unavailable is an EVALUATOR-UNAVAILABLE warning and the assessment is not-evaluated (D5): an unavailable evaluator does not refute the declaration, and blocking belongs to admission of a required obligation, while an optional one stays visibly unevaluated. An id in neither set, including a host-reserved id, is still CHECK-UNKNOWN. Native check records keep `check.runs`; the schema also admits `check.implementation`, which `checkRunner` reads first, and requires neither alone (C16). Catalog text never names a callback, command or path: `bindEvaluators(catalog, implementations)` associates trusted host implementations keyed `${id}@${implementationDigest}`, and any key naming an unknown, substituted, unavailable or revoked implementation is EVALUATOR-SUBSTITUTED and refuses the whole binding. The host must bind before invoking; binding invokes nothing, and admission independently checks each receipt's evaluator id, version and digest against the catalog (C28).
|
|
98
98
|
|
|
@@ -127,22 +127,23 @@ Failed diagnostics are sliced to 20 entries before filtering, and each line is r
|
|
|
127
127
|
|
|
128
128
|
Resolver not-applicable with evidence does not block. An optional obligation never blocks and is reported as `optional-unevaluated`, or `optional-failed` when its latest valid receipt failed. Each decision records the trust of the receipt it relied on, and the transition records `minimumTrust` and `reliedTrust` (the weakest trust among satisfying receipts, or none). A local unsigned receipt is a local diagnostic. None of these functions reads files, a clock or the network, schedules or executes anything, or persists receipts.
|
|
129
129
|
|
|
130
|
-
C29 (evaluation profiles; D6). `EVALUATION_PROFILES['strict-typing
|
|
130
|
+
C29 (evaluation profiles; D6). `EVALUATION_PROFILES['strict-typing']` is the consumer contract id mapping to three requirements: `configuration`, `included-file-coverage` and `compiler-run`. `profileOccurrences('strict-typing', binding)` expands one selected law or contract occurrence into three required occurrences with requirements `strict-typing/<name>`, each discharged by a host catalog evaluator named in the binding. A built-in id, a non-catalog id, an unknown profile or a missing or extra mapping is a TypeError. The original id `strict-typing-v1` stays an accepted alias, as compatibility for at least one major release; a requirement is named after the profile id the caller gave, so receipts written under the old id keep matching. The profile is not a native word. Declarations, native cases and check records never become results by presence: the three obligations are admitted only with valid passed receipts, so a real compiler run requires an installed evaluator and its receipt.
|
|
131
131
|
|
|
132
132
|
C30 (structural COMP-CHECK). `validateCheckStructure(node)` is COMP-CHECK as a structural admission reads it: CHECK-CONFLICT for two different evaluators and CHECK-UNKNOWN ("the check names no evaluator") for none, as C16 has them, and a pass for any one named evaluator, built in or not, because which implementation serves it is decided when the check is bound against a host catalog. `evaluate(graph, {checks})` takes `strict` (the default, C16 or C26 with `catalog`) or `structural`. `validateCheck` stays the strict admission every existing reader uses.
|
|
133
133
|
|
|
134
|
-
Evaluator catalog rules D1–D6 (2026-09-28): D1 package metadata never weakens a root-adopted obligation (C27); D2 admission is bound to a verified resolver-issued resolution (C27, C28); D3 service trust needs a host verifier, `minimumTrust` is required and trust is recorded (C28); D4 only CHECK_IDS are built in, `options.builtins` only reserves ids (C25, C26); D5 COMP-CHECK treats revoked as an error and unavailable as not-evaluated (C26); D6 the strict-typing
|
|
134
|
+
Evaluator catalog rules D1–D6 (2026-09-28): D1 package metadata never weakens a root-adopted obligation (C27); D2 admission is bound to a verified resolver-issued resolution (C27, C28); D3 service trust needs a host verifier, `minimumTrust` is required and trust is recorded (C28); D4 only CHECK_IDS are built in, `options.builtins` only reserves ids (C25, C26); D5 COMP-CHECK treats revoked as an error and unavailable as not-evaluated (C26); D6 the strict-typing producer mapping belongs to this package (C29).
|
|
135
135
|
|
|
136
136
|
Public type note: `Finding['code']` now also admits `EvidenceCode`, an additive widening of the exported union; consumers that switch exhaustively over `Finding['code']` must handle the new codes. C25–C29 codes are exported as `EVIDENCE_CODES`, separate from COMP_CODES. The repository fixture gate now requires successful producer observations for both inventories. `tools/compliance/evidence-fixtures.ts` executes 28 catalog, binding, obligation, receipt and admission refusals through the actual pure APIs, after valid catalog/receipt/admission positive controls. Removing or failing the sole observation for any evidence code fails COMP-FIXTURES. Direct package tests remain in tests/evaluator-catalog.test.ts. Synthetic local unsigned receipts establish no live host, writer, reviewer or service authorization.
|
|
137
137
|
|
|
138
138
|
C25–C28 delivered (2026-09-28) with 23 tests. A repair the same day added D1–D6, fixes to secret redaction and package directive validation, and C29, bringing tests/evaluator-catalog.test.ts to 35 tests. They cover catalog construction, check binding with and without a catalog, bounded evaluator output, receipt reuse and fresh-run attempts, the producer side of root precedence, obligation resolution and each catalog, binding, resolution, receipt and admission refusal, plus a byte-identical report regression without a catalog. The pre-change report digests on the native corpus (with and without supplied observations) were unchanged after the original change and after the repair.
|
|
139
139
|
|
|
140
|
-
## Native conformance evidence (package
|
|
140
|
+
## Native conformance evidence (package)
|
|
141
141
|
|
|
142
142
|
C31 (native conformance evidence). The package produces COMP-KERNEL and COMP-FIXTURES evidence itself, and `evaluate(graph, {conformance: {inputs, kernel, fixtures}})` binds it to the graph. It is opt-in: without `conformance`, nothing runs.
|
|
143
143
|
- `verifyKernel(floor = KERNEL_SOURCES)` regenerates the kernel from `floor` in-process against the closed contract. The pure generator lives in `src/kernel.ts`; `tools/kernel` keeps the reader, the drift check and `kernel:check`. It compares every regenerated constant, `KERNEL_DIGEST` and `KERNEL_SOURCES` included, with the running `@inventarch/language`'s public exports. `PRESENT_PHRASES` is not exported, so it is compared through what it determines: `VERB_PHRASES` and each phrase's `verbOf`. Only the public entry is read, so neither the generator nor `kernel:check` needs built output. A floor that does not regenerate, or regenerates to anything else, fails, so a floor with one byte changed fails. `floorDigest` is the digest of that floor, computed as `KERNEL_DIGEST` is.
|
|
144
|
-
-
|
|
145
|
-
-
|
|
144
|
+
- The profile id carries no version. `package-v1` is its original spelling and is accepted wherever an inventory names its profile, as compatibility for at least one major release; new evidence and inventories write `package`.
|
|
145
|
+
- `verifyFixtures()` runs the `package` profile: the language fixtures this package ships, checked against `src/conformance/inventory.generated.ts`, and the refusal and evidence boundary suites over the conformance corpus the inventory embeds. It reads only the package's own files and writes nothing. It fails on any of these: a missing, extra or changed fixture file; a companion its clause and mode do not admit; a fixture listed under another clause or mode; a duplicate inventory path; an inventory that differs from `INVENTORY_DIGEST`; required codes that differ from the running LANG, GRAPH, COMP and EVIDENCE codes; a boundary case the inventory does not list or that no longer runs; and any required code that no passing failing case observes. A fixture directory that cannot be read leaves the profile not-evaluated. So does a listed file that cannot be read: it is not evaluated and suspends the coverage judgement, while other failures still fail.
|
|
146
|
+
- Out of profile. Every fixture evidence object lists the suites the profile does not run, each with its reason and the codes only it observes: HOOK, RUNTIME, escalation, EXEC and PUBLICATION. A `package` pass says nothing about hooks, the runtime, execution or publication on that host; `tools/compliance` still runs those suites. The mandate fixtures are pure, but they need `@inventarch/runtime` and observe RUNTIME codes, so they stay out of profile.
|
|
146
147
|
- Evidence objects are deeply frozen and recorded by kind in module-private WeakSets. `isConformanceEvidence(value, subject?)` accepts only an object that `verifyKernel` or `verifyFixtures` returned in the same module instance. Each object carries `subject`, `profile`, `toolchain {languageVersion, kernelDigest, compliance, node}` and `assessment`. Kernel evidence adds `floorDigest`; fixture evidence adds `inventoryDigest`, `observedCodes` and `outOfProfile`. The words are C28's; none of C28's catalog, trust or admission machinery applies.
|
|
147
148
|
- Binding. `inputs` are the graph's `RevisionInputs`. `evaluate` reads them once, by index and without Array methods (so no `Symbol.species` constructor is consulted), into frozen plain data of exactly `{languageVersion, kernelDigest, sources: [{path, text, location: {placement: {kind, band, reach}, provenance}}]}`, and every rule below uses that copy, so a getter cannot show the revision one value and a later rule another. Both checks are NOT-EVALUATED when `revisionOf(graph.registry, inputs)` is not `graph.revision`, or when `inputs.languageVersion` or `inputs.kernelDigest` is not the running language's. Each check is also NOT-EVALUATED when its own evidence's toolchain is not the running one, so one stale object leaves the other bound. COMP-KERNEL is also NOT-EVALUATED when an input source has a `.ia/src/floor/` path or floor placement but not both, or when the digest of the sources that have both is not `kernel.floorDigest`. Otherwise each check takes its evidence's assessment. A COMP-KERNEL failure therefore needs verification that ran on the graph's own floor and failed.
|
|
148
149
|
- Refusals (TypeError): an unbranded, cloned, copied or hand-built object; a kernel object and a fixture object in each other's slots; `inputs` that are not an object with a sources array; a path, text, placement kind, reach, provenance, language version or kernel digest that is not a string, or a band that is not a number; and `evidence` together with `conformance`.
|
package/dist/catalog.d.ts
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import type { Assessment } from './types.js';
|
|
2
2
|
/**
|
|
3
|
-
* Current catalog format (C25)
|
|
4
|
-
*
|
|
3
|
+
* Current catalog format (C25): `{format: 'evaluator-catalog', formatVersion: 2, entries}`. The version is an
|
|
4
|
+
* integer field, never part of the name; an unsupported version is refused, and it is part of the catalog digest.
|
|
5
5
|
*/
|
|
6
|
-
export declare const EVALUATOR_CATALOG_FORMAT = "
|
|
6
|
+
export declare const EVALUATOR_CATALOG_FORMAT = "evaluator-catalog";
|
|
7
|
+
/** The catalog format versions this package reads in the current shape. */
|
|
8
|
+
export declare const EVALUATOR_CATALOG_FORMAT_VERSIONS: readonly [2];
|
|
9
|
+
/** The catalog format version new catalogs declare. */
|
|
10
|
+
export declare const EVALUATOR_CATALOG_FORMAT_VERSION = 2;
|
|
11
|
+
/**
|
|
12
|
+
* The legacy catalog format: `{format: 'ia-evaluator-catalog/1.<minor>', entries}`, whose entries name their codecs
|
|
13
|
+
* with `inputSchemaId` / `outputSchemaId` strings `name@major`. It is still read, by the explicit legacy reader
|
|
14
|
+
* below, and converted to the current entry shape; its digest stays the one computed over the declared legacy entries.
|
|
15
|
+
*/
|
|
16
|
+
export declare const LEGACY_EVALUATOR_CATALOG_FORMAT = "ia-evaluator-catalog/1.0";
|
|
7
17
|
/** Evaluator invocation-contract majors this package understands. */
|
|
8
18
|
export declare const EVALUATOR_CONTRACT_MAJORS: readonly [1];
|
|
9
19
|
export interface EvaluatorLimits {
|
|
@@ -29,13 +39,19 @@ export interface EnvironmentProfile {
|
|
|
29
39
|
readonly id: string;
|
|
30
40
|
readonly credentials: 'none' | 'scoped';
|
|
31
41
|
}
|
|
42
|
+
/** A codec reference: a codec id and its integer version. The pair, never a joined string, names a codec. */
|
|
43
|
+
export interface CodecRef {
|
|
44
|
+
readonly id: string;
|
|
45
|
+
readonly version: number;
|
|
46
|
+
}
|
|
32
47
|
export interface EvaluatorEntry {
|
|
33
48
|
readonly id: string;
|
|
49
|
+
/** The version of the evaluator's invocation contract. */
|
|
34
50
|
readonly contractVersion: string;
|
|
35
51
|
readonly implementationVersion: string;
|
|
36
52
|
readonly implementationDigest: string;
|
|
37
|
-
readonly
|
|
38
|
-
readonly
|
|
53
|
+
readonly inputCodec: CodecRef;
|
|
54
|
+
readonly outputCodec: CodecRef;
|
|
39
55
|
readonly supportedScopes: readonly string[];
|
|
40
56
|
readonly effects: readonly string[];
|
|
41
57
|
readonly environmentProfile: EnvironmentProfile;
|
|
@@ -49,15 +65,18 @@ export interface EvaluatorEntry {
|
|
|
49
65
|
*/
|
|
50
66
|
export interface EvaluatorCodec {
|
|
51
67
|
readonly id: string;
|
|
68
|
+
readonly version: number;
|
|
52
69
|
readonly validate: (value: unknown) => boolean;
|
|
53
70
|
readonly normalize?: (value: unknown) => unknown;
|
|
54
71
|
}
|
|
55
72
|
export interface CatalogInput {
|
|
56
73
|
readonly format: string;
|
|
74
|
+
/** Required in the current shape; absent in the legacy `ia-evaluator-catalog/1.x` shape. */
|
|
75
|
+
readonly formatVersion?: number;
|
|
57
76
|
readonly entries: readonly unknown[];
|
|
58
77
|
}
|
|
59
78
|
export interface CatalogOptions {
|
|
60
|
-
readonly codecs:
|
|
79
|
+
readonly codecs: readonly EvaluatorCodec[];
|
|
61
80
|
/**
|
|
62
81
|
* Additional host-reserved ids (D4). They only block catalog overrides; they never pass COMP-CHECK and never
|
|
63
82
|
* resolve as evaluators. Only CHECK_IDS are built in.
|
|
@@ -66,6 +85,8 @@ export interface CatalogOptions {
|
|
|
66
85
|
}
|
|
67
86
|
export interface EvaluatorCatalog {
|
|
68
87
|
readonly format: string;
|
|
88
|
+
/** 2 for the current shape; 1 for a catalog read from the legacy `ia-evaluator-catalog/1.x` shape. */
|
|
89
|
+
readonly formatVersion: number;
|
|
69
90
|
readonly digest: string;
|
|
70
91
|
readonly entries: readonly EvaluatorEntry[];
|
|
71
92
|
/** Always exactly CHECK_IDS. */
|
|
@@ -88,6 +109,13 @@ export interface EvaluatorBinding<T> {
|
|
|
88
109
|
}
|
|
89
110
|
export declare const EVALUATOR_ID: RegExp;
|
|
90
111
|
export declare const DIGEST: RegExp;
|
|
112
|
+
/** True for a `{id, version}` codec reference: a plain-token id and a positive safe-integer version. */
|
|
113
|
+
export declare function isCodecRef(value: unknown): value is CodecRef;
|
|
114
|
+
/**
|
|
115
|
+
* The legacy reader for a codec id written `name@major` (catalogs `ia-evaluator-catalog/1.x`, evidence that
|
|
116
|
+
* recorded such ids): the one place that parses it. Returns undefined for anything else.
|
|
117
|
+
*/
|
|
118
|
+
export declare function legacyCodecRef(legacyId: unknown): CodecRef | undefined;
|
|
91
119
|
export declare function compareVersions(a: string, b: string): number;
|
|
92
120
|
/**
|
|
93
121
|
* Pure v1 catalog constructor (C25). Refuses unknown format majors, malformed entries, invalid limits,
|
|
@@ -98,7 +126,8 @@ export declare function createEvaluatorCatalog(input: CatalogInput, options: Cat
|
|
|
98
126
|
/** True only for a catalog returned by createEvaluatorCatalog in this module instance. */
|
|
99
127
|
export declare function isEvaluatorCatalog(value: unknown): value is EvaluatorCatalog;
|
|
100
128
|
export declare function assertCatalog(value: unknown): asserts value is EvaluatorCatalog;
|
|
101
|
-
|
|
129
|
+
/** The host codec registered for exactly this `{id, version}` pair, or undefined. */
|
|
130
|
+
export declare function codecOf(catalog: EvaluatorCatalog, ref: CodecRef): EvaluatorCodec | undefined;
|
|
102
131
|
/** The entry a check's evaluator id (checkRunner: check.implementation, else check.runs) selects: the supported implementation, else the highest listed version. */
|
|
103
132
|
export declare function selectEvaluator(catalog: EvaluatorCatalog, id: string): EvaluatorEntry | undefined;
|
|
104
133
|
export declare function catalogEntry(catalog: EvaluatorCatalog, id: string, implementationVersion: string): EvaluatorEntry | undefined;
|
package/dist/catalog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts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,GAAG,KAAK,IAAI,QAAQ,CAO5D;AACD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,CAKtE;AAGD,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAK5D;AAoLD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,cAAc,GAAG,aAAa,CAuGlG;AACD,0FAA0F;AAC1F,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E;AACD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,gBAAgB,CAG/E;AACD,qFAAqF;AACrF,wBAAgB,OAAO,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,EAAE,QAAQ,GAAG,cAAc,GAAG,SAAS,CAE5F;AACD,oKAAoK;AACpK,wBAAgB,eAAe,CAAC,OAAO,EAAE,gBAAgB,EAAE,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAIjG;AACD,wBAAgB,YAAY,CAC1B,OAAO,EAAE,gBAAgB,EACzB,EAAE,EAAE,MAAM,EACV,qBAAqB,EAAE,MAAM,GAC5B,cAAc,GAAG,SAAS,CAE5B;AACD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAC9B,OAAO,EAAE,gBAAgB,EACzB,eAAe,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,GACtC,gBAAgB,CAAC,CAAC,CAAC,CAyBrB"}
|
package/dist/catalog.js
CHANGED
|
@@ -2,10 +2,20 @@ import { CHECK_IDS } from './check-ids.js';
|
|
|
2
2
|
import { compareText, deepFreeze, exactKeys, record, sanitized, sha256 } from './shape.js';
|
|
3
3
|
import { assess } from './types.js';
|
|
4
4
|
/**
|
|
5
|
-
* Current catalog format (C25)
|
|
6
|
-
*
|
|
5
|
+
* Current catalog format (C25): `{format: 'evaluator-catalog', formatVersion: 2, entries}`. The version is an
|
|
6
|
+
* integer field, never part of the name; an unsupported version is refused, and it is part of the catalog digest.
|
|
7
7
|
*/
|
|
8
|
-
export const EVALUATOR_CATALOG_FORMAT = '
|
|
8
|
+
export const EVALUATOR_CATALOG_FORMAT = 'evaluator-catalog';
|
|
9
|
+
/** The catalog format versions this package reads in the current shape. */
|
|
10
|
+
export const EVALUATOR_CATALOG_FORMAT_VERSIONS = Object.freeze([2]);
|
|
11
|
+
/** The catalog format version new catalogs declare. */
|
|
12
|
+
export const EVALUATOR_CATALOG_FORMAT_VERSION = 2;
|
|
13
|
+
/**
|
|
14
|
+
* The legacy catalog format: `{format: 'ia-evaluator-catalog/1.<minor>', entries}`, whose entries name their codecs
|
|
15
|
+
* with `inputSchemaId` / `outputSchemaId` strings `name@major`. It is still read, by the explicit legacy reader
|
|
16
|
+
* below, and converted to the current entry shape; its digest stays the one computed over the declared legacy entries.
|
|
17
|
+
*/
|
|
18
|
+
export const LEGACY_EVALUATOR_CATALOG_FORMAT = 'ia-evaluator-catalog/1.0';
|
|
9
19
|
/** Evaluator invocation-contract majors this package understands. */
|
|
10
20
|
export const EVALUATOR_CONTRACT_MAJORS = Object.freeze([1]);
|
|
11
21
|
const ENTRY_KEYS = [
|
|
@@ -13,8 +23,8 @@ const ENTRY_KEYS = [
|
|
|
13
23
|
'contractVersion',
|
|
14
24
|
'implementationVersion',
|
|
15
25
|
'implementationDigest',
|
|
16
|
-
'
|
|
17
|
-
'
|
|
26
|
+
'inputCodec',
|
|
27
|
+
'outputCodec',
|
|
18
28
|
'supportedScopes',
|
|
19
29
|
'effects',
|
|
20
30
|
'environmentProfile',
|
|
@@ -24,13 +34,36 @@ const ENTRY_KEYS = [
|
|
|
24
34
|
];
|
|
25
35
|
export const EVALUATOR_ID = /^[a-z][a-z0-9]*(-[a-z0-9]+)+$/;
|
|
26
36
|
const TOKEN = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;
|
|
27
|
-
|
|
37
|
+
/** A codec id: a plain token. The version is a separate field, so an id never carries `@`. */
|
|
38
|
+
const CODEC_ID = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;
|
|
39
|
+
/** The legacy codec id, read only by `legacyCodecRef`. */
|
|
40
|
+
const LEGACY_CODEC_ID = /^([a-z][a-z0-9]*(?:-[a-z0-9]+)*)@([1-9][0-9]*)$/;
|
|
28
41
|
const SEMVER = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/;
|
|
29
42
|
export const DIGEST = /^sha256:[0-9a-f]{64}$/;
|
|
30
43
|
const FORMAT = /^ia-evaluator-catalog\/([0-9]+)\.([0-9]+)$/;
|
|
31
44
|
const RESERVED_ID = /^[A-Za-z][A-Za-z0-9]*(-[A-Za-z0-9]+)*$/;
|
|
32
45
|
const catalogs = new WeakSet();
|
|
33
46
|
const catalogCodecs = new WeakMap();
|
|
47
|
+
const codecKey = (id, version) => `${id}#${version}`;
|
|
48
|
+
/** True for a `{id, version}` codec reference: a plain-token id and a positive safe-integer version. */
|
|
49
|
+
export function isCodecRef(value) {
|
|
50
|
+
return (exactKeys(value, ['id', 'version']) &&
|
|
51
|
+
typeof value.id === 'string' &&
|
|
52
|
+
CODEC_ID.test(value.id) &&
|
|
53
|
+
positive(value.version));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The legacy reader for a codec id written `name@major` (catalogs `ia-evaluator-catalog/1.x`, evidence that
|
|
57
|
+
* recorded such ids): the one place that parses it. Returns undefined for anything else.
|
|
58
|
+
*/
|
|
59
|
+
export function legacyCodecRef(legacyId) {
|
|
60
|
+
const match = typeof legacyId === 'string' ? LEGACY_CODEC_ID.exec(legacyId) : null;
|
|
61
|
+
if (match === null)
|
|
62
|
+
return undefined;
|
|
63
|
+
const version = Number(match[2]);
|
|
64
|
+
return Number.isSafeInteger(version) ? Object.freeze({ id: match[1], version }) : undefined;
|
|
65
|
+
}
|
|
66
|
+
const legacyCodecId = (ref) => `${ref.id}@${ref.version}`;
|
|
34
67
|
export function compareVersions(a, b) {
|
|
35
68
|
const x = a.split('.').map(Number), y = b.split('.').map(Number);
|
|
36
69
|
for (let i = 0; i < 3; i++)
|
|
@@ -50,15 +83,16 @@ function tokens(value, nonempty) {
|
|
|
50
83
|
function note(code, line, message, path = '<catalog>') {
|
|
51
84
|
return { code, severity: 'error', path, line, message: `${path}:${line}: ${message}` };
|
|
52
85
|
}
|
|
53
|
-
function checkEntry(raw, line, reserved, codecs) {
|
|
86
|
+
function checkEntry(raw, line, reserved, codecs, legacy) {
|
|
54
87
|
const invalid = (message, code = 'IA-COMP-CATALOG-ENTRY-INVALID') => ({
|
|
55
88
|
finding: note(code, line, message),
|
|
56
89
|
});
|
|
57
90
|
if (!record(raw))
|
|
58
91
|
return invalid('Catalog entry must be an object');
|
|
92
|
+
const keys = ENTRY_KEYS.map((k) => legacy ? (k === 'inputCodec' ? 'inputSchemaId' : k === 'outputCodec' ? 'outputSchemaId' : k) : k);
|
|
59
93
|
const unknown = Object.keys(raw)
|
|
60
|
-
.filter((k) => !
|
|
61
|
-
.sort(compareText), missing =
|
|
94
|
+
.filter((k) => !keys.includes(k))
|
|
95
|
+
.sort(compareText), missing = keys.filter((k) => !Object.hasOwn(raw, k));
|
|
62
96
|
if (unknown.length > 0 || missing.length > 0)
|
|
63
97
|
return invalid(`Catalog entry fields must be exactly the v1 set${unknown.length > 0 ? `; unknown: ${unknown.join(', ')}` : ''}${missing.length > 0 ? `; missing: ${missing.join(', ')}` : ''}`);
|
|
64
98
|
const e = raw, { id } = e;
|
|
@@ -76,12 +110,18 @@ function checkEntry(raw, line, reserved, codecs) {
|
|
|
76
110
|
return invalid(`${id}: evaluator contract major ${major} is not supported (supported: ${EVALUATOR_CONTRACT_MAJORS.join(', ')})`, 'IA-COMP-CATALOG-VERSION');
|
|
77
111
|
if (typeof e.implementationDigest !== 'string' || !DIGEST.test(e.implementationDigest))
|
|
78
112
|
return invalid(`${id}: implementationDigest must be sha256:<64 lowercase hex>`);
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
113
|
+
const refs = [];
|
|
114
|
+
for (const key of legacy
|
|
115
|
+
? ['inputSchemaId', 'outputSchemaId']
|
|
116
|
+
: ['inputCodec', 'outputCodec']) {
|
|
117
|
+
const declared = e[key], ref = legacy ? legacyCodecRef(declared) : isCodecRef(declared) ? declared : undefined;
|
|
118
|
+
if (ref === undefined)
|
|
119
|
+
return invalid(legacy
|
|
120
|
+
? `${id}: ${key} must be a legacy codec id such as name@1`
|
|
121
|
+
: `${id}: ${key} must be {id, version}: a plain codec id and a positive integer version`);
|
|
122
|
+
if (!codecs.has(codecKey(ref.id, ref.version)))
|
|
123
|
+
return invalid(`${id}: ${key} ${legacyCodecId(ref)} is not a host-registered codec`, 'IA-COMP-CATALOG-CODEC-UNKNOWN');
|
|
124
|
+
refs.push(Object.freeze({ id: ref.id, version: ref.version }));
|
|
85
125
|
}
|
|
86
126
|
const supportedScopes = tokens(e.supportedScopes, true), effects = tokens(e.effects, false);
|
|
87
127
|
if (supportedScopes === undefined)
|
|
@@ -125,8 +165,8 @@ function checkEntry(raw, line, reserved, codecs) {
|
|
|
125
165
|
contractVersion: e.contractVersion,
|
|
126
166
|
implementationVersion: e.implementationVersion,
|
|
127
167
|
implementationDigest: e.implementationDigest,
|
|
128
|
-
|
|
129
|
-
|
|
168
|
+
inputCodec: refs[0],
|
|
169
|
+
outputCodec: refs[1],
|
|
130
170
|
supportedScopes,
|
|
131
171
|
effects,
|
|
132
172
|
environmentProfile: { id: profile.id, credentials: profile.credentials },
|
|
@@ -143,17 +183,20 @@ function checkEntry(raw, line, reserved, codecs) {
|
|
|
143
183
|
}
|
|
144
184
|
function codecMap(codecs) {
|
|
145
185
|
const map = new Map();
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
186
|
+
if (!Array.isArray(codecs))
|
|
187
|
+
throw new TypeError('options.codecs must be a list of {id, version, validate} codecs');
|
|
188
|
+
for (const codec of codecs) {
|
|
189
|
+
const key = codec !== null && typeof codec === 'object' && isCodecRef({ id: codec.id, version: codec.version })
|
|
190
|
+
? codecKey(codec.id, codec.version)
|
|
191
|
+
: undefined;
|
|
192
|
+
if (key === undefined ||
|
|
151
193
|
typeof codec.validate !== 'function' ||
|
|
152
194
|
(codec.normalize !== undefined && typeof codec.normalize !== 'function') ||
|
|
153
195
|
map.has(key))
|
|
154
|
-
throw new TypeError(`Invalid or duplicate host codec registration ${String(
|
|
196
|
+
throw new TypeError(`Invalid or duplicate host codec registration ${sanitized(String(codec?.id), 80) ? String(codec?.id) : '<id>'}`);
|
|
155
197
|
map.set(key, Object.freeze({
|
|
156
198
|
id: codec.id,
|
|
199
|
+
version: codec.version,
|
|
157
200
|
validate: codec.validate,
|
|
158
201
|
...(codec.normalize === undefined ? {} : { normalize: codec.normalize }),
|
|
159
202
|
}));
|
|
@@ -175,14 +218,25 @@ export function createEvaluatorCatalog(input, options) {
|
|
|
175
218
|
.filter((id) => !CHECK_IDS.includes(id))
|
|
176
219
|
.sort(compareText));
|
|
177
220
|
const refuse = (findings) => Object.freeze({ ok: false, assessment: assess('COMP-CATALOG', 'catalog', findings) });
|
|
178
|
-
const raw = input
|
|
179
|
-
|
|
221
|
+
const raw = input;
|
|
222
|
+
// The current shape declares `format` and an integer `formatVersion`; the legacy shape is `ia-evaluator-catalog/1.x`.
|
|
223
|
+
let legacy;
|
|
224
|
+
if (exactKeys(raw, ['format', 'formatVersion', 'entries']) &&
|
|
225
|
+
raw.format === EVALUATOR_CATALOG_FORMAT &&
|
|
226
|
+
EVALUATOR_CATALOG_FORMAT_VERSIONS.includes(raw.formatVersion))
|
|
227
|
+
legacy = false;
|
|
228
|
+
else if (exactKeys(raw, ['format', 'entries']) && typeof raw.format === 'string') {
|
|
229
|
+
const match = FORMAT.exec(raw.format);
|
|
230
|
+
if (match !== null && match[1] === '1')
|
|
231
|
+
legacy = true;
|
|
232
|
+
}
|
|
233
|
+
if (legacy === undefined || !Array.isArray(input.entries))
|
|
180
234
|
return refuse([
|
|
181
|
-
note('IA-COMP-CATALOG-VERSION', 1, `Unsupported evaluator catalog; expected exactly {format: ${EVALUATOR_CATALOG_FORMAT.
|
|
235
|
+
note('IA-COMP-CATALOG-VERSION', 1, `Unsupported evaluator catalog; expected exactly {format: ${EVALUATOR_CATALOG_FORMAT}, formatVersion: ${EVALUATOR_CATALOG_FORMAT_VERSIONS.join(' | ')}, entries: [...]} or the legacy {format: ia-evaluator-catalog/1.x, entries: [...]}`),
|
|
182
236
|
]);
|
|
183
237
|
const reservedUpper = new Set([...builtins, ...reserved].map((id) => id.toUpperCase())), findings = [], entries = [];
|
|
184
238
|
input.entries.forEach((item, index) => {
|
|
185
|
-
const checked = checkEntry(item, index + 1, reservedUpper, codecs);
|
|
239
|
+
const checked = checkEntry(item, index + 1, reservedUpper, codecs, legacy);
|
|
186
240
|
if ('finding' in checked)
|
|
187
241
|
findings.push(checked.finding);
|
|
188
242
|
else
|
|
@@ -207,9 +261,24 @@ export function createEvaluatorCatalog(input, options) {
|
|
|
207
261
|
if (findings.length > 0)
|
|
208
262
|
return refuse(findings.sort((a, b) => a.line - b.line || compareText(a.code, b.code)));
|
|
209
263
|
const sorted = [...byVersion.values()].sort((a, b) => compareText(a.id, b.id) || compareVersions(a.implementationVersion, b.implementationVersion));
|
|
264
|
+
// A legacy catalog keeps the digest over the entries as declared (`name@major` codec ids), so receipts and joins
|
|
265
|
+
// that recorded it still match; a current catalog's digest covers its format version and `{id, version}` codecs.
|
|
266
|
+
const digested = legacy
|
|
267
|
+
? sha256({
|
|
268
|
+
format: input.format,
|
|
269
|
+
entries: sorted.map(({ inputCodec, outputCodec, ...rest }) => ({
|
|
270
|
+
...rest,
|
|
271
|
+
inputSchemaId: legacyCodecId(inputCodec),
|
|
272
|
+
outputSchemaId: legacyCodecId(outputCodec),
|
|
273
|
+
})),
|
|
274
|
+
builtins,
|
|
275
|
+
reserved,
|
|
276
|
+
})
|
|
277
|
+
: sha256({ format: input.format, formatVersion: input.formatVersion, entries: sorted, builtins, reserved });
|
|
210
278
|
const catalog = deepFreeze({
|
|
211
279
|
format: input.format,
|
|
212
|
-
|
|
280
|
+
formatVersion: legacy ? 1 : input.formatVersion,
|
|
281
|
+
digest: digested,
|
|
213
282
|
entries: sorted,
|
|
214
283
|
builtins,
|
|
215
284
|
reserved,
|
|
@@ -226,8 +295,9 @@ export function assertCatalog(value) {
|
|
|
226
295
|
if (!isEvaluatorCatalog(value))
|
|
227
296
|
throw new TypeError('An evaluator catalog must be constructed by createEvaluatorCatalog');
|
|
228
297
|
}
|
|
229
|
-
|
|
230
|
-
|
|
298
|
+
/** The host codec registered for exactly this `{id, version}` pair, or undefined. */
|
|
299
|
+
export function codecOf(catalog, ref) {
|
|
300
|
+
return catalogCodecs.get(catalog)?.get(codecKey(ref.id, ref.version));
|
|
231
301
|
}
|
|
232
302
|
/** The entry a check's evaluator id (checkRunner: check.implementation, else check.runs) selects: the supported implementation, else the highest listed version. */
|
|
233
303
|
export function selectEvaluator(catalog, id) {
|
package/dist/catalog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAC3F,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGpC;;;GAGG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AACnE,qEAAqE;AACrE,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,MAAM,CAAC,CAA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AG,CAAC;QAAE,KAAK,CAAC,KAAK,EAAE,CAAC;IACvC,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,UAAU,EAAE,MAAM,CAAC,cAAc,EAAE,UAAU,EAAE,QAAQ,CAAC;QACxD,cAAc,EAAE,CAAC,EAAU,EAAE,MAAc,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,MAAM,EAAE,CAAC;KAC7E,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evidence-fixtures.d.ts","sourceRoot":"","sources":["../../src/conformance/evidence-fixtures.ts"],"names":[],"mappings":"AAAA,4HAA4H;AAC5H,OAAO,KAAK,EAAE,KAAK,EAAQ,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"evidence-fixtures.d.ts","sourceRoot":"","sources":["../../src/conformance/evidence-fixtures.ts"],"names":[],"mappings":"AAAA,4HAA4H;AAC5H,OAAO,KAAK,EAAE,KAAK,EAAQ,MAAM,mBAAmB,CAAC;AAgBrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAyDpD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,aAAa,EAAE,CAuO1E"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { EVALUATOR_CATALOG_FORMAT, bindEvaluators, createEvaluatorCatalog } from '../catalog.js';
|
|
1
|
+
import { EVALUATOR_CATALOG_FORMAT, EVALUATOR_CATALOG_FORMAT_VERSION, bindEvaluators, createEvaluatorCatalog, } from '../catalog.js';
|
|
2
2
|
import { EVIDENCE_RECEIPT_FORMAT, acceptEvaluatorOutput, admitTransition, evidenceDigest, validateReceipt, } from '../evidence.js';
|
|
3
3
|
import { validateCheck } from '../graph-checks.js';
|
|
4
4
|
import { resolveObligations } from '../obligations.js';
|
|
5
5
|
import { assess } from '../types.js';
|
|
6
6
|
const hex = (value) => `sha256:${value.repeat(64)}`;
|
|
7
7
|
const codecs = [
|
|
8
|
-
{ id: 'fixture-input
|
|
8
|
+
{ id: 'fixture-input', version: 1, validate: () => true },
|
|
9
9
|
{
|
|
10
|
-
id: 'fixture-output
|
|
10
|
+
id: 'fixture-output',
|
|
11
|
+
version: 1,
|
|
11
12
|
validate: (value) => typeof value === 'object' && value !== null && typeof value.files === 'number',
|
|
12
13
|
},
|
|
13
14
|
];
|
|
@@ -16,8 +17,8 @@ const entry = {
|
|
|
16
17
|
contractVersion: '1.0.0',
|
|
17
18
|
implementationVersion: '1.0.0',
|
|
18
19
|
implementationDigest: hex('a'),
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
inputCodec: { id: 'fixture-input', version: 1 },
|
|
21
|
+
outputCodec: { id: 'fixture-output', version: 1 },
|
|
21
22
|
supportedScopes: ['package'],
|
|
22
23
|
effects: ['read'],
|
|
23
24
|
environmentProfile: { id: 'node-offline', credentials: 'none' },
|
|
@@ -43,7 +44,9 @@ const unavailable = {
|
|
|
43
44
|
implementationDigest: hex('d'),
|
|
44
45
|
availability: { status: 'unavailable', reason: 'Fixture host has no implementation' },
|
|
45
46
|
};
|
|
46
|
-
const build = (entries, format
|
|
47
|
+
const build = (entries, format) => createEvaluatorCatalog(format === undefined
|
|
48
|
+
? { format: EVALUATOR_CATALOG_FORMAT, formatVersion: EVALUATOR_CATALOG_FORMAT_VERSION, entries }
|
|
49
|
+
: { format, entries }, { codecs });
|
|
47
50
|
export function runEvidenceFixtures(graph) {
|
|
48
51
|
const built = build([entry, fresh, revoked, unavailable]);
|
|
49
52
|
if (!built.ok)
|
|
@@ -140,7 +143,7 @@ export function runEvidenceFixtures(graph) {
|
|
|
140
143
|
['IA-COMP-CATALOG-BUILTIN-OVERRIDE', () => build([{ ...entry, id: 'COMP-CHECK' }]).assessment.findings],
|
|
141
144
|
[
|
|
142
145
|
'IA-COMP-CATALOG-CODEC-UNKNOWN',
|
|
143
|
-
() => build([{ ...entry,
|
|
146
|
+
() => build([{ ...entry, inputCodec: { id: 'unknown-codec', version: 1 } }]).assessment.findings,
|
|
144
147
|
],
|
|
145
148
|
['IA-COMP-EVALUATOR-UNAVAILABLE', () => validateCheck(runs(unavailable.id), catalog).findings],
|
|
146
149
|
['IA-COMP-EVALUATOR-REVOKED', () => validateCheck(runs(revoked.id), catalog).findings],
|