@inventarch/db 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/SPEC.md +39 -5
- package/dist/checks.d.ts +66 -0
- package/dist/checks.d.ts.map +1 -0
- package/dist/checks.js +143 -0
- package/dist/checks.js.map +1 -0
- package/dist/descriptors/codec.js +2 -2
- package/dist/descriptors/codec.js.map +1 -1
- package/dist/descriptors/envelope.js +2 -2
- package/dist/descriptors/envelope.js.map +1 -1
- package/dist/descriptors/index.d.ts +1 -1
- package/dist/descriptors/index.js +1 -1
- package/dist/distribution/codec.d.ts +7 -1
- package/dist/distribution/codec.d.ts.map +1 -1
- package/dist/distribution/codec.js +6 -0
- package/dist/distribution/codec.js.map +1 -1
- package/dist/distribution/contracts.d.ts.map +1 -1
- package/dist/distribution/contracts.js +5 -2
- package/dist/distribution/contracts.js.map +1 -1
- package/dist/distribution/implementations.d.ts +56 -0
- package/dist/distribution/implementations.d.ts.map +1 -0
- package/dist/distribution/implementations.js +148 -0
- package/dist/distribution/implementations.js.map +1 -0
- package/dist/distribution/index.d.ts +4 -1
- package/dist/distribution/index.d.ts.map +1 -1
- package/dist/distribution/index.js +3 -1
- package/dist/distribution/index.js.map +1 -1
- package/dist/distribution/reader.d.ts +1 -1
- package/dist/distribution/reader.d.ts.map +1 -1
- package/dist/distribution/reader.js +34 -8
- package/dist/distribution/reader.js.map +1 -1
- package/dist/distribution/release-control.d.ts +4 -0
- package/dist/distribution/release-control.d.ts.map +1 -0
- package/dist/distribution/release-control.js +46 -0
- package/dist/distribution/release-control.js.map +1 -0
- package/dist/editor/index.d.ts +13 -2
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/index.js +9 -4
- package/dist/editor/index.js.map +1 -1
- package/dist/evidence.d.ts +84 -0
- package/dist/evidence.d.ts.map +1 -0
- package/dist/evidence.js +313 -0
- package/dist/evidence.js.map +1 -0
- package/dist/handle.d.ts +42 -7
- package/dist/handle.d.ts.map +1 -1
- package/dist/handle.js +62 -15
- package/dist/handle.js.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/inputs.d.ts +37 -1
- package/dist/inputs.d.ts.map +1 -1
- package/dist/inputs.js +135 -18
- package/dist/inputs.js.map +1 -1
- package/dist/membership.d.ts +6 -0
- package/dist/membership.d.ts.map +1 -1
- package/dist/membership.js +7 -1
- package/dist/membership.js.map +1 -1
- package/dist/preview.d.ts +2 -2
- package/dist/preview.d.ts.map +1 -1
- package/dist/preview.js +9 -7
- package/dist/preview.js.map +1 -1
- package/dist/retention.d.ts +35 -14
- package/dist/retention.d.ts.map +1 -1
- package/dist/retention.js +49 -24
- package/dist/retention.js.map +1 -1
- package/dist/runner-evidence.d.ts +22 -0
- package/dist/runner-evidence.d.ts.map +1 -0
- package/dist/runner-evidence.js +388 -0
- package/dist/runner-evidence.js.map +1 -0
- package/dist/view.d.ts +85 -2
- package/dist/view.d.ts.map +1 -1
- package/dist/view.js +343 -42
- package/dist/view.js.map +1 -1
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Filesystem composition of language, graph and compliance. [SPEC.md](SPEC.md) owns admitted views, revisions, read scopes and the disposable cache.
|
|
4
4
|
|
|
5
|
-
Use `open(workspacePath)` to discover `.ia/src`, then `resolveScope({root, phase})` and pass its `token` as `within` to `snapshot`, `records`, `get`, `referencedBy`, `directedView`, `resolveSeat`, `words`, `roots`, `resolve`, `search` and `traverse`. Runtime consumers must use tokens. Unscoped methods and independent scope issuance are privileged host inspection. A child scope intersects physical occurrences; changing its effective registry refuses. Identity allowlists only narrow. `report` and `refused` expose root-view admission evidence to the privileged host. A snapshot's `membership` gives each of its records one `{identity, root, band, digest}` row: the source root it was captured under (the longest root that a `@workspace` admitted at the workspace root declares in `sources`, else its system folder), its band and its per-record digest (SPEC D02a). Every scope gives an occurrence the same row. `directedView(identity)` lists the identity's declared edge rows, the derived inverses of its counterparts' declarations (read from its side in the kernel spelling, such as `governed-by` at the target, with the record that declared them) and its typed field references both ways, rows whose counterpart is outside the scope pruned (SPEC D09, graph G06b). `resolveSeat(path)` resolves a workspace-relative path to the seat it is declared at, `by` naming the rule: the `@system` of the system folder holding it (`system`), else the `@workspace` declaring the longest `sources` root containing it (`root`), else, for a path in no `.ia` tree, the repository's own `@workspace` (`repository`); with no seat, `unknown` reads `undeclared`, or `outside` for a path that is absolute or escapes the workspace. Its `claimants` are the records whose `covers` or `hook.paths` selections select the path (a `@check`'s
|
|
5
|
+
Use `open(workspacePath)` to discover `.ia/src`, then `resolveScope({root, phase})` and pass its `token` as `within` to `snapshot`, `records`, `get`, `referencedBy`, `directedView`, `resolveSeat`, `words`, `roots`, `resolve`, `search` and `traverse`. Runtime consumers must use tokens. Unscoped methods and independent scope issuance are privileged host inspection. A child scope intersects physical occurrences; changing its effective registry refuses. Identity allowlists only narrow. `report` and `refused` expose root-view admission evidence to the privileged host. A snapshot's `membership` gives each of its records one `{identity, root, band, digest}` row: the source root it was captured under (the longest root that a `@workspace` admitted at the workspace root declares in `sources`, else its system folder), its band and its per-record digest (SPEC D02a). Every scope gives an occurrence the same row. `directedView(identity)` lists the identity's declared edge rows, the derived inverses of its counterparts' declarations (read from its side in the kernel spelling, such as `governed-by` at the target, with the record that declared them) and its typed field references both ways, rows whose counterpart is outside the scope pruned (SPEC D09, graph G06b). `resolveSeat(path)` resolves a workspace-relative path to the seat it is declared at, `by` naming the rule: the `@system` of the system folder holding it (`system`), else the `@workspace` declaring the longest `sources` root containing it (`root`), else, for a path in no `.ia` tree, the repository's own `@workspace` (`repository`); with no seat, `unknown` reads `undeclared`, or `outside` for a path that is absolute or escapes the workspace. Its `claimants` are the records whose `covers` (a `@check`'s `check.covers` included) or `hook.paths` selections select the path (a `@check`'s textual `check.scope` claims nothing), band descending then identity, each with the matching fields and selections (SPEC D02b, graph G06c). A scope prunes the seat and the claimants like a search. `words()` lists the words the view's registry registers for its admitted systems, the floor's two included, sorted: the closed set a runtime scope key's word must belong to (SPEC D09a). A child scope never changes it, so every scope of a view reads the same words; a scope issued for another root reads that root's view, whose registry may admit other systems. The registry itself stays private. `roots()` lists the roots the `@workspace` records declare in `sources` as `{root, placement, workspace}`, longest first, so a reader can tell a workspace's capture members from the rest; a scope that does not admit the declaring workspace prunes its roots, never re-rooting a row (SPEC D02c).
|
|
6
6
|
|
|
7
7
|
`refresh()` rebuilds and verifies stable inputs before replacing the state. A failed refresh preserves the previous view. A source change stales existing scopes even if those bytes are subsequently restored. `close()` refuses future reads. Cached root graphs are always verified against a fresh build; corrupt or forged payloads are replaced, equal bytes are not rewritten, and unavailable cache storage leaves in-memory reads usable with a warning. Set `cache:false` for a fully read-only open.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
`authoredRevision` on a handle, and on each snapshot, is the revision without the sources at runtime placement (graph `authoredRevisionOf`, the derived `.ia/.db-inputs.json` input kept), so a runtime-band source such as the evidence an `ia validate` writes moves `revision` and leaves it (one that adds no system folder and declares no `@system` or `@schema`, which the kept input and the registry name), while an authored edit moves both; it equals `revision` while no source sits at runtime placement (SPEC D05a). Scopes, `revision` read bindings (`IA-DB-STALE`), previews and the cache keep `revision`; retention and the capture pair key on the authored revision.
|
|
10
|
+
|
|
11
|
+
A handle also retains the previous admitted root snapshot: the most recent one whose authored revision differs from the current one, so opening or refreshing at an unchanged authored revision keeps it (SPEC D08). `previousRevision` and `previousAuthoredRevision` name it. `staleness(identity)` compares the identity's current membership digest with the previous one's and answers `unchanged`, `changed`, `new` (every current identity while no previous snapshot is retained) or `removed`; `readiness(identity, digest)` answers `current`, `previous` or `unknown` for a digest observed earlier, such as an `@observation`'s `subject-revision`. Both take the same `within`, `root`, `phase` and `revision` bindings as `get`, answer about the record `get` returns, and refuse an identity outside the scope with `IA-DB-OUT-OF-SCOPE`. Only root snapshots are retained: when a narrower root or phase reads an occurrence other than the root one, `staleness` is undefined and `readiness` answers only `current` or `unknown`. The pair persists between processes as the capture pair `ia capture` writes through `writeCapture(root, text)`: `.ia/work/snapshot/current.json` and `previous.json`, `ia-snapshot-1` documents (SPEC D08a). Every disk handle, whatever its cache setting, seeds its previous snapshot from that pair the first time it is asked, never on open or refresh, and never writes it; `capturedRevision` and `capturedAuthoredRevision` name the revision and the authored revision of the capture at `current.json`, which a capture written before the authored revision names by its `revision`; a capture whose records not at runtime placement are the fresh ones, by identity, band and digest, is trusted at the fresh authored revision whatever its runtime-band rows and roots, while a runtime-band record that changes which of them are admitted leaves it untrusted until the next capture. A file that is no capture, or one behind a link, is ignored and every read stays usable. A refresh rotates the pair in memory without reading the capture pair, so a handle that lived through an edit reports it whether or not it was captured, and `capturedRevision` is read again when next asked. `writeCapture` counts the records against the prior capture by digest, rotates the prior `current.json` into `previous.json` on an authored revision change, writes nothing until its checks pass (a link, a `.ia/work` or snapshot directory that is not a directory, a snapshot path that is not a regular file) and leaves the pair it found when a write fails. `planCapture(root, text)` makes the same checks and reads and returns what `writeCapture` would (its counts and rotation) with the changed, added and removed identities, each list sorted; it creates and writes nothing, which is how `ia capture --preview` reports a capture without spending the retained previous snapshot.
|
|
10
12
|
|
|
11
13
|
`inertDeclarations(options)` names the declarations the capture reads that declare nothing, each with its record, field, value, path, line and reason: a `composition.sources` entry that names no root, and a path selection the dialect reads as none (SPEC D02b). They are not admission findings.
|
|
12
14
|
|
package/SPEC.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Database specification
|
|
2
2
|
|
|
3
|
+
`tests/check-evidence.test.ts` pins D13's exact scope selection against both ancestor and descendant scopes and lexical prefixes. A matching verdict passes alone even when its neighboring scopes fail; without the exact scope, the result remains not-evaluated.
|
|
4
|
+
|
|
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
|
+
|
|
7
|
+
## M7 runner journal evidence
|
|
8
|
+
|
|
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
|
+
|
|
11
|
+
`writeRunnerEvidence(root, {authoredRevision, events})` records a verified runner journal as closed JSON under `.ia/work/runner-evidence/<authored revision>-<SHA-256 session id>.json`. The caller first reads the journal through session-system; DB checks the bounded transport and event hash chain, never duplicates the session transition reducer. It accepts no native source text. The optional reader uses the same `evidence: true` option as D14, lists at most 128 receipts, and reads only the current authored revision's receipts, at most 4 MiB and 4,096 events each and 16 MiB in total. UTF-8, duplicate keys, fields, versions, sequence, session identity, event hashes, creation and manifest hashes are checked. Every creation or rebind must name the current whole-workspace capture digest with capture id `runner`, using the exact reader-selected sources, folders, floor origin and activation. Explicit host input options therefore remain effective. Stale, malformed, linked, oversized or changed receipts are ignored.
|
|
12
|
+
|
|
13
|
+
The view generates only `@run` and `@observation` at runtime band 0. A run is named `runner-<SHA-256 session id>` and its owner is the unique admitted agent referenced by the creation profile's `composition.agent`. Its status and phase are `recorded`: this is a journal projection, not live engine state. Root operation observations, root accepted outcomes and root waits become observations with `evidence.subject @run`; an operation's unknown or partial effect is inconclusive, a limit wait records refusal without implying termination, and accepted outcomes retain refusal even when terminal status is completed. Payload prose cannot add native declarations or relationships. Authored-name collisions refuse the receipt, and adding generated sources must leave existing records, findings, verdicts and refusals unchanged. D14's exact validation-evidence reproduction is independent and unchanged. Evidence changes the reader revision, never the authored revision; existing evidence-free readers and caches remain unchanged.
|
|
14
|
+
|
|
15
|
+
Journal hashes establish internal integrity, not an external observer, authorized execution, event truth, trustworthy timestamps or successful real-world effects. A party that can replace a whole local journal can produce another consistent claim; these receipts grant no authority and no executable implementation. Session transition validation and current execution status remain session-system and runner responsibilities. The projection records no new authority-bearing words, claims or governing relationships.
|
|
16
|
+
|
|
17
|
+
The writer validates data without evaluating accessors and atomically stages, flushes and replaces a receipt under a per-receipt exclusive lock. It rejects an older or divergent prefix instead of overwriting it, and never prunes other sessions or revisions. A held or abandoned `.json.lock` refuses; recovery requires establishing that no writer owns it before manually removing that exact lock. Rollback consists of removing the selected receipt after its writer stops; the source journal and authored files are unchanged. Removing a receipt removes only its optional projection. `tests/runner-evidence.test.ts` exercises ordinary and editor admission, subject references, existing validation evidence, successful operations, limit refusal, terminal outcomes, stale/colliding/tampered data, source rebinding, data accessors, bounded reads and unsafe paths. Session replay and actual operation execution are qualified by the runner integration tests.
|
|
18
|
+
|
|
3
19
|
Planned consumer: bounded repository capture specifies an explicit host collector over package-local sources. It must adapt supported public admission interfaces; it does not change this package's root discovery, adoption limits or create implicit parent/recursive scanning. Native revision and full code/toolchain identity remain distinct.
|
|
4
20
|
|
|
5
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.
|
|
@@ -12,13 +28,17 @@ The public `@inventarch/db/descriptors` entrypoint owns the pure, bounded, versi
|
|
|
12
28
|
|
|
13
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, with the archive/file ceilings from DIST-05. Decoding copies and freezes output. A release descriptor's `distribution` is its one optional key (2026-10-09, milestone position-packet plan amendment B7): 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.
|
|
14
30
|
|
|
31
|
+
The same entrypoint shapes the installed-implementation catalog a host payload carries (milestone generation-binding, plan amendments C16 and C24; review finding B-N9): `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
|
+
|
|
15
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.
|
|
16
34
|
|
|
17
|
-
|
|
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
|
+
|
|
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 M3-M5 behavior before these planned contracts are reported delivered.
|
|
18
38
|
|
|
19
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.
|
|
20
40
|
|
|
21
|
-
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.
|
|
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, plan amendment C21) 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).
|
|
22
42
|
|
|
23
43
|
Implementation contract for database plan. 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.
|
|
24
44
|
|
|
@@ -30,7 +50,7 @@ D02. Default authored sources use band100, empty reach and workspace provenance.
|
|
|
30
50
|
|
|
31
51
|
D02a. Capture membership (position-and-projection row 3). `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>`, design row 8) 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`.
|
|
32
52
|
|
|
33
|
-
D02b. Location seat (position-and-projection row 17). `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` or `
|
|
53
|
+
D02b. Location seat (position-and-projection row 17). `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; plan amendments C17 and C22), 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.
|
|
34
54
|
|
|
35
55
|
D02c. Declared roots (position-and-projection row 3; 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.
|
|
36
56
|
|
|
@@ -40,15 +60,17 @@ D04. Compliance validates candidate schemas and system joins. A malformed system
|
|
|
40
60
|
|
|
41
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.
|
|
42
62
|
|
|
63
|
+
D05a. The authored revision (2026-10-09, decision evidence-placement; milestone generation-binding plan amendment C13, task authored-revision). 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
|
+
|
|
43
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.
|
|
44
66
|
|
|
45
67
|
D07. resolveScope issues an opaque unguessable token bound privately to its issuing handle, canonical root, optional phase (wildcard when omitted), view revision and source generation. The initial occurrence boundary includes every reachable candidate occurrence before phase selection; an optional identity allowlist only intersects it. A child root is the same or a segment-boundary descendant. Its occurrence boundary intersects the parent's and its admitted identities include only winners whose actual occurrence is in that boundary. A new winner with the same identity cannot widen it. A child may change phase but never add occurrences. Omitted child bindings inherit; explicit phase:null requests a wildcard. Refuse narrowing with SCOPE-MISMATCH if the effective registry differs from the parent: a read token cannot authorize new vocabulary/schema interpretation. A privileged host may issue an independent root token for that view. Explicit requested revision must agree with the inherited token when narrowing.
|
|
46
68
|
|
|
47
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.
|
|
48
70
|
|
|
49
|
-
D08 retention (position-and-projection row 20), 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 and D02a membership rows: the current one, and `previous`, the most recent admitted root snapshot whose revision differs from the current one. Only
|
|
71
|
+
D08 retention (position-and-projection row 20), 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, authored-revision: 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.
|
|
50
72
|
|
|
51
|
-
D08a. The capture pair (position-and-projection §5 and rows 3 and 20). `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 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.
|
|
73
|
+
D08a. The capture pair (position-and-projection §5 and rows 3 and 20). `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.
|
|
52
74
|
|
|
53
75
|
D08b. The capture plan (decision capture-preview-placement; `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.
|
|
54
76
|
|
|
@@ -72,6 +94,14 @@ D acceptance complete:47db tests;1520workspace tests/56files, typecheck/build/ke
|
|
|
72
94
|
|
|
73
95
|
D12. Stage E Task1 adds Handle.preview(changes), 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.
|
|
74
96
|
|
|
97
|
+
D13. Check binding at validate (milestone generation-binding task check-runner-join-validate; plan amendments C15, C21 and C22). `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 (B3-N5). `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 (review finding B3-N1). 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
|
+
|
|
99
|
+
D14. Runtime evidence (plan amendments C14 and C23). `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 (review finding B3-N10), 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, review finding F1) and `evidenceText` reproduces it byte for byte (`reproducesEvidence`, review findings B3-R4 and B4-RC1): 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 (review finding F2), and the validate request keeps times only from a file `reproducesEvidence` admits (B4-RC2). `writeEvidence(root, authoredRevision, text | null, {pruneBefore?})` refuses only when this revision's file must be written (B3-R1): 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 (review finding D2-N3), 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 (B3-N6). 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 (B3-N2); a current file found unchanged is touched, so it counts as modified now (B4-RC3). `readEvidence` reads the current file the same way and never through a hard link. Only the distribution's validate request calls the writer.
|
|
100
|
+
|
|
101
|
+
D15. Unadmitted occurrences (2026-10-12, milestone generation-binding lane D; runtime R23; revised after the lane D review, findings D-R3, D-N4, D-N5 and D-N6, and its rechecks, D2-R2, D2-N2, F1 and F2). `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's D9 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 spec 3.1 gives the header under its word's registration (language `identityOf`). 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 (review D2-N2), 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's D9 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 (review D2-R2 and its recheck, F1 and F2), 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
|
+
|
|
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
|
+
|
|
75
105
|
PT0/PT1 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; distribution M3's full installed-generation reader remains separately scheduled.
|
|
76
106
|
|
|
77
107
|
M5 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.
|
|
@@ -85,3 +115,7 @@ Path identity (#315): `src/paths.ts`, exported from `@inventarch/db`, compares p
|
|
|
85
115
|
Directories must be portable, canonical, disjoint and unaliased. The reader refuses junctions/symlinks, hard-linked native files, nonregular sources, invalid UTF-8, missing root system context and ambiguous path spellings. Selected package capture is bounded to 1000 package roots, 20000 native files, 1 MiB per file and 64 MiB aggregate native bytes. Reads allocate at most the statted size plus one byte and refuse concurrent size/metadata changes. Hosts must additionally bound their full repository capture and verify inventory membership, package-to-record correspondence, ownership, policy/evaluator freshness and one writer.
|
|
86
116
|
|
|
87
117
|
Selection and exact source bytes participate in the input fingerprint and admitted revision. Refresh therefore invalidates previous scopes when a selected package source changes. A contextual scoped read uses the root handle; opening a package directory alone supplies no parent definitions and does not admit those instances. No package-local editor write or preview target is added: existing draft paths remain root `.ia/src` paths. This is the upstream read prerequisite, not a claim that a consuming monorepo has completed its package-record cutover or installed qualification.
|
|
118
|
+
|
|
119
|
+
Version-1 `.ia/workspace.json` additionally accepts `open` bindings at `.ia/open/<id>/<revision>` with an optional canonical workspace-relative `reach`. Discovery verifies exact native source bytes as it verifies adopted bindings, then places them at open band 50, below adopted band 90 and authored band 100. `adoptedBindings` includes these bindings with `placement: "open"`; legacy bindings retain their prior shape. The combined binding ceiling remains 16. These bindings are source data and confer no executable loader or write grant.
|
|
120
|
+
|
|
121
|
+
Distribution engine compatibility: the reader retains `IA-DB-SOURCE-UNAVAILABLE` but classifies an unsupported lock or archive range as `InstallationError.reason: engine-incompatible`, naming the required range and actual reader engine. It does not classify that mismatch as damaged bytes or modify the lock. The exact released lock marker `0.1.0` retains its existing forward-compatibility exception; archive engine ranges remain strict, including root release controls requiring 0.1.1 or later.
|
package/dist/checks.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Report, Verdict } from '@inventarch/compliance';
|
|
2
|
+
import type { Node } from '@inventarch/graph';
|
|
3
|
+
/**
|
|
4
|
+
* D13: binding each `@check` at validate (milestone generation-binding, plan amendments C15 and C22). A check names its
|
|
5
|
+
* evaluator (`check.implementation`, else `check.runs`; compliance `checkRunner`) and selects what it covers with the
|
|
6
|
+
* text `check.scope`. Binding decides which implementation serves the evaluator and reads the verdicts it produced; it
|
|
7
|
+
* runs nothing and writes nothing.
|
|
8
|
+
*
|
|
9
|
+
* - A built-in evaluator (compliance CHECK_IDS) is always bound: built-ins are implicit, whatever the host carries. Its
|
|
10
|
+
* result is the aggregate of that evaluator's verdicts in the admission report that `check.scope` selects: every one
|
|
11
|
+
* when the scope is the whole-workspace token `*`, else exactly those whose scope equals it (record identities,
|
|
12
|
+
* system folders, `graph`, `sources`, as the evaluator reports them). Fail dominates, then not-evaluated, then pass.
|
|
13
|
+
* A scope that selects nothing (prose, an unknown scope, or an evaluator that reported nothing) is not-evaluated,
|
|
14
|
+
* never an empty pass. COMP-CHECK's pass for a check only structural admission admits counts as not-evaluated.
|
|
15
|
+
* - Any other evaluator is looked up in the evaluator catalog the host payload carries (compliance
|
|
16
|
+
* `createEvaluatorCatalog`, `selectEvaluator`): `supported` is bound, but no host implementation is bound to run it in
|
|
17
|
+
* this release (`bindEvaluators` with none), so its result is not-evaluated; `unavailable`, an entry the catalog does
|
|
18
|
+
* not list, a catalog that is not valid, or no catalog at all is unavailable, not-evaluated; `revoked`, or a catalog
|
|
19
|
+
* that failed verification, is revoked, an error. The host registers no evaluator codec in this release, so each schema
|
|
20
|
+
* id the catalog's entries declare is given one that accepts nothing (`inertCodecs`): the catalog's structure and
|
|
21
|
+
* statuses are checked as compliance checks them, and nothing it lists can validate an input or produce evidence.
|
|
22
|
+
*/
|
|
23
|
+
export declare const WHOLE_WORKSPACE_SCOPE = "*";
|
|
24
|
+
/** The evaluator catalog a check binds against: the host payload's, or why there is none. */
|
|
25
|
+
export type CheckCatalog = {
|
|
26
|
+
readonly status: 'present';
|
|
27
|
+
readonly evaluators: {
|
|
28
|
+
readonly format: string;
|
|
29
|
+
readonly entries: readonly unknown[];
|
|
30
|
+
};
|
|
31
|
+
} | {
|
|
32
|
+
readonly status: 'unavailable';
|
|
33
|
+
readonly reason: string;
|
|
34
|
+
} | {
|
|
35
|
+
readonly status: 'damaged';
|
|
36
|
+
readonly reason: string;
|
|
37
|
+
};
|
|
38
|
+
export type CheckBindingStatus = 'bound' | 'unavailable' | 'revoked';
|
|
39
|
+
export type CheckOutcome = 'pass' | 'fail' | 'not-evaluated';
|
|
40
|
+
export interface CheckBinding {
|
|
41
|
+
readonly identity: string;
|
|
42
|
+
readonly name: string;
|
|
43
|
+
/** The evaluator the check names; null when it names none. */
|
|
44
|
+
readonly runner: string | null;
|
|
45
|
+
readonly scope: string | null;
|
|
46
|
+
readonly status: CheckBindingStatus;
|
|
47
|
+
/** `built-in`, or the catalog entry's `<id>@<implementation version>`; null when nothing is bound. */
|
|
48
|
+
readonly implementation: string | null;
|
|
49
|
+
/** The aggregate of the selected verdicts; not-evaluated whenever nothing bound produced one. */
|
|
50
|
+
readonly outcome: CheckOutcome;
|
|
51
|
+
/** How many of the evaluator's verdicts the scope selected. */
|
|
52
|
+
readonly selected: number;
|
|
53
|
+
/** One line: why the check has this binding and outcome. */
|
|
54
|
+
readonly reason: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* C22: the evaluator's verdicts `scope` selects, and their aggregate: fail, then not-evaluated, then pass. A verdict about a
|
|
58
|
+
* record in `excluded` (the runtime evidence) is never selected, so a check's result does not depend on its own evidence.
|
|
59
|
+
*/
|
|
60
|
+
export declare function checkVerdicts(verdicts: readonly Verdict[], runner: string, scope: string | null, excluded?: ReadonlySet<string>): {
|
|
61
|
+
readonly outcome: CheckOutcome;
|
|
62
|
+
readonly selected: readonly Verdict[];
|
|
63
|
+
};
|
|
64
|
+
/** Every admitted `@check` among `records`, by identity, bound against `catalog` with `report`'s verdicts. */
|
|
65
|
+
export declare function bindChecks(records: readonly Node[], report: Pick<Report, 'verdicts'>, catalog: CheckCatalog): readonly CheckBinding[];
|
|
66
|
+
//# sourceMappingURL=checks.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;GAmBG;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;;;GAGG;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
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { bindEvaluators, CHECK_IDS, checkRunner, createEvaluatorCatalog, selectEvaluator, } from '@inventarch/compliance';
|
|
2
|
+
/**
|
|
3
|
+
* D13: binding each `@check` at validate (milestone generation-binding, plan amendments C15 and C22). A check names its
|
|
4
|
+
* evaluator (`check.implementation`, else `check.runs`; compliance `checkRunner`) and selects what it covers with the
|
|
5
|
+
* text `check.scope`. Binding decides which implementation serves the evaluator and reads the verdicts it produced; it
|
|
6
|
+
* runs nothing and writes nothing.
|
|
7
|
+
*
|
|
8
|
+
* - A built-in evaluator (compliance CHECK_IDS) is always bound: built-ins are implicit, whatever the host carries. Its
|
|
9
|
+
* result is the aggregate of that evaluator's verdicts in the admission report that `check.scope` selects: every one
|
|
10
|
+
* when the scope is the whole-workspace token `*`, else exactly those whose scope equals it (record identities,
|
|
11
|
+
* system folders, `graph`, `sources`, as the evaluator reports them). Fail dominates, then not-evaluated, then pass.
|
|
12
|
+
* A scope that selects nothing (prose, an unknown scope, or an evaluator that reported nothing) is not-evaluated,
|
|
13
|
+
* never an empty pass. COMP-CHECK's pass for a check only structural admission admits counts as not-evaluated.
|
|
14
|
+
* - Any other evaluator is looked up in the evaluator catalog the host payload carries (compliance
|
|
15
|
+
* `createEvaluatorCatalog`, `selectEvaluator`): `supported` is bound, but no host implementation is bound to run it in
|
|
16
|
+
* this release (`bindEvaluators` with none), so its result is not-evaluated; `unavailable`, an entry the catalog does
|
|
17
|
+
* not list, a catalog that is not valid, or no catalog at all is unavailable, not-evaluated; `revoked`, or a catalog
|
|
18
|
+
* that failed verification, is revoked, an error. The host registers no evaluator codec in this release, so each schema
|
|
19
|
+
* id the catalog's entries declare is given one that accepts nothing (`inertCodecs`): the catalog's structure and
|
|
20
|
+
* statuses are checked as compliance checks them, and nothing it lists can validate an input or produce evidence.
|
|
21
|
+
*/
|
|
22
|
+
export const WHOLE_WORKSPACE_SCOPE = '*';
|
|
23
|
+
const fieldText = (node, section, key) => {
|
|
24
|
+
for (const candidate of node.sections)
|
|
25
|
+
if (candidate.name === section)
|
|
26
|
+
for (const field of candidate.fields)
|
|
27
|
+
if ('key' in field && field.key === key && field.when === undefined) {
|
|
28
|
+
const value = field.value;
|
|
29
|
+
return 'text' in value && typeof value.text === 'string' ? value.text : null;
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
};
|
|
33
|
+
/** One codec per schema id `entries` declare, each refusing every value (see the module comment). */
|
|
34
|
+
function inertCodecs(entries) {
|
|
35
|
+
const ids = new Set();
|
|
36
|
+
for (const entry of entries)
|
|
37
|
+
if (entry !== null && typeof entry === 'object')
|
|
38
|
+
for (const key of ['inputSchemaId', 'outputSchemaId']) {
|
|
39
|
+
const id = entry[key];
|
|
40
|
+
if (typeof id === 'string')
|
|
41
|
+
ids.add(id);
|
|
42
|
+
}
|
|
43
|
+
return [...ids].sort().map((id) => Object.freeze({ id, validate: () => false }));
|
|
44
|
+
}
|
|
45
|
+
const RANK = { pass: 0, 'not-evaluated': 1, fail: 2 };
|
|
46
|
+
/**
|
|
47
|
+
* C22: the evaluator's verdicts `scope` selects, and their aggregate: fail, then not-evaluated, then pass. A verdict about a
|
|
48
|
+
* record in `excluded` (the runtime evidence) is never selected, so a check's result does not depend on its own evidence.
|
|
49
|
+
*/
|
|
50
|
+
export function checkVerdicts(verdicts, runner, scope, excluded = new Set()) {
|
|
51
|
+
const selected = verdicts.filter((verdict) => verdict.check === runner &&
|
|
52
|
+
!excluded.has(verdict.scope) &&
|
|
53
|
+
(scope === WHOLE_WORKSPACE_SCOPE || verdict.scope === scope));
|
|
54
|
+
if (selected.length === 0)
|
|
55
|
+
return { outcome: 'not-evaluated', selected };
|
|
56
|
+
const outcome = selected.reduce((worst, verdict) => (RANK[verdict.outcome] > RANK[worst] ? verdict.outcome : worst), 'pass');
|
|
57
|
+
return { outcome, selected };
|
|
58
|
+
}
|
|
59
|
+
/** Every admitted `@check` among `records`, by identity, bound against `catalog` with `report`'s verdicts. */
|
|
60
|
+
export function bindChecks(records, report, catalog) {
|
|
61
|
+
let evaluators;
|
|
62
|
+
// Records at runtime placement are evidence, not what a check covers.
|
|
63
|
+
const runtime = new Set(records.filter((record) => record.band === 0).map((record) => record.identity));
|
|
64
|
+
// Review finding B3-N1: COMP-CHECK passes a check naming an evaluator that is not built in only under structural
|
|
65
|
+
// admission, while every strict reader fails it at the same revision; its verdict there is not-evaluated, never a pass.
|
|
66
|
+
const structural = new Set(records
|
|
67
|
+
.filter((record) => record.discriminator === 'check' && record.band !== 0)
|
|
68
|
+
.filter((record) => {
|
|
69
|
+
const runner = checkRunner(record);
|
|
70
|
+
return runner !== undefined && !CHECK_IDS.includes(runner);
|
|
71
|
+
})
|
|
72
|
+
.map((record) => record.identity));
|
|
73
|
+
const verdicts = structural.size === 0
|
|
74
|
+
? report.verdicts
|
|
75
|
+
: report.verdicts.map((verdict) => verdict.check === 'COMP-CHECK' && structural.has(verdict.scope) && verdict.outcome === 'pass'
|
|
76
|
+
? { ...verdict, outcome: 'not-evaluated' }
|
|
77
|
+
: verdict);
|
|
78
|
+
const catalogOf = () => {
|
|
79
|
+
if (catalog.status !== 'present')
|
|
80
|
+
return undefined;
|
|
81
|
+
if (evaluators === undefined)
|
|
82
|
+
try {
|
|
83
|
+
evaluators = createEvaluatorCatalog(catalog.evaluators, {
|
|
84
|
+
codecs: inertCodecs(catalog.evaluators.entries),
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
catch (error) {
|
|
88
|
+
// A schema id that is not a codec id at all: compliance refuses the registration itself.
|
|
89
|
+
evaluators = { ok: 'refused', reason: error instanceof Error ? error.message : String(error) };
|
|
90
|
+
}
|
|
91
|
+
return evaluators;
|
|
92
|
+
};
|
|
93
|
+
return Object.freeze(records
|
|
94
|
+
.filter((record) => record.discriminator === 'check' && record.band !== 0)
|
|
95
|
+
.sort((a, b) => (a.identity < b.identity ? -1 : a.identity > b.identity ? 1 : 0))
|
|
96
|
+
.map((record) => {
|
|
97
|
+
const runner = checkRunner(record) ?? null, scope = fieldText(record, 'check', 'scope');
|
|
98
|
+
const result = (status, reason, rest = {}) => Object.freeze({
|
|
99
|
+
identity: record.identity,
|
|
100
|
+
name: record.name,
|
|
101
|
+
runner,
|
|
102
|
+
scope,
|
|
103
|
+
status,
|
|
104
|
+
implementation: null,
|
|
105
|
+
outcome: 'not-evaluated',
|
|
106
|
+
selected: 0,
|
|
107
|
+
reason,
|
|
108
|
+
...rest,
|
|
109
|
+
});
|
|
110
|
+
if (runner === null)
|
|
111
|
+
return result('unavailable', 'the check names no evaluator');
|
|
112
|
+
if (CHECK_IDS.includes(runner)) {
|
|
113
|
+
const { outcome, selected } = checkVerdicts(verdicts, runner, scope, runtime);
|
|
114
|
+
const reason = selected.length > 0
|
|
115
|
+
? `built-in ${runner}: ${selected.length} selected ${selected.length === 1 ? 'verdict' : 'verdicts'}, ${outcome}`
|
|
116
|
+
: scope === WHOLE_WORKSPACE_SCOPE
|
|
117
|
+
? `built-in ${runner} reported no verdict in this workspace, so nothing was evaluated`
|
|
118
|
+
: `check.scope "${scope ?? ''}" selects no ${runner} verdict; name "${WHOLE_WORKSPACE_SCOPE}" or a scope ${runner} reports, so nothing was evaluated`;
|
|
119
|
+
return result('bound', reason, { implementation: 'built-in', outcome, selected: selected.length });
|
|
120
|
+
}
|
|
121
|
+
if (catalog.status === 'damaged')
|
|
122
|
+
return result('revoked', `the installed evaluator catalog failed verification: ${catalog.reason}`);
|
|
123
|
+
if (catalog.status === 'unavailable')
|
|
124
|
+
return result('unavailable', catalog.reason);
|
|
125
|
+
const checked = catalogOf();
|
|
126
|
+
if (checked.ok !== true)
|
|
127
|
+
return result('unavailable', `the installed evaluator catalog is not valid: ${checked.ok === 'refused' ? checked.reason : (checked.assessment.findings[0]?.message ?? 'no reason given')}`);
|
|
128
|
+
const entry = selectEvaluator(checked.catalog, runner);
|
|
129
|
+
if (entry === undefined)
|
|
130
|
+
return result('unavailable', `the installed evaluator catalog lists no evaluator ${runner}`);
|
|
131
|
+
const implementation = `${entry.id}@${entry.implementationVersion}`;
|
|
132
|
+
if (entry.availability.status === 'revoked')
|
|
133
|
+
return result('revoked', `the installed evaluator catalog revokes ${implementation}: ${entry.availability.reason}`);
|
|
134
|
+
if (entry.availability.status === 'unavailable')
|
|
135
|
+
return result('unavailable', `${implementation} is unavailable on this host: ${entry.availability.reason}`);
|
|
136
|
+
// Supported, but no host implementation is bound to run it in this release, so it was never invoked.
|
|
137
|
+
const ran = bindEvaluators(checked.catalog, new Map()).implementation(entry.id, entry.implementationDigest);
|
|
138
|
+
return result('bound', ran === undefined
|
|
139
|
+
? `${implementation} is supported, but no host implementation ran it, so nothing was evaluated`
|
|
140
|
+
: `${implementation} is supported`, { implementation });
|
|
141
|
+
}));
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=checks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checks.js","sourceRoot":"","sources":["../src/checks.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,SAAS,EACT,WAAW,EACX,sBAAsB,EACtB,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAKhC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AA4BzC,MAAM,SAAS,GAAG,CAAC,IAAU,EAAE,OAAe,EAAE,GAAW,EAAiB,EAAE;IAC5E,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,QAAQ;QACnC,IAAI,SAAS,CAAC,IAAI,KAAK,OAAO;YAC5B,KAAK,MAAM,KAAK,IAAI,SAAS,CAAC,MAAM;gBAClC,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,IAAK,KAAuB,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;oBACvF,MAAM,KAAK,GAAI,KAAuB,CAAC,KAAK,CAAC;oBAC7C,OAAO,MAAM,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC/E,CAAC;IACP,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AACF,qGAAqG;AACrG,SAAS,WAAW,CAClB,OAA2B;IAE3B,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,KAAK,MAAM,KAAK,IAAI,OAAO;QACzB,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;YAC7C,KAAK,MAAM,GAAG,IAAI,CAAC,eAAe,EAAE,gBAAgB,CAAU,EAAE,CAAC;gBAC/D,M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AK,SAAS;YACf,CAAC,CAAC,GAAG,cAAc,4EAA4E;YAC/F,CAAC,CAAC,GAAG,cAAc,eAAe,EACpC,EAAE,cAAc,EAAE,CACnB,CAAC;IACJ,CAAC,CAAC,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
|
-
import {
|
|
2
|
+
import { isProxy } from 'node:util/types';
|
|
3
3
|
import semver from 'semver';
|
|
4
4
|
import { parseStrictJson } from '../json.js';
|
|
5
5
|
/** OS09 DESC-02 initial limits. Collections are arrays and layout objects; names are unique per collection. */
|
|
@@ -239,7 +239,7 @@ export function snapshot(value, code, path, limits = { depth: 32, nodes: DESCRIP
|
|
|
239
239
|
typeof item === 'number' ||
|
|
240
240
|
item === undefined)
|
|
241
241
|
return item;
|
|
242
|
-
if (typeof item !== 'object' ||
|
|
242
|
+
if (typeof item !== 'object' || isProxy(item) || ancestors.has(item))
|
|
243
243
|
fault();
|
|
244
244
|
const object = item, array = Array.isArray(object), prototype = Object.getPrototypeOf(object);
|
|
245
245
|
if (array ? prototype !== Array.prototype : prototype !== Object.prototype && prototype !== null)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec.js","sourceRoot":"","sources":["../../src/descriptors/codec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7C,+GAA+G;AAC/G,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC7C,aAAa,EAAE,IAAI,GAAG,IAAI;IAC1B,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,IAAI;IACb,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,GAAG;IACT,OAAO,EA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