@inventarch/db 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 +60 -15
- package/SPEC.md +33 -33
- package/dist/checks.d.ts +6 -6
- package/dist/checks.d.ts.map +1 -1
- package/dist/checks.js +8 -8
- package/dist/checks.js.map +1 -1
- package/dist/distribution/contracts.d.ts +1 -1
- package/dist/distribution/contracts.js +1 -1
- package/dist/distribution/contracts.js.map +1 -1
- package/dist/distribution/implementations.d.ts +4 -4
- package/dist/distribution/implementations.js +8 -8
- package/dist/distribution/reader.d.ts +1 -1
- package/dist/distribution/reader.js +1 -1
- package/dist/editor/index.d.ts +2 -2
- package/dist/evidence.d.ts +19 -20
- package/dist/evidence.d.ts.map +1 -1
- package/dist/evidence.js +28 -29
- package/dist/evidence.js.map +1 -1
- package/dist/handle.d.ts +7 -7
- package/dist/handle.d.ts.map +1 -1
- package/dist/handle.js +5 -5
- package/dist/handle.js.map +1 -1
- package/dist/inputs.d.ts +3 -3
- package/dist/inputs.d.ts.map +1 -1
- package/dist/inputs.js +2 -2
- package/dist/inputs.js.map +1 -1
- package/dist/paths.d.ts +2 -2
- package/dist/paths.js +2 -2
- package/dist/preview.js +1 -1
- package/dist/preview.js.map +1 -1
- package/dist/retention.d.ts +1 -1
- package/dist/retention.d.ts.map +1 -1
- package/dist/seat.d.ts +1 -1
- package/dist/seat.d.ts.map +1 -1
- package/dist/view.d.ts +29 -30
- package/dist/view.d.ts.map +1 -1
- package/dist/view.js +25 -25
- package/dist/view.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,30 +1,75 @@
|
|
|
1
1
|
# @inventarch/db
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@inventarch/db) [](https://github.com/inventarch/ia/actions/workflows/platform-quality.yml) [](LICENSE) [](package.json)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> `@inventarch/db` reads an IA workspace from disk. It discovers the workspace's `.ia/src` sources, installed distributions and adopted mounts, admits them through `@inventarch/language`, `@inventarch/graph` and `@inventarch/compliance`, and serves the admitted records through scoped read handles. [`@inventarch/runtime`](../runtime/README.md), the `ia` CLI and the other IA apps read workspaces through it.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## ⚡ Quick start
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```sh
|
|
10
|
+
npm install @inventarch/db
|
|
11
|
+
```
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
Read the workspace from the [root README quick start](../../README.md#-quick-start) without writing to it:
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
```js
|
|
16
|
+
import { open } from '@inventarch/db';
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
const workspace = open('path/to/your-project', { cache: false });
|
|
19
|
+
try {
|
|
20
|
+
const { token } = workspace.resolveScope();
|
|
21
|
+
const decision = workspace.get('work-system/definition/decision/api-response-format', { within: token });
|
|
22
|
+
console.log(decision.band, decision.source.path);
|
|
23
|
+
console.log(workspace.resolveSeat('.ia/src/decision.ia', { within: token }));
|
|
24
|
+
} finally {
|
|
25
|
+
workspace.close();
|
|
26
|
+
}
|
|
27
|
+
```
|
|
16
28
|
|
|
17
|
-
|
|
29
|
+
```text
|
|
30
|
+
100 .ia/src/decision.ia
|
|
31
|
+
{
|
|
32
|
+
path: '.ia/src/decision.ia',
|
|
33
|
+
seat: 'workspace-system/definition/workspace/my-project',
|
|
34
|
+
by: 'root',
|
|
35
|
+
claimants: []
|
|
36
|
+
}
|
|
37
|
+
```
|
|
18
38
|
|
|
19
|
-
|
|
39
|
+
`open` admits the workspace once. `resolveScope` issues an opaque token, and every read that passes it as `within` stays inside that scope. Band 100 marks a record the workspace authors. `cache: false` makes the open fully read-only; without it, the handle keeps a disposable graph cache at `.ia/.iadb/graph.json`.
|
|
20
40
|
|
|
21
|
-
|
|
22
|
-
# Editor snapshots
|
|
41
|
+
## 🧭 What it does
|
|
23
42
|
|
|
24
|
-
|
|
43
|
+
| Export | Use it for |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| `open(root, options)` | Discover and admit a workspace and return a `Handle`. `checks: 'structural'` admits `@check` records the way `ia validate`, `ia preview` and `ia author` do. |
|
|
46
|
+
| `resolveScope(request)` | Issue a scope token for a root, a phase or a list of identities. A child scope only narrows. |
|
|
47
|
+
| `get`, `records`, `snapshot`, `search`, `traverse`, `resolve`, `referencedBy`, `directedView` | Read admitted records and their relationships through a token. |
|
|
48
|
+
| `resolveSeat`, `roots`, `words` | Find the seat a path is declared at and the records that claim it, the declared source roots, and the registered words. |
|
|
49
|
+
| `report`, `refused`, `unadmitted` | Admission findings and the records admission left out, for privileged host inspection. |
|
|
50
|
+
| `revision`, `authoredRevision`, `staleness`, `readiness`, `refresh()` | Track change. The authored revision leaves out runtime-placed sources such as `ia validate` evidence; `staleness` and `readiness` compare a record with the previous retained snapshot. |
|
|
51
|
+
| `preview(changes)` | Admit in-memory drafts against the current sources without writing anything. |
|
|
52
|
+
| `planCapture`, `writeCapture` | Plan or write the capture pair under `.ia/work/snapshot/` that `ia capture` maintains. |
|
|
53
|
+
| `bindChecks`, `writeEvidence`, `readEvidence` | Bind each `@check` to an evaluator and keep the `@observation` evidence `ia validate` records under `.ia/work/evidence/`. |
|
|
54
|
+
| `writeRunnerEvidence` | Record a verified runner journal under `.ia/work/runner-evidence/`. |
|
|
55
|
+
| `readWorkspaceBytes(root, path, limit)` | Read one workspace file's exact bytes, refusing links, escaping paths and files over the limit. |
|
|
56
|
+
| `@inventarch/db/editor` | `EditorDatabase` and `EditorSnapshot`: cache-free readers with unsaved overlay buffers. |
|
|
57
|
+
| `@inventarch/db/distribution` | Strict decoders and canonical bytes for release descriptors, manifests, locks, generation membership, activation pointers and the installed-implementation catalog. |
|
|
58
|
+
| `@inventarch/db/descriptors` | Pure, bounded compilers for `domain-model`, `storage-binding` and `app-composition` descriptor resources; see [their contract](src/descriptors/SPEC.md). |
|
|
25
59
|
|
|
26
|
-
|
|
60
|
+
The `./internal/*` subpaths serve specific toolchain consumers and are not a stable contract.
|
|
27
61
|
|
|
28
|
-
|
|
62
|
+
## ⚖️ What it does not do
|
|
29
63
|
|
|
30
|
-
|
|
64
|
+
- **It never writes authored source.** Its only writes are the disposable cache, which `cache: false` turns off, and the capture pair and evidence files, each only when you call its writer.
|
|
65
|
+
- **It makes no network request and no installation write.** Reads verify installed distributions and refuse missing, corrupt or drifted state. Acquiring and installing archives belongs to the application, such as the `ia` CLI.
|
|
66
|
+
- **Admission is not evaluation.** Opening a workspace runs no conformance suite or prose case. `bindChecks` runs no evaluator that is not built in: such a check stays `not-evaluated`, which is never a pass.
|
|
67
|
+
- **A scope narrows reads; it does not decide who reads.** Unscoped reads and issuing independent scopes are privileged host inspection, and the host that holds the handle decides what it discloses.
|
|
68
|
+
- **Evidence is not attestation.** A runner journal's hash chain establishes internal integrity, not an external observer, authorized execution or real-world effects.
|
|
69
|
+
|
|
70
|
+
## 📚 Learn more
|
|
71
|
+
|
|
72
|
+
- [SPEC.md](SPEC.md): the database contract for revisions, scopes, retention, capture and evidence.
|
|
73
|
+
- [LANGUAGE.md](LANGUAGE.md): the public vocabulary this release carries.
|
|
74
|
+
- The [root README](../../README.md) and the [architecture reference](../../docs/reference/architecture/README.md).
|
|
75
|
+
- Related packages: [`@inventarch/language`](../language/README.md), [`@inventarch/graph`](../graph/README.md), [`@inventarch/compliance`](../compliance/README.md) and [`@inventarch/runtime`](../runtime/README.md).
|
package/SPEC.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
`safePath` locates a symlink or junction refusal at the first unsafe workspace-relative component it encounters. Evidence writers preserve that location, so recovery can replace the workspace link itself instead of acting on a child through its external target. The walk stops before traversing the refused component; the existing read-only evidence behavior remains unchanged.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Runner journal evidence
|
|
8
8
|
|
|
9
9
|
Event IDs are session command IDs: an atomic command may contribute up to 32 contiguous events with the same ID, actor and cause. Noncontiguous reuse, changed command attribution, and oversized command groups are rejected. Sequence and hash chaining identify each distinct event. Exact runner authority and limit refusal waits project refusal; unrelated waits remain inconclusive.
|
|
10
10
|
|
|
@@ -20,27 +20,27 @@ Planned consumer: bounded repository capture specifies an explicit host collecto
|
|
|
20
20
|
|
|
21
21
|
PT5 complete-disclosure refinement: `ReadHandle.isCompleteScope(token)` proves that a current handle-issued scope was created at the whole-workspace root without a phase or identity restriction, and has no narrowed ancestor. Unknown, stale and closed tokens retain existing scope errors. Selecting every admitted identity still returns false: refused source diagnostics may reveal material outside that identity set. The flag stays internal to scope storage, so serialized scope/snapshot shapes remain compatible. Whole-workspace draft preview consumers must require this proof before exposing admission diagnostics; ordinary scoped reads are unchanged.
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## Descriptor producer
|
|
24
24
|
|
|
25
|
-
The public `@inventarch/db/descriptors` entrypoint owns the pure, bounded, versioned codecs and compilers for `domain-model`, `storage-binding` and `app-composition` resources
|
|
25
|
+
The public `@inventarch/db/descriptors` entrypoint owns the pure, bounded, versioned codecs and compilers for `domain-model`, `storage-binding` and `app-composition` resources: strict 1 MiB/depth-16/1,000-entry JSON with duplicate-key refusal, canonical `sha256:` digests bound to the native envelope, a host-built trusted contract registry for command/query/validator/view/operation/port/adapter/migration-policy IDs, and typed single-diagnostic refusals with owner/source/resource/field attribution. It performs no I/O, DDL or code execution, and the three words remain unregistered; an isolated candidate is admitted only through `preview`. The strict JSON transport is shared with the distribution codec through `src/json.ts` with unchanged distribution messages. See the [descriptor SPEC](src/descriptors/SPEC.md).
|
|
26
26
|
|
|
27
|
-
## Distribution
|
|
27
|
+
## Distribution implementation packet
|
|
28
28
|
|
|
29
|
-
The public `@inventarch/db/distribution` entrypoint owns strict version-1 transport decoders and canonical bytes for release descriptors/manifests, portable locks, generation membership and activation pointers. JSON rejects duplicate decoded keys and unknown fields; object input must be bounded plain data without accessors or aliases. Native parsing stays in language. Package IDs are provider-qualified lowercase `provider/name`; versions and ranges use pinned SemVer. No absolute path or credential enters a portable lock. Metadata limits are 4 MiB, 128 selected bundles and 10,000 files,
|
|
29
|
+
The public `@inventarch/db/distribution` entrypoint owns strict version-1 transport decoders and canonical bytes for release descriptors/manifests, portable locks, generation membership and activation pointers. JSON rejects duplicate decoded keys and unknown fields; object input must be bounded plain data without accessors or aliases. Native parsing stays in language. Package IDs are provider-qualified lowercase `provider/name`; versions and ranges use pinned SemVer. No absolute path or credential enters a portable lock. Metadata limits are 4 MiB, 128 selected bundles and 10,000 files, beside separate archive/file ceilings. Decoding copies and freezes output. A release descriptor's `distribution` is its one optional key (2026-10-09): a workspace that releases nothing, as one a default `ia init` creates, omits it, and the decoded `ReleaseDescriptor` then has no `distribution` property; present, it must still be a native distribution identity, never null. A bundle manifest always carries one, and its decoded keys keep their order, so canonical bytes are unchanged.
|
|
30
30
|
|
|
31
|
-
The same entrypoint shapes the installed-implementation catalog a host payload carries
|
|
31
|
+
The same entrypoint shapes the installed-implementation catalog a host payload carries: `checkInstalledImplementations(value)` admits exactly `format` `ia.installed-implementations.v1`, an `evaluators` section with an `ia-evaluator-catalog/1.x` format and at most 1,024 entries, and at most 1,024 `operations` sorted by id and unique, each `available` (id, version, operation identity, handler, input and output validator ids, a portable `runtime/node_modules/...` handler module inside one of its sorted `packages`, and the module's SHA-256), `unavailable` or `revoked` with a single-line reason, and returns the value or the first reason it is not one; it reads, loads and executes nothing. `@inventarch/distribution` verifies a catalog against its payload with it and `@inventarch/workspace-runtime` binds records against its rows (`InstalledOperation`).
|
|
32
32
|
|
|
33
|
-
Generation membership enumerates selected bundle IDs/archive digests and source inventories derived from verified manifests, with deterministic identical-system deduplication and contributing-package provenance. Readers verify complete file inventory, exact canonical generation bytes and the active lock, and load only selected source bytes. An unpinned regular file named `.DS_Store` or `._*`, which a Mac writes into directories it opens, is skipped; a pinned one is verified like any other, and a link or special file of such a name is refused (`platformDebris`, #323). Candidate installation is an explicit host-selected input option; it does not bypass admission or grant writes. The generated installation workspace uses native composition and direct-distribution use edges. Installed sources retain adopted band 90/methodology; generated installation state uses band 100/workspace. Active generation and monotonic counter participate in revision and scope freshness. Existing authored/adopted callers keep their behavior when no installation exists.
|
|
33
|
+
Generation membership enumerates selected bundle IDs/archive digests and source inventories derived from verified manifests, with deterministic identical-system deduplication and contributing-package provenance. Readers verify complete file inventory, exact canonical generation bytes and the active lock, and load only selected source bytes. An unpinned regular file named `.DS_Store` or `._*`, which a Mac writes into directories it opens, is skipped; a pinned one is verified like any other, and a link or special file of such a name is refused (`platformDebris`, crowncodes/ia#323). Candidate installation is an explicit host-selected input option; it does not bypass admission or grant writes. The generated installation workspace uses native composition and direct-distribution use edges. Installed sources retain adopted band 90/methodology; generated installation state uses band 100/workspace. Active generation and monotonic counter participate in revision and scope freshness. Existing authored/adopted callers keep their behavior when no installation exists.
|
|
34
34
|
|
|
35
35
|
Root release-control sources at `.ia/src/releases/<distribution-name>.ia` contain exactly their selected public distribution declaration, meaning and unconditional system roots matching the manifest. The shared `verifyReleaseControl` check enforces this source profile in archive verification, expanded-bundle reads and `generationSources`, including retained source installations whose content and metadata have been consistently repinned. Ordinary system-source admission remains a separate check.
|
|
36
36
|
|
|
37
|
-
The application owns archive acquisition, bounded solving and mutation. The database owns no network or installation writes. Restore-required, lock-drift, corrupt-state and pending-recovery remain named operational refusals; a fresh read never silently ignores a selected installation. Filesystem and fault-injection tests must establish
|
|
37
|
+
The application owns archive acquisition, bounded solving and mutation. The database owns no network or installation writes. Restore-required, lock-drift, corrupt-state and pending-recovery remain named operational refusals; a fresh read never silently ignores a selected installation. Filesystem and fault-injection tests must establish that behavior before these planned contracts are reported delivered.
|
|
38
38
|
|
|
39
39
|
Local binding adapter (2026-09-18): when `InputOptions.adopted` is absent, `readInputs` loads optional `.ia/workspace.json`: `{ "version": 1, "adopted": [{ "id": "foundation", "path": "vendor/foundation", "revision": "<sha256>" }] }`. This closed host-data format supports at most 16 bindings and 64 KiB of UTF-8 JSON. Each path is a canonical portable directory inside the current workspace and outside its `.ia` tree; absolute paths, parent traversal, duplicate IDs/directories and aliases refuse. Only the selected directory's physical `.ia/src` sources are captured, with package artifacts excluded and no recursive binding expansion. Its floor is excluded: the workspace still selects exactly one explicit/local/embedded floor. The revision uses the existing `AdoptedSource` digest of the ordered exact `{path,text}` list. Missing roots, malformed configuration or changed pinned bytes fail the capture; they never silently drop a dependency. Bindings are validated and read in manifest order, each read before the next is validated, so the first faulty binding answers with its own fault, a read-time one (a link, a missing tree, a changed pin) included, as the frozen Door routes and `ia scope` report it. Explicit `adopted` captures, including `[]`, replace automatic bindings. Disk/editor refresh rereads the manifest and dependency bytes; failed refresh retains internal evidence while the host marks it unavailable. Read-only adopted placement, membership, admission and stale-action semantics remain unchanged; this manifest grants no writable system or model disclosure. An adopted mount's sources carry the path `.ia/adopted/<id>/<revision>/<path>`, a label under which no file exists. `adoptedBindings(root)` (2026-10-07) returns the manifest's bindings, frozen, each `{id, path, revision, tree}` with `tree` that label, validated as discovery validates them (the same IA-DB-ROOT-INVALID, IA-DB-SOURCE-UNAVAILABLE and IA-DB-PATH-UNSAFE refusals) without reading or verifying the bound sources, and [] without a manifest, so a host can read a mount's other files, such as the documents `ia read` returns, from its bound directory; those files are outside the revision pin.
|
|
40
40
|
|
|
41
|
-
Editor extension contract (2026-09-18): `/editor` owns cache-free captured-input readers, versioned unsaved overlays (including local floor buffers), deleted-source reconciliation and privileged source/registry/occurrence inspection. Reads share the existing scope, admission and view implementation; every refresh retires the previous reader. An editor reader retains no previous snapshot (D08). Source metadata identifies embedded/explicit floor as virtual read-only, and local sources by placement/provenance. Existing `Handle.preview` retains its non-floor draft contract. No filesystem writes occur in editor capture or preview. Candidate/baseline comparison preserves unrelated pre-existing failures while refusing new errors or loss of admitted records. `EditorOptions` (2026-10-11
|
|
41
|
+
Editor extension contract (2026-09-18): `/editor` owns cache-free captured-input readers, versioned unsaved overlays (including local floor buffers), deleted-source reconciliation and privileged source/registry/occurrence inspection. Reads share the existing scope, admission and view implementation; every refresh retires the previous reader. An editor reader retains no previous snapshot (D08). Source metadata identifies embedded/explicit floor as virtual read-only, and local sources by placement/provenance. Existing `Handle.preview` retains its non-floor draft contract. No filesystem writes occur in editor capture or preview. Candidate/baseline comparison preserves unrelated pre-existing failures while refusing new errors or loss of admitted records. `EditorOptions` (2026-10-11) extends `InputOptions` with `checks` (`strict`, the default, or `structural`, D13): `EditorDatabase(root, options)` and `EditorSnapshot(input, changes, options)` accept it, and a structural editor database's snapshot, its `preview` drafts, its candidates and every update or refresh admit structurally, while a caller that passes no `checks` keeps strict admission. An editor lists evidence only when `evidence` asks for it (D14).
|
|
42
42
|
|
|
43
|
-
Implementation contract for database
|
|
43
|
+
Implementation contract for the database package. Depends on @inventarch/language, @inventarch/graph and @inventarch/compliance. Node filesystem adapter; source parsing and semantic decoding stay in language, graph owns all adjacency/postings, compliance alone constructs verdicts.
|
|
44
44
|
|
|
45
45
|
D01. open(root, options) reads a canonical existing workspace directory and its .ia/src tree. A missing source tree is empty. Read only regular .ia files and all direct system directories, including empty ones. Refuse symlink/junction source or cache traversal and paths escaping the canonical workspace; never follow an alias into another source root. Canonical source names are workspace-relative and slash-separated. Windows override lookup is case-insensitive and duplicate aliases refuse. Decode UTF-8 fatally while preserving a BOM as source content; invalid encoding or unreadable source is SOURCE-UNAVAILABLE. No source file is written.
|
|
46
46
|
|
|
@@ -48,19 +48,19 @@ D01a. Workspace file bytes (2026-10-08; runtime R12, the Door's `read`). `readWo
|
|
|
48
48
|
|
|
49
49
|
D02. Default authored sources use band100, empty reach and workspace provenance. Local or embedded .ia/src/floor sources use floor10/bootstrap. Explicit per-source Location overrides supply other closed placement/provenance values and canonical reach; validate kind/band consistency. options.floor is an explicit array of canonical floor path/text sources, replacing local/default floor. Without it, an existing local floor directory is authoritative as a whole, including when empty; only an absent directory selects language.KERNEL_SOURCES. Report embedded origin as virtual bootstrap input. Copy/freeze inputs and options so caller mutation cannot change a published view.
|
|
50
50
|
|
|
51
|
-
D02a. Capture membership
|
|
51
|
+
D02a. Capture membership. `Snapshot.membership` holds one frozen row `{identity, root, band, digest}` per record in `records`, in the same identity order: `band` is the record's placement band and `digest` its graph G13 per-record digest. The capture declares roots once, from the `@workspace` records the root view (location '', no phase) admits: each `composition.sources` entry spelled `<root> @<placement>` declares that root at that placement, read relative to the tree holding the declaring record (the directory above its `.ia/src`, which the exported `sourceTree(path)` names: '' for the workspace's own tree, a package's or an installed store's directory, and an adopted mount's `.ia/adopted/<id>/<revision>` label), so an adopted or installed `@workspace` speaks only for its own mount. An entry that does not parse, names an unknown placement, or is absolute or escapes that tree declares nothing (`inertDeclarations` names it, D02b), and so does a `@workspace` the root view does not admit (one whose reach excludes the root). A record's `root` is the longest declared root at the record's own placement that contains its source path; the record is then a member of every `@workspace` declaring that root. That is composition, not an edge row or a field index. Any other record keeps its system seat: the `systemMember` system folder of its path, whether local, package, adopted (`.ia/adopted/<id>/<revision>/…`) or installed (`.ia/distributions/store/<archive>/…`). A record under `.ia/src/floor/` is rooted at `.ia/src/floor`, and any other record outside every system folder (the generated installation workspace) at its source directory, so floor records read `.ia/src/floor` at band 10 unless a workspace declares a root containing them at `@floor`. Each view's rows come from its admitted winners: shadowed, tied, blocked, refused and inactive (out-of-reach or out-of-phase) occurrences, and records admission removed, are not admitted records and have no row. A row depends only on its occurrence and the capture's declared roots, so every view admitting an occurrence gives it the same row: a scope narrowed by identities, root or phase prunes rows and never re-roots one, although a narrower root or phase can admit another occurrence of an identity, whose row is its own. The input model cannot express two cases: an adopted closure named by locator (`<distribution-id>@<digest>`) is not a path, so such a `sources` entry declares no root and adopted and installed records keep their system seats; and nothing seats a record by anything but its path and placement. Membership and per-record digests are not revision inputs, so workspace revisions are unchanged. The runtime Door's MACHINE_PROTOCOL version 1 `records` operation omits `membership`.
|
|
52
52
|
|
|
53
|
-
D02b. Location seat
|
|
53
|
+
D02b. Location seat. `resolveSeat(path, options)` on every reader returns a frozen `SeatResolution` `{path, seat?, by?, claimants, unknown?}`. `path` is canonicalized as a scope root with `\` read as `/`; an absolute path, or one escaping the workspace, comes back as supplied with `unknown: 'outside'` and no claimants. Otherwise the seat is the first that applies, and `by` names which: `system`, the admitted `@system` of the system folder that holds the path or is the path, as `systemMember` reads local, package, adopted and installed folders, and the floor's `@system` for `.ia/src/floor`; `root`, the `@workspace` declaring the longest D02a root that contains the path, at any placement, ties by workspace identity; `repository`, for a path with no `.ia` segment, the repository's own `@workspace`. The capture decides that workspace once, from the root view, as the one admitted `@workspace` in the repository's `.ia/src` tree that declares a root, else the only `@workspace` there; none or several decide none. With no seat, `unknown` is `undeclared`. `claimants` are graph G06c's claimants of the path, whatever the seat: each record whose `authority.covers`, `subject.covers`, `work.covers`, `hook.paths` or `check.covers` selection selects it (a `@check`'s textual `check.scope` claims nothing), with every matching field and selection, band descending then identity ascending; the graph indexes the selections once per load, so claimants are read from that index, never from the records, and the seat from the graph's name and discriminator indexes and the capture's declared roots. `options` bind as `get` binds them (CLOSED, STALE, SCOPE-UNAVAILABLE, SCOPE-MISMATCH), and a scope prunes as search and resolution do (D09): a seat or claimant outside it is absent, so the path takes the next seat that applies. `inertDeclarations(options)` on every reader names, as frozen `{identity, field, value, path, line, reason}` values ordered by path, line and identity and pruned to the scope, each declaration the capture reads that declares nothing: a `composition.sources` entry of an admitted `@workspace` that names no root (D02a), and a claimant selection the dialect reads as none (graph `isSelection`), which selects no path, so a host can say so where it is authored; neither is a report finding, so admission, snapshots and the Door are unchanged. The resolution reads the view's graph and the capture's declared roots only; it adds no snapshot field, no cache payload beyond the graph's G06c index and no revision input, and the frozen Door routes and `ia scope` do not call it. `tests/seat.test.ts` pins the exit evidence (`.ia/src/systems/work-system/records/work.ia` seats at work-system with the fixture `@mandate` that covers it), each seat rule and the root tie-break, how the repository's own `@workspace` is chosen, outside paths, claimant order across bands and fields, scope binding and a scope pruning each seat rule, and the editor reader's unsaved overlays.
|
|
54
54
|
|
|
55
|
-
D02c. Declared roots (
|
|
55
|
+
D02c. Declared roots (runtime R15). `roots(options)` on every reader returns the roots the capture declares (D02a) as frozen `DeclaredRoot` copies `{root, placement, workspace}`, in the capture's order: longest root first, then by declaring `@workspace` identity. An entry that declares nothing (`inertDeclarations`) is no root. `options` bind as `get` binds them (CLOSED, STALE, SCOPE-UNAVAILABLE, SCOPE-MISMATCH), and a root whose declaring `@workspace` the read does not admit is pruned, as the seat rule prunes it (D02b, D09); membership rows keep the roots they were captured under whatever the scope, so pruning a root never re-roots a row. It is how a runtime reader computes a workspace's capture members and closure without the private view: it adds no snapshot field, cache payload or revision input, never reads the D08a capture pair, and the frozen Door routes do not call it. `DeclaredRoot` is exported as a type. `tests/membership.test.ts` pins the order, the inert entry left out, frozen copies, and a scope that does not admit the declaring workspace pruning its roots while its rows keep theirs; `tests/scope.test.ts` and `tests/retention.test.ts` pin the token checks and that no capture file is read.
|
|
56
56
|
|
|
57
|
-
D03. A source snapshot includes all selected source bytes, paths, placement/provenance and discovered system folders. A derived revision-only input carries the folder inventory, floor origin and admission-policy version so empty-folder changes also change the revision; it is never parsed or exposed as an authored record. A view selects sources by reach before building its registry, compiles them independently through language, and delegates authority/phase and external resolution to graph. Never pass all shadowed external occurrences to the compiler as an ambiguous pool. Preserve language
|
|
57
|
+
D03. A source snapshot includes all selected source bytes, paths, placement/provenance and discovered system folders. A derived revision-only input carries the folder inventory, floor origin and admission-policy version so empty-folder changes also change the revision; it is never parsed or exposed as an authored record. A view selects sources by reach before building its registry, compiles them independently through language, and delegates authority/phase and external resolution to graph. Never pass all shadowed external occurrences to the compiler as an ambiguous pool. Preserve language L32: any language error refuses every record in that file; healthy other files remain independent. Compiled preview siblings are never promoted to admission. Whole-tree requirement ids remain unique without a band exception under language S09. Before authority can hide duplicates, collect distinct physical requirement occurrences from error-free compilation at every distinct declared reach (and the requested location), using each location's registry. Deduplicate the same source occurrence across views, then invoke the shared language collision helper; every participating file is refused. This finite context set covers all registry visibility changes without inventing a second requirement parser.
|
|
58
58
|
|
|
59
59
|
D04. Compliance validates candidate schemas and system joins. A malformed system folder or missing steward refuses that join, its owned words and dependent systems; preserve the root finding. Foreign instances, invalid schemas, selectors, variants and unknown check runners are not readable admitted nodes. A schema assessment that remains not-evaluated cannot establish instance admission. Rebuild graph relationships after removing refused nodes until admission stabilizes; retain failed/unavailable assessments as admission evidence without turning earlier candidate passes into final claims. Coverage/adoption failures remain report evidence and do not erase an otherwise structurally valid contract/workspace declaration. The public snapshot identifies admitted system order and refused subjects separately from candidate vocabulary; private graph registry data is not exposed as admission proof.
|
|
60
60
|
|
|
61
61
|
D05. The root view revision is the handle's whole-source generation stamp; graph revisions additionally include the effective view registry. Every selected source participates even when unreachable in a view. Refresh fully rereads and rebuilds; system/schema changes always rebuild everything. Verify source discovery/bytes are stable before publishing a new snapshot, retry a bounded three times on concurrent changes, then SOURCE-CHANGED. Publication swaps the complete immutable state; failed refresh preserves the previous state. Source errors produce attributable partial admission, not silent success.
|
|
62
62
|
|
|
63
|
-
D05a. The authored revision (2026-10-09
|
|
63
|
+
D05a. The authored revision (2026-10-09). Every view carries, beside its graph revision, its authored revision: graph G01a `authoredRevisionOf` over the same revision inputs and view registry, the derived revision-only input of D03 (`.ia/.db-inputs.json`) named as derived, so it is the graph revision without the sources at runtime placement (band 0) while a folder, floor origin, authored-root or activation change still moves it. `authoredRevision` on every reader names the root view's, and `Snapshot.authoredRevision` the read view's, beside `revision`; with no source at runtime placement the two are equal, so every workspace without one keeps its revisions. A source at runtime placement appearing, changing or leaving moves `revision` and leaves `authoredRevision` unless it moves an input the authored revision keeps: the derived input's folder inventory (a source that adds a system folder) or the view registry, which every placement builds (a `@system` or `@schema` it declares); an authored edit moves both. `revision` keeps its meaning everywhere else: it is what scopes bind (D07), what a `revision` read binding asserts (D08: IA-DB-STALE is about the handle's inputs, runtime-band ones included), what `preview` names as base and candidate revisions (D12) and the cache stamp (D06). Retention and the capture pair key on the authored revision (D08, D08a). The Door's version 1 `records` operation leaves `authoredRevision` out with `membership`, so its output keeps its four fields (runtime R12). `tests/retention.test.ts` pins the equality with no runtime-placed source, on the root view, a phase view and a narrower root; a runtime-band source moving the revision alone while nothing rotates, in the handle, in a new handle and in the capture pair, and the capture stays current; an authored edit moving both; a capture trusted though its runtime-band rows or a row's root differ, and across a runtime-band `@workspace` that roots authored records, and refused for another authored row at the fresh authored revision whatever its revision; a document without `authoredRevision` read at its `revision`, and a malformed one ignored; and `tests/scope.test.ts` the snapshot's keys.
|
|
64
64
|
|
|
65
65
|
D06. The derived .ia/.iadb/graph.json stores a format tag, revision and deterministic serialized root graph. Always build/validate fresh and compare the complete payload before accepting a cached artifact; a matching stamp alone is insufficient. Equal bytes are not rewritten. Changed/corrupt/foreign bytes are replaced atomically through a unique same-directory temporary file. Recheck containment immediately before access/publication. Cache I/O failures produce CACHE-UNAVAILABLE and leave the valid in-memory snapshot usable; no authored file is touched. This version saves redundant writes, not parsing work. Fresh/cached/refreshed graphs are byte-equal for equal inputs. `cache.state` and `cache.observations` report this file alone; the D08 retained pair is the capture pair of D08a, never a cache file.
|
|
66
66
|
|
|
@@ -68,47 +68,47 @@ D07. resolveScope issues an opaque unguessable token bound privately to its issu
|
|
|
68
68
|
|
|
69
69
|
D08. Every read carrying a token validates issuer, open state, generation and explicit root/phase/revision assertions. Omitted bindings inherit. Unknown/forged/other-handle tokens are SCOPE-UNAVAILABLE; incompatible bindings or a wider child root SCOPE-MISMATCH; changed generation STALE (a token never revives after refresh to different inputs and back); closed handle CLOSED. Stale tokens never read current bytes under an old stamp. Scope grants reading only. Tokens are not transferable between processes without the later owning transport retaining their issuing handle.
|
|
70
70
|
|
|
71
|
-
D08 retention
|
|
71
|
+
D08 retention, apart from scope validation: a handle retains two admitted root snapshots, seeded from the capture pair of D08a (location '', no phase), each as its revision, its authored revision (D05a) and its D02a membership rows: the current one, and `previous`, the most recent admitted root snapshot whose authored revision differs from the current one. Only an authored revision change rotates (2026-10-09: a change to runtime-band sources alone, such as evidence an `ia validate` writes, moves the revision but must not spend the comparison staleness and readiness depend on). A refresh, or a new handle, that finds the authored revision last retained as current keeps the existing previous, so a plain open or refresh at an unchanged authored revision never wipes that comparison; an authored revision change, even one that alters no record text, rotates that current into previous; a failed refresh rotates nothing. `previousRevision` and `previousAuthoredRevision` name the previous snapshot's revision and authored revision, undefined while none is retained. `staleness(identity, options)` and `readiness(identity, digest, options)` bind `options` exactly as `get` does (CLOSED, STALE, SCOPE-UNAVAILABLE, SCOPE-MISMATCH, and OUT-OF-SCOPE for an identity outside the scope's allowed identities) and take the current digest from the view `get` reads, so their current side is the record `get` returns. Only root snapshots are retained, so the previous side is the identity's digest in the previous root snapshot, and it applies only while the selected view's digest is the identity's current root digest, as it always is for a root read. `staleness` answers `unchanged` when the two sides are equal, `changed` when not, `new` when only the current side has a digest (so every current identity reads `new` while no previous snapshot is retained), `removed` when only the previous side does, undefined when neither does. `readiness` answers `current` when `digest` equals the current side, else `previous` when it equals the previous side, else `unknown`: digest equality, never an order. When a narrower root or phase selects a digest other than the current root one, including a record only one of the two views holds (for example a phase-shadowed or tied occurrence, or one only a narrower root reaches), the retained root snapshots describe a different occurrence: `staleness` is undefined and `readiness` answers `current` for the selected record's own digest, else `unknown`. A scope admits only identities its view holds, so a read through a scope token never reports `removed`. The previous snapshot persists between processes as the capture pair of D08a, the one retained pair, which only `ia capture` writes: every disk handle, whatever its cache setting, seeds its pair from it, and no handle writes it. A handle reads the pair the first time it is asked for `previousRevision`, `previousAuthoredRevision`, `capturedRevision`, `capturedAuthoredRevision`, `staleness` or `readiness`, never on open or refresh, so a read that never asks (every frozen Door route) opens no capture file. The seed is the capture at `current.json` and, when it is a capture at another authored revision, the one at `previous.json`; with no readable `current.json`, a capture at `previous.json` alone. The handle rotates that seed against its own root snapshot: at the captured authored revision `previous` is the capture at `previous.json`, at another authored revision it is the capture at `current.json`. A capture is trusted by its authored revision and the membership rows of its records not at runtime placement (band other than 0), each by its identity, band and digest: a `current.json` that names the fresh authored revision with other such rows is not this workspace's capture at that revision, so the pair seeds nothing, while one that differs from the fresh snapshot only in its runtime-band rows, and so in its revision, or in the roots of its rows, which a runtime-band `@workspace` can declare (D02a) and no retained read takes, is this workspace's. Admission still reads every placement, so a runtime-band record that changes which records not at runtime placement are admitted (one repeating an authored requirement id refuses both) leaves a capture at that authored revision untrusted until the next capture; a capture at another authored revision cannot be rebuilt from the fresh inputs, so it is trusted as written. A link or junction on the way, an entry that is not a regular file, and a file that is no capture (not JSON, another format, a malformed revision, authored revision or membership row) are ignored, never followed, and leave every read usable. `capturedRevision` and `capturedAuthoredRevision` name the revision and the authored revision of the capture at `current.json`, undefined when there is none or it is not trusted; a capture at another authored revision than `authoredRevision` is stale, and one that differs only in runtime-band sources is not. A refresh rotates the pair its handle holds in memory without reading the capture pair: at a changed authored revision the root snapshot it held becomes `previous`, and at an unchanged one it keeps the previous side it held, still unread until asked, so however often a handle refreshes it holds one pair. `capturedRevision` and `capturedAuthoredRevision` are read again the next time they are asked after a refresh, as `ia capture` may have run, so a handle that lived through an edit reports the edit as changed whether or not it was captured. The cache-free editor reader retains nothing: `previousRevision`, `previousAuthoredRevision`, `capturedRevision` and `capturedAuthoredRevision` are undefined, every current identity reads `new`, and `readiness` never answers `previous`. Retention is not a revision input and adds no snapshot field (the `authoredRevision` a snapshot carries is its view's, D05a), so workspace revisions, snapshots and the Door's MACHINE_PROTOCOL version 1 output are unchanged by it.
|
|
72
72
|
|
|
73
|
-
D08a. The capture pair (
|
|
73
|
+
D08a. The capture pair (the CLI's `capture`). `writeCapture(root, text)` writes `text`, an `ia-snapshot-1` document (`CAPTURE_FORMAT`: one JSON object whose `format` is `ia-snapshot-1`, whose `revision` is a 64-hex workspace revision, whose optional `authoredRevision` is its 64-hex authored revision (D05a; `ia capture` writes it, and a document without one, written before it, names its `revision` as its authored revision, which it was while no source sat at runtime placement; another value, `null` included, is no capture) and whose `membership` holds D02a rows, each exactly `{identity, root, band, digest}` with a closed band and a 64-hex digest, identities unique), to `.ia/work/snapshot/current.json` (`CAPTURE_CURRENT`), keeps `.ia/work/snapshot/previous.json` (`CAPTURE_PREVIOUS`) as D08 rotates its pair, and returns `{prior, ignored, previous, rotated, changed, unchanged, added, removed}`; any other `text` throws a TypeError before anything is touched. Its counts follow `staleness` against the prior capture at `current.json`: an equal digest is unchanged, another changed, a row the prior lacks added, and a prior row with none now removed; with no readable prior capture every row is added, and `ignored` says why an existing `current.json` was not taken as one. Rotation is by authored revision, as D08 rotates: a capture at a new authored revision makes the prior `current.json` the new `previous.json`, renamed, so byte for byte; one at an unchanged authored revision (one that changes runtime-band sources alone among them) keeps `previous.json` while it holds a capture at another authored revision; with no readable prior capture, a `previous.json` at another authored revision is kept as the most recent capture there is; a `previous.json` at the new authored revision, or one that is no capture, is moved aside before `current.json` is written and removed after; and a `current.json` that already holds `text` is not rewritten. Nothing is written until every check passes: a link or junction on the way, an entry at `.ia`, `.ia/work` or `.ia/work/snapshot` that is not a directory, or an entry at either path that is not a regular file, refuses as PATH-UNSAFE; for an entry that is not a directory or not a regular file the error's optional `path` names it, and a link or junction is named in the message. The new bytes are staged first in a unique same-directory temporary file, flushed and owner-only; a rotation then moves `previous.json` aside, renames `current.json` to `previous.json` and the staged file to `current.json`, and a step that fails undoes the ones before it in reverse, so a failed write leaves the pair it found and only the error escapes (a process killed between two renames can leave the moved-aside file and `previous.json` holding what `current.json` held, which the next capture rotates again). Concurrent captures of one root are last-writer-wins. The pair is local working state under `.ia/work/`, never a source and never read by admission, and no handle writes it.
|
|
74
74
|
|
|
75
|
-
D08b. The capture plan (
|
|
75
|
+
D08b. The capture plan (`ia capture --preview`). `planCapture(root, text)` makes every check and read `writeCapture(root, text)` makes before its first write, with the same TypeError for a `text` that is no `ia-snapshot-1` document and the same PATH-UNSAFE refusals, and returns the frozen `CapturePlan`: the result that write would return, so its counts, `prior`, `ignored`, `previous` and `rotated` are the write's, plus `identities` `{changed, added, removed}`, the identities those three counts count, each list sorted by code unit (with no readable prior capture, `added` lists every row). It creates no directory and stages, renames, removes or writes no file, so the capture pair keeps its bytes and modification times. `writeCapture` makes its checks and reads through the same planner, then writes; its result and its writes are unchanged. `CapturePlan` is exported as a type. `tests/retention.test.ts` pins the plan of a workspace never captured (no `.ia/work` is created), one edit named as the one changed identity with the pair left as it was, an added and a removed identity, the plan agreeing with the write's result at each step, a check that refuses the plan, and each list sorted by code unit whatever order either document holds its rows in.
|
|
76
76
|
|
|
77
|
-
D09. get, records, referencedBy, directedView, resolveSeat, words, roots, resolve, search and traverse honor the supplied token and view. get, referencedBy and directedView, like D08 staleness and readiness, yield OUT-OF-SCOPE outside their allowed identities; referencedBy returns graph G06a typed field references naming the identity, pruned to holders in scope; directedView returns the identity's graph G06b directed view (its declared edge rows, the derived inverses of its counterparts' declarations and its typed field references both ways, each row with `declaredOn`, its spelling or field path and `derived`), pruned the same way to rows whose counterpart is in scope (the declaring record is the identity or that counterpart, so a pruned scope never shows a row declared outside it). The view is
|
|
77
|
+
D09. get, records, referencedBy, directedView, resolveSeat, words, roots, resolve, search and traverse honor the supplied token and view. get, referencedBy and directedView, like D08 staleness and readiness, yield OUT-OF-SCOPE outside their allowed identities; referencedBy returns graph G06a typed field references naming the identity, pruned to holders in scope; directedView returns the identity's graph G06b directed view (its declared edge rows, the derived inverses of its counterparts' declarations and its typed field references both ways, each row with `declaredOn`, its spelling or field path and `derived`), pruned the same way to rows whose counterpart is in scope (the declaring record is the identity or that counterpart, so a pruned scope never shows a row declared outside it). The view is a snapshot derivation: graph computes it on read from the view's admitted graph, so it is per revision and deterministic but is not stored in the cache payload or the D08a capture and is not a revision input. It is the same pure function of one revision wherever it is read, so a capture document need not carry it. Dangling, ambiguous and consent-refused assertions stay admission findings (graph diagnostics in the report) with no row in it; lists/search/resolution, D02b seat resolution included, prune and traversal cannot cross an excluded intermediary. Scope and typed traversal filters apply before emitting gated edges. A scoped snapshot exposes only allowed immutable nodes, their D02a membership rows, its root/phase/view revision and admitted system order; it does not expose the private full graph/registry/indexes or unscoped diagnostics. All query products delegate to graph; db creates no second adjacency or text index. Unscoped reads are privileged host inspection, and runtime must always supply a token.
|
|
78
78
|
|
|
79
|
-
D09a. Registered words
|
|
79
|
+
D09a. Registered words. `words(options)` on every reader returns the frozen, sorted keywords the read view's registry registers for its admitted systems, the floor's `system` and `schema` included; a keyword two systems register at the winning band is blocked and absent, and so is every word of a system admission blocked. It is the closed set a runtime scope key's `word` is checked against (runtime R14). `options` bind as `get` binds them; a scope narrows records, never the registry (a child scope that would change it refuses, D07), so every scope of a view reads the same words. Only the keywords are exposed: the registry, its registrations and its consent ledgers stay private. It adds no snapshot field, cache payload or revision input, it never reads the D08a capture pair, and the frozen Door routes do not call it.
|
|
80
80
|
|
|
81
81
|
D10. Reports retain source/graph/compliance namespaces and original attribution. Database operational errors use IA-DB-ROOT-INVALID, PATH-UNSAFE, SOURCE-UNAVAILABLE, SOURCE-CHANGED, SCOPE-UNAVAILABLE, SCOPE-MISMATCH, STALE, CLOSED, OUT-OF-SCOPE and CACHE-UNAVAILABLE. Errors are typed DbError values; cache observations are warnings. Kernel/fixture/adoption evidence stays explicitly not-evaluated when unavailable; opening a corpus does not execute conformance suites or prose cases.
|
|
82
82
|
|
|
83
83
|
D11. Acceptance exercises the real five-system/floor corpus, a foreign record, missing schema restoration, view-specific vocabulary/authority, malformed siblings, source identity preservation under prose edits, cached payload forgery, byte/revision invalidation, scope narrowing across different occurrence winners, stale/closed/foreign tokens and built-package declaration/runtime consumers. No donor files are required. Source writers, retention beyond the D08 current and previous root snapshots, sessions and capability dispatch retain downstream owners.
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
Input discovery delivered: immutable input discovery and explicit/local/embedded floor precedence, generated frozen kernel source export, package scaffold and operational error inventory. Thirteen tests cover default118-record floor, local holes, explicit overrides/caller mutation, exact CRLF/BOM bytes, empty folder fingerprints, invalid UTF-8, bad roots/bands/aliases, source junction refusal and the actual native tree. 1485 tests/52files pass with typecheck/build/kernel/dependency and full compliance fixture verification. Admission, handles/cache and scope APIs remain next.
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
View builder and admission delivered: private per-location view builder compiles independent visible files, delegates authority/late resolution to graph, applies whole-file language refusal and whole-tree physical requirement uniqueness before authority, and iterates structural admission to stability. Malformed/missing-steward joins block their owned words/dependents; individual compliance failures and descendants are removed with retained non-pass assessments under compliance C21. A derived metadata input stamps folder inventory/floor origin/admission version. Eleven new tests cover native/default admission, foreign records, file previews versus healthy files, instance descendants, join cascades, schema restoration, reach/phase overlays, cross-band/reach REQ duplication, contextual vocabulary and empty-folder revision changes. 1497 tests/53files, typecheck/build/kernel/dependencies pass. Handles/cache and scoped reads are next.
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Handles and cache delivered: public open/refresh/close and immutable read products; stable-source verification retries at most three times and preserves the prior state on failure. Disposable cache comparison verifies the entire freshly derived payload, skips identical writes, atomically replaces corruption/forgery, and reports cache obstruction or junction access as warnings while retaining in-memory reads. Nine new tests;1506 workspace tests/54files, typecheck/build/kernel/dependencies pass. Scope tokens and read pruning are next.
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
Scope tokens delivered: opaque per-handle scopes bind roots, phases, view revisions and monotonic source generations. Reads share binding checks, parent narrowing intersects actual occurrences, changed registries refuse, and graph owns pruned resolution/search/traversal. Eight tests cover bindings, forged/foreign/closed/stale tokens, restoration without revival, excluded intermediaries/gated edges, phase changes and same-identity winner boundaries. 1514 tests/55files, typecheck/build/kernel/dependencies pass. Public built consumers and mutation acceptance are next.
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
Database acceptance complete:47db tests;1520workspace tests/56files, typecheck/build/kernel/dependencies/native/full compliance checks and emitted-declaration/built-runtime database consumer pass. Fresh/cache/refresh products agree after record/system/schema/kernel edits, actual schema admission changes restore, placement overlays invalidate and caller options remain copied. Native corpus153records; compliance485verdicts retain one adoption not-evaluated without supplied evaluators. All ten database operational codes have refusal or cache-warning tests. No source writer, retained history or execution permission is claimed. Next: runtime retrieval/budgets/select, thin CLI/MCP, verified steward hook and fixture loop acceptance.
|
|
94
94
|
|
|
95
|
-
D12.
|
|
95
|
+
D12. Handle.preview(changes) is a privileged pure draft view over the handle's current immutable input snapshot. Each change is {path,text}; require nonempty unique canonical .ia/src/*.ia paths, no aliases/traversal or floor changes. Preserve replaced source locations; new sources are authored100/workspace, using existing explicit location overrides when supplied. Add newly represented system folders. Recompute fingerprint and run the existing viewBuilder/admission at root with no phase. Return frozen baseRevision/revision/records/report/refused. Never mutate the handle, existing scopes, cache or filesystem. Empty changes reproduce current root results. IA-DB-DRAFT-INVALID refuses malformed draft input before compilation. A valid preview does not apply edits or promise current filesystem freshness; the executing host rechecks before publishing drafts.
|
|
96
96
|
|
|
97
|
-
D13. Check binding at validate
|
|
97
|
+
D13. Check binding at validate. `OpenOptions.checks` (`ViewOptions.checks`) chooses how a `@check` is admitted: `strict`, the default every existing reader keeps (the nine machine routes, `ia scope`, position, capture, projection and every other consumer of the admitted graph), is compliance `validateCheck`, so a runner that is not a built-in id is IA-COMP-CHECK-UNKNOWN and the record is not admitted; `structural`, asked for only by the validate request and by the CLI's authoring paths (`ia preview` and `ia author`, through `EditorOptions.checks`), is `validateCheckStructure`, which admits any check naming one evaluator and still refuses a conflict or none; `preview` drafts under the handle's own admission. A handle opened `structural` or with `evidence` never reads or writes the cache, whatever `cache` says, so `.ia/.iadb/graph.json` only ever holds a strict, evidence-free graph. `bindChecks(records, report, catalog)` binds every admitted, non-runtime check, by identity: a built-in evaluator (compliance CHECK_IDS) is always `bound`, `implementation: built-in`, with the aggregate of that evaluator's admission verdicts its text `check.scope` selects (`checkVerdicts`): every one for the documented whole-workspace token `*` (`WHOLE_WORKSPACE_SCOPE`), otherwise exactly those whose scope equals it; fail dominates, then not-evaluated, then pass, and an empty selection (prose, an unknown scope, an evaluator that reported nothing) is not-evaluated, never a pass. Verdicts about runtime-placed records are never selected, so a check does not observe its own evidence, and COMP-CHECK's pass for a check only structural admission admits counts as not-evaluated, since every strict reader fails it. Any other evaluator is looked up in the host catalog's evaluators section through compliance `createEvaluatorCatalog` and `selectEvaluator`: with no catalog, an unlisted or unavailable entry, or a catalog compliance refuses, it is `unavailable`; a revoked entry, or a catalog that failed verification, is `revoked`, an error; a supported entry is `bound`, but no host implementation runs it in this release (`bindEvaluators` with none), so its outcome is not-evaluated. The host registers no evaluator codec, so each schema id the entries declare gets one that accepts nothing. Binding runs and writes nothing.
|
|
98
98
|
|
|
99
|
-
D14. Runtime evidence
|
|
99
|
+
D14. Runtime evidence. `InputOptions.evidence` lists the files under `.ia/work/evidence` named `<64 hex>.ia` (`EVIDENCE_DIRECTORY`, `EVIDENCE_FILE`) by size and modification time, which the fingerprint covers, and reads none of them; nothing is listed or read through a link, junction, hard link or entry of the wrong kind, which means no evidence rather than a refusal, so a workspace a released reader validated is never refused for its `.ia/work`; without it, as for every existing reader, none is listed. A view builds the authored view first, then reads only the file named after its authored revision, at runtime placement band 0, and admits it only when the view's admission is not refused (the validate request records nothing for a refused one) and `evidenceText` reproduces it byte for byte (`reproducesEvidence`): the view's own checks bound again from its records and report, no catalog taking part since only built-in evaluators produce evidence, and the times taken from the file itself, so a forged verdict, reason, record or time, an observation for a check not evaluated, a relationship or any byte the writer would not write is not evidence; and only when adding it leaves the authored records' findings, verdicts, refusals and records as they were. Otherwise the authored view stands, as for an older revision's file. Evidence moves `revision`, never `authoredRevision`, and no validation binds or reports from it. `evidenceText` renders one `@observation` per bound check that passed (verdict `success`) or failed (`refusal`), nothing for a not-evaluated one (a failing built-in verdict always refuses admission, so the validate request, which records nothing then, never writes a `refusal`), skipping a name an authored observation holds; an observation recorded again unchanged keeps its first times, so a second validate at one authored revision writes the same bytes; a time not in the writer's exact stamp, with observed and captured apart, or more than five minutes ahead of the reading clock is not evidence; any other time is carried as written, not verified, and the validate request keeps times only from a file `reproducesEvidence` admits. `writeEvidence(root, authoredRevision, text | null, {pruneBefore?})` refuses only when this revision's file must be written: a link, junction or entry of the wrong kind on the way refuses as IA-DB-PATH-UNSAFE and a file it cannot write fails with the filesystem's code, before anything is pruned; it stages the bytes in the evidence directory, flushes and renames them into place (retention's atomic write); on win32, where a rename over a file another handle holds fails with EPERM, EACCES or EBUSY (a concurrent validate reading the evidence, or another writer's rename in flight), it retries for up to two seconds, backing off, and stops without writing once the file holds exactly its bytes, which only a concurrent writer of the same revision can have put there, so concurrent validates of one revision leave one whole file with the writer's bytes. With nothing to record (null, or a file that already holds `text`) it never refuses, whatever stands at those paths. Pruning comes last and is best effort: only other regular `<64 hex>.ia` files (and this revision's for null), a file it may not remove skipped, and with `pruneBefore` a file modified at or after that time kept, as a validation of another revision may have written it meanwhile; a current file found unchanged is touched, so it counts as modified now. `readEvidence` reads the current file the same way and never through a hard link. Only the distribution's validate request calls the writer.
|
|
100
100
|
|
|
101
|
-
D15. Unadmitted occurrences (2026-10-12
|
|
101
|
+
D15. Unadmitted occurrences (2026-10-12; runtime R23). `refused` names only what admission excluded from a built graph, so three ways a record goes unadmitted left no trace a reader could locate: a file refused whole by a language error, and one refused whole for a requirement id another occurrence declares too, never reach a graph, and an identity tie drops both occurrences with only an IA-GRAPH-IDENTITY-TIE diagnostic whose identity is in its message. Every view therefore also carries `unadmitted`, and every read handle and editor snapshot exposes it as the getter `unadmitted`, reading the root view like `refused` and `report`, whatever a read binds: an occurrence that is not admitted is in no scope, so a caller that serves a narrowed scope must not disclose it (db PT5; runtime R23 discloses its path and finding only through a whole-workspace token). It holds one frozen `UnadmittedRecord` `{identity?, word?, name?, band, path, line, endLine, finding}` per occurrence of the view's sources the view does not admit, by path, line and word: each occurrence `refused` names, each occurrence of a tie, and each record of a file refused whole. `name` is the record's name as its header spells it, lowercased, what runtime R23 matches a typed reference by. `band` is the band of the placement the source was read at, where capture membership reads a record's band: 100 for the workspace's own sources, 90 for an adopted or installed base. `finding` `{code, path, line, message}` is the record's own admission finding, from the diagnostics the view already holds, so no reader matches findings back: for a refused occurrence, the assessment's first error (else its first finding, else IA-COMP-NOT-EVALUATED for an assessment left not-evaluated with none), the system check's, the enclosing record's, a refused graph occurrence's dimension diagnostic, or for a refused system join the finding that blocked its system (a file error of its declaration, a system check, the blocked system it requires); for a tie, the occurrence's own IA-GRAPH-IDENTITY-TIE; for a record of a file refused whole, the error inside its lines, else the file's first error, which refused the file. A record of a file refused whole is each header the view's own parse of the file reads, nested ones included, with the identity the file's compile gives the record or, where the compile refused it, the identity language `identityOf` gives the header under its word's registration. The file's captured text, split at every line terminator (CRLF, CR or LF), adds three readings the parse cannot give. First, each line that opens with `@<word>` after any whitespace or Unicode format characters (a no-break space, a form feed, a zero-width space, a byte-order mark) and is no header the parse read, wherever it stands, inside the lines of a parsed record too, under its word and the name token after it, with no identity, so a header the parse cannot read (a missing or unsupported pragma, a malformed name, an indented header, a CR-only file the parse reads as one line) is still listed, with the name runtime R23 matches an `@agent <name>` or `@workspace <name>` reference by. Second, on each line no parsed record spans (a parsed header's lines through the end of its syntax span, refused trailing lines included) that the language scanner does not read as a whole-line comment (the comment classification correction below), every `@<word>` token anywhere on it, under its word alone, so a file whose parse reads no record lists every word it mentions outside such comments. Third, a line the first reading names no header on is one occurrence with no `word`, no name and no identity, the error on its line, else the file's first error, its finding, wherever it may declare a record db cannot identify: (1) a line holding one of the file's errors that no parsed record spans, where an error at a blank line (whitespace and format characters alone), at a comment line (`#` first after them, the pragma's own line among them) or past the text is taken at the first line from there that is neither, and at none when there is none; (2) a line that opens, after any whitespace or format characters, with an at sign (`@`, the full-width U+FF20 or the small U+FE6B), wherever it stands, inside the lines of a parsed record and inside a prose value left open too; and (3) in a file refused at its pragma (IA-LANG-PRAGMA-MISSING or IA-LANG-VERSION-UNSUPPORTED), whose parse reports nothing past it, every line at column 0 that is neither blank nor a comment. A reader that gates on a word counts such an occurrence as possibly that word (runtime R23 counts it as a mandate). So a header spelled `@ mandate x`, with a full-width at sign or with a joiner after the at sign leaves one wherever it stands, as do text in another encoding (UTF-16LE without a byte-order mark reads as a comment line, then lines a NUL opens at column 0 of a file refused at its pragma) and a stray top-level line; while an empty file, a file of blank and comment lines alone, a missing or unsupported pragma before nothing but headers the first reading names and their indented lines, and an error inside the lines of a parsed record on a line no at sign opens (which stays that record's, listed under its word) leave none. The readings err towards listing: a non-header line so spelled in a file already refused is listed under its word, and an error line or at-sign line that declares nothing is listed with no word. What they still miss, exactly, is a line that declares a record whose at sign follows some other character on its line (a NUL, a letter, other text) when it stands inside the lines of a parsed record, or indented in a file refused at its pragma: no reading names it and an error there, if any, is that record's. Nothing is read from disk for it; `refused`, the report, the snapshot, the cache and the frozen Door routes are unchanged; and `tests/handle.test.ts` pins each kind with its finding, the line terminators, the leading characters, the token reading, a reference inside a parsed record listed as nothing, an occurrence of no word for a spaced and a full-width at sign, UTF-16LE text, a stray line, a missing pragma before a spaced header, a spaced, full-width or joined header after a named first header in a file refused at its pragma, an unsupported pragma, a top-level line there, an at-sign line indented inside a parsed record, behind a tab or inside a prose value left open, and a malformed header after a comment, and none for an error inside a parsed record, an empty file, a missing pragma before a named header or a file of comments alone, and bands 100 and 90 side by side.
|
|
102
102
|
|
|
103
103
|
D15 comment classification correction (2026-10-13, revised after its review): the second, raw-token reading excludes a genuine full-line comment, including an `ia author` attribution, only when language trivia identifies it as a comment and its text matches the complete physical line after ASCII space/tab indentation and trailing whitespace are removed. `scan` of the same captured source text supplies that evidence, never a filesystem reread: the parse of a file refused at a missing or unsupported pragma holds no trivia, and any other parse adds only trailing comments to the scanner's, which the `#` check and the full-line match below refuse. Nothing is admitted and no finding is suppressed. Bare-CR files retain the conservative token reading because scanner and fallback line numbers differ. Trailing/inline comments, comment-like prose and malformed prefixes are not exempted by their appearance. So a genuine attribution is still listed under its words, and fails the workspace closed through runtime R23, in three damaged files: one that holds a bare CR anywhere; one where it stands inside `"""` prose no parsed record spans, as after a `"""` no line closes, which the scanner reads as prose; and one with no pragma where a byte-order mark precedes it on line 1, since the scanner strips the mark but the `#` check reads the physical line. The header reading and every unidentified-line rule above remain unchanged: a disguised declaration after a comment and conflict markers still produce their original occurrences. `tests/handle.test.ts` covers LF/CRLF, indented comments, pragma refusals, malformed prefixes, open prose, bare CR and following declarations, and pins each guard with a file only that guard keeps listed: the byte-order mark (the `#` check), a prose closer followed by a trailing comment on a line that opens with `#` (the full-line match), and a bare CR, both where the scanner's line number names another physical line of the same text and after a genuine attribution (the bare-CR exclusion).
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
Projection integration: the public `systemMember(path)` remains the sole authored/adopted membership interpreter used by the projection composition root. Consumers derive observations from the selected admitted records and bind them to that view's revision; path recognition alone is not admission, scope authorization or permission to modify an adopted root. This reuse closes only the renderer's reconstructed-local-path gap; the distribution's full installed-generation reader remains separately scheduled.
|
|
106
106
|
|
|
107
|
-
|
|
107
|
+
Authoring asset closure: distribution metadata permits the exact `.ia/authoring.resources.json` path only as an `asset`, and explicit `.ia/src/**/*.md` paths only as `documentation`. Other hidden/build paths and role substitutions remain invalid. This is a bounded path/role allowance, not an asset validity verdict: the distribution owner verifies the closed manifest, exact resource pins and native joins before packing/verifying/installing guide-bearing archives. Native floor code remains supplied by the fixed language floor rather than an archive's documentation assets.
|
|
108
108
|
|
|
109
|
-
Path identity (#315): `src/paths.ts`, exported from `@inventarch/db`, compares paths by what the volume opens, because APFS folds case and Unicode normalization and NTFS folds case. `sameFile` compares device and inode (a path it cannot examine, such as a link loop, is compared by `pathKey`); `within(parent, child)` walks the child's real ancestors by device and inode, and compares folded settled spellings only while the parent does not exist; `unaliased(path, real)` accepts another spelling of the same existing names and refuses a link or junction in any component, and a path that is not absolute and normalized, since the kernel walks a `link/..` pair through the link (on win32, where the kernel removes `..` before it follows a junction, it compares the normalized path case-folded, which also refuses subst drives and 8.3 names); `linked` finds that link; `pathKey` folds the key of a relative path that may not exist, case on win32 and `caseFold` on darwin: NFC and full Unicode case folding, as APFS compares names, so `ß` and `ss` are one name there, while the dotless `ı` stays apart from `i` (#323). The same key names draft paths (`preview.ts`), editor overlays (`editor/index.ts`) and sources (`inputs.ts`), so on macOS two of them that differ only in case or Unicode case are one path, refused as a duplicate; a case-sensitive APFS volume holding both `A.ia` and `a.ia` is refused there as a duplicate source. `@inventarch/runtime` re-exports all of them but `linked` and `caseFold`, for the apps that depend on it rather than on `@inventarch/db`.
|
|
109
|
+
Path identity (crowncodes/ia#315): `src/paths.ts`, exported from `@inventarch/db`, compares paths by what the volume opens, because APFS folds case and Unicode normalization and NTFS folds case. `sameFile` compares device and inode (a path it cannot examine, such as a link loop, is compared by `pathKey`); `within(parent, child)` walks the child's real ancestors by device and inode, and compares folded settled spellings only while the parent does not exist; `unaliased(path, real)` accepts another spelling of the same existing names and refuses a link or junction in any component, and a path that is not absolute and normalized, since the kernel walks a `link/..` pair through the link (on win32, where the kernel removes `..` before it follows a junction, it compares the normalized path case-folded, which also refuses subst drives and 8.3 names); `linked` finds that link; `pathKey` folds the key of a relative path that may not exist, case on win32 and `caseFold` on darwin: NFC and full Unicode case folding, as APFS compares names, so `ß` and `ss` are one name there, while the dotless `ı` stays apart from `i` (crowncodes/ia#323). The same key names draft paths (`preview.ts`), editor overlays (`editor/index.ts`) and sources (`inputs.ts`), so on macOS two of them that differ only in case or Unicode case are one path, refused as a duplicate; a case-sensitive APFS volume holding both `A.ia` and `a.ia` is refused there as a duplicate source. `@inventarch/runtime` re-exports all of them but `linked` and `caseFold`, for the apps that depend on it rather than on `@inventarch/db`.
|
|
110
110
|
|
|
111
|
-
### Explicit package-local authored inputs
|
|
111
|
+
### Explicit package-local authored inputs
|
|
112
112
|
|
|
113
113
|
`InputOptions.authoredRoots` selects a frozen, sorted list of repository-relative package directories. Selection is explicit host input; the database does not discover a monorepo, inherit a parent workspace, or read package policy JSON. Each selected directory contributes only its `.ia/src/systems/<owner>/` native files, at authored workspace precedence and with the original physical `source.path`. Vocabulary identities are unchanged. The sole system declaration remains at the repository root; a package cannot carry its own system declaration, floor, workspace/adoption manifest, distribution lock, release manifest, or legacy package authority. Existing structural admission and duplicate diagnostics apply across the combined source set.
|
|
114
114
|
|
package/dist/checks.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import type { Report, Verdict } from '@inventarch/compliance';
|
|
2
2
|
import type { Node } from '@inventarch/graph';
|
|
3
3
|
/**
|
|
4
|
-
* D13: binding each `@check` at validate
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* runs nothing and writes nothing.
|
|
4
|
+
* D13: binding each `@check` at validate. A check names its evaluator (`check.implementation`, else `check.runs`;
|
|
5
|
+
* compliance `checkRunner`) and selects what it covers with the text `check.scope`. Binding decides which
|
|
6
|
+
* implementation serves the evaluator and reads the verdicts it produced; it runs nothing and writes nothing.
|
|
8
7
|
*
|
|
9
8
|
* - A built-in evaluator (compliance CHECK_IDS) is always bound: built-ins are implicit, whatever the host carries. Its
|
|
10
9
|
* result is the aggregate of that evaluator's verdicts in the admission report that `check.scope` selects: every one
|
|
@@ -54,8 +53,9 @@ export interface CheckBinding {
|
|
|
54
53
|
readonly reason: string;
|
|
55
54
|
}
|
|
56
55
|
/**
|
|
57
|
-
*
|
|
58
|
-
* record in `excluded` (the runtime evidence) is never selected, so a check's result does not depend on its
|
|
56
|
+
* The evaluator's verdicts `scope` selects (D13), and their aggregate: fail, then not-evaluated, then pass. A verdict
|
|
57
|
+
* about a record in `excluded` (the runtime evidence) is never selected, so a check's result does not depend on its
|
|
58
|
+
* own evidence.
|
|
59
59
|
*/
|
|
60
60
|
export declare function checkVerdicts(verdicts: readonly Verdict[], runner: string, scope: string | null, excluded?: ReadonlySet<string>): {
|
|
61
61
|
readonly outcome: CheckOutcome;
|
package/dist/checks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../src/checks.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAG9C
|
|
1
|
+
{"version":3,"file":"checks.d.ts","sourceRoot":"","sources":["../src/checks.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAG9C;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC,6FAA6F;AAC7F,MAAM,MAAM,YAAY,GACpB;IACE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAC3B,QAAQ,CAAC,UAAU,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,OAAO,EAAE,CAAA;KAAE,CAAC;CACxF,GACD;IAAE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC3D;IAAE,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAC5D,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,aAAa,GAAG,SAAS,CAAC;AACrE,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,eAAe,CAAC;AAC7D,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;IACpC,sGAAsG;IACtG,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,iGAAiG;IACjG,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,4DAA4D;IAC5D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AA0BD;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,SAAS,OAAO,EAAE,EAC5B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,QAAQ,GAAE,WAAW,CAAC,MAAM,CAAa,GACxC;IAAE,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,CAAA;CAAE,CAa3E;AAED,8GAA8G;AAC9G,wBAAgB,UAAU,CACxB,OAAO,EAAE,SAAS,IAAI,EAAE,EACxB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,EAChC,OAAO,EAAE,YAAY,GACpB,SAAS,YAAY,EAAE,CA2GzB"}
|
package/dist/checks.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { bindEvaluators, CHECK_IDS, checkRunner, createEvaluatorCatalog, selectEvaluator, } from '@inventarch/compliance';
|
|
2
2
|
/**
|
|
3
|
-
* D13: binding each `@check` at validate
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* runs nothing and writes nothing.
|
|
3
|
+
* D13: binding each `@check` at validate. A check names its evaluator (`check.implementation`, else `check.runs`;
|
|
4
|
+
* compliance `checkRunner`) and selects what it covers with the text `check.scope`. Binding decides which
|
|
5
|
+
* implementation serves the evaluator and reads the verdicts it produced; it runs nothing and writes nothing.
|
|
7
6
|
*
|
|
8
7
|
* - A built-in evaluator (compliance CHECK_IDS) is always bound: built-ins are implicit, whatever the host carries. Its
|
|
9
8
|
* result is the aggregate of that evaluator's verdicts in the admission report that `check.scope` selects: every one
|
|
@@ -44,8 +43,9 @@ function inertCodecs(entries) {
|
|
|
44
43
|
}
|
|
45
44
|
const RANK = { pass: 0, 'not-evaluated': 1, fail: 2 };
|
|
46
45
|
/**
|
|
47
|
-
*
|
|
48
|
-
* record in `excluded` (the runtime evidence) is never selected, so a check's result does not depend on its
|
|
46
|
+
* The evaluator's verdicts `scope` selects (D13), and their aggregate: fail, then not-evaluated, then pass. A verdict
|
|
47
|
+
* about a record in `excluded` (the runtime evidence) is never selected, so a check's result does not depend on its
|
|
48
|
+
* own evidence.
|
|
49
49
|
*/
|
|
50
50
|
export function checkVerdicts(verdicts, runner, scope, excluded = new Set()) {
|
|
51
51
|
const selected = verdicts.filter((verdict) => verdict.check === runner &&
|
|
@@ -61,8 +61,8 @@ export function bindChecks(records, report, catalog) {
|
|
|
61
61
|
let evaluators;
|
|
62
62
|
// Records at runtime placement are evidence, not what a check covers.
|
|
63
63
|
const runtime = new Set(records.filter((record) => record.band === 0).map((record) => record.identity));
|
|
64
|
-
//
|
|
65
|
-
//
|
|
64
|
+
// COMP-CHECK passes a check naming an evaluator that is not built in only under structural admission, while every
|
|
65
|
+
// strict reader fails it at the same revision; its verdict there is not-evaluated, never a pass.
|
|
66
66
|
const structural = new Set(records
|
|
67
67
|
.filter((record) => record.discriminator === 'check' && record.band !== 0)
|
|
68
68
|
.filter((record) => {
|