@inventarch/compliance 3.0.0 → 3.1.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/README.md +92 -4
- package/SPEC.md +44 -27
- package/dist/catalog.d.ts +1 -1
- package/dist/catalog.js +1 -1
- 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/evidence.d.ts +5 -5
- package/dist/evidence.js +5 -5
- package/dist/graph-checks.d.ts +9 -6
- package/dist/graph-checks.d.ts.map +1 -1
- package/dist/graph-checks.js +9 -6
- package/dist/graph-checks.js.map +1 -1
- package/dist/host-plugin.js +2 -2
- package/dist/host-plugin.js.map +1 -1
- 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/obligations.d.ts +2 -2
- package/dist/obligations.d.ts.map +1 -1
- package/dist/obligations.js +2 -2
- package/dist/obligations.js.map +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/profiles.js +1 -1
- package/dist/report.d.ts +8 -3
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +28 -7
- package/dist/report.js.map +1 -1
- package/dist/schema.d.ts +4 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +11 -10
- package/dist/schema.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/dist/values.d.ts +2 -2
- package/dist/values.d.ts.map +1 -1
- package/dist/values.js +2 -2
- package/dist/values.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
package/README.md
CHANGED
|
@@ -1,9 +1,97 @@
|
|
|
1
1
|
# @inventarch/compliance
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@inventarch/compliance) [](https://github.com/inventarch/ia/actions/workflows/platform-quality.yml) [](LICENSE) [](package.json)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> Checks over compiled IA records and graphs: schema conformance, system admission, fragments, coverage, selectors, variants and contract adoption with supplied evaluators, assembled into one revision report. It also resolves obligations against an optional evaluator catalog and qualifies evidence receipts.
|
|
6
|
+
>
|
|
7
|
+
> It consumes [`@inventarch/graph`](../graph/README.md); [`@inventarch/db`](../db/README.md) uses its verdicts to admit a workspace.
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
## ⚡ Quick start
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
```sh
|
|
12
|
+
npm install @inventarch/language @inventarch/graph @inventarch/compliance
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { buildRegistry, compile, KERNEL_DIGEST, KERNEL_SOURCES, LANGUAGE_VERSION, parse } from '@inventarch/language';
|
|
17
|
+
import { load } from '@inventarch/graph';
|
|
18
|
+
import { evaluate } from '@inventarch/compliance';
|
|
19
|
+
|
|
20
|
+
const location = { placement: { kind: 'floor', band: 10, reach: '' }, provenance: 'bootstrap' };
|
|
21
|
+
const sources = KERNEL_SOURCES.map((source) => ({ ...source, location }));
|
|
22
|
+
const parsed = sources.map((source) => ({ ...parse(source.text, source.path), location }));
|
|
23
|
+
const registered = buildRegistry(parsed);
|
|
24
|
+
const compiled = parsed.map((source) => compile(source.ast, registered.registry, location, []));
|
|
25
|
+
const graph = load(
|
|
26
|
+
compiled.flatMap((result) => result.records),
|
|
27
|
+
registered.registry,
|
|
28
|
+
{ sources, languageVersion: LANGUAGE_VERSION, kernelDigest: KERNEL_DIGEST, location: '' },
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const report = evaluate(graph, {
|
|
32
|
+
sourceDiagnostics: [...registered.diagnostics, ...compiled.flatMap((result) => result.diagnostics)],
|
|
33
|
+
});
|
|
34
|
+
console.log(report.outcome); // not-evaluated
|
|
35
|
+
for (const verdict of report.verdicts.filter((v) => v.outcome !== 'pass'))
|
|
36
|
+
console.log(verdict.check, '|', verdict.findings[0].message);
|
|
37
|
+
// COMP-FIXTURES | COMP-FIXTURES: matching-revision verification evidence was not supplied
|
|
38
|
+
// COMP-KERNEL | COMP-KERNEL: matching-revision verification evidence was not supplied
|
|
39
|
+
// COMP-STEWARD | System folder discovery observations were not supplied
|
|
40
|
+
// COMP-SYSTEM | System folder discovery observations were not supplied
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Every other verdict passes, yet the report is `not-evaluated`, not `pass`: the kernel and fixture checks need verification evidence at the graph's revision, and the system and steward checks need the discovered system folders (`folders`).
|
|
44
|
+
|
|
45
|
+
The package can produce the kernel and fixture evidence itself. It is opt-in: pass the graph's revision inputs with the evidence, and both checks are bound to that graph:
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
import { verifyFixtures, verifyKernel } from '@inventarch/compliance';
|
|
49
|
+
|
|
50
|
+
const inputs = { sources, languageVersion: LANGUAGE_VERSION, kernelDigest: KERNEL_DIGEST, location: '' };
|
|
51
|
+
const verified = evaluate(graph, {
|
|
52
|
+
sourceDiagnostics: [...registered.diagnostics, ...compiled.flatMap((result) => result.diagnostics)],
|
|
53
|
+
conformance: { inputs, kernel: verifyKernel(), fixtures: verifyFixtures() },
|
|
54
|
+
});
|
|
55
|
+
for (const verdict of verified.verdicts.filter((v) => ['COMP-KERNEL', 'COMP-FIXTURES'].includes(v.check)))
|
|
56
|
+
console.log(verdict.check, verdict.outcome, verdict.basis);
|
|
57
|
+
// COMP-FIXTURES pass verified
|
|
58
|
+
// COMP-KERNEL pass verified
|
|
59
|
+
console.log(verified.conformance.profile); // package-v1
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`verifyKernel()` regenerates the kernel from the floor and compares it with the running `@inventarch/language`; `verifyFixtures()` runs the `package-v1` 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
|
+
|
|
64
|
+
## 🧭 What it does
|
|
65
|
+
|
|
66
|
+
| Area | Exports |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| Revision report | `evaluate(graph, options?)` returns an immutable report keyed to `graph.revision`: `outcome`, `verdicts`, `findings` and `shadows`. `fail` dominates `not-evaluated`, which dominates `pass`. |
|
|
69
|
+
| Schema checks | `validateSchema(record, registry, pool)` for bootstrap without a graph and `validateGraphSchema` on a graph: sections, fields, value types and narrowings (`matchesType`, `matchesForm`) and relationship cardinality. |
|
|
70
|
+
| System admission | `validateSystems(folders, registry, pool)`: one `@system` per folder, words from systems the folder does not require, steward coverage, schema enrolment and declared consent. |
|
|
71
|
+
| Graph checks | `validateFragments`, `validateCoverage`, `validateSelectors`, `validateVariants`, `validateConsent`, `validateIdentity`, `validateParse`, and `validateCheck` (built-in or catalog evaluator ids) or `validateCheckStructure` (any one named evaluator). |
|
|
72
|
+
| Contract adoption | `validateAdoption` calls the clause evaluators you supply, keyed by contract and requirement. |
|
|
73
|
+
| Evaluator catalog | `createEvaluatorCatalog`, `selectEvaluator` and `bindEvaluators` register a host's trusted, namespaced evaluators for the id a `@check` names. |
|
|
74
|
+
| Obligations and receipts | `resolveObligations`, `inspectObligations`, `profileOccurrences`, `validateReceipt`, `acceptEvaluatorOutput`, `adaptBuiltinVerdict` and `admitTransition` decide which obligations apply, whether a receipt is valid and current, and whether a transition may be admitted. |
|
|
75
|
+
| Fixtures | `runLanguageFixture` and `fixtureCoverage` run conformance fixtures you read yourself. The package ships its conformance fixtures under `fixtures/`. |
|
|
76
|
+
| Conformance evidence | `verifyKernel`, `verifyFixtures` and `isConformanceEvidence` produce and recognise COMP-KERNEL and COMP-FIXTURES evidence; `evaluate`'s `conformance` option binds it to a graph. Evidence about another graph, floor or toolchain stays `not-evaluated`, and evidence the package did not produce is refused. Results from it carry `basis: 'verified'`; results from the caller's own `evidence` map carry `basis: 'caller-asserted'`. |
|
|
77
|
+
| Host plugin | `renderClaudePlugin` returns the files of the user-level Claude Code plugin that `ia host claude --user` installs. |
|
|
78
|
+
|
|
79
|
+
Finding codes are `COMP_CODES` and `EVIDENCE_CODES` (`IA-COMP-*`); language and graph findings keep their own codes. The `./internal/*` subpaths are published for IA's own toolchain; use the root entry point.
|
|
80
|
+
|
|
81
|
+
## ⚖️ What it does not do
|
|
82
|
+
|
|
83
|
+
- **No I/O or execution beyond its own files.** Apart from `verifyKernel` and `verifyFixtures`, which read only this package's own files and write nothing, it reads no files, network or clock, schedules and persists nothing, and calls only host functions you supply, such as evaluators, codecs and predicates. The caller also supplies source diagnostics, system folders, any other verification evidence and the current time.
|
|
84
|
+
- **Self-verification is not a trust root.** The conformance evidence is produced by the code it verifies. Pin `kernelDigest` and `inventoryDigest` and rely on npm integrity for the package itself.
|
|
85
|
+
- **`not-evaluated` is never a pass.** Missing evidence, a missing or throwing clause evaluator, an unavailable catalog evaluator and an unresolved relationship that could change an answer all leave a check `not-evaluated`.
|
|
86
|
+
- **Declarations are not results.** A `@case` establishes declared coverage, not an executed test, and coverage never satisfies adoption. A `@check` names an evaluator; it does not run it, and `bindEvaluators` invokes nothing.
|
|
87
|
+
- **Trust is never self-asserted.** A service-associated receipt counts only when the host's verifier accepts it, and a resolution digest is an integrity check, not authentication.
|
|
88
|
+
- **Conformance is not truth.** A passing report establishes that records conform to their schemas and that their relationships resolve with consent, not that their prose is true or complete.
|
|
89
|
+
|
|
90
|
+
## 📚 Learn more
|
|
91
|
+
|
|
92
|
+
- [SPEC.md](SPEC.md): the package contract, refusal codes, the evaluator catalog, obligation and receipt clauses, and native conformance evidence (C31)
|
|
93
|
+
- [LANGUAGE.md](LANGUAGE.md): the packaged summary of the words this release ships
|
|
94
|
+
- [Architecture reference](../../docs/reference/architecture/README.md#which-package-to-use) and the [host plugin specification](../../docs/specs/host-plugin-distribution/README.md)
|
|
95
|
+
- 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
|
|
96
|
+
- In this repository, `pnpm compliance:check` runs these checks over the native corpus, the conformance fixtures and the `package-v1` inventory
|
|
97
|
+
- [Root README](../../README.md)
|
package/SPEC.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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 (
|
|
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-v1 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. Still open and owned elsewhere: the API transactional controller and managed transition seam, an app host's fixed-to-catalog consumer, the consumer-side cases (late edit/reevaluation, concurrent workers and durable intent, silent agents) and the consumer side of strict typing (a real compiler evaluator and excluded-source detection). No scheduler, execution, persistence or native word is added here.
|
|
4
4
|
|
|
5
|
-
Status: implemented through stage C and the D/R/E integration clause C21; the projection clauses C22–C24 are retired (below).
|
|
5
|
+
Status: implemented through stage C and the D/R/E integration clause C21; 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
|
|
|
7
7
|
## Instance schemas
|
|
8
8
|
|
|
@@ -12,13 +12,13 @@ C02. Resolve the subject's schema through its registered discriminator. A missin
|
|
|
12
12
|
|
|
13
13
|
C03. Require each `must have` section. Under closed, diagnose every unlisted section. Repeated sections form one logical field collection. Cognition and activation are floor-owned and always admitted even under closed; their validity remains language-owned. Head is a virtual field section, never a required body section. Closed applies to keys as well as section names (C04b); open admits any key.
|
|
14
14
|
|
|
15
|
-
C04. For each schema field, use its section and exact key. The current dialect admits exactly section.key with a single-token key; nested paths and schema spelling of multiword keys are not added here. Must fields require a present field. An absent optional section creates no subordinate field obligation. A missing required section consumes missing-field reports beneath it. Validate every occurrence, so one valid duplicate does not mask a wrong-typed duplicate. A declared key whose type is not `list of T` is exactly one field: `must have` means exactly one for non-list types and `may have` at most one. A second occurrence of such a key, counted across repeated sections and in the virtual head section, is FIELD-DUPLICATE, reported once per schema row at the second occurrence's span, while every occurrence is still type-checked and narrowed (C04a). Only a `list of T` key may repeat. Undeclared keys are not counted (
|
|
15
|
+
C04. For each schema field, use its section and exact key. The current dialect admits exactly section.key with a single-token key; nested paths and schema spelling of multiword keys are not added here. Must fields require a present field. An absent optional section creates no subordinate field obligation. A missing required section consumes missing-field reports beneath it. Validate every occurrence, so one valid duplicate does not mask a wrong-typed duplicate. A declared key whose type is not `list of T` is exactly one field: `must have` means exactly one for non-list types and `may have` at most one. A second occurrence of such a key, counted across repeated sections and in the virtual head section, is FIELD-DUPLICATE, reported once per schema row at the second occurrence's span, while every occurrence is still type-checked and narrowed (C04a). Only a `list of T` key may repeat. Undeclared keys are not counted (2026-09-25); under open they remain admitted, under closed they are FIELD-UNKNOWN (C04b). Missing required field: FIELD-MISSING; bad present value: FIELD-TYPE. One failed value, including a bad list member, yields one finding at the field.
|
|
16
16
|
|
|
17
|
-
C04b. Under `closed`, a declared body section admits only the keys the schema declares for it (
|
|
17
|
+
C04b. Under `closed`, a declared body section admits only the keys the schema declares for it (2026-09-25). Every other ordinary field is FIELD-UNKNOWN (error) at its own span, `closed @schema <name> does not declare '<section>.<key>'`; the children of an undeclared block fold into its one finding, `- item` lines are not keys, and W0 narrowing still applies to the declared keys beside it. An ordinary field is a compiled field the compiler left as a field. Exempt, because the language reads them itself: the head (virtual, open); the floor grammar sections `relationships`, `cognition` and `activation` (edges, cells, selectors); a field the compiler consumed as a semantic product, decided by span, namely a governance variant clause (`record.variants`; `readVariants` takes every `governance` field except `severity` and `when`) or a contract requirement clause (`record.requirements`, the `REQ-*` lines); and a `section.key` path listed in the kernel `DIMENSION_PATHS` (today `governance.severity`), which the graph reads as a coordinate. Records of the two floor dialect words `schema` and `system` are exempt whole: their body is the schema/system dialect (`sections.must have`, `fields.may have`, `edges.may`, `closed`), and `@schema schema` is closed with no declared field. The two dialect words and the three grammar sections are the only name-based exemptions; every other carrier is recognised by what the compiler emitted for it.
|
|
18
18
|
|
|
19
19
|
C04a. A field whose schema row carries a W0 narrowing (language L19a) is checked further once its value matches its type, each narrowing yielding at most one finding per field occurrence, list items included: `values` (from `id in [...]`) requires every scalar or quoted text to be a member, compared exactly, else FIELD-VALUE; `target` (from `ref to <word>`) requires every reference's discriminator to equal the word, else FIELD-REF-TARGET, and otherwise, when the caller supplied a reference lookup, warns FIELD-REF-MISSING for a reference no admitted record declares; `form` (from `text form <form>`) requires every text to match the form, else FIELD-FORM. `validateSchema` looks references up in its pool (the subject included) through `resolveTarget` over the candidates sharing the reference's word and name; `validateGraphSchema` looks them up in the admitted graph. An ambiguous target is not missing: identity ties are graph-owned. A narrowed field with no matching value, an absent optional section, or a value that already failed its type raises no narrowing finding.
|
|
20
20
|
|
|
21
|
-
C05. Value semantics (`matchesType`) and text forms (`matchesForm`, C04a): `iso-date` admits exactly `YYYY-MM-DD` where the month is 01–12 and the day exists in that month, leap years by the Gregorian rule; no time, zone or single-digit part. Text admits scalar, string or prose (including empty quoted text); id admits scalar/string matching an ASCII letter followed by letters/digits/hyphens; qname admits scalar/string with exactly four nonempty canonical identity slots (lowercase system/kind/facet/name, closed kind); number admits a finite decimal scalar/string with optional sign, fraction and exponent, no empty/hex/Infinity; ref admits only typed sigil references; flag admits none (a bare key) or scalar true/false. Block is not a flag. `list of T` requires a list and validates every item against T; an empty list is valid because the dialect has no nonempty-list constraint, with one exception (2026-10-12
|
|
21
|
+
C05. Value semantics (`matchesType`) and text forms (`matchesForm`, C04a): `iso-date` admits exactly `YYYY-MM-DD` where the month is 01–12 and the day exists in that month, leap years by the Gregorian rule; no time, zone or single-digit part. Text admits scalar, string or prose (including empty quoted text); id admits scalar/string matching an ASCII letter followed by letters/digits/hyphens; qname admits scalar/string with exactly four nonempty canonical identity slots (lowercase system/kind/facet/name, closed kind); number admits a finite decimal scalar/string with optional sign, fraction and exponent, no empty/hex/Infinity; ref admits only typed sigil references; flag admits none (a bare key) or scalar true/false. Block is not a flag. `list of T` requires a list and validates every item against T; an empty list is valid because the dialect has no nonempty-list constraint, with one exception (2026-10-12): a stated empty `authority.moves` on a record whose word is `mandate` (the word agent-system registers, which the runtime's mandate resolver reads by the same test), when its schema declares that key as agent-system's does, is FIELD-VALUE, an error at that field, each such occurrence on its own, whose message says `authority.moves` must name at least one kernel move when stated. A stated move list means one or more kernel moves and the runtime's mandate reader refuses an empty one, so admitting it let every mandate-gated command refuse with an unreadable profile; the dialect cannot say "one or more", so the check is keyed to the `mandate` word in schema field validation, as COMP-STEWARD keys a system's steward to agent-system's `agent` word (`src/systems.ts`, `validateSystems`), and db admission (`validateGraphSchema`) and the bootstrap `validateSchema` (`native:check`) both apply it. An absent `authority.moves` stays valid and restricts no move, and every other empty list, `authority.excluded-words []` and `authority.covers []` included, stays valid. The refusal fixtures observe it (boundary `IA-COMP-FIELD-VALUE/mandate-moves-empty`). Type recognition is over compiled values, not lexical matching of IA source.
|
|
22
22
|
|
|
23
23
|
C06. Edge obligations use logical active predicates in the direction the rule's spelling carries: an `out` rule counts the record's active edges by their target endpoint, an `in` rule the active edges whose target is the record by their source endpoint. Either relation may be asserted on the record or, in the reciprocal spelling, on another admitted record. Count distinct (endpoint identity, fragment) pairs, where a fragment joins the pair only when it addresses the counted endpoint: an assertion on the record contributes its fragment, and a reciprocal assertion's fragment addresses the record and is dropped. Equivalent reciprocal assertions do not inflate cardinality. Match the counted endpoint by closed kind or discriminator. Required one/one-or-more means at least one; one and optional cap at one even for a may row. A required field with type flag is present when its bare key occurs. A must optional row has zero minimum (optional explicitly permits absence). A may one-or-more row permits absence but has no maximum. Unconditional edges can establish a static obligation. Conditioned edges or unresolved/ambiguous targets that could change its answer produce EDGE-UNRESOLVED and not-evaluated unless an independently certain failure already establishes fail. A dangling edge cannot be counted as a pass. This checker does not select a coordinate or execute contracts.
|
|
24
24
|
|
|
@@ -26,11 +26,11 @@ C07. Findings use language's location/severity/message shape with IA-COMP codes;
|
|
|
26
26
|
|
|
27
27
|
## Delivery boundary and evidence
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
The schema delivery must cover all C01–C07 branches with native language compilation, plus direct boundary cases where graph admission is the caller's job. Schema validation is the early reusable part of COMP-SCHEMA/COMP-KERNEL. Enrollment, consent, fragments, coverage, adoption, fixtures, steward/bootstrap, scenario execution and a full revision report remain later work and must never be reported as passing by this API.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Schema delivery evidence: 62 compliance tests (native parse/registry/compile instances and scalar boundary tests), 1001 language tests, workspace typecheck/build and a built-package success/refusal consumer pass. The initial nested-path proposal was removed after native dialect probes; no grammar expansion was made.
|
|
32
32
|
|
|
33
|
-
## Native system admission
|
|
33
|
+
## Native system admission
|
|
34
34
|
|
|
35
35
|
C08. `validateSystems(folders, registry, pool)` is pure. A folder supplies its canonical relative path, name, parsed sources and admitted compiled records. The host supplies all discovered folders, including empty ones. Each must contain exactly one system declaration, located at its direct system.ia with the same name. A malformed folder receives SYSTEM-MALFORMED once and consumes its subordinate ownership/steward checks. Parser/registry faults remain owned by language; the host excludes their previews before this check.
|
|
36
36
|
|
|
@@ -40,9 +40,9 @@ C10. A steward reference must be @agent, resolve to exactly one admitted agent o
|
|
|
40
40
|
|
|
41
41
|
C11. Each active registration's word must occur on either side of at least one consent row, with wildcard matching; absence yields CONSENT-EMPTY warning and does not invalidate structural admission. Each visible schema is enrolled by exactly one active registration, counting fixed floor registrations. Zero yields SCHEMA-UNREFERENCED; more than one yields SCHEMA-MULTIPLE. Independent warning evidence can coexist with pass; only an unavailable evaluation is not-evaluated. Assessments returned are COMP-SYSTEM, COMP-STEWARD, COMP-BOOTSTRAP, COMP-SCHEMA-ENROLLED and COMP-CONSENT-DECLARED. Actual edge consent remains a separate check.
|
|
42
42
|
|
|
43
|
-
C12. Native systems own README/SPEC next to their records. The first five and their record closure must compile and pass instance/admission checks without substitute TypeScript providers. Their stewards and methods are authored roles/procedures;
|
|
43
|
+
C12. Native systems own README/SPEC next to their records. The first five and their record closure must compile and pass instance/admission checks without substitute TypeScript providers. Their stewards and methods are authored roles/procedures; admission does not launch agents, execute scenarios or install a hook. Success/refusal mutation tests must use the real floor/system sources. Native sources are authored, not generated from legacy catalogs.
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
Native system admission evidence: the API is exported and consumed by pnpm native:check. The five-system closure has 153 records and 170 passing structural assessments. Nineteen native mutation/connection tests cover C08-C12, alongside 62 schema tests and 21 kernel tests; the language suite remains 1001 passing tests. Typecheck/build pass. No scenario engine or host execution is claimed.
|
|
46
46
|
|
|
47
47
|
## Full graph and revision checks (stage C)
|
|
48
48
|
|
|
@@ -62,31 +62,33 @@ C18 repository consumer: [tools/compliance](../../tools/compliance/SPEC.md#found
|
|
|
62
62
|
|
|
63
63
|
C19. COMP-KERNEL and COMP-FIXTURES require caller-supplied matching-revision assessments from actual verification. No supplied result or a stale result produces NOT-EVALUATED. A pure language-fixture runner can consume source and expected products/diagnostics/format companions without reading files; tools discover fixtures and record observed results. Every named refusal must have a tested failing case; unavailable fixture coverage stays explicit. General prose scenario execution remains outside this stage.
|
|
64
64
|
|
|
65
|
+
C19 note: C31 is the package producer of these assessments. `verifyKernel` and `verifyFixtures` run the verification in-process, and `evaluate`'s `conformance` option binds their evidence to the graph. The caller-asserted `evidence` map remains, and results taken from it are labelled `caller-asserted`.
|
|
66
|
+
|
|
65
67
|
C20. Public checks use IA-COMP-FRAGMENT-MISSING, COVERAGE-MISSING, COVERAGE-KIND, SELECTOR-INVALID, CHECK-UNKNOWN, CHECK-CONFLICT, VARIANT-AMBIGUOUS, ADOPTION-FAILED, NOT-EVALUATED and FIXTURE-MISMATCH in addition to C07/C11. NOT-EVALUATED is warning evidence that changes the outcome; warning consent-empty/shadow evidence does not fail an otherwise completed check. Source parse/graph codes remain namespaced by their owners. Every implementation delivery records full-suite, negative/native and built-consumer evidence here.
|
|
66
68
|
|
|
67
|
-
Stage C
|
|
69
|
+
Stage C graph checks delivered: graph schema/fragment/coverage, selector/check-id/source/consent/identity checks and immutable assessments. Native 153-node closure passes these checks. Thirteen graph-check tests cover removed cases, conditional coverage, missing targets/fragments, inverse cell fragments, late resolution, source-code preservation, malformed selectors/runners and consent-refusal diagnostic consumption. Full suite: 1453 tests/48files; typecheck/build/kernel/dependency pass. Exact variant ambiguity, adoption and assembled revision reports remain next.
|
|
68
70
|
|
|
69
|
-
Stage C
|
|
71
|
+
Stage C variant ambiguity and adoption delivered: exact finite ambiguity with witness coordinates and explicit structural adoption evaluators. Thirteen new tests include 128 bounded families compared against exhaustive graph-query evaluation, partial/full domination, missing axes, fixed dimensions, a nine-axis family, absent/throwing/failed evaluators and conditional/unresolved adoption. 88 compliance tests; 1466 workspace tests/49files, typecheck/build/kernel/dependencies pass. Native declarations alone intentionally leave adoption not-evaluated. Full revision reports and executable fixture evidence remain next.
|
|
70
72
|
|
|
71
|
-
Stage C
|
|
73
|
+
Stage C revision reports and acceptance delivered: evaluate produces immutable revision reports, preserving originating codes, graph dimension refusals and shadows. Provisional compile missing-target warnings are replaced by graph resolution for the same assertion. Reports restrict folder semantic checks to graph winners. The pure fixture runner consumes supplied source/companions; tools/compliance reads the real tree, verifies generated kernel bytes and executes 176 language plus 34 boundary fixtures covering every current language/graph/compliance code. The native report has 485 verdicts: 484 pass and one adoption not-evaluated without clause evaluators. No executed prose scenarios are claimed.
|
|
72
74
|
|
|
73
|
-
Verified 1472 tests/51files (1241 language,92 graph,92 compliance,47 tools), typecheck/build/native/kernel/dependency checks and built-package runtime/declaration consumer. Compliance stage C is delivered; database admission/publication, runtime packets and specialized execution retain their
|
|
75
|
+
Verified 1472 tests/51files (1241 language,92 graph,92 compliance,47 tools), typecheck/build/native/kernel/dependency checks and built-package runtime/declaration consumer. Compliance stage C is delivered; database admission/publication, runtime packets and specialized execution retain their own owners.
|
|
74
76
|
|
|
75
77
|
C21 (database admission integration). The report assembler may receive prior failed/unavailable admission assessments for subjects subsequently removed from its graph. Retain those observations, coalescing a repeated check/scope at the worst outcome and deduplicating findings. Do not retain earlier candidate-only passes as final evidence. This lets db publish an admitted subset while the compliance report still names refused source subjects. Coverage and adoption are evaluated on the final graph.
|
|
76
78
|
|
|
77
|
-
C21 delivered with database
|
|
79
|
+
C21 delivered with the database view builder: report options accept prior non-pass admission observations, coalesce identical check/scope at the worst outcome and deduplicate findings. Candidate-only passes are ignored. The regression test retains removed-subject evidence without duplicate verdicts.
|
|
78
80
|
|
|
79
|
-
C22–C24 (the host projection renderers renderHostArtifacts and renderWorkspaceProjection, their ProjectionMembership input, the steward composition behind them and the IA-COMP-PROJECTION-INVALID refusal) were retired on 2026-10-09
|
|
81
|
+
C22–C24 (the host projection renderers renderHostArtifacts and renderWorkspaceProjection, their ProjectionMembership input, the steward composition behind them and the IA-COMP-PROJECTION-INVALID refusal) were retired on 2026-10-09. The position packet and its claude and codex adapters replace them in @inventarch/runtime (runtime SPEC R19 and R20), and the CLI and tools/projections render through those. Compliance exports no projection API, no projection marker and no steward host table, and the ids C22–C24 are not reused.
|
|
80
82
|
|
|
81
|
-
## Trusted evaluator catalog, obligations and evidence (
|
|
83
|
+
## Trusted evaluator catalog, obligations and evidence (producer side)
|
|
82
84
|
|
|
83
|
-
C25 (catalog v1
|
|
85
|
+
C25 (catalog v1). Pure `createEvaluatorCatalog({format, entries}, {codecs, builtins?})`. The top level must be exactly `{format, entries}` with format `ia-evaluator-catalog/1.<minor>`; an unknown key (e.g. `revocations`), another major or another shape is CATALOG-VERSION. Minor-version handling: any minor of major 1 is accepted, but every entry must use exactly the v1 fields, so a later minor that adds behavior is refused rather than silently ignored; the declared format, minor included, is part of the digest. An entry has exactly id, contractVersion, implementationVersion, implementationDigest, inputSchemaId, outputSchemaId, 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>`. inputSchemaId/outputSchemaId are `name@major` ids that must be in the host codec registry, otherwise CATALOG-CODEC-UNKNOWN; a codec is trusted host code with `validate` and an optional `normalize`. 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.
|
|
84
86
|
|
|
85
|
-
C26 (check.runs with a catalog
|
|
87
|
+
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).
|
|
86
88
|
|
|
87
|
-
C27 (obligation resolution
|
|
89
|
+
C27 (obligation resolution). Pure `resolveObligations(input)` takes the subject, policy revision, catalog, the catalog digest the policy pins, captured scope facts (JSON data), the root adoption set, the selected law/contract/check occurrences (identity, word, adoption, requirement fragment, runs, provenance `{path, line}`, optional applicability predicate id, required flag and JSON input), trusted versioned applicability predicates (`name@version`) and package metadata directives. It returns a deeply frozen resolution sorted by `obligationId` (`obl:` sha256 of subject, occurrence, requirement and runs), each with subject, requirement, provenance (path, line, adoption, source), applicability, required, evaluator identity (built-ins use version `builtin`, digest `builtin:<id>` and fresh-run evidence), `inputDigest` and evidence policy. The input must be JSON data and must satisfy the evaluator's input codec; the digest covers the codec-normalized value, so equivalent inputs share a digest. Predicates receive a deeply frozen copy of the facts, never the caller's object. Applicability is applicable, not-applicable or undetermined. not-applicable always carries resolver evidence: `basis: predicate` with the predicate id@version, or `basis: package-metadata` with the directive source. A missing, throwing or malformed predicate is undetermined with a fixed message that never echoes predicate output. Undetermined required applicability is OBLIGATION-UNDETERMINED (blocking). OBLIGATION-UNRESOLVED covers: a malformed occurrence (missing provenance included) or adoption; an adoption or runs id that does not resolve (a reserved id never resolves, D4); an input that is not JSON or fails its codec; a package directive that is malformed (the action set is closed to `optional` and `disable`, and the source must be sanitized) or names no selected obligation. OBLIGATION-CONFLICT covers a pinned catalog digest that differs, one adoption declared with conflicting source or mandatory status, and one obligation selected twice with different content. Either refuses with status `refused` and no obligations. A root-adopted mandatory obligation is always required. Package metadata never changes any root-adopted obligation, whether the root made it required, optional or mandatory: the directive is ignored with an OBLIGATION-WEAKENED warning (D1: source precedence cannot silently weaken root requirements). Metadata may relax or disable package-adopted obligations only. Every resolution carries `digest = resolutionDigest(content)` over its canonical content, which includes the catalog digest and policy revision, and is recorded as issued by this module (D2). `inspectObligations(input)` returns the same selection as rows with support (builtin, supported, unavailable, revoked or unknown), versions, applicability and required flag, including unresolved rows, and never calls an evaluator. Predicates and codecs are the only host code called.
|
|
88
90
|
|
|
89
|
-
C28 (receipts and admission
|
|
91
|
+
C28 (receipts and admission). Receipt format `ia-evidence-receipt/1` has exactly format, receiptId, attemptId, obligationId, subject, inputDigest, digests {candidate, native, code, policy, dependency}, environment {id, toolchain}, evaluator {id, implementationVersion, implementationDigest}, catalogDigest, policyRevision, observedAt, completedAt, result (passed, failed, unavailable, error, cancelled, not-evaluated, not-applicable), evidenceDigest, issuer and trust (local-unsigned or service-associated). Text fields, receiptId and issuer included, must be sanitized single-line text. `validateReceipt(receipt, expectation, now)` takes an explicit ISO-8601 UTC `now`; it and every receipt time must be a real calendar instant (round-trip checked, so 2026-02-30 is invalid). The checks run in this order:
|
|
90
92
|
- shape and time order: RECEIPT-INVALID
|
|
91
93
|
- obligation and subject: RECEIPT-SUBJECT
|
|
92
94
|
- evaluator known to the catalog with the same digest: RECEIPT-EVALUATOR
|
|
@@ -99,13 +101,13 @@ C28 (receipts and admission, EVAL-03/04, EVAL-Q07/Q08). Receipt format `ia-evide
|
|
|
99
101
|
- fresh-run attempt identity: RECEIPT-FRESH-RUN
|
|
100
102
|
- reusable maximum age: RECEIPT-EXPIRED
|
|
101
103
|
|
|
102
|
-
`evidenceKey` is the
|
|
104
|
+
`evidenceKey` is the receipt deduplication key over candidate, obligation, evaluator, policy revision and digest, the environment `{id, toolchain}` (toolchain only when environment-insensitive; no other fields) and, for fresh-run, the attempt.
|
|
103
105
|
|
|
104
106
|
`acceptEvaluatorOutput(catalog, obligation, observation, {secrets?})` never throws for evaluator output. It maps a host observation to a result:
|
|
105
107
|
- unsupported evaluators are `unavailable`;
|
|
106
108
|
- timeouts, crashes, a missing or oversized byte length, output that is not JSON data (a Date, Map, function, cycle or non-finite number), an envelope other than `{result: passed | failed, evidence, diagnostics?}`, a hostile object that throws on read, and codec rejection or throw are all `error`, with EVALUATOR-OUTPUT-INVALID and fixed messages.
|
|
107
109
|
|
|
108
|
-
Failed diagnostics are sliced to 20 entries before filtering, and each line is redacted and then truncated to 240 characters. Redaction runs in this order: control characters are normalized to spaces (in the lines and in the supplied secrets
|
|
110
|
+
Failed diagnostics are sliced to 20 entries before filtering, and each line is redacted and then truncated to 240 characters. Redaction runs in this order: control characters are normalized to spaces (in the lines and in the supplied secrets), then supplied secret values, bearer tokens, quoted keys (`"password":"x"`), `KEY=value` or `KEY: value` where the key contains token, secret, password, passwd, api_key, credential, auth or private_key as a substring (e.g. `GITHUB_TOKEN=`, `AWS_SECRET_ACCESS_KEY=`), and `key 'value'` forms are replaced by `[redacted]`. A built-in obligation is a TypeError there. `adaptBuiltinVerdict(obligation, verdict?)` maps a built-in verdict to the envelope: pass is passed, fail is failed, not-evaluated or absent is not-evaluated (an unevaluated built-in outcome stays unevaluated).
|
|
109
111
|
|
|
110
112
|
`admitTransition(resolution, receipts, context, now)` first verifies the resolution (D2): its digest must recompute from its content, and it must either be resolver-issued in this process (the frozen, branded object) or match `context.expectedResolutionDigest` pinned by the host. Every obligation must be structurally sound: the id recomputes; built-in evaluators are CHECK_IDS with the built-in digest; catalog evaluators match the catalog's id, version, digest, contract version and evidence policy; not-applicable carries predicate or package-metadata evidence and never package-metadata on a root adoption. Otherwise the decision is OBLIGATION-UNVERIFIED and not admitted. The digest is an integrity check, not authentication: a resolution that crosses a trust boundary must have its digest pinned by the host. Admission then requires the same catalog and policy, and that every required applicable obligation has a valid passed receipt of at least `minimumTrust` as its latest valid result (a same-time non-pass wins). The following block a required obligation:
|
|
111
113
|
- failed (OBLIGATION-FAILED);
|
|
@@ -115,12 +117,27 @@ Failed diagnostics are sliced to 20 entries before filtering, and each line is r
|
|
|
115
117
|
|
|
116
118
|
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.
|
|
117
119
|
|
|
118
|
-
C29 (evaluation profiles
|
|
120
|
+
C29 (evaluation profiles; D6). `EVALUATION_PROFILES['strict-typing-v1']` is the consumer contract id mapping to three requirements: `configuration`, `included-file-coverage` and `compiler-run`. `profileOccurrences('strict-typing-v1', binding)` expands one selected law or contract occurrence into three required occurrences with requirements `strict-typing-v1/<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 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.
|
|
119
121
|
|
|
120
|
-
C30 (structural COMP-CHECK
|
|
122
|
+
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.
|
|
121
123
|
|
|
122
|
-
|
|
124
|
+
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-v1 producer mapping belongs to this package (C29).
|
|
123
125
|
|
|
124
126
|
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.
|
|
125
127
|
|
|
126
|
-
|
|
128
|
+
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.
|
|
129
|
+
|
|
130
|
+
## Native conformance evidence (package-v1)
|
|
131
|
+
|
|
132
|
+
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.
|
|
133
|
+
- `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.
|
|
134
|
+
- `verifyFixtures()` runs the `package-v1` 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.
|
|
135
|
+
- 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-v1` 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.
|
|
136
|
+
- 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.
|
|
137
|
+
- 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.
|
|
138
|
+
- 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`.
|
|
139
|
+
- Labels. A bound result's verdict carries `basis: 'verified'` only when its evidence was evaluated, that is, passed or failed. Bound evidence that is itself not-evaluated stays not-evaluated, with no basis. `Report.conformance` is present when at least one result is verified. It carries the profile and the running toolchain, plus `kernel {floorDigest}` when COMP-KERNEL is verified and `fixtures {inventoryDigest, observedCodes, outOfProfile}` when COMP-FIXTURES is, so a verified fixture result always names the suites it did not run. A result taken from the caller-asserted `evidence` map carries `basis: 'caller-asserted'`, with its outcome unchanged. The assembler rebuilds that result from its check, scope, outcome and findings, so any other key a caller put on the verdict no longer reaches the report. Only the assembler sets `basis`. Reports that pass neither option keep their outcome and digest.
|
|
140
|
+
- Self-verification limit. The evidence is produced by the code it verifies, so a tampered package can change code and expectations together and still pass. The trust root stays npm integrity plus the consumer's pinned `kernelDigest` and `inventoryDigest`. The binding also trusts the caller's `Graph`, `graph.revision` included: a copy of a graph with a forged revision, passed with inputs that recompute it, binds. Branding graphs is out of scope. The contract only makes a stale or mismatched toolchain, floor or graph visible.
|
|
141
|
+
- The inventory gate is `tools/compliance/inventory.ts --check|--write`, and `compliance:check` runs it. Any fixture, companion, corpus or boundary change fails until the inventory is regenerated.
|
|
142
|
+
|
|
143
|
+
C31 delivered: tests/report.test.ts pins the refusals, the binding rules (including three getter attacks on the inputs and one stale object at a time), the labels, the per-check summary and the profile's tamper cases; tools/compliance/check.test.ts pins the inventory gate. Each of 28 spot-checked mutants, each removing one of these rules, was red. No test can fail a check that the evidence's inventory digest is the running one, because branding admits only the producing module instance, so the binding has no such rule. `kernel:check`, `public-language:check` and `vocabulary:check` pass on a fresh copy with no built output. Measured on the built package (Node 22.22.2, Windows), one process: verifyKernel about 30 ms cold and verifyFixtures about 440 ms cold, with about 70 MB heap. Both pass under Node's permission model with read access to the packages only and no write grant.
|
package/dist/catalog.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export declare function codecOf(catalog: EvaluatorCatalog, id: string): Evaluato
|
|
|
103
103
|
export declare function selectEvaluator(catalog: EvaluatorCatalog, id: string): EvaluatorEntry | undefined;
|
|
104
104
|
export declare function catalogEntry(catalog: EvaluatorCatalog, id: string, implementationVersion: string): EvaluatorEntry | undefined;
|
|
105
105
|
/**
|
|
106
|
-
* Associate trusted host implementations with supported entries, keyed `${id}@${implementationDigest}` (
|
|
106
|
+
* Associate trusted host implementations with supported entries, keyed `${id}@${implementationDigest}` (C26).
|
|
107
107
|
* Any key naming an unknown, substituted, unavailable or revoked implementation refuses the whole binding. The host
|
|
108
108
|
* must bind before it invokes anything; binding invokes nothing, and admission separately checks every receipt's
|
|
109
109
|
* evaluator id, version and digest against the catalog (C28), so an unbound or substituted run cannot pass.
|
package/dist/catalog.js
CHANGED
|
@@ -239,7 +239,7 @@ export function catalogEntry(catalog, id, implementationVersion) {
|
|
|
239
239
|
return catalog.entries.find((e) => e.id === id && e.implementationVersion === implementationVersion);
|
|
240
240
|
}
|
|
241
241
|
/**
|
|
242
|
-
* Associate trusted host implementations with supported entries, keyed `${id}@${implementationDigest}` (
|
|
242
|
+
* Associate trusted host implementations with supported entries, keyed `${id}@${implementationDigest}` (C26).
|
|
243
243
|
* Any key naming an unknown, substituted, unavailable or revoked implementation refuses the whole binding. The host
|
|
244
244
|
* must bind before it invokes anything; binding invokes nothing, and admission separately checks every receipt's
|
|
245
245
|
* evaluator id, version and digest against the catalog (C28), so an unbound or substituted run cannot pass.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { Graph, RevisionInputs } from '@inventarch/graph';
|
|
2
|
+
import type { Assessment } from '../types.js';
|
|
3
|
+
import type { ConformanceProfile, ConformanceToolchain, FixtureEvidence, KernelEvidence } from './evidence.js';
|
|
4
|
+
import type { OutOfProfileSuite } from './inventory.js';
|
|
5
|
+
/** `ReportOptions.conformance`: the graph's own revision inputs and the evidence verifyKernel and verifyFixtures returned. */
|
|
6
|
+
export interface ConformanceOptions {
|
|
7
|
+
readonly inputs: RevisionInputs;
|
|
8
|
+
readonly kernel: KernelEvidence;
|
|
9
|
+
readonly fixtures: FixtureEvidence;
|
|
10
|
+
}
|
|
11
|
+
/** `Report.conformance`: present when at least one check is verified evidence bound to the graph. */
|
|
12
|
+
export interface ConformanceSummary {
|
|
13
|
+
readonly profile: ConformanceProfile;
|
|
14
|
+
readonly toolchain: ConformanceToolchain;
|
|
15
|
+
/** Present when COMP-KERNEL is verified: the floor it verified. */
|
|
16
|
+
readonly kernel?: {
|
|
17
|
+
readonly floorDigest: string;
|
|
18
|
+
};
|
|
19
|
+
/** Present when COMP-FIXTURES is verified: what the profile ran, observed and did not run. */
|
|
20
|
+
readonly fixtures?: {
|
|
21
|
+
readonly inventoryDigest: string;
|
|
22
|
+
readonly observedCodes: readonly string[];
|
|
23
|
+
readonly outOfProfile: readonly OutOfProfileSuite[];
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface BoundConformance {
|
|
27
|
+
/** The assessment for each check; `verified` only where the evidence bound and was evaluated. */
|
|
28
|
+
readonly results: readonly {
|
|
29
|
+
readonly assessment: Assessment;
|
|
30
|
+
readonly verified: boolean;
|
|
31
|
+
}[];
|
|
32
|
+
readonly summary?: ConformanceSummary;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Binds conformance evidence to `graph` (C31). Unbranded, copied or swapped evidence and inputs that are not revision
|
|
36
|
+
* inputs are a TypeError. The inputs are read once. Evidence counts only for the graph whose revision the inputs
|
|
37
|
+
* recompute, loaded for the running language version and kernel digest, and only when the running toolchain produced
|
|
38
|
+
* it; COMP-KERNEL also needs the inputs' floor (the sources under `.ia/src/floor/` at floor placement) to be the floor
|
|
39
|
+
* it verified. Anything else, including a source with only one of that path and that placement, is NOT-EVALUATED.
|
|
40
|
+
*/
|
|
41
|
+
export declare function bindConformance(graph: Graph, conformance: ConformanceOptions): BoundConformance;
|
|
42
|
+
//# sourceMappingURL=bind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bind.d.ts","sourceRoot":"","sources":["../../src/conformance/bind.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAkB,MAAM,mBAAmB,CAAC;AAG/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/G,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD,8HAA8H;AAC9H,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;CACpC;AACD,qGAAqG;AACrG,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,CAAC;IACzC,mEAAmE;IACnE,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IACnD,8FAA8F;IAC9F,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAClB,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;QACjC,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;QAC1C,QAAQ,CAAC,YAAY,EAAE,SAAS,iBAAiB,EAAE,CAAC;KACrD,CAAC;CACH;AACD,MAAM,WAAW,gBAAgB;IAC/B,iGAAiG;IACjG,QAAQ,CAAC,OAAO,EAAE,SAAS;QAAE,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;QAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IAC7F,QAAQ,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC;CACvC;AAsDD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,kBAAkB,GAAG,gBAAgB,CAkE/F"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { KERNEL_DIGEST, LANGUAGE_VERSION, canonicalPath } from '@inventarch/language';
|
|
2
|
+
import { revisionOf, stableSerialize } from '@inventarch/graph';
|
|
3
|
+
import { kernelDigest } from '../kernel.js';
|
|
4
|
+
import { assess } from '../types.js';
|
|
5
|
+
import { isConformanceEvidence, runningToolchain } from './evidence.js';
|
|
6
|
+
const notEvaluated = (check, reason) => assess(check, 'graph', [
|
|
7
|
+
{ code: 'IA-COMP-NOT-EVALUATED', severity: 'warning', path: '', line: 1, message: `${check}: ${reason}` },
|
|
8
|
+
]);
|
|
9
|
+
const record = (value, label) => {
|
|
10
|
+
if (typeof value !== 'object' || value === null)
|
|
11
|
+
throw new TypeError(`${label} must be an object`);
|
|
12
|
+
return value;
|
|
13
|
+
};
|
|
14
|
+
const text = (value, label) => {
|
|
15
|
+
if (typeof value !== 'string')
|
|
16
|
+
throw new TypeError(`${label} must be a string`);
|
|
17
|
+
return value;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The caller's inputs read once into frozen plain data, so every rule below sees what `revisionOf` hashed: a getter
|
|
21
|
+
* cannot show the revision one value and the version or floor checks another.
|
|
22
|
+
*/
|
|
23
|
+
function snapshot(inputs) {
|
|
24
|
+
const { sources, languageVersion, kernelDigest: digest } = record(inputs, 'conformance.inputs');
|
|
25
|
+
if (!Array.isArray(sources))
|
|
26
|
+
throw new TypeError('conformance.inputs.sources must be an array');
|
|
27
|
+
// An index loop into a fresh array literal, reading the length once: Array methods would build their results through
|
|
28
|
+
// the caller's constructor[Symbol.species], which can define other objects in place of the copies validated here.
|
|
29
|
+
const length = sources.length;
|
|
30
|
+
if (typeof length !== 'number' || !Number.isSafeInteger(length) || length < 0)
|
|
31
|
+
throw new TypeError('conformance.inputs.sources must be an array');
|
|
32
|
+
const copied = [];
|
|
33
|
+
for (let index = 0; index < length; index++) {
|
|
34
|
+
const at = `conformance.inputs.sources[${index}]`;
|
|
35
|
+
const { path, text: body, location } = record(sources[index], at);
|
|
36
|
+
const { placement, provenance } = record(location, `${at}.location`);
|
|
37
|
+
const { kind, band, reach } = record(placement, `${at}.location.placement`);
|
|
38
|
+
if (typeof band !== 'number')
|
|
39
|
+
throw new TypeError(`${at}.location.placement.band must be a number`);
|
|
40
|
+
copied.push(Object.freeze({
|
|
41
|
+
path: text(path, `${at}.path`),
|
|
42
|
+
text: text(body, `${at}.text`),
|
|
43
|
+
location: Object.freeze({
|
|
44
|
+
placement: Object.freeze({
|
|
45
|
+
kind: text(kind, `${at}.location.placement.kind`),
|
|
46
|
+
band,
|
|
47
|
+
reach: text(reach, `${at}.location.placement.reach`),
|
|
48
|
+
}),
|
|
49
|
+
provenance: text(provenance, `${at}.location.provenance`),
|
|
50
|
+
}),
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
return Object.freeze({
|
|
54
|
+
languageVersion: text(languageVersion, 'conformance.inputs.languageVersion'),
|
|
55
|
+
kernelDigest: text(digest, 'conformance.inputs.kernelDigest'),
|
|
56
|
+
sources: Object.freeze(copied),
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Binds conformance evidence to `graph` (C31). Unbranded, copied or swapped evidence and inputs that are not revision
|
|
61
|
+
* inputs are a TypeError. The inputs are read once. Evidence counts only for the graph whose revision the inputs
|
|
62
|
+
* recompute, loaded for the running language version and kernel digest, and only when the running toolchain produced
|
|
63
|
+
* it; COMP-KERNEL also needs the inputs' floor (the sources under `.ia/src/floor/` at floor placement) to be the floor
|
|
64
|
+
* it verified. Anything else, including a source with only one of that path and that placement, is NOT-EVALUATED.
|
|
65
|
+
*/
|
|
66
|
+
export function bindConformance(graph, conformance) {
|
|
67
|
+
const { inputs: given, kernel, fixtures } = record(conformance, 'conformance');
|
|
68
|
+
if (!isConformanceEvidence(kernel, 'COMP-KERNEL'))
|
|
69
|
+
throw new TypeError('conformance.kernel must be evidence verifyKernel returned');
|
|
70
|
+
if (!isConformanceEvidence(fixtures, 'COMP-FIXTURES'))
|
|
71
|
+
throw new TypeError('conformance.fixtures must be evidence verifyFixtures returned');
|
|
72
|
+
const inputs = snapshot(given), toolchain = runningToolchain();
|
|
73
|
+
const graphReason = revisionOf(graph.registry, inputs) !== graph.revision
|
|
74
|
+
? "the conformance inputs do not recompute this graph's revision"
|
|
75
|
+
: inputs.languageVersion !== LANGUAGE_VERSION || inputs.kernelDigest !== KERNEL_DIGEST
|
|
76
|
+
? 'the graph was loaded for another language version or kernel digest than the running one'
|
|
77
|
+
: undefined;
|
|
78
|
+
// Each object is checked against the running toolchain on its own, so one stale object leaves the other bound.
|
|
79
|
+
const staleness = (evidence) => stableSerialize(evidence.toolchain) === stableSerialize(toolchain)
|
|
80
|
+
? undefined
|
|
81
|
+
: 'the evidence was produced by another toolchain';
|
|
82
|
+
let kernelReason = graphReason ?? staleness(kernel);
|
|
83
|
+
if (kernelReason === undefined) {
|
|
84
|
+
const floor = [], ambiguous = [];
|
|
85
|
+
for (const source of inputs.sources) {
|
|
86
|
+
const path = canonicalPath(source.path), atPath = path.startsWith('.ia/src/floor/'), atPlacement = source.location.placement.kind === 'floor';
|
|
87
|
+
if (atPath && atPlacement)
|
|
88
|
+
floor.push({ path, text: source.text });
|
|
89
|
+
else if (atPath || atPlacement)
|
|
90
|
+
ambiguous.push(path);
|
|
91
|
+
}
|
|
92
|
+
kernelReason =
|
|
93
|
+
ambiguous.length > 0
|
|
94
|
+
? `floor source ${ambiguous.sort()[0]} has a floor path or a floor placement, not both`
|
|
95
|
+
: kernelDigest(floor) !== kernel.floorDigest
|
|
96
|
+
? 'the kernel evidence verified another floor'
|
|
97
|
+
: undefined;
|
|
98
|
+
}
|
|
99
|
+
const fixturesReason = graphReason ?? staleness(fixtures);
|
|
100
|
+
// Bound evidence whose own assessment is not-evaluated stays as it is: not verified, and not summarised.
|
|
101
|
+
const result = (check, reason, assessment) => reason === undefined
|
|
102
|
+
? { assessment, verified: assessment.outcome !== 'not-evaluated' }
|
|
103
|
+
: { assessment: notEvaluated(check, reason), verified: false };
|
|
104
|
+
const [kernelResult, fixturesResult] = [
|
|
105
|
+
result('COMP-KERNEL', kernelReason, kernel.assessment),
|
|
106
|
+
result('COMP-FIXTURES', fixturesReason, fixtures.assessment),
|
|
107
|
+
];
|
|
108
|
+
const results = [kernelResult, fixturesResult];
|
|
109
|
+
if (!kernelResult.verified && !fixturesResult.verified)
|
|
110
|
+
return { results };
|
|
111
|
+
return {
|
|
112
|
+
results,
|
|
113
|
+
summary: Object.freeze({
|
|
114
|
+
profile: kernel.profile,
|
|
115
|
+
toolchain,
|
|
116
|
+
...(kernelResult.verified ? { kernel: Object.freeze({ floorDigest: kernel.floorDigest }) } : {}),
|
|
117
|
+
...(fixturesResult.verified
|
|
118
|
+
? {
|
|
119
|
+
fixtures: Object.freeze({
|
|
120
|
+
inventoryDigest: fixtures.inventoryDigest,
|
|
121
|
+
observedCodes: fixtures.observedCodes,
|
|
122
|
+
outOfProfile: fixtures.outOfProfile,
|
|
123
|
+
}),
|
|
124
|
+
}
|
|
125
|
+
: {}),
|
|
126
|
+
}),
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=bind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bind.js","sourceRoot":"","sources":["../../src/conformance/bind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEtF,OAAO,EAAE,UAAU,EAA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{
|
|
4
|
+
readonly graph: Graph;
|
|
5
|
+
readonly inputs: readonly RevisionSource[];
|
|
6
|
+
readonly folders: readonly SystemFolder[];
|
|
7
|
+
}
|
|
8
|
+
/** Compiles and loads the conformance corpus the boundary suites run over. Throws on any diagnostic. */
|
|
9
|
+
export declare function loadCorpus(corpus: readonly {
|
|
10
|
+
readonly path: string;
|
|
11
|
+
readonly text: string;
|
|
12
|
+
}[], folderNames: readonly string[]): Corpus;
|
|
13
|
+
//# sourceMappingURL=corpus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corpus.d.ts","sourceRoot":"","sources":["../../src/conformance/corpus.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,SAAS,cAAc,EAAE,CAAC;IAC3C,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;CAC3C;AAKD,wGAAwG;AACxG,wBAAgB,UAAU,CACxB,MAAM,EAAE,SAAS;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,EACnE,WAAW,EAAE,SAAS,MAAM,EAAE,GAC7B,MAAM,CAwCR"}
|